|
GnuCash 2.3.0
|
Data Structures | |
| struct | addition_t |
| struct | copy_data |
Files | |
| file | dialog-preferences.c |
Dialog for handling user preferences. | |
| file | dialog-preferences.h |
Dialog for handling user preferences. | |
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 |
| typedef struct addition_t addition |
This data structure holds the information for a single addition to the preferences dialog.
| void gnc_preferences_add_page | ( | const gchar * | filename, |
| const gchar * | widgetname, | ||
| const gchar * | tabname | ||
| ) |
This function adds a full page of preferences to the preferences dialog. When the dialog is created, the specified widget will be pulled from the specified glade file and added to the preferences dialog with the specified tab name. The tab name may not be duplicated. For example, the Business code might have a full page of its own preferences.
| filename | The name of a glade file. |
| widgetname | The name of the widget to extract from the glade file. |
| tabname | The (translated!) name this page of preferences should have in the dialog notebook. |
Definition at line 292 of file dialog-preferences.c.
{
gnc_preferences_add_page_internal(filename, widgetname, tabname, TRUE);
}
| void gnc_preferences_add_to_page | ( | const gchar * | filename, |
| const gchar * | widgetname, | ||
| const gchar * | tabname | ||
| ) |
This function adds a partial page of preferences to the preferences dialog. When the dialog is created, the specified widget will be pulled from the specified glade file and added to the preferences dialog with the specified tab name. The tab name may be duplicated. For example, the HBCI preferences may share a "Data Import" page with QIF and other methods.
| filename | The name of a glade file. |
| widgetname | The name of the widget to extract from the glade file. |
| tabname | The (translated!) name this page of preferences should have in the dialog notebook. |
Definition at line 307 of file dialog-preferences.c.
{
gnc_preferences_add_page_internal(filename, widgetname, tabname, FALSE);
}
| void gnc_preferences_dialog | ( | void | ) |
This function creates the preferences dialog and presents it to the user. The preferences dialog is a singletone, so if a preferences dialog already exists it will be raised to the top of the window stack instead of creating a new dialog.
Definition at line 1874 of file dialog-preferences.c.
{
GtkWidget *dialog;
ENTER("");
if (gnc_forall_gui_components(DIALOG_PREFERENCES_CM_CLASS,
show_handler, NULL))
{
LEAVE("existing window");
return;
}
dialog = gnc_preferences_dialog_create();
gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(dialog));
gtk_widget_show(dialog);
gnc_gconf_add_notification(G_OBJECT(dialog), NULL,
gnc_preferences_gconf_changed,
DIALOG_PREFERENCES_CM_CLASS);
gnc_gconf_general_register_cb(KEY_ACCOUNT_SEPARATOR,
(GncGconfGeneralCb)gnc_account_separator_prefs_cb,
dialog);
gnc_register_gui_component(DIALOG_PREFERENCES_CM_CLASS,
NULL, close_handler, dialog);
LEAVE(" ");
}
| void gnc_preferences_response_cb | ( | GtkDialog * | dialog, |
| gint | response, | ||
| GtkDialog * | unused | ||
| ) |
Handle a user click on one of the buttons at the bottom of the preference dialog. Also handles delete_window events, which have conveniently converted to a response by GtkDialog.
Definition at line 1404 of file dialog-preferences.c.
{
switch (response)
{
case GTK_RESPONSE_HELP:
gnc_gnome_help(HF_HELP, HL_GLOBPREFS);
break;
default:
gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(dialog));
gnc_unregister_gui_component_by_data(DIALOG_PREFERENCES_CM_CLASS,
dialog);
gnc_gconf_general_remove_cb(
KEY_ACCOUNT_SEPARATOR,
(GncGconfGeneralCb)gnc_account_separator_prefs_cb,
dialog);
gnc_gconf_remove_notification(G_OBJECT(dialog), NULL,
DIALOG_PREFERENCES_CM_CLASS);
gtk_widget_destroy(GTK_WIDGET(dialog));
break;
}
}
| GSList* add_ins = NULL |
A list of all additions that have been made to the preferences dialog. The data fields for this list are addition data structures.
Definition at line 112 of file dialog-preferences.c.
1.7.4