[virt-tools-list] [PATCH virt-viewer 09/19] Rebuild display menu when a window is added or removed

Marc-André Lureau marcandre.lureau at gmail.com
Mon Jul 16 16:57:44 UTC 2012


---
 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 03cf4b4..758cfe9 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -520,6 +520,7 @@ virt_viewer_app_remove_nth_window(VirtViewerApp *self, gint nth)
     DEBUG_LOG("Remove window %d %p", nth, win);
     removed = g_hash_table_steal(self->priv->windows, &nth);
     g_warn_if_fail(removed);
+    virt_viewer_app_update_menu_displays(self);
 
     if (removed)
         g_signal_emit(self, signals[SIGNAL_WINDOW_REMOVED], 0, win);
@@ -540,6 +541,7 @@ virt_viewer_app_set_nth_window(VirtViewerApp *self, gint nth, VirtViewerWindow *
     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_viewer_app_update_menu_displays(self);
 
     g_signal_emit(self, signals[SIGNAL_WINDOW_ADDED], 0, win);
 }
-- 
1.7.10.4




More information about the virt-tools-list mailing list