[virt-tools-list] [PATCH v2 01/16] window: do not reset sensitivity of menu-send in rebuild

Victor Toso victortoso at redhat.com
Thu Dec 20 16:12:49 UTC 2018


Hi,

On Wed, Sep 26, 2018 at 07:26:24PM +0400, marcandre.lureau at redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau at redhat.com>
> 
> The sensitivy of "menu-send" is getting more complex in the following
> patch. Let's have the logic in a single place,
> virt_viewer_window_set_menus_sensitive().
> 
> rebuild_combo_menu() is called in 2 cases:
> 
> 1. notify::enable-accel: there is no need to update the sensitivy of
>    "menu-send"
> 
> 2. on construction: default to false since display == NULL. It will be
>    later updated when virt_viewer_window_set_menus_sensitive(). The
>    default sensitivity is covered by previous .ui patch change.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
Acked-by: Victor Toso <victortoso at redhat.com>
> ---
>  src/virt-viewer-window.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
> index 241b627..74afb32 100644
> --- a/src/virt-viewer-window.c
> +++ b/src/virt-viewer-window.c
> @@ -219,7 +219,6 @@ rebuild_combo_menu(GObject    *gobject G_GNUC_UNUSED,
>      menu = GTK_WIDGET(gtk_builder_get_object(self->priv->builder, "menu-send"));
>      gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu),
>                                GTK_WIDGET(virt_viewer_window_get_keycombo_menu(self)));
> -    gtk_widget_set_sensitive(menu, (self->priv->display != NULL));
>  }
>  
>  static void
> -- 
> 2.19.0.271.gfe8321ec05
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20181220/907cac41/attachment.sig>


More information about the virt-tools-list mailing list