
jan at nessus
May 22, 2006, 5:43 AM
Post #1 of 1
(656 views)
Permalink
|
|
NessusClient/nessus/prefs_dialog prefs_dialog.c,1.10.2.2,1.10.2.3
|
|
Update of /usr/local/cvs/NessusClient/nessus/prefs_dialog In directory raccoon.nessus.org:/tmp/cvs-serv90339 Modified Files: Tag: release-1-0 prefs_dialog.c Log Message: Backport from HEAD: Added a menu item for saving the global settings. Take care, the plugin prefs are synced when a scan is executed. Index: prefs_dialog.c =================================================================== RCS file: /usr/local/cvs/NessusClient/nessus/prefs_dialog/prefs_dialog.c,v retrieving revision 1.10.2.2 retrieving revision 1.10.2.3 diff -u -d -r1.10.2.2 -r1.10.2.3 --- prefs_dialog.c 17 May 2006 12:41:13 -0000 1.10.2.2 +++ prefs_dialog.c 22 May 2006 12:43:41 -0000 1.10.2.3 @@ -76,6 +76,7 @@ static void prefs_dialog_set_tooltips(struct arglist *); +static void prefs_dialog_apply_plugin_prefs(struct nessus_plugin *); /* * launch the users manual pdf document with the configure @@ -102,6 +103,22 @@ } /* + * Save the current global settings to ~/.nessusrc + */ +void +save_global_settings(menuitem, ctrls) + GtkWidget *menuitem; + gpointer ctrls; +{ + prefs_dialog_apply(Global, ctrls); + prefs_dialog_apply_plugin_prefs(Global->plugins); + prefs_dialog_apply_plugin_prefs(Global->scanners); + context_sync_plugin_prefs(Global); + preferences_save(Global); + show_info(_("The global settings have been saved.")); +} + +/* * Toggle Toolbar on/off */ void @@ -370,6 +387,10 @@ menuitem_add(menuitem, submenu, "PREFERENCES_MENUITEM", NULL, GTK_SIGNAL_FUNC(prefs_dialog_prefs)); + menuitem = gtk_image_menu_item_new_with_mnemonic(_("Save _Global Settings")); + menuitem_add(menuitem, submenu, NULL, "gtk-save", + GTK_SIGNAL_FUNC(save_global_settings)); + menuitem_separator(submenu); menuitem = gtk_image_menu_item_new_from_stock("gtk-quit", accel_group); @@ -1503,6 +1524,7 @@ prefs_dialog_apply(context, ctrls); prefs_dialog_apply_plugin_prefs(context->plugins); prefs_dialog_apply_plugin_prefs(context->scanners); + context_sync_plugin_prefs(context); /* * Check for the errors _______________________________________________ Nessus-cvs mailing list Nessus-cvs [at] list http://mail.nessus.org/mailman/listinfo/nessus-cvs
|