After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 129195 - [PATCH] Empty menu if no recent files
[PATCH] Empty menu if no recent files
Status: RESOLVED FIXED
Product: libegg
Classification: Other
Component: recent-files
unspecified
Other All
: High normal
: ---
Assigned To: Emmanuele Bassi (:ebassi)
Emmanuele Bassi (:ebassi)
Depends on:
Blocks:
 
 
Reported: 2003-12-12 14:09 UTC by Jorn Baayen
Modified: 2005-08-21 04:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (2.85 KB, patch)
2003-12-12 14:09 UTC, Jorn Baayen
none Details | Review
attach dummy item when the list is empty (4.79 KB, patch)
2005-08-21 02:44 UTC, Emmanuele Bassi (:ebassi)
none Details | Review
attach dummy item when the list is empty (3.50 KB, patch)
2005-08-21 04:04 UTC, Emmanuele Bassi (:ebassi)
none Details | Review

Description Jorn Baayen 2003-12-12 14:09:05 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.
Comment 1 Jorn Baayen 2003-12-12 14:09:47 UTC
Created attachment 22369 [details] [review]
Patch
Comment 2 Kjartan Maraas 2005-01-25 17:38:15 UTC
Was never applied. Please take a look.
Comment 3 Emmanuele Bassi (:ebassi) 2005-06-20 22:49:22 UTC
the patch looks good.  I'll apply it with the pending patches batch.
Comment 4 Vincent Untz 2005-08-18 09:53:20 UTC
Emmanuele: it seems you forgot this one.
Comment 5 Emmanuele Bassi (:ebassi) 2005-08-18 15:54:25 UTC
vincent, you are right... I have to remove the translation mark, first, since
libegg doesn't support it.
Comment 6 Emmanuele Bassi (:ebassi) 2005-08-18 16:16:10 UTC
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).
Comment 7 Vincent Untz 2005-08-18 16:29:38 UTC
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).
Comment 8 Emmanuele Bassi (:ebassi) 2005-08-18 18:44:53 UTC
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.
Comment 9 Emmanuele Bassi (:ebassi) 2005-08-21 02:42:55 UTC
reopening the bug, and attaching a patch for EggRecentViewBonobo.

(by the way, EggRecentViewBonobo must die, die, die)
Comment 10 Emmanuele Bassi (:ebassi) 2005-08-21 02:44:36 UTC
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.
Comment 11 Emmanuele Bassi (:ebassi) 2005-08-21 04:04:58 UTC
Created attachment 51049 [details] [review]
attach dummy item when the list is empty

and here's the patch for EggRecentViewUIManager
Comment 12 Emmanuele Bassi (:ebassi) 2005-08-21 04:15:08 UTC
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.