Re: Gtk+ menu bug 78949
- From: Michael Meeks <michael ximian com>
- To: Rajkumar Sivasamy <rajkumar siva wipro com>
- Cc: "nautilus-list gnome org" <nautilus-list gnome org>, Gtk Hackers <gtk-devel-list gnome org>
- Subject: Re: Gtk+ menu bug 78949
- Date: 05 Jul 2002 07:54:16 +0100
Rajkumar,
On Thu, 2002-07-04 at 19:10, Rajkumar Sivasamy wrote:
> On further work around I found the root cause for the bookmark menu
> being truncated:
I think you managed to conceal the real bug.
> a) When the user adds up a menu item, it calls up
> refresh_bookmarks_menu(), it _deletes_ all the existing static and
> dynamic bookmarks and then regenerates the entire menu item along with
> the newly added bookmark entry.
Yes - that's true; the bookmarks may have changed in an unpredictable
way, multiple removals / adds for example.
> b) This process of regenerating the entire menu item for a new entry
> consumes quite some-time. In btw if the user pops-up the bookmark menu
> **before refresh_bookmarks_menu() completes its execution** the menu
> will be truncated and the reason being the menu item is not _completely_
> regenerated at this _instant_ (as the routine is still under execution).
I think you're confused. While it is being re-generated there should be
no entry points for a popup event to come in - I can believe there is
between the remove and the rebuild though.
> c) It's verified by the following:
> + I modified the code so that when a new bookmark entry is added it
> appends the new entry at the tail of the bookmark menu without deleting
> the existing static and dynamic menu items. With this when the user
> pops-up the bookmark menu immediately after adding an entry, the menu
> will *NOT be truncated* as before.
This is not a fix for the underlying problem - which will 'pop up' in
other places as well.
> IMHO the patch provided for gtk-demo does not fit as a test case in this
> context, because:
>
> + In this test code though the menu items are added continuously, when
> we pop up the menu it shows up the entire list without any truncation.
The small test case clearly shows that the popup window is not being
correctly sized, thus this is a Gtk+ bug, and worse it's a regression
from Gtk+ 1.2.
> + I agree that the menu doesn't grow dynamically here (test code) and it
> does when seperated (tear off). But this is a different issue and
> doesn't fit in our case of bookmark menu being truncated.
Look; we can either fix the bug properly in Gtk+, or fool around trying
to work around this 1 symptom in nautilus which is a waste of time. The
Gtk+ bug will undoubtedly show itself in other ways later - so it's
vital to fix it in the right place, not hack around it in an ugly
fashion. It's simply not acceptable to have menus which magically have
new entries if you tear them off.
Regards,
Michael.
--
mmeeks gnu org <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]