|
GnuCash 2.4.99
|
Dialog for handling user preferences. More...
#include "config.h"#include <gtk/gtk.h>#include <glib/gi18n.h>#include "dialog-utils.h"#include "gnc-currency-edit.h"#include "gnc-date-edit.h"#include "gnc-gconf-utils.h"#include "gnc-gobject-utils.h"#include "gnc-period-select.h"#include "gnc-engine.h"#include "Account.h"#include "gnc-ui.h"#include "gnc-ui-util.h"#include "gnc-component-manager.h"#include "dialog-preferences.h"Go to the source code of this file.
Data Structures | |
| struct | addition_t |
| struct | copy_data |
Defines | |
| #define | DIALOG_PREFERENCES_CM_CLASS "dialog-newpreferences" |
| #define | GCONF_SECTION "dialogs/preferences" |
| #define | PREFIX_LEN sizeof("gconf/") - 1 |
| #define | WIDGET_HASH "widget_hash" |
| #define | NOTEBOOK "notebook" |
Typedefs | |
| typedef struct addition_t | addition |
Functions | |
| void | gnc_preferences_response_cb (GtkDialog *dialog, gint response, GtkDialog *unused) |
| 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) |
Variables | |
| GSList * | add_ins = NULL |
Dialog for handling user preferences.
These functions are the external API available for the new user preference dialog. Preferences are now stored in GConf. This code ends up being nothing more than a pretty interface to set key/value pairs in that 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 consistence it should probably be the same.
If a widget name is in the form gconf/xxx/yyy... and it is a type of widget this code knows how to handle, then the callback signals will be automatically wired up for the widget. This code currently knows about 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 six 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.c.
1.7.4