r20592 - gnucash/trunk/src - Convert Account dialog from libglade to gtkbuilder

Geert Janssens gjanssens at code.gnucash.org
Sat Apr 23 10:52:55 EDT 2011


Author: gjanssens
Date: 2011-04-23 10:52:54 -0400 (Sat, 23 Apr 2011)
New Revision: 20592
Trac: http://svn.gnucash.org/trac/changeset/20592

Modified:
   gnucash/trunk/src/gnome-utils/dialog-account.c
   gnucash/trunk/src/gnome/glade/account.glade
   gnucash/trunk/src/gnome/gtkbuilder/account.glade
Log:
Convert Account dialog from libglade to gtkbuilder

Modified: gnucash/trunk/src/gnome/glade/account.glade
===================================================================
--- gnucash/trunk/src/gnome/glade/account.glade	2011-04-23 14:52:42 UTC (rev 20591)
+++ gnucash/trunk/src/gnome/glade/account.glade	2011-04-23 14:52:54 UTC (rev 20592)
@@ -1,823 +1,7 @@
 <?xml version="1.0"?>
 <glade-interface>
   <!-- interface-requires gtk+ 2.10 -->
-  <requires lib="gnome"/>
-  <!-- interface-requires gnome 2115.57576 -->
   <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkDialog" id="Account Dialog">
