On Sun, 2007-09-09 at 13:05 +0200, Bernhard Berger wrote:

> 2.) How to realize a recent file submenu?
> What is the best and easiest way to realize a recent file submenu? I've
> added an empty menu in the xml and "unset" the hide_if_empty
> property of the action. I've noticed that the activate action is
> triggered while the submenu opens. Do I have to merge new menu items in
> the callback routine? But then I've to determine where the action was
> triggered since the position of the recent file menu can change.

there's a C example of that here:

  http://www.gnome.org/~ebassi/recent-uimanager-inline.c

for both sub-menu and inline recent files list, using GtkUIManager and a
custom action.

with the next stable release of GTK+ there'll be a GtkRecentAction
available which will make the code far easier to write.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi,
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to