[Openvas-commits] r3251 - in trunk/openvas-client: . nessus/prefs_dialog

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed May 6 11:43:54 CEST 2009


Author: felix
Date: 2009-05-06 11:43:52 +0200 (Wed, 06 May 2009)
New Revision: 3251

Modified:
   trunk/openvas-client/ChangeLog
   trunk/openvas-client/nessus/prefs_dialog/prefs_dialog.c
Log:
* nessus/prefs_dialog/prefs_dialog.c: Collapsed comments, minor
reformatting.


Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog	2009-05-06 08:46:21 UTC (rev 3250)
+++ trunk/openvas-client/ChangeLog	2009-05-06 09:43:52 UTC (rev 3251)
@@ -1,3 +1,8 @@
+2009-05-06  Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
+	* nessus/prefs_dialog/prefs_dialog.c: Collapsed comments, minor
+	reformatting.
+	
 2009-05-05  Felix Wolfsteller <felix.wolfsteller at intevation.de>
 
 	* src/gui/ssh_keys_dialog.c: Added missing include.

Modified: trunk/openvas-client/nessus/prefs_dialog/prefs_dialog.c
===================================================================
--- trunk/openvas-client/nessus/prefs_dialog/prefs_dialog.c	2009-05-06 08:46:21 UTC (rev 3250)
+++ trunk/openvas-client/nessus/prefs_dialog/prefs_dialog.c	2009-05-06 09:43:52 UTC (rev 3251)
@@ -399,14 +399,11 @@
   struct arglist *prefs_report;
   struct arglist *ctrls = emalloc(sizeof(struct arglist));
 
-
   MainDialog = ctrls;
 
   create_nessus_icon_factory();
 
-/*
- * We draw the window ....
- */
+  /* We draw the window .... */
   window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
   gtk_window_set_default_size(GTK_WINDOW(window), 1000, 630);
   g_signal_connect(G_OBJECT(window), "delete_event",
@@ -417,16 +414,14 @@
   gtk_window_set_title(GTK_WINDOW(window), _("OpenVAS-Client"));
   arg_add_value(ctrls, "WINDOW", ARG_PTR, -1, window);
   arg_add_value(ctrls, "CONTEXT", ARG_PTR, -1, window);
-  /*
-   * We put a vbox in it...
-   */
+
+  /* We put a vbox in it... */
   box = gtk_vbox_new(FALSE, 0);
   gtk_container_add(GTK_CONTAINER(window), box);
   gtk_widget_show(box);
 
-/*
- * Main menu
- */
+
+  /* Main menu */
   accel_group = gtk_accel_group_new();
   gtk_window_add_accel_group(GTK_WINDOW(window), accel_group);
 
@@ -618,10 +613,7 @@
 
 
 
-
-
 /* hbox with toolbar+scopetree-vbox and notebook */
-
   hbox = gtk_hbox_new(FALSE, 4);
   gtk_widget_show(hbox);
   gtk_box_pack_start(GTK_BOX(box), hbox, TRUE, TRUE, 0);
@@ -638,9 +630,7 @@
   gtk_widget_show(vbox);
   gtk_container_add(GTK_CONTAINER(hpaned), vbox);
 
-/*
- * The Toolbar
- */
+  /* The Toolbar */
   toolbar = gtk_toolbar_new();
   gtk_widget_show(toolbar);
   gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0);
@@ -709,37 +699,27 @@
   gtk_widget_show(GTK_WIDGET(tool_button));
   arg_add_value(ctrls, "EXECSCOPE_BUTTON", ARG_PTR, -1, tool_button);
 
-/*
- * The Scope Tree
- */
-
+  /* The Scope Tree */
   prefs_scope_tree = prefs_dialog_scope_tree(context);
   frame = arg_get_value(prefs_scope_tree, "FRAME");
   gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
   arg_add_value(ctrls, "SCOPETREE", ARG_PTR, -1, prefs_scope_tree);
 
-/*
- * The Context Frame
- */
-
+  /* The Context Frame */
   frame = gtk_frame_new(NULL);
   gtk_frame_set_label(GTK_FRAME(frame), _("Context"));
   gtk_widget_show(frame);
   gtk_container_add(GTK_CONTAINER(hpaned), frame);
   arg_add_value(ctrls, "CONTEXTFRAME", ARG_PTR, -1, frame);
 
-/*
- * The Context Notebook
- */
+  /* The Context Notebook */
   notebook = gtk_notebook_new();
   gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP);
   gtk_container_add(GTK_CONTAINER(frame), notebook);
   gtk_widget_show(notebook);
   arg_add_value(ctrls, "CONTEXTNOTEBOOK", ARG_PTR, -1, notebook);
 
-/*
- * We set up the pages of our notebook
- */
+  /* We set up the pages of our notebook */
   prefs_comment = prefs_dialog_comment();
   prefs_options = prefs_dialog_options(context, ctrls);
   prefs_report = prefs_dialog_report();
@@ -748,9 +728,7 @@
   arg_add_value(ctrls, "OPTIONS", ARG_ARGLIST, -1, prefs_options);
   arg_add_value(ctrls, "REPORT", ARG_ARGLIST, -1, prefs_report);
 
