Mailing List Archive

NessusClient/nessus/prefs_dialog prefs_dialog_user.c,1.5,1.6
Update of /usr/local/cvs/NessusClient/nessus/prefs_dialog
In directory raccoon.nessus.org:/tmp/cvs-serv63555

Modified Files:
prefs_dialog_user.c
Log Message:
Fixed the adding of user rules. The bug was introduced
during migration from GtkCombo to GtkComboBoxEntry. It
should have been to GtkComboBox.


Index: prefs_dialog_user.c
===================================================================
RCS file: /usr/local/cvs/NessusClient/nessus/prefs_dialog/prefs_dialog_user.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- prefs_dialog_user.c 19 Oct 2006 21:51:08 -0000 1.5
+++ prefs_dialog_user.c 19 Mar 2007 22:23:09 -0000 1.6
@@ -176,10 +176,11 @@
GtkWidget * w;
struct arglist * ctrls;
{
- GtkComboBoxEntry * action_combo;
+ GtkComboBox * action_combo;
GtkEntry * target_entry;
GtkWidget * tree;
GtkTreeStore * store;
+ GtkTreeModel * model;
GtkTreeIter iter, parent;
char * action = NULL;
char * target = NULL;
@@ -187,7 +188,14 @@
GtkTreePath * path;

action_combo = arg_get_value(ctrls, "ACTION");
- action = (char *)gtk_entry_get_text(GTK_ENTRY(GTK_BIN(action_combo)->child));
+ /* XXX: Once the GTK+ minimum version is 2.6, this line
+ * can replace the following if construct:
+ * action = (char *)gtk_combo_box_get_active_text(action_combo);
+ */
+ if (gtk_combo_box_get_active_iter (action_combo, &iter)) {
+ model = gtk_combo_box_get_model(action_combo);
+ gtk_tree_model_get(model, &iter, 0, &action, -1);
+ }
target_entry = arg_get_value(ctrls, "TARGET");
target = (char*)gtk_entry_get_text(target_entry);
tree = arg_get_value(ctrls, "RULES_TREE");

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