new libxfcegui4 stuff
Jasper Huijsmans
jasper at xfce.org
Mon Feb 23 21:34:26 CET 2004
Op ma 23-02-2004, om 20:05 schreef Brian J. Tarricone:
> hi all-
>
> i just committed two things to libxfcegui4... first is my 'backport' of
> GtkIconTheme that i ripped out of gtk 2.3.2. use it by including
> libxfcegui4/xgtkicontheme.h. the file name change is just to absolutely
> be sure of avoiding problems with gtkicontheme.h in gtk 2.4. i put
> ifdefs in place to only enable the code if compiled against <=gtk-2.2.x
> (and 2.3 as well, tho this perhaps should be changed). if included on a
> system with gtk 2.4, including libxfcegui4's copy of this include file
> will include the 'real' version instead (though i'd suggest that anyone
> who use it should do a gtk version check and include the appropriate
> header).
>
> i'm going to convert xfdesktop to use GtkIconTheme for its icon
> searching needs, and jean-francois: i'd suggest you modify
> xfce4-menueditor to use it as well.
>
This is excellent. I'd like to try and implement the panel icon theme
code using this as well. Time permitting, naturally.
> second is a GtkImageMenuItem subclass i wrote, XfceAppMenuItem. here's
> the summary from my cvs commit message:
>
> XfceAppMenuItem is a subclass of GtkImageMenuItem. its purpose is to
> represent an application that is run by selecting the menu item. it
> handles themed icons mostly automatically and can be generated manually
> from app name, command, icon name, etc., or automatically from an
> XfceDesktopEntry.
>
Interesting. I wonder if I could use a similar representation for panel
launchers ...
> i tossed a really simple sample app at
> http://kelnos.homelinux.org/xfce4/files/xamitest.c
> which demonstrates both using the XfceDesktopEntry interface and
> creating the item manually.
>
> i'm not sure how general-use this is, but i'm planning on ditching
> GtkItemFactory and the extra MenuItem struct in favor of this method,
> since it handles it's own memory storage and is in general less annoying
> to manage.
>
I no fan of the itemfactory myself, so it sounds promising.
> i was thinking about the xfdesktop menu itself... is this something
> that should eventually be moved into libxfcegui4 as well? i could
> imagine some users wanting, e.g., a button on the panel that pops up the
> system menu, so it makes sense to generate it in the same place.
>
> on the other hand, i'm wary of dumping lots of stuff into libxfcegui4 -
> i doubt anyone wants to see it turn into something huge like one of the
> gnome libs.
Yeah, this is indeed a problem. Beside the panel and xfdesktop I don't
see much use for it, but code duplication sucks. Perhaps making it a
gmodule installed by xfdesktop could work...
> out of curiosity, what's with the inclusion of all the netk
> stuff? why hasn't anyone (meaning, anyone in the general desktop
> developers community, not anyone xfce-related) put this into a
> standalone library? there certainly seems like there's enough there for
> a general-purpose util lib.
>
netk stuff is renamed libwnck from GNOME. Olivier decided to include it
in libxfcegui4 to reduce dependencies. At that time the library wasn't
all that stable, I believe. I'm not sure how it is now.
Jasper
More information about the Xfce4-dev
mailing list