-/*
- * and we append them to it
- */
+  /* and we append them to it  */
 
   /* Tab "Comments" */
   label = gtk_label_new(_("Comments"));
@@ -773,10 +751,9 @@
   g_signal_connect_after(G_OBJECT(notebook), "switch-page",
       G_CALLBACK(prefs_context_switch_notebookpage), NULL);
 
-/*
- * Message Log
- */
 
+  /* Message Log */
+
   /* The frame */
   msglogframe = gtk_frame_new(NULL);
   gtk_widget_show(msglogframe);
@@ -820,9 +797,7 @@
   gtk_widget_hide(msglogframe);
 
 
-/*
- * Status bar
- */
+  /* Status bar */
   hbox = gtk_hbox_new(FALSE, 0);
   gtk_widget_show(hbox);
   gtk_box_pack_end(GTK_BOX(box), hbox, FALSE, TRUE, 0);
@@ -852,9 +827,7 @@
   gtk_box_pack_start(GTK_BOX(hbox), icon, FALSE, TRUE, 0);
   arg_add_value(ctrls, "CONNECT_IMAGE", ARG_PTR, -1, icon);
 
-/*
- * Final
- */
+  /* Final */
   menuitem = arg_get_value(ctrls, "TOGGLETOOLBAR_MENUITEM");
   gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem),
       !prefs_get_int(Global, "hide_toolbar"));
@@ -877,7 +850,7 @@
  * @param prefrence_name Key to look for and eventually set to "yes" or no.
  */
 static void
-arg_int_to_yesno(struct arglist* preferences, char* preference_name)
+arg_int_to_yesno (struct arglist* preferences, char* preference_name)
 {
   char* value = arg_get_value (preferences, preference_name);
   if (arg_get_type (preferences, preference_name) == ARG_INT)
@@ -957,9 +930,7 @@
       GTK_TOGGLE_BUTTON(gtkw)->active = FALSE;
   }
 
-  /*
-   *  Host expansion options
-   */
+  /* Host expansion options */
   t = arg_get_value(ctrls, "TARGET");
   gtk_entry_set_text(GTK_ENTRY(arg_get_value(t, "TARGET")),
       prefs_get_string(context, "targets"));
@@ -986,9 +957,7 @@
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), (flag & EX_DNS));
   }
 
-  /*
-   * Scan options 
-   */
+  /* Scan options */
   t = arg_get_value(ctrls, "SCAN_OPTIONS");
   gtkw = arg_get_value(t, "PING_HOSTS");
   arg_int_to_yesno(serv, "ping_hosts");
@@ -1087,9 +1056,7 @@
       gtk_entry_set_text(GTK_ENTRY(gtkw), v);
   }
 
-  /*
-   * User
-   */
+  /* User */
   fill_rules_list(context, arg_get_value(MainDialog, "USER"));
 
 #ifdef ENABLE_SAVE_KB
@@ -1179,12 +1146,12 @@
  if(togglebutton)
   {
     char *value;
-  
+
     if(GTK_TOGGLE_BUTTON(togglebutton)->active)
       value = estrdup("yes");
     else
       value = estrdup("no");
-  
+
     if(arg_get_value(preferences, preference_name))
       arg_set_value(preferences, preference_name, strlen(value), value); /* RATS: ignore */
     else
@@ -1222,7 +1189,7 @@
    * values from server.
    */
 
-  bzero(expansion, 30);
+  bzero (expansion, 30);
   prefs = context->prefs;
   serv = arg_get_value(prefs, "SERVER_PREFS");
   if(!serv)
@@ -1233,13 +1200,13 @@
 
 
   t = arg_get_value(ctrls, "PLUGINS");
-  
+
   gtkw = arg_get_value(t, "ENABLE_DEPS_AT_RUNTIME");
   set_yesno_pref_from_toggle(serv, gtkw, "auto_enable_dependencies");
-  
+
   gtkw = arg_get_value(t, "SILENT_DEPS");
   set_yesno_pref_from_toggle(serv, gtkw, "silent_dependencies");
-  
+
   gtkw = arg_get_value(t, "AUTO_ENABLE_NEW_PLUGINS");
   if(gtkw)
   {
@@ -1249,18 +1216,16 @@
       prefs_set_int(context,"auto_enable_new_plugins",0);
   }
 
-  /*
-   * Host expansion
-   */
+  /* Host expansion */
   t = arg_get_value(ctrls, "TARGET");
   gtkw = arg_get_value(t, "DNS_EXPAND");
   if(GTK_TOGGLE_BUTTON(gtkw)->active)
-    strcat(expansion, "dns;");
+    strcat (expansion, "dns;");
 
   strcat(expansion, "ip;");
 
-  if(!strlen(expansion))
-    strncpy(expansion, "none;", 5);
+  if (!strlen(expansion))
+    strncpy (expansion, "none;", 5);
   expansion[strlen(expansion) - 1] = 0;
 
   s = (char *)gtk_entry_get_text(GTK_ENTRY(arg_get_value(t, "TARGET")));
@@ -1546,7 +1511,7 @@
     return (0);
   }
 
-  monitor_dialog_setup(hostname, context);
+  monitor_dialog_setup (hostname, context);
 
   return (0);
 }



More information about the Openvas-commits mailing list