[Openvas-commits] r5587 - in trunk/openvas-client: . openvas/prefs_dialog
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Sat Oct 17 14:38:04 CEST 2009
Author: mattm
Date: 2009-10-17 14:38:00 +0200 (Sat, 17 Oct 2009)
New Revision: 5587
Modified:
trunk/openvas-client/ChangeLog
trunk/openvas-client/openvas/prefs_dialog/prefs_context.c
Log:
* openvas/prefs_dialog/prefs_context.c (update_connection_image)
[USE_OMP]: Clear the image if is_connected is -1.
(prefs_context_update_statusbar) [USE_OMP]: For OMP contexts clear the
text and image.
Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog 2009-10-17 12:09:00 UTC (rev 5586)
+++ trunk/openvas-client/ChangeLog 2009-10-17 12:38:00 UTC (rev 5587)
@@ -1,5 +1,12 @@
2009-10-17 Matthew Mundell <matthew.mundell at intevation.de>
+ * openvas/prefs_dialog/prefs_context.c (update_connection_image)
+ [USE_OMP]: Clear the image if is_connected is -1.
+ (prefs_context_update_statusbar) [USE_OMP]: For OMP contexts clear the
+ text and image.
+
+2009-10-17 Matthew Mundell <matthew.mundell at intevation.de>
+
* src/omp-cli.c (prints_tasks): Print reports if there are any.
(main): Free report_id.
Modified: trunk/openvas-client/openvas/prefs_dialog/prefs_context.c
===================================================================
--- trunk/openvas-client/openvas/prefs_dialog/prefs_context.c 2009-10-17 12:09:00 UTC (rev 5586)
+++ trunk/openvas-client/openvas/prefs_dialog/prefs_context.c 2009-10-17 12:38:00 UTC (rev 5587)
@@ -329,6 +329,10 @@
gtk_image_set_from_pixbuf(GTK_IMAGE(image),
is_connected ? connected : disconnected);
+
+#ifdef USE_OMP
+ if (is_connected == -1) gtk_image_clear (GTK_IMAGE (image));
+#endif
}
/**
@@ -354,24 +358,34 @@
gtk_statusbar_pop(statusbar,
gtk_statusbar_get_context_id(statusbar, "connection"));
- if(context->socket >= 0)
- {
- if (port == GPOINTER_TO_SIZE(prefs_get_default(context, "nessusd_port")))
- connect_status = g_strdup_printf(_("Connection: %s@%s"),
- username, hostname);
- else if (port >= 0)
- connect_status = g_strdup_printf(_("Connection: %s@%s:%d"),
- username, hostname, port);
- else
- connect_status = g_strdup_printf(_("Connection: user %s"),
- username);
- update_connection_image(icon, 1);
- }
+#ifdef USE_OMP
+ if (context->protocol == PROTOCOL_OMP)
+ {
+ connect_status = g_strdup (_(""));
+ update_connection_image (icon, -1);
+ }
else
- {
- connect_status = g_strdup_printf(_("not connected"));
- update_connection_image(icon, 0);
- }
+#endif /* USE_OMP */
+ {
+ if(context->socket >= 0)
+ {
+ if (port == GPOINTER_TO_SIZE(prefs_get_default(context, "nessusd_port")))
+ connect_status = g_strdup_printf(_("Connection: %s@%s"),
+ username, hostname);
+ else if (port >= 0)
+ connect_status = g_strdup_printf(_("Connection: %s@%s:%d"),
+ username, hostname, port);
+ else
+ connect_status = g_strdup_printf(_("Connection: user %s"),
+ username);
+ update_connection_image(icon, 1);
+ }
+ else
+ {
+ connect_status = g_strdup_printf(_("not connected"));
+ update_connection_image(icon, 0);
+ }
+ }
gtk_statusbar_push(statusbar,
gtk_statusbar_get_context_id(statusbar, "connection"), connect_status);
More information about the Openvas-commits
mailing list