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

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

 



Hi,

On Wed, Sep 26, 2018 at 07:26:24PM +0400, marcandre.lureau@xxxxxxxxxx wrote:
> From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
Acked-by: Victor Toso <victortoso@xxxxxxxxxx>
> ---
>  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
> 

Attachment: signature.asc
Description: PGP signature

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list

[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux