[virt-tools-list] [virt-viewer 2/2] Remove close button from secondary screen windows
Christophe Fergeau
cfergeau at redhat.com
Thu Apr 25 19:54:25 UTC 2013
After the previous commit, closing any window will cause the
application to quit. This can be unexpected, so this commit removes
the close button from all windows except from the first. The final
decision belongs to the window manager, so this may not work for
everyone.
---
src/virt-viewer-app.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index 853615e..0e9bb3d 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -586,6 +586,8 @@ virt_viewer_app_set_nth_window(VirtViewerApp *self, gint nth, VirtViewerWindow *
g_return_if_fail(virt_viewer_app_get_nth_window(self, nth) == NULL);
key = g_malloc(sizeof(gint));
*key = nth;
+ if (nth != 0)
+ gtk_window_set_deletable(virt_viewer_window_get_window(win), FALSE);
DEBUG_LOG("Insert window %d %p", nth, win);
g_hash_table_insert(self->priv->windows, key, win);
virt_viewer_app_set_window_subtitle(self, win, nth);
--
1.8.1.4
More information about the virt-tools-list
mailing list