[virt-tools-list] [PATCH virt-viewer 10/10] Enable share folder widgets if supported by session
Marc-André Lureau
marcandre.lureau at gmail.com
Sun Feb 15 16:18:43 UTC 2015
---
src/virt-viewer-app.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index 4958864..6b5bc39 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -2433,6 +2433,17 @@ virt_viewer_app_show_preferences(VirtViewerApp *self, GtkWidget *parent)
preferences = GTK_WIDGET(gtk_builder_get_object(builder, "preferences"));
self->priv->preferences = preferences;
+ gboolean can_share_folder = virt_viewer_session_can_share_folder(session);
+ g_object_set (gtk_builder_get_object(builder, "cbsharefolder"),
+ "sensitive", can_share_folder, NULL);
+ g_object_set (gtk_builder_get_object(builder, "cbsharefolderro"),
+ "sensitive", can_share_folder, NULL);
+ g_object_set (gtk_builder_get_object(builder, "fcsharefolder"),
+ "sensitive", can_share_folder, NULL);
+
+ if (!can_share_folder)
+ goto present;
+
g_object_bind_property(virt_viewer_app_get_session(self),
"share-folder",
gtk_builder_get_object(builder, "cbsharefolder"),
--
2.1.0
More information about the virt-tools-list
mailing list