
jan at nessus
May 18, 2006, 7:50 AM
Post #1 of 1
(639 views)
Permalink
|
|
NessusClient/nessus/prefs_dialog prefs_dialog.c,1.14,1.15
|
|
Update of /usr/local/cvs/NessusClient/nessus/prefs_dialog In directory raccoon.nessus.org:/tmp/cvs-serv36573 Modified Files: prefs_dialog.c Log Message: 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.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- prefs_dialog.c 17 May 2006 12:34:57 -0000 1.14 +++ prefs_dialog.c 18 May 2006 14:50:35 -0000 1.15 @@ -82,6 +82,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 @@ -108,6 +109,23 @@ } /* + * Save the current global settings to ~/.nessusrc + */ +void +save_global_settings(menuitem, ctrls) + GtkWidget *menuitem; + gpointer ctrls; +{ + prefs_context_update(Global); + 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 @@ -379,6 +397,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); @@ -1512,6 +1534,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
|