[Openvas-commits] r3365 - trunk/openvas-client/nessus/prefs_dialog

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu May 14 10:49:26 CEST 2009


Author: felix
Date: 2009-05-14 10:49:26 +0200 (Thu, 14 May 2009)
New Revision: 3365

Modified:
   trunk/openvas-client/nessus/prefs_dialog/prefs_dialog_user.c
Log:
* nessus/prefs_dialog/prefs_dialog_user.c: Use GTK+ 2.6 functionality
(keeping old code as comment), use gchar where glib char function is
used.


Modified: trunk/openvas-client/nessus/prefs_dialog/prefs_dialog_user.c
===================================================================
--- trunk/openvas-client/nessus/prefs_dialog/prefs_dialog_user.c	2009-05-14 08:17:28 UTC (rev 3364)
+++ trunk/openvas-client/nessus/prefs_dialog/prefs_dialog_user.c	2009-05-14 08:49:26 UTC (rev 3365)
@@ -177,22 +177,20 @@
   GtkEntry * target_entry;
   GtkWidget * tree;
   GtkTreeStore * store;
-  GtkTreeModel * model;
   GtkTreeIter iter, parent;
   char * action = NULL;
   char * target = NULL;
-  char * rule = NULL;
+  gchar * rule = NULL;
   GtkTreePath * path;
 
   action_combo = arg_get_value(ctrls, "ACTION");
-  /* 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)) {
+  action = (char *)gtk_combo_box_get_active_text(action_combo);
+  /* Before the GTK+ minimum version was 2.6,  looked like:
+    GtkTreeModel * model;
+    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");



More information about the Openvas-commits mailing list