-    <property name="border_width">6</property>
-    <property name="title" translatable="yes">New Account</property>
-    <property name="window_position">center</property>
-    <property name="type_hint">dialog</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox12">
-        <property name="visible">True</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">6</property>
-        <child>
-          <widget class="GtkNotebook" id="account_notebook">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="border_width">5</property>
-            <child>
-              <widget class="GtkVBox" id="vbox75">
-                <property name="visible">True</property>
-                <property name="border_width">6</property>
-                <property name="orientation">vertical</property>
-                <property name="spacing">18</property>
-                <child>
-                  <widget class="GtkTable" id="table">
-                    <property name="visible">True</property>
-                    <property name="n_rows">2</property>
-                    <property name="n_columns">2</property>
-                    <property name="row_spacing">6</property>
-                    <child>
-                      <widget class="GtkLabel" id="label">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Identification&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="right_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label1">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label">    </property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkTable" id="table3">
-                        <property name="visible">True</property>
-                        <property name="n_rows">9</property>
-                        <property name="n_columns">2</property>
-                        <property name="column_spacing">12</property>
-                        <property name="row_spacing">6</property>
-                        <child>
-                          <widget class="GtkLabel" id="label2">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Account _name:</property>
-                            <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">name_entry</property>
-                          </widget>
-                          <packing>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label3">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">_Account code:</property>
-                            <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">code_entry</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label4">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">_Description:</property>
-                            <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">description_entry</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="security_label">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">_Security/currency:</property>
-                            <property name="use_underline">True</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkHBox" id="commodity_hbox">
-                            <property name="visible">True</property>
-                            <child>
-                              <placeholder/>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label5">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Smallest _fraction:</property>
-                            <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">account_scu</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">4</property>
-                            <property name="bottom_attach">5</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label6">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Account _Color:</property>
-                            <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">color_entry_button</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">5</property>
-                            <property name="bottom_attach">6</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkHBox" id="color_hbox">
-                            <property name="visible">True</property>
-                            <property name="spacing">3</property>
-                            <child>
-                              <widget class="GtkColorButton" id="color_entry_button">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">True</property>
-                                <property name="color">#ededececebeb</property>
-                              </widget>
-                              <packing>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkButton" id="color_default_button">
-                                <property name="label" translatable="yes">Default</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">True</property>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">5</property>
-                            <property name="bottom_attach">6</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label7">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="yalign">0</property>
-                            <property name="label" translatable="yes">No_tes:</property>
-                            <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">notes_text</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">6</property>
-                            <property name="bottom_attach">7</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="tax_related_button">
-                            <property name="label" translatable="yes">Ta_x related</property>
-                            <property name="visible">True</property>
-                            <property name="sensitive">False</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="tooltip" translatable="yes">Use Edit-&gt;Tax Report Options to set the tax-related flag and assign a tax code to this account.</property>
-                            <property name="use_underline">True</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">7</property>
-                            <property name="bottom_attach">8</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="placeholder_button">
-                            <property name="label" translatable="yes">Placeholde_r</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="tooltip" translatable="yes">This account is present solely as a placeholder in the hierarchy.  Transactions may not be posted to this account, only to sub-accounts of this account.</property>
-                            <property name="use_underline">True</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">8</property>
-                            <property name="bottom_attach">9</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="hidden_button">
-                            <property name="label" translatable="yes">H_idden</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="tooltip" translatable="yes">This account (and any sub-accounts) will be hidden in the account tree and will not appear in the popup account list in the register.  To reset this option, you will first need to open the "Filter By..." dialog for the account tree and check the "show hidden accounts" option.  Doing so will allow you to select the account and reopen this dialog.</property>
-                            <property name="use_underline">True</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">7</property>
-                            <property name="bottom_attach">8</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="name_entry">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="has_focus">True</property>
-                            <property name="activates_default">True</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="code_entry">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="activates_default">True</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="description_entry">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="activates_default">True</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkScrolledWindow" id="scrolledwindow9">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="hscrollbar_policy">automatic</property>
-                            <property name="vscrollbar_policy">automatic</property>
-                            <property name="shadow_type">in</property>
-                            <child>
-                              <widget class="GtkTextView" id="notes_text">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="wrap_mode">word</property>
-                              </widget>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">6</property>
-                            <property name="bottom_attach">7</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEventBox" id="eventbox1">
-                            <property name="visible">True</property>
-                            <property name="tooltip" translatable="yes">Smallest fraction of this commodity that can be referenced.</property>
-                            <child>
-                              <widget class="GtkComboBox" id="account_scu">
-                                <property name="visible">True</property>
-                                <property name="items" translatable="yes">Use Commodity Value
-1
-1/10
-1/100
-1/1000
-1/10000
-1/100000
-1/1000000</property>
-                              </widget>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">4</property>
-                            <property name="bottom_attach">5</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="y_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkTable" id="table4">
-                    <property name="visible">True</property>
-                    <property name="n_rows">2</property>
-                    <property name="n_columns">5</property>
-                    <property name="row_spacing">6</property>
-                    <child>
-                      <widget class="GtkLabel" id="type_label">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Acco_unt Type&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">type_view</property>
-                      </widget>
-                      <packing>
-                        <property name="right_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label8">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label">    </property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label9">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label">    </property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="right_attach">3</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="parent_label">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">&lt;b&gt;_Parent Account&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">3</property>
-                        <property name="right_attach">5</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label10">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label">    </property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">3</property>
-                        <property name="right_attach">4</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow32">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">never</property>
-                        <property name="vscrollbar_policy">automatic</property>
-                        <property name="shadow_type">in</property>
-                        <child>
-                          <widget class="GtkTreeView" id="type_view">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="headers_visible">False</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="parent_scroll">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="hscrollbar_policy">automatic</property>
-                        <property name="vscrollbar_policy">automatic</property>
-                        <property name="shadow_type">in</property>
-                        <child>
-                          <placeholder/>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">4</property>
-                        <property name="right_attach">5</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="y_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label11">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">General</property>
-                <property name="justify">center</property>
-              </widget>
-              <packing>
-                <property name="tab_fill">False</property>
-                <property name="type">tab</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkVBox" id="vbox118">
-                <property name="visible">True</property>
-                <property name="border_width">6</property>
-                <property name="orientation">vertical</property>
-                <child>
-                  <widget class="GtkTable" id="table11">
-                    <property name="visible">True</property>
-                    <property name="n_rows">8</property>
-                    <property name="n_columns">2</property>
-                    <property name="column_spacing">12</property>
-                    <property name="row_spacing">6</property>
-                    <child>
-                      <widget class="GtkLabel" id="label8477432">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label8477394">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Balance Information&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="right_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label8477433">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Initial Balance Transfer&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">4</property>
-                        <property name="bottom_attach">5</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkHBox" id="opening_balance_box">
-                        <property name="visible">True</property>
-                        <child>
-                          <placeholder/>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment18">
-                        <property name="visible">True</property>
-                        <property name="left_padding">24</property>
-                        <child>
-                          <widget class="GtkScrolledWindow" id="transfer_account_scroll">
-                            <property name="visible">True</property>
-                            <property name="sensitive">False</property>
-                            <property name="can_focus">False</property>
-                            <property name="border_width">3</property>
-                            <property name="hscrollbar_policy">automatic</property>
-                            <property name="vscrollbar_policy">automatic</property>
-                            <child>
-                              <placeholder/>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">7</property>
-                        <property name="bottom_attach">8</property>
-                        <property name="x_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkHBox" id="opening_balance_date_box">
-                        <property name="visible">True</property>
-                        <child>
-                          <widget class="GnomeDateEdit" id="opening_balance_date_edit">
-                            <property name="visible">True</property>
-                            <property name="dateedit_flags">GNOME_DATE_EDIT_SHOW_TIME | GNOME_DATE_EDIT_24_HR</property>
-                          </widget>
-                          <packing>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                        <property name="y_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment14">
-                        <property name="visible">True</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkLabel" id="balance_label">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">_Balance:</property>
-                            <property name="use_underline">True</property>
-                            <property name="justify">right</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment15">
-                        <property name="visible">True</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkLabel" id="label847738">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">_Date:</property>
-                            <property name="use_underline">True</property>
-                            <property name="justify">right</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment16">
-                        <property name="visible">True</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkRadioButton" id="opening_equity_radio">
-                            <property name="label" translatable="yes">_Use equity 'Opening Balances' account</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="use_underline">True</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">5</property>
-                        <property name="bottom_attach">6</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment17">
-                        <property name="visible">True</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkRadioButton" id="radiobutton8">
-                            <property name="label" translatable="yes">_Select transfer account</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="use_underline">True</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">opening_equity_radio</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">6</property>
-                        <property name="bottom_attach">7</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label847739">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">Opening Balance</property>
-                <property name="justify">center</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-                <property name="tab_fill">False</property>
-                <property name="type">tab</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area12">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <widget class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="response_id">-6</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="response_id">-5</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="button72">
-                <property name="label">gtk-help</property>
-                <property name="response_id">-11</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
   <widget class="GtkDialog" id="Account Picker">
     <property name="visible">True</property>
     <property name="title" translatable="yes">Select Account</property>

