new libxfcegui4 stuff

Brian J. Tarricone bjt23 at cornell.edu
Mon Feb 23 20:05:02 CET 2004


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.

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.

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 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.  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.

	-brian




More information about the Xfce4-dev mailing list