[virt-tools-list] [PATCH 04/22] window: use virt_viewer_window_set_menus_sensitive()
marcandre.lureau at redhat.com
marcandre.lureau at redhat.com
Tue Jul 31 13:41:07 UTC 2018
From: Marc-André Lureau <marcandre.lureau at redhat.com>
virt_viewer_window_set_menus_sensitive() is the common function to set
sensitivity on menu items.
It was lacking "toolbar_send_key", so add it there too.
Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
---
src/virt-viewer-window.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index af3441f..4b48e31 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -1352,6 +1352,8 @@ virt_viewer_window_set_menus_sensitive(VirtViewerWindow *self, gboolean sensitiv
menu = GTK_WIDGET(gtk_builder_get_object(priv->builder, "menu-send"));
gtk_widget_set_sensitive(menu, sensitive);
+
+ gtk_widget_set_sensitive(self->priv->toolbar_send_key, sensitive);
}
static void
@@ -1432,10 +1434,7 @@ virt_viewer_window_set_display(VirtViewerWindow *self, VirtViewerDisplay *displa
if (virt_viewer_display_get_enabled(display))
virt_viewer_window_desktop_resize(display, self);
- gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(self->priv->builder, "menu-preferences")), TRUE);
- gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(self->priv->builder, "menu-view-zoom")), TRUE);
- gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(self->priv->builder, "menu-send")), TRUE);
- gtk_widget_set_sensitive(self->priv->toolbar_send_key, TRUE);
+ virt_viewer_window_set_menus_sensitive(self, TRUE);
}
}
--
2.18.0.321.gffc6fa0e39
More information about the virt-tools-list
mailing list