Modified: gnucash/trunk/src/gnome/gtkbuilder/account.glade
===================================================================
--- gnucash/trunk/src/gnome/gtkbuilder/account.glade	2011-04-23 14:52:42 UTC (rev 20591)
+++ gnucash/trunk/src/gnome/gtkbuilder/account.glade	2011-04-23 14:52:54 UTC (rev 20592)
@@ -2,9 +2,9 @@
 <interface>
   <requires lib="gtk+" version="2.16"/>
   <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkListStore" id="liststore1">
+  <object class="GtkListStore" id="fraction_liststore">
     <columns>
-      <!-- column-name item -->
+      <!-- column-name Fractions -->
       <column type="gchararray"/>
     </columns>
     <data>
@@ -39,6 +39,7 @@
     <property name="title" translatable="yes">New Account</property>
     <property name="window_position">center</property>
     <property name="type_hint">dialog</property>
+    <signal name="destroy" handler="gnc_account_window_destroy_cb"/>
     <child internal-child="vbox">
       <object class="GtkVBox" id="dialog-vbox12">
         <property name="visible">True</property>
@@ -218,6 +219,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">True</property>
+                                <signal name="clicked" handler="gnc_account_color_default_cb"/>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
@@ -310,6 +312,8 @@
                             <property name="can_focus">True</property>
                             <property name="has_focus">True</property>
                             <property name="activates_default">True</property>
+                            <signal name="changed" handler="gnc_account_name_changed_cb"/>
+                            <signal name="insert_text" handler="gnc_account_name_insert_text_cb"/>
                           </object>
                           <packing>
                             <property name="left_attach">1</property>
@@ -376,9 +380,9 @@
                             <child>
                               <object class="GtkComboBox" id="account_scu">
                                 <property name="visible">True</property>
-                                <property name="model">liststore1</property>
+                                <property name="model">fraction_liststore</property>
                                 <child>
-                                  <object class="GtkCellRendererText" id="cellrenderertext1"/>
+                                  <object class="GtkCellRendererText" id="acct_scu_renderer"/>
                                   <attributes>
                                     <attribute name="text">0</attribute>
                                   </attributes>
@@ -712,6 +716,7 @@
                             <property name="receives_default">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
+                            <signal name="toggled" handler="opening_equity_cb"/>
                           </object>
                         </child>
                       </object>
@@ -1693,6 +1698,9 @@
                 <property name="y_options"></property>
               </packing>
             </child>
+            <child>
+              <placeholder/>
+            </child>
           </object>
           <packing>
             <property name="position">2</property>

Modified: gnucash/trunk/src/gnome-utils/dialog-account.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-account.c	2011-04-23 14:52:42 UTC (rev 20591)
+++ gnucash/trunk/src/gnome-utils/dialog-account.c	2011-04-23 14:52:54 UTC (rev 20592)
@@ -24,7 +24,7 @@
 
 #include "config.h"
 
