[Openvas-commits] r5537 - in trunk/openvas-client: . openvas

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Oct 14 11:16:15 CEST 2009


Author: mattm
Date: 2009-10-14 11:16:14 +0200 (Wed, 14 Oct 2009)
New Revision: 5537

Modified:
   trunk/openvas-client/ChangeLog
   trunk/openvas-client/openvas/monitor_dialog.c
Log:
	* openvas/monitor_dialog.c (monitor_dialog_setup) [USE_OMP]: Only show the
	checkboxes for OTP tasks.  Add OMP specific button text.  Only set action
	for OMP contexts.

Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog	2009-10-14 08:42:03 UTC (rev 5536)
+++ trunk/openvas-client/ChangeLog	2009-10-14 09:16:14 UTC (rev 5537)
@@ -1,3 +1,9 @@
+2009-10-14  Matthew Mundell <matthew.mundell at intevation.de>
+
+	* openvas/monitor_dialog.c (monitor_dialog_setup) [USE_OMP]: Only show the
+	checkboxes for OTP tasks.  Add OMP specific button text.  Only set action
+	for OMP contexts.
+
 2009-10-14  Felix Wolfsteller <felix.wolfsteller at intevation.de>
 
 	* src/gui/ssh_keys_dialog.c (ssh_keys_dialog_prompt_new) [USE_OMP]

Modified: trunk/openvas-client/openvas/monitor_dialog.c
===================================================================
--- trunk/openvas-client/openvas/monitor_dialog.c	2009-10-14 08:42:03 UTC (rev 5536)
+++ trunk/openvas-client/openvas/monitor_dialog.c	2009-10-14 09:16:14 UTC (rev 5537)
@@ -510,12 +510,17 @@
       renderer, "value", COL_CHECKS, NULL);
     gtk_tree_view_append_column (GTK_TREE_VIEW (w), column);
 
-    /* The stop action as toggle */
-    renderer = gtk_cell_renderer_toggle_new();
-    g_signal_connect(renderer, "toggled", G_CALLBACK(stop_toggled), ctrls);
-    column = gtk_tree_view_column_new_with_attributes(_("Stop"), renderer,
-        NULL);
-    gtk_tree_view_append_column(GTK_TREE_VIEW (w), column);
+#ifdef USE_OMP
+    if (context->protocol == PROTOCOL_OTP)
+#endif
+    {
+      /* The stop action as toggle */
+      renderer = gtk_cell_renderer_toggle_new();
+      g_signal_connect(renderer, "toggled", G_CALLBACK(stop_toggled), ctrls);
+      column = gtk_tree_view_column_new_with_attributes(_("Stop"), renderer,
+          NULL);
+      gtk_tree_view_append_column(GTK_TREE_VIEW (w), column);
+    }
 
     gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled_window),
                                           w);
@@ -525,6 +530,11 @@
   tag = gtk_idle_add ((GtkFunction)idle_socket, ctrls);
 
   arg_add_value(ctrls, "TAG", ARG_INT, sizeof(gpointer), GSIZE_TO_POINTER(tag));
+#ifdef USE_OMP
+  if (context->protocol == PROTOCOL_OMP)
+    w = gtk_button_new_with_label (_("Stop the task"));
+  else
+#endif
   w = gtk_button_new_with_label(_("Stop the whole test"));
   g_signal_connect (GTK_OBJECT(w), "clicked",
                    (GtkSignalFunc)monitor_stop_whole_test,ctrls);
@@ -540,7 +550,8 @@
 #endif
 #ifdef USE_OMP
     // FIX explain why
-    context->action = CONTEXT_IDLE;
+    if (context->protocol == PROTOCOL_OMP)
+      context->action = CONTEXT_IDLE;
 #endif
     prefs_context_update(context);
     scopetreeview_connected_update(context);



More information about the Openvas-commits mailing list