Re: help on child menus (Re: MDI Child menus don't show.)



On Fri, Jul 09, 1999 at 12:50:10AM +0000, mclos000@correu.udg.es wrote:
> After compiling the program, I execute it and a window containing a mdi child
> appers, also, the "File" menu and the "child" menu, but, the problem is that
> the child is not listed in the child menu, and neither the menu associated to it.
> Please, tell me if something is wrong!

Hi Manuel,

I'm having pretty much the same problem.  I assume you're running
with LANG=es, or something like that?  I've found that the child
menu items come up fine (in English) with LANG=C, but when someone
runs it with in some other language, the child menu never gets 
populated.  My theory (and I'm just now getting around to testing
it) is that the menu declared in the GnomeUIInfo is slightly 
different from the menu in gnome_mdi_set_child_list_path().

In my case, I'm using GNOMEUIINFO_MENU_WINDOWS_PATH and 
GNOME_MENU_WINDOWS_PATH.  Since the first one is in gnome-libs, it's
getting translated, but the second one is in my own file, and I 
haven't done any PO files yet, it's not getting translated.  The
literal strings don't match, so gnome-mdi doesn't know where
to put the child menu items.

> static GnomeUIInfo main_menu[]= 
> {
> GNOMEUIINFO_SUBTREE(N_("File"), file_menu),
> GNOMEUIINFO_SUBTREE(N_("Children"), empty_menu),
> GNOMEUIINFO_END
> };

> int
> main(int argc, char *argv[])
> {
...
> gnome_mdi_set_child_menu_path(mdi, _("File"));
> gnome_mdi_set_child_list_path(mdi, _("Children/"));
...
> }

In your case, maybe it's because "Children" != "Children/".
I don't know how strict the mdi menu-matching code is, so
I'm not sure if the "/" is throwing it off.

Good luck!
John



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