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

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



On Tue, Jul 17, 2012 at 11:24 AM, Christophe Fergeau
<cfergeau redhat com> wrote:
> Makes sense, ACK
>
> However, I'm worried by the way VirtViewerApp uses hash tables,
> virt_viewer_app_update_menu_displays calls g_list_sort and then g_list_free on
> the list returned by g_hash_table_get_keys while this list should not be
> modified (I'm assuming g_list_sort does the sorting in place and does not
> create a new list). Keys to the 'windows' hash table should also be using
> GUINT_TO_POINTER. I can send patches for this after this series gets in.

Agree, I had the same thought. Either a sorted-list or a GTree would
do better I think.

I would be happy if you clean that up.

Another thing that is not so nice about the menu rebuild, is that it
may now happen quite often, at startup time. It doesn't seem to be a
problem atm, but I wonder if an "on-demand" approach wouldn't make
more sense. Anyway, just something to keep in mind.

-- 
Marc-André Lureau


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