GNOME Bugzilla – Bug 129195
[PATCH] Empty menu if no recent files
Last modified: 2005-08-21 04:15:08 UTC
This patch creates an insensitive "Empty" menu item if there are a) no recent files and b) the recent menu is "single", i.e. it is not embedded in another menu. This fixes the ugly, 2x2 pixel ors omething like that empty recent menu if there are no recent files.
Created attachment 22369 [details] [review] Patch
Was never applied. Please take a look.
the patch looks good. I'll apply it with the pending patches batch.
Emmanuele: it seems you forgot this one.
vincent, you are right... I have to remove the translation mark, first, since libegg doesn't support it.
2005-08-18 Emmanuele Bassi <ebassi@cvs.gnome.org> * libegg/recent-files/egg-recent-view-gtk.c: (egg_recent_view_gtk_set_item_tag), (egg_recent_view_gtk_set_empty_list), (model_changed_cb): if the menu is not embedded, add a dummy item to show it (based on patch from jorn@openedhand.com (Jorn Baayen), fixes bug #129195).
Well... The string should probably be translatable since the it will appear in the panel, e.g. It will be translated in the various modules, and not in libegg. However, this breaks string freeze... Maybe you can ask for string breakage on gnome-i18n? Or let it like this (but it will be highly visible for first-time users).
I can't add translatable strings into recent-files without breaking compilation when the code is inside libegg; I'm looking into it, in order to mark all strings as translatable. as for the string breakage: this would affect every program using recent-files code, if they resync their tree with libegg.
reopening the bug, and attaching a patch for EggRecentViewBonobo. (by the way, EggRecentViewBonobo must die, die, die)
Created attachment 51047 [details] [review] attach dummy item when the list is empty this updates EggRecentViewBonobo with an dummy menu item when the list is empty. i'll do EggRecentViewUIManager next.
Created attachment 51049 [details] [review] attach dummy item when the list is empty and here's the patch for EggRecentViewUIManager
2005-08-21 Emmanuele Bassi <ebassi@cvs.gnome.org> * libegg/recent-files/egg-recent-view-bonobo.c: (egg_recent_view_bonobo_set_list), (egg_recent_view_bonobo_set_empty_list), (model_changed_cb), (egg_recent_view_bonobo_finalize), (theme_changed_cb), (egg_recent_view_bonobo_init): if the list is empty, show a dummy menu item; also, remove every trace of GnomeIconTheme and use GtkIconTheme instead. * libegg/recent-files/egg-recent-view-uimanager.c: (egg_recent_view_uimanager_set_list), (egg_recent_view_uimanager_set_empty_list), (model_changed_cb): if the list is empty, show a dummy menu item; mark strings as translatable; add a default tooltip if none was provided by the tooltip_func.