Avoid the need for a duplicate dialog-preferences.glade

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23331 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2013-10-25 19:03:00 +00:00
parent 5490605de2
commit d429a83792
4 changed files with 207 additions and 3758 deletions

View File

@ -1071,33 +1071,36 @@ gnc_preferences_dialog_create(void)
DEBUG("Opening dialog-preferences.glade:");
builder = gtk_builder_new();
#ifdef REGISTER2_ENABLED
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "auto_decimal_places_adj");
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "autosave_interval_minutes_adj");
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "save_on_close_adj");
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "date_backmonth_adj");
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "max_transactions_adj");
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "key_length_adj");
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "new_search_limit_adj");
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "retain_days_adj");
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "tab_width_adj");
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "date_formats");
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "GnuCash Preferences");
#else
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "auto_decimal_places_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "autosave_interval_minutes_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "save_on_close_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "date_backmonth_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "max_transactions_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "key_length_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "new_search_limit_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "retain_days_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "tab_width_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "date_formats");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "GnuCash Preferences");
#endif
dialog = GTK_WIDGET(gtk_builder_get_object (builder, "GnuCash Preferences"));
#ifndef REGISTER2_ENABLED
/* Hide preferences that are related to register2 */
box = GTK_WIDGET (gtk_builder_get_object (builder, "label14"));
gtk_widget_hide (box);
box = GTK_WIDGET (gtk_builder_get_object (builder, "pref/general.register/key-length"));
gtk_widget_hide (box);
box = GTK_WIDGET (gtk_builder_get_object (builder, "pref/general.register/show-extra-dates"));
gtk_widget_hide (box);
box = GTK_WIDGET (gtk_builder_get_object (builder, "pref/general.register/show-calendar-buttons"));
gtk_widget_hide (box);
box = GTK_WIDGET (gtk_builder_get_object (builder, "pref/general.register/selection-to-blank-on-expand"));
gtk_widget_hide (box);
box = GTK_WIDGET (gtk_builder_get_object (builder, "pref/general.register/show-extra-dates-on-selection"));
gtk_widget_hide (box);
#endif
label = GTK_WIDGET(gtk_builder_get_object (builder, "sample_account"));
g_object_set_data(G_OBJECT(dialog), "sample_account", label);

View File

@ -8,7 +8,6 @@ gtkbuilder_DATA = \
dialog-object-references.glade \
dialog-options.glade \
dialog-preferences.glade \
dialog-preferences2.glade \
dialog-query-view.glade \
dialog-reset-warnings.glade \
dialog-tax-table.glade \

View File

@ -1158,7 +1158,7 @@
</child>
<child>
<object class="GtkRadioButton" id="pref/general/date-completion-sliding">
<property name="label" translatable="yes">In a sliding 12-month window starting this
<property name="label" translatable="yes">In a sliding 12-month window starting this
many months before the current month:</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@ -1311,57 +1311,6 @@ many months before the current month:</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkLabel" id="label50">
<property name="visible">True</property>
@ -1833,6 +1782,15 @@ many months before the current month:</property>
<property name="x_padding">12</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkLabel" id="label84">
<property name="visible">True</property>
@ -1900,6 +1858,48 @@ many months before the current month:</property>
<property name="x_padding">12</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkCheckButton" id="pref/general/save-on-close-expires">
<property name="label" translatable="yes">Enable timeout on "Save changes on closing" question</property>
@ -1919,12 +1919,6 @@ many months before the current month:</property>
<property name="x_padding">12</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkLabel" id="label15">
<property name="visible">True</property>
@ -1993,6 +1987,12 @@ many months before the current month:</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkLabel" id="label19">
<property name="visible">True</property>
@ -2563,7 +2563,7 @@ many months before the current month:</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="n_rows">10</property>
<property name="n_rows">15</property>
<property name="n_columns">4</property>
<child>
<placeholder/>
@ -2589,6 +2589,12 @@ many months before the current month:</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkLabel" id="label63">
<property name="visible">True</property>
@ -2804,6 +2810,131 @@ many months before the current month:</property>
<property name="x_padding">12</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label14">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Number of _characters for auto complete:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">pref/general.register/key-length</property>
</object>
<packing>
<property name="top_attach">10</property>
<property name="bottom_attach">11</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
<property name="x_padding">12</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="pref/general.register/key-length">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_tooltip">True</property>
<property name="tooltip_markup">This sets the number of characters before auto complete starts for description, notes and memo fields.</property>
<property name="tooltip_text" translatable="yes">This sets the number of characters before auto complete starts for description, notes and memo fields.</property>
<property name="invisible_char">●</property>
<property name="invisible_char_set">True</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
<property name="adjustment">key_length_adj</property>
<property name="climb_rate">1</property>
<property name="snap_to_ticks">True</property>
<property name="numeric">True</property>
<property name="update_policy">if-valid</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">10</property>
<property name="bottom_attach">11</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="pref/general.register/show-extra-dates">
<property name="label" translatable="yes">Show the _entered and reconcile dates</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_markup">Show the date when the transaction was entered below the posted date and reconciled date on split row.</property>
<property name="tooltip_text" translatable="yes">Show the date when the transaction was entered below the posted date and reconciled date on split row.</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="right_attach">4</property>
<property name="top_attach">11</property>
<property name="bottom_attach">12</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
<property name="x_padding">12</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="pref/general.register/show-calendar-buttons">
<property name="label" translatable="yes">Show the calendar b_uttons</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_markup">Show the calendar buttons Cancel, Today and Select.</property>
<property name="tooltip_text" translatable="yes">Show the calendar buttons Cancel, Today and Select.</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="right_attach">4</property>
<property name="top_attach">13</property>
<property name="bottom_attach">14</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
<property name="x_padding">12</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="pref/general.register/selection-to-blank-on-expand">
<property name="label" translatable="yes">_Move the selection to the blank split on expand</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_markup">This will move the selection to the blank split when the transaction is expanded.</property>
<property name="tooltip_text" translatable="yes">This will move the selection to the blank split when the transaction is expanded.</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="right_attach">4</property>
<property name="top_attach">14</property>
<property name="bottom_attach">15</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
<property name="x_padding">12</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="pref/general.register/show-extra-dates-on-selection">
<property name="label" translatable="yes">_Show entered and reconciled dates on selection</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_markup">Show the entered date and reconciled date on transaction selection.</property>
<property name="tooltip_text" translatable="yes">Show the entered date and reconciled date on transaction selection.</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="right_attach">4</property>
<property name="top_attach">12</property>
<property name="bottom_attach">13</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
<property name="x_padding">12</property>
</packing>
</child>
<child>
<placeholder/>
</child>

File diff suppressed because it is too large Load Diff