gnome-session: custom per-app icon



Hi all

Some while ago, I asked the question regarding custom gnome-splash icons
for gnome-session. It was in TODO list. It is now still there. The RIGHT
way to do this thing is to modify libgnomeui (gnome-client stuff) to add
the icon into the session record properties. Since this is a long way
(and will break API and/or ABI compatibility), I offer not-so-bad
solution with just 2 lines of code.

This patch just takes the name of the executable (basename variable) and
looks for the icon with same name (and any supported extension:
png/gif/xpm).

And as a "last resort", good old gnome-unknown.png will still be used. I
checked the version from CVS - it works perfectly OK for me with this
patch.

Could please any of gnome-session owners review these 2 lines and submit
if possible? Since the solution with the session property is rather
expensive (in terms of interfaces breakage and modified code) and I see
no real world situations where appname.png icon is a bad convention - I
do not think this solution is too bad for its price.

The patch is against HEAD but I'd love to see it in 2.2 branch too...

Cheers,

-- 
Sergey
--- splash-widget.c	2003-03-18 23:48:11.000000000 +0000
+++ splash-widget.c1	2003-03-17 21:40:40.000000000 +0000
@@ -492,6 +492,9 @@
          */
 
 	if (!pb)
+		pb = get_splash_icon (sw, basename);
+
+	if (!pb)
 		pb = get_splash_icon (sw, "gnome-unknown.png");
 
 	if (!text)

Attachment: signature.asc
Description: This is a digitally signed message part



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