use of provate functions and other gtk code

Brian J. Tarricone bjt23 at
Wed Apr 21 03:03:18 CEST 2004

ok, done.  i think i got everything.  i dug up the old icon searching 
code i had been using in xfdesktop and put it in libxfcegui4 as a 
lightweight replacement for GtkIconTheme for gtk < 2.4.  it seems to 
work well enough.

jean-francois - i added GTK_CHECK_VERSION() to menueditor in a couple 
places; likely icon theme discovery and stuff won't work in menueditor 
for gtk 2.2 users.  it'll compile and run though, so that's something.  
fix at your leisure.

if there are any problems or anything i missed, let me know.  it's 
likely that xfdesktop will need to be recompiled after updating to 
current libxfcegui4.


Olivier Fourdan wrote:

>The gtk part must go. Just remove the parts that come from gtk, and
>protect the part of xfce code with #if/#endif to adjust to the gtk
>version the code is being compiled with.
>Anything else will be seen as hack and will lead to endless bugs.
>So yes, please take the necessaty actions to remove the parts of the
>code that either use gtk cut'n paste or gtk private functions (even if
>it means taking functionality out of the code)
>I definitely prefer a clean, stable maintainable code. 
>On Tue, 2004-04-20 at 23:41, Brian J. Tarricone wrote:
>>On Tue, 20 Apr 2004, Olivier Fourdan wrote:
>>>It seems you added a bunch of code from gtk in libxfcegui4.
>>>This is not correct and should be reverted because:
>>>1) as already said, use of private gtk functions outside gtk is not
>>>correct and wil lead to a lot of problems
>>i didn't think it would be a problem since 1) both gtk 2.2 and 2.4 have 
>>_gtk_fnmatch() (and since gtk 2.2 is no longer the current release, 
>>that's unlikely to change), and 2) it worked fine for me.  but obviously 
>>it is a problem, so, as i said in a previous email, i'll fix it.  i'll 
>>probably end up setting it up to use the system fnmatch(), or, in the 
>>absence of it, degrade (hopefully) gracefully.
>>>2) the "gtk" name space is reserved to gtk and using it outside gtk is a
>>what would you suggest i do?  the gtk_/Gtk namespaced 'classes' are 
>>backports from gtk 2.4.  if i were to go and rename, e.g., GtkFileFilter 
>>to XfceFileFilter, and all the gtk_file_filter_* functions to 
>>xfce_file_filter_*, it would be a lot of wasted effort for what i think 
>>is negligible gain.  plus that means writing stub functions for all of 
>>them that just call the gtk_* counterparts when compiled against gtk 
>>2.4.  also it means renaming everything that references it.  it also 
>>adds some maintainence overhead if bugs are fixed in gtk 2.4.0's 
>>implementation of GtkFileFilter or GtkIconTheme, as it's not so simple 
>>to just copy over the new files and change a few lines - there will be a 
>>need to track down each individual line that changed and merge it into 
>>the libxfcegui4 tree.
>>the only reason these gtk bits are in there are for compatibility with 
>>users that are stuck with gtk 2.2.  when compiled against gtk 2.4, these 
>>parts don't get compiled.  there shouldn't be any binary compat issues 
>>(with libxfcegui4), but it seems there are, and i'll do my best to get 
>>to the bottom of it.
>>if it really is that important to you, i'll make the changes - it's your 
>>show - but i'm certainly not going to enjoy the extra work that implies.
>>	-brian
>>Xfce4-dev mailing list
>>Xfce4-dev at

More information about the Xfce4-dev mailing list