-#include <gnome.h>
+#include <gtk/gtk.h>
 #include <glib/gi18n.h>
 #include <math.h>
 #ifdef G_OS_WIN32
@@ -41,6 +41,7 @@
 #include "gnc-commodity.h"
 #include "gnc-commodity-edit.h"
 #include "gnc-component-manager.h"
+#include "gnc-date-edit.h"
 #include "gnc-engine.h"
 #include "gnc-gui-query.h"
 #include "gnc-session.h"
@@ -145,6 +146,16 @@
 void gnc_account_renumber_interval_changed_cb (GtkSpinButton *spinbutton, RenumberDialog *data);
 void gnc_account_renumber_response_cb (GtkDialog *dialog, gint response, RenumberDialog *data);
 
+G_MODULE_EXPORT void gnc_account_window_destroy_cb (GtkObject *object, gpointer data);
+G_MODULE_EXPORT void opening_equity_cb (GtkWidget *w, gpointer data);
+G_MODULE_EXPORT void gnc_account_name_changed_cb(GtkWidget *widget, gpointer data);
+G_MODULE_EXPORT void gnc_account_color_default_cb(GtkWidget *widget, gpointer data);
+G_MODULE_EXPORT void gnc_account_name_insert_text_cb (GtkWidget   *entry,
+                                                      const gchar *text,
+                                                      gint         length,
+                                                      gint        *position,
+                                                      gpointer     data);
+
 /** Implementation *******************************************************/
 
 static void
@@ -443,8 +454,8 @@
     if (gnc_reverse_balance (account))
         balance = gnc_numeric_neg (balance);
 
-    date = gnome_date_edit_get_time (
-               GNOME_DATE_EDIT (aw->opening_balance_date_edit));
+    date = gnc_date_edit_get_date (
+               GNC_DATE_EDIT (aw->opening_balance_date_edit));
 
     use_equity = gtk_toggle_button_get_active
                  (GTK_TOGGLE_BUTTON (aw->opening_equity_radio));
@@ -707,7 +718,7 @@
 }
 
 
-static gboolean
+G_MODULE_EXPORT static gboolean
 gnc_filter_parent_accounts (Account *account, gpointer data)
 {
     AccountWindow *aw = data;
@@ -907,7 +918,7 @@
     LEAVE(" ");
 }
 
-static void
+G_MODULE_EXPORT static void
 gnc_account_window_response_cb (GtkDialog *dialog,
                                 gint response,
                                 gpointer data)
@@ -958,7 +969,7 @@
     LEAVE(" ");
 }
 
-static void
+G_MODULE_EXPORT void
 gnc_account_window_destroy_cb (GtkObject *object, gpointer data)
 {
     AccountWindow *aw = data;
@@ -1007,7 +1018,7 @@
     LEAVE(" ");
 }
 
-static void
+G_MODULE_EXPORT static void
 gnc_account_parent_changed_cb (GtkTreeSelection *selection, gpointer data)
 {
     AccountWindow *aw = data;
@@ -1069,7 +1080,7 @@
     gnc_account_window_set_name(aw);
 }
 
-static void
+G_MODULE_EXPORT static void
 gnc_account_type_changed_cb (GtkTreeSelection *selection, gpointer data)
 {
     AccountWindow *aw = data;
@@ -1167,7 +1178,7 @@
     gnc_tree_model_account_types_set_selection(selection, 1 << aw->type);
 }
 
-static void
+G_MODULE_EXPORT void
 gnc_account_name_insert_text_cb (GtkWidget   *entry,
                                  const gchar *text,
                                  gint         length,
@@ -1197,7 +1208,7 @@
     g_strfreev ( strsplit );
 }
 
-static void
+G_MODULE_EXPORT void
 gnc_account_name_changed_cb(GtkWidget *widget, gpointer data)
 {
     AccountWindow *aw = data;
@@ -1205,7 +1216,7 @@
     gnc_account_window_set_name (aw);
 }
 
-static void
+G_MODULE_EXPORT void
 gnc_account_color_default_cb(GtkWidget *widget, gpointer data)
 {
     GdkColor color;
@@ -1216,7 +1227,7 @@
 
 }
 
-static void
+G_MODULE_EXPORT static void
 commodity_changed_cb (GNCGeneralSelect *gsl, gpointer data)
 {
     AccountWindow *aw = data;
@@ -1269,7 +1280,7 @@
     return gnc_commodity_equiv (xaccAccountGetCommodity (account), commodity);
 }
 
