use of provate functions and other gtk code

Brian J. Tarricone bjt23 at cornell.edu
Tue Apr 20 23:41:25 CEST 2004


On Tue, 20 Apr 2004, Olivier Fourdan wrote:

> Brian,
> 
> 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
> bug.

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




More information about the Xfce4-dev mailing list