Mailing List Archive

NessusClient/nessus/prefs_dialog prefs_dialog.c,1.22,1.23
Update of /usr/local/cvs/NessusClient/nessus/prefs_dialog
In directory raccoon.nessus.org:/tmp/cvs-serv41749

Modified Files:
prefs_dialog.c
Log Message:
Replacing redundant and defunct code for access rules by a single
function call. This also removes any remains of depreacted GtkList methods.


Index: prefs_dialog.c
===================================================================
RCS file: /usr/local/cvs/NessusClient/nessus/prefs_dialog/prefs_dialog.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- prefs_dialog.c 6 Feb 2007 22:02:50 -0000 1.22
+++ prefs_dialog.c 20 Mar 2007 21:52:09 -0000 1.23
@@ -49,6 +49,8 @@
#include "prefs_report.h"
#include "prefs_scan_assistant.h"
#include "prefs_comment.h"
+#include "prefs_dialog_user.h"
+

#ifdef ENABLE_SAVE_KB
# include "prefs_kb.h"
@@ -1041,47 +1043,7 @@
/*
* User
*/
-
- t = arg_get_value(ctrls, "USER");
-
- gtkw = arg_get_value(t, "RULES");
- if(gtkw)
- {
- GtkWidget *item;
- GtkWidget *label;
-
- GList *dlist = NULL;
- GList *oldlist = (void *)arg_get_value(t, "RULES_DLIST");
- struct arglist *rules = arg_get_value(context->prefs, "RULES");
-
- if(oldlist)
- gtk_list_remove_items(GTK_LIST(gtkw), oldlist);
-
- while(rules && rules->next)
- {
- GtkWidget *box;
-
- if(strlen(rules->value))
- {
- item = gtk_list_item_new();
- gtk_object_set_data(GTK_OBJECT(item), "rule", rules->name);
- box = gtk_hbox_new(FALSE, 0);
- gtk_container_add(GTK_CONTAINER(item), box);
- gtk_widget_show(box);
- label = gtk_label_new(rules->value);
- gtk_widget_show(label);
- gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 0);
- dlist = g_list_append(dlist, item);
- rules = rules->next;
- gtk_widget_show(item);
- }
- }
- if(arg_get_value(t, "RULES_DLIST"))
- arg_set_value(t, "RULES_DLIST", -1, dlist);
- else
- arg_add_value(t, "RULES_DLIST", ARG_PTR, -1, dlist);
- gtk_list_append_items(GTK_LIST(gtkw), dlist);
- }
+ fill_rules_list(context, arg_get_value(MainDialog, "USER"));

#ifdef ENABLE_SAVE_KB
prefs_dialog_kb_set_prefs(arg_get_value(ctrls, "SAVE_KB"), context->prefs);

_______________________________________________
Nessus-cvs mailing list
Nessus-cvs@list.nessus.org
http://mail.nessus.org/mailman/listinfo/nessus-cvs