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

Daniel P. Berrange berrange at redhat.com
Mon Jul 23 14:01:44 UTC 2012


On Tue, Jul 17, 2012 at 09:24:51PM +0200, Marc-André Lureau wrote:
> ---
>  src/virt-viewer-app.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
> index 661cdd7..c4f712d 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);
>  }
> @@ -657,6 +659,7 @@ virt_viewer_app_display_added(VirtViewerSession *session G_GNUC_UNUSED,
>      }
>  
>      virt_viewer_window_set_display(window, display);
> +    virt_viewer_app_update_menu_displays(self);
>      g_signal_connect(display, "notify::show-hint",
>                       G_CALLBACK(display_show_hint), window);
>      g_object_notify(G_OBJECT(display), "show-hint"); /* call display_show_hint */

ACK


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the virt-tools-list mailing list