Re: Hidable rulers

Subject: Re: Hidable rulers
From: Stephen Hack (
Date: Thu Dec 02 1999 - 13:46:44 CST

Acutally, I worked on the adding the check menu code. A little bit was
implemented, but never worked. I have an idea for a possible solution.

... twenty minutes later ...

While trying to find a references, I decided to go ahead and try a fix. Which
I'm glad to say works. It was chaning back the set_active call to the
internal mangling of the code, which I changed when getting check buttons
working. (I made two changes, one to add check_menu instead of menus (some of
the times), and the other, I just backed out.)


On Thu, Dec 02, 1999 at 08:54:47AM -0600, wrote:
> Stephen Hack wrote:
> > the getState is fine, but the i'm not sure about the others. I've not changed
> > any of the EditMethods viewRuler calling, so ... ??? I'm seeing the traces,
> > but not having the ruler actually changed unless I click it. (only on unix)
> I sat down with gdb last night and found the problem. Whenever a menu
> is clicked (any menu, something like "Help"), the menu code goes through
> and refreshes all the menus, so that it's sure the menu it will need to
> pop up will contain the correct values for any dynamic items. Doing so
> makes a run through the View menu (the one that holds "Show rulers")
> even if View wasn't the menu chosen.
> In the refreshMenu function (I'm not sure on function name specifics here,
> I just woke up) there's a chunk that (1) reads what the current menu
> item _should_ look like and (2) sets it. In the case of check menu items
> it calls something like:
> gtk_check_menu_set_active(GTK_CHECK_MENU_ITEM(item), bCheck);
> That function then triggers the "activate" signal, which (to GTK) is just
> like a user clicking on the Hide Rulers menu item.
> So every time any menu is refreshed, the Hide Rulers option is "set" again
> to its proper value, just in-case it changed (through some other code path)
> since the last time the menus were displayed.
> This is a bug in the menu code. It needs to be totally refactored on the
> Unix side (where it interfaces with GTK). It was written long ago, before
> GTK had menus like it does now, but has just been patched whenever they
> changed stuff.
> I'll volunteer to do that clean-up (since I wrote most of the original code)
> if there isn't another short-term solution for this problem. :)
> --
> Shaw Terwilliger

This archive was generated by hypermail 2b25 : Thu Dec 02 1999 - 13:47:24 CST