GnuCash  5.6-133-gc519490283+
Data Structures | Typedefs | Functions
Options Dialog

Data Structures

class  GncOptionsDialog
 

Typedefs

typedef void(* GncOptionsDialogCallback) (GncOptionsDialog *, void *data)
 

Functions

void gnc_business_options_gnome_initialize (void)
 Set up the business and counters pages in the File Preferences dialog.
 
void gnc_options_dialog_set_new_book_option_values (GncOptionDB *odb)
 Set the initial values of new book options to values specified in user preferences. More...
 

Detailed Description

Function Documentation

◆ gnc_options_dialog_set_new_book_option_values()

void gnc_options_dialog_set_new_book_option_values ( GncOptionDB odb)

Set the initial values of new book options to values specified in user preferences.

Nothing to do with GncOptionsDialog, but it depends on Gtk and s used in both assistant-hierarchy and gnc-main-window.

Parameters
odbThe book's options database.

Definition at line 692 of file dialog-options.cpp.

693 {
694  if (!odb) return;
695  auto num_split_action = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL,
696  GNC_PREF_NUM_SOURCE);
697  if (num_split_action)
698  {
699  auto option{odb->find_option(OPTION_SECTION_ACCOUNTS,
700  OPTION_NAME_NUM_FIELD_SOURCE)};
701  auto num_source_button{option_get_gtk_widget(option)};
702  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (num_source_button),
703  num_split_action);
704  }
705 }
gboolean gnc_prefs_get_bool(const gchar *group, const gchar *pref_name)
Get a boolean value from the preferences backend.