[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [virt-viewer 2/2] Remove close button from secondary screen windows

I am not convince that removing the close button will improve the situation. One might find it hard to reach the first window. And in some scenarios, it could have the first monitor/window disabled, so no close button anywhere. So nack, the first patch is enough imho. The existing confirmation dialog should be enough to prevent unexpected session leaving anyway.

On Thu, Apr 25, 2013 at 9:54 PM, Christophe Fergeau <cfergeau redhat com> wrote:
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
 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);

virt-tools-list mailing list
virt-tools-list redhat com

Marc-André Lureau

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]