retrieve a gtkItemFactoryEntry.


I'd like to retrieve a GtkItemFactoryEntry given its ItemFctory and its
path into the item factory, is this possible?

To better explain what I mean, here it is what I want to do:
I have a menu in the menu bar which list all the currently opened files;
each time a file is opened or created I fill the fields of a
GtkItemFactoryEntry and add the item to my item factory; in particular
the "path" is something like

entry.path = g_strdup_printf ("/Files/%s", filename);

The problem is when the file is saved with a different filename (Save as
...): I'd like to retrieve the entry and change the path.

Currently I have it working, but I am looking for a cleaner way to do
this since my method is a little hackish: I keep a GList of struct like

struct my_entry
        myfile *file;
        GtkItemFactoryEntry *entry;

in the main window data structure and each time a file is Saved As I
walk the list till I find the my_entry which has .file equal to the
saved file and then update its .entry .

Thanks in advance for any suggestion.


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