Re: Reloading menu entries



--- Marco Quezada <mquezada nlxcorp com> wrote:
Hi,

I have a program which builds menus according to a
list that it loads
when it executes. I want to give the user the option
to "Refresh" the
contents of the menus by pressing on a button. This
should update the
contents of files in a directory. Is there a gtk or
maybe a system
signal that will destroy and restart the
program/process and thus allow
the menus to be recreated?

Thanks.

This is probably a long shot on my part, but there's a
whole bunch of GtkItemFactory functions that allows
you to do such things as dump an item factory
containing the said menu items to files, parse such
dumped files, and create new interfaces from them.
Take a look the GtkItemFactory API docs. You might be
able to do something like dump the modified menus as
an GtkItemFactory, reload GtkItemFactory, and call
gtk_main_iteration() (or do something really weird and
create a new instance of gtk_main that makes use of
the modified menus and kill the previous instance. Can
this be done? Can it be done without too mnch
weirdness going on? I'm not sure) 

Probably Havoc is able to give you far saner advice
than yours truly. But it's something to try in the
meantime. 
--Ilan 

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




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