I'm using gaim v0.75 and xfce-4.0.4 and the gaim's icon is bigger than systray
This sounds similar to the bug I've had reported to me by a Debian user about you always cropping all systray icons now to 24x24. cf http://bugs.debian.org/236686
If I use the biggest size of the systray the icon get's OK, but it's not a solution. I think that would be good if it's resizeable
Biggest? Nah, the icon is still fairly small even in gaim 0.75. Can you post a small screenshot?
The submitter of the Debian bug has given me: before: http://www.eecs.harvard.edu/~ccshan/debbugs/xfce/tray.png after: http://www.eecs.harvard.edu/~ccshan/debbugs/xfce/tray-wrong.png He has his systray on the taskbar and then in the new version his workrave icon is cut off (the time disappears). I think this is a bug but I'm not sure if it's yours or workrave's. Is there a spec which says they're only allowed to be 24x24 somewhere?
Can you try with this version of libxfcegui4: http://www.xfce.org/archive/test/libxfcegui4-4.0.5-cvs.tar.gz TIA Olivier.
No, this doesn't help I'm afraid. The problem is that KDE and GNOME apps seem to return -1 -1 to gtk_widget_get_size_request. If you look at http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#gtk-widget-get-size-request then -1 means no explicit size has been set. Reading the API I thought you'd made a mistake in not using gtk_widget_size_request but then I tried with that and it just returns 1 and 1 each time. I tried some other bits like looking at the widget's allocation but that didn't help. The workrave icon is just bigger than 24 pixels and I'm not sure how you work out that it wants to be that big. I looked at the gnome-panel source and it seems to work out when the panel is vertical or horizontal and only set the other dimension. I don't think that would work with KDE apps though so to get this right in all cases I think you need a patch like the one Debian used to use.
Humm, nope, the patch you are refereing to is from Benny, and it was a hack (from his own words). So it's a non fix issue.
But that means GTK apps like workrave are having their systray icons cut off. Why would you not want to fix this for all apps?
It's not that "I don't want" to fix it, it's that there is no way of fixing it. And sorry, no, the patch you mention is not a good solution.
Okay, another try. Can you retry, same URL, updated archive. http://www.xfce.org/archive/test/libxfcegui4-4.0.5-cvs.tar.gz TIA Olivier.
I see what you're trying to do but again each app I try always gives the same results. I've been adding debugging statements and I get: request_width 0 request_height 0 for each app I try (knotes, workrave etc) Is there a way to work out (in the systray) what the orientation of the panel is? If so we could do the gnome-panel way and just set the size of one dimension (setting the other dimension to -1). I don't know if KDE icons show up on the gnome-panel though.
Same player, shoot again. Same URL, update archive... Could you try again this one: http://www.xfce.org/archive/test/libxfcegui4-4.0.5-cvs.tar.gz It works for me (at least) TIA Olivier.
Nope, no joy still with workrave. What did you test with? This one is still setting the size to 24,24 when the socket's request_height and width are < 16 though and as I said before when I debugged it with fprintfs to stderr they were always 0. I can't really see what you changed on the size side. If you want a test case remove the call to gtk_widget_set_size_request install, and run workrave. Note the bar on the right of the icon. You'll also see that KDE icons don't work (e.g. knotes). If you then try with your current version you'll see that workrave's icon is cropped but knotes does show up. Thanks for your efforts so far
You aren't using the file I updated (check the md5sum, it should be b4e372cc7da0dcf94da11ad444a056f2) The libxfcegui4 lib I've put yesterday does fix the issue. Olivier.
Oops, you're right I wasn't but I still see it. http://the.earth.li/~huggie/xfce4-latest-workrave.png This is the one which does: req.width = req.height = 1; gtk_widget_size_request (GTK_WIDGET(socket), &req); if ((req.width < 16) || (req.height < 16)) { gtk_widget_set_size_request(icon, MAX (24, req.width), MAX (24, req.height)); } gtk_widget_show(icon); Adding debugging of req.width and req.height they are both 1 just before that if so again everything is cropped.
Oki; so that systray app is totally braindead and there is noithing I can do about it. I can't even compile it. crap! Trash it :) Olivier.
Closing that bug because I did my best and I do believe that the issue should be fixed on workrave side (ie the icon should have an acceptable size at first) and because I have no way to fix the issue at my level w/out breaking KDE compat.