-static void
+G_MODULE_EXPORT void
 opening_equity_cb (GtkWidget *w, gpointer data)
 {
     AccountWindow *aw = data;
@@ -1291,49 +1302,38 @@
 gnc_account_window_create(AccountWindow *aw)
 {
     GtkWidget *amount;
+    GtkWidget *date_edit;
     GObject *awo;
     GtkWidget *box;
     GtkWidget *label;
-    GladeXML  *xml;
+    GtkBuilder  *builder;
     GtkTreeSelection *selection;
 
     ENTER("aw %p, modal %d", aw, aw->modal);
-    xml = gnc_glade_xml_new ("account.glade", "Account Dialog");
+    builder = gtk_builder_new();
+    gnc_builder_add_from_file (builder, "account.glade", "fraction_liststore");
+    gnc_builder_add_from_file (builder, "account.glade", "Account Dialog");
 
-    aw->dialog = glade_xml_get_widget (xml, "Account Dialog");
+    aw->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "Account Dialog"));
     awo = G_OBJECT (aw->dialog);
 
     g_object_set_data (awo, "dialog_info", aw);
 
-    g_signal_connect (awo, "destroy",
-                      G_CALLBACK (gnc_account_window_destroy_cb), aw);
-
     if (!aw->modal)
         g_signal_connect (awo, "response",
                           G_CALLBACK (gnc_account_window_response_cb), aw);
     else
         gtk_window_set_modal (GTK_WINDOW (aw->dialog), TRUE);
 
-    aw->notebook = glade_xml_get_widget (xml, "account_notebook");
+    aw->notebook = GTK_WIDGET(gtk_builder_get_object (builder, "account_notebook"));
+    aw->name_entry = GTK_WIDGET(gtk_builder_get_object (builder, "name_entry"));
+    aw->description_entry = GTK_WIDGET(gtk_builder_get_object (builder, "description_entry"));
+    aw->color_entry_button = GTK_WIDGET(gtk_builder_get_object (builder, "color_entry_button"));
+    aw->color_default_button = GTK_WIDGET(gtk_builder_get_object (builder, "color_default_button"));
+    aw->code_entry =        GTK_WIDGET(gtk_builder_get_object (builder, "code_entry"));
+    aw->notes_text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (GTK_WIDGET(gtk_builder_get_object (builder, "notes_text"))));
 
