GnuCash
2.6.99
|
Dialog for handling user preferences. More...
Go to the source code of this file.
Functions | |
void | gnc_preferences_add_page (const gchar *filename, const gchar *widgetname, const gchar *tabname) |
void | gnc_preferences_add_to_page (const gchar *filename, const gchar *widgetname, const gchar *tabname) |
void | gnc_preferences_dialog (void) |
Dialog for handling user preferences.
These functions are the external API available for the user preference dialog. This dialog allows a user to modify several user preferences in the gnucash preferences database. Any module may add a page (or partial page) of preferences to the dialog. These additions are done by providing the name of a glade file and the content to load from that file along with a widget in that file. If a partial page is added, the widget name provided must be that of a GtkTable containing four columns. If a full page is added, the widget name provided to this code can be any kind of widget, but for consistency it should probably be the same.
If a widget name is in the form pref/aaa.bbb/ccc... and it is a type of widget this code knows how to handle, then the widget is bound to the preference named ccc in group aaa.bbb. This means that if the widget's value changes, the preference is automatically updated. The same goes the other way around. This code currently knows about font buttons, radio buttons, check buttons, spin boxes, combo boxes, gnucash currency select widgets, gnucash accounting period widgets, and a gnucash date edit widget. (Combo boxes should not be used for less than five choices. Use a radio button group instead.)
The argument is a glade file, so if your code has special requirements (e.g. make one widget insensitive until another is selected) feel free to go ahead and add your own callbacks to the glade file. This code will connect any callbacks that exist in the glade file.
Definition in file dialog-preferences.h.