X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fdsp_mainwindow.c;h=e819137b509e1297fa3809f6fdf2637facf2aebf;hb=88ee1e67be75d5618016c6f0685c91e38966774e;hp=ea62b80c3994e9c0e6cdbc8b1b80c4cffa62c63f;hpb=2ef3e601408ebaeeaf5f40d6967664b012a49979;p=chaz%2Fhomebank diff --git a/src/dsp_mainwindow.c b/src/dsp_mainwindow.c index ea62b80..e819137 100644 --- a/src/dsp_mainwindow.c +++ b/src/dsp_mainwindow.c @@ -22,6 +22,8 @@ #include "dsp_mainwindow.h" +#include "ext.h" + #include "list_account.h" #include "list_upcoming.h" #include "list_topspending.h" @@ -111,6 +113,8 @@ static void ui_mainwindow_action_export(void); static void ui_mainwindow_action_anonymize(void); static void ui_mainwindow_action_file_statistics(void); +static void ui_mainwindow_action_pluginprefs(void); + static void ui_mainwindow_action_help(void); void ui_mainwindow_action_help_welcome(void); static void ui_mainwindow_action_help_online(void); @@ -144,6 +148,8 @@ void ui_mainwindow_scheduled_postall(GtkWidget *widget, gpointer user_data); void ui_mainwindow_recent_add (struct hbfile_data *data, const gchar *path); +static void ui_mainwindow_showprefs(gint page); + extern gchar *CYA_ACC_TYPE[]; gchar *CYA_CATSUBCAT[] = { @@ -165,6 +171,7 @@ static GtkActionEntry entries[] = { { "TxnMenu" , NULL, N_("_Transactions"), NULL, NULL, NULL }, { "ReportMenu" , NULL, N_("_Reports"), NULL, NULL, NULL }, { "ToolsMenu" , NULL, N_("_Tools"), NULL, NULL, NULL }, + { "PluginMenu" , NULL, N_("_Plugins"), NULL, NULL, NULL }, { "HelpMenu" , NULL, N_("_Help"), NULL, NULL, NULL }, // { "Import" , NULL, N_("Import") }, @@ -219,6 +226,9 @@ static GtkActionEntry entries[] = { { "FileStats" , NULL , N_("File statistics...") , NULL, NULL, G_CALLBACK (ui_mainwindow_action_file_statistics) }, { "Anonymize" , NULL , N_("Anonymize...") , NULL, NULL, G_CALLBACK (ui_mainwindow_action_anonymize) }, + /* Plugins */ + { "PluginPreferences", "prf-plugins", N_("_Plugins..."), "U", N_("Configure plugin preferences"), G_CALLBACK(ui_mainwindow_action_pluginprefs) }, + /* HelpMenu */ { "Contents" , ICONNAME_HELP , N_("_Contents") , "F1", N_("Documentation about HomeBank"), G_CALLBACK (ui_mainwindow_action_help) }, { "Online" , "lpi-help" , N_("Get Help Online...") , NULL, N_("Connect to the LaunchPad website for online help"), G_CALLBACK (ui_mainwindow_action_help_online) }, @@ -308,6 +318,11 @@ static const gchar *ui_info = " " " " " " +" " +" " +" " +" " +" " " " " " " " @@ -340,6 +355,7 @@ static const gchar *ui_info = " " " " " " +" " " " ""; @@ -419,7 +435,8 @@ gchar *version; static const gchar *authors[] = { "Lead developer:\n" \ "Maxime DOYEN", - "\nContributor:\n" \ + "\nContributors:\n" \ + "Charles MCGARVEY (Plugin system, Perl support)\n" \ "Ga\xc3\xabtan LORIDANT (Maths formulas for charts)\n", NULL }; @@ -552,6 +569,12 @@ static void ui_mainwindow_action_file_statistics(void) } +static void ui_mainwindow_action_pluginprefs(void) +{ + ui_mainwindow_showprefs(PREF_PLUGINS); +} + + static void ui_mainwindow_action_properties(void) { create_defhbfile_dialog(); @@ -661,10 +684,15 @@ static void ui_mainwindow_action_defassign(void) static void ui_mainwindow_action_preferences(void) +{ + ui_mainwindow_showprefs(PREF_GENERAL); +} + +static void ui_mainwindow_showprefs(gint page) { struct hbfile_data *data = g_object_get_data(G_OBJECT(GLOBALS->mainwindow), "inst_data"); - defpref_dialog_new(); + defpref_dialog_new(page); if(!PREFS->euro_active) { GtkToggleAction *action = (GtkToggleAction *)gtk_ui_manager_get_action(data->manager, "/MenuBar/ViewMenu/AsMinor"); @@ -2343,6 +2371,9 @@ struct hbfile_data *data = user_data; struct WinGeometry *wg; gboolean retval = FALSE; + GValue widget_value = G_VALUE_INIT; + ext_hook("main_window_disposal", EXT_OBJECT(&widget_value, widget), NULL); + DB( g_print("\n[ui-mainwindow] dispose\n") ); //store position and size