-    aw->name_entry = glade_xml_get_widget (xml, "name_entry");
-    g_signal_connect (G_OBJECT (aw->name_entry), "insert-text",
-                      G_CALLBACK (gnc_account_name_insert_text_cb), aw);
-    g_signal_connect (G_OBJECT (aw->name_entry), "changed",
-                      G_CALLBACK (gnc_account_name_changed_cb), aw);
-
-    aw->description_entry = glade_xml_get_widget (xml, "description_entry");
-
-    aw->color_entry_button = glade_xml_get_widget (xml, "color_entry_button");
-
-    aw->color_default_button = glade_xml_get_widget (xml, "color_default_button");
-    g_signal_connect (G_OBJECT (aw->color_default_button), "clicked",
-                      G_CALLBACK (gnc_account_color_default_cb), aw);
-
-    aw->code_entry =        glade_xml_get_widget (xml, "code_entry");
-    aw->notes_text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (glade_xml_get_widget (xml, "notes_text")));
-
-    box = glade_xml_get_widget (xml, "commodity_hbox");
+    box = GTK_WIDGET(gtk_builder_get_object (builder, "commodity_hbox"));
     aw->commodity_edit = gnc_general_select_new (GNC_GENERAL_SELECT_TYPE_SELECT,
                          gnc_commodity_edit_get_string,
                          gnc_commodity_edit_new_select,
@@ -1341,15 +1341,15 @@
     gtk_box_pack_start(GTK_BOX(box), aw->commodity_edit, TRUE, TRUE, 0);
     gtk_widget_show (aw->commodity_edit);
 
-    label = glade_xml_get_widget (xml, "security_label");
+    label = GTK_WIDGET(gtk_builder_get_object (builder, "security_label"));
     gnc_general_select_make_mnemonic_target (GNC_GENERAL_SELECT(aw->commodity_edit), label);
 
     g_signal_connect (G_OBJECT (aw->commodity_edit), "changed",
                       G_CALLBACK (commodity_changed_cb), aw);
 
-    aw->account_scu = glade_xml_get_widget (xml, "account_scu");
+    aw->account_scu = GTK_WIDGET(gtk_builder_get_object (builder, "account_scu"));
 
-    box = glade_xml_get_widget (xml, "parent_scroll");
+    box = GTK_WIDGET(gtk_builder_get_object (builder, "parent_scroll"));
 
     aw->parent_tree = gnc_tree_view_account_new(TRUE);
     gtk_container_add(GTK_CONTAINER(box), GTK_WIDGET(aw->parent_tree));
@@ -1358,32 +1358,33 @@
     g_signal_connect (G_OBJECT (selection), "changed",
                       G_CALLBACK (gnc_account_parent_changed_cb), aw);
 
-    aw->tax_related_button = glade_xml_get_widget (xml, "tax_related_button");
-    aw->placeholder_button = glade_xml_get_widget (xml, "placeholder_button");
-    aw->hidden_button = glade_xml_get_widget (xml, "hidden_button");
+    aw->tax_related_button = GTK_WIDGET(gtk_builder_get_object (builder, "tax_related_button"));
+    aw->placeholder_button = GTK_WIDGET(gtk_builder_get_object (builder, "placeholder_button"));
+    aw->hidden_button = GTK_WIDGET(gtk_builder_get_object (builder, "hidden_button"));
 
-    box = glade_xml_get_widget (xml, "opening_balance_box");
+    box = GTK_WIDGET(gtk_builder_get_object (builder, "opening_balance_box"));
     amount = gnc_amount_edit_new ();
     aw->opening_balance_edit = amount;
     gtk_box_pack_start(GTK_BOX(box), amount, TRUE, TRUE, 0);
     gnc_amount_edit_set_evaluate_on_enter (GNC_AMOUNT_EDIT (amount), TRUE);
     gtk_widget_show (amount);
 
-    label = glade_xml_get_widget (xml, "balance_label");
+    label = GTK_WIDGET(gtk_builder_get_object (builder, "balance_label"));
     gtk_label_set_mnemonic_widget (GTK_LABEL(label), amount);
 
-    box = glade_xml_get_widget (xml, "opening_balance_date_box");
-    aw->opening_balance_date_edit = glade_xml_get_widget (xml, "opening_balance_date_edit");
+    box = GTK_WIDGET(gtk_builder_get_object (builder, "opening_balance_date_box"));
+    date_edit = gnc_date_edit_new (time (NULL), 1, 1);
+    aw->opening_balance_date_edit = date_edit;
+    gtk_box_pack_start(GTK_BOX(box), date_edit, TRUE, TRUE, 0);
+    gtk_widget_show (date_edit);
 
     aw->opening_balance_page =
         gtk_notebook_get_nth_page (GTK_NOTEBOOK (aw->notebook), 1);
 
-    aw->opening_equity_radio = glade_xml_get_widget (xml,
-                               "opening_equity_radio");
-    g_signal_connect (G_OBJECT (aw->opening_equity_radio), "toggled",
-                      G_CALLBACK (opening_equity_cb), aw);
+    aw->opening_equity_radio = GTK_WIDGET(gtk_builder_get_object (builder,
+                               "opening_equity_radio"));
 
-    box = glade_xml_get_widget (xml, "transfer_account_scroll");
+    box = GTK_WIDGET(gtk_builder_get_object (builder, "transfer_account_scroll"));
     aw->transfer_account_scroll = box;
 
     aw->transfer_tree = GTK_WIDGET(gnc_tree_view_account_new(FALSE));
@@ -1393,16 +1394,20 @@
     gtk_container_add(GTK_CONTAINER(box), GTK_WIDGET(aw->transfer_tree));
     gtk_widget_show (GTK_WIDGET(aw->transfer_tree));
 
-    label = glade_xml_get_widget (xml, "parent_label");
+    label = GTK_WIDGET(gtk_builder_get_object (builder, "parent_label"));
     gtk_label_set_mnemonic_widget (GTK_LABEL(label), GTK_WIDGET(aw->parent_tree));
 
     /* This goes at the end so the select callback has good data. */
-    aw->type_view = glade_xml_get_widget (xml, "type_view");
+    aw->type_view = GTK_WIDGET(gtk_builder_get_object (builder, "type_view"));
     gnc_account_type_view_create (aw);
 
     gnc_restore_window_size (GCONF_SECTION, GTK_WINDOW(aw->dialog));
 
     gtk_widget_grab_focus(GTK_WIDGET(aw->name_entry));
+
+    gtk_builder_connect_signals(builder, aw);
+    g_object_unref(G_OBJECT(builder));
+
     LEAVE(" ");
 }
 



More information about the gnucash-changes mailing list