[virt-tools-list] [PATCH 06/22] window: do not reset sensitivity of menu-send in rebuild
Marc-André Lureau
marcandre.lureau at redhat.com
Fri Aug 31 11:18:31 UTC 2018
Hi
On Fri, Aug 31, 2018 at 1:14 PM, Marc-André Lureau
<marcandre.lureau at redhat.com> wrote:
> Hi
>
> On Fri, Aug 31, 2018 at 8:32 AM, Victor Toso <victortoso at redhat.com> wrote:
>> Hi,
>>
>> On Tue, Jul 31, 2018 at 03:41:09PM +0200, marcandre.lureau at redhat.com wrote:
>>> From: Marc-André Lureau <marcandre.lureau at redhat.com>
>>>
>>> A mere app::enable-accel notification shouldn't modify the
>>> sensitivity, which is handled for all menu items elsewhere, leave the
>>> current state untouched.
>>>
>>> Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
>>
>> Not sure if this could introduce regression around
>> https://bugzilla.redhat.com/show_bug.cgi?id=1152574
>>
>> Before, the code was always setting sensitive to FALSE on
>> app:enable-accel. With Jonathon's commit 65560fa4664e, it was
>> changed to take in consideration if display existed.
>>
>> Not sure how to test.
>>
>
> I lack arguments on why this patch was needed, let's drop it for now.
> I'll add it back when I remember or can better explain the reason.
>
> thanks
>
Ah, looking at the following patch helps a bit.
The sensitivy of "menu-send" is getting more complex. I tried to have
a single place to put the logic.
So rebuild_combo_menu() is called in 2 cases:
1. notify::enable-accel: there is no need to update the sensitivy of
"menu-send", ok
2. on construction: default to false since display == NULL. It will be
later updated when virt_viewer_window_set_menus_sensitive()
I think the correct patch is to move gtk_widget_set_sensitive(menu,
FALSE) in virt_viewer_window_constructed.
Does it make sense? I'll updatre the patch.
thanks
More information about the virt-tools-list
mailing list