How to behave? / App policy



Hi all! :)

I have a problem on the use of the gnome_window_icon_set_* set of functions.
I can read on the API docs that they are only present from the version 1.2.0
of Gnome-libs. So, I wonder if I can include it in my application or not...
I don't think it is right to compel the user to upgrade to the new
version... is it there a general policy, on the question? I mean, following
the general directives of GNOME, should I use the latest functions, or not?

I can make a workaround; I can test for the version of the libs in
configure.in, and set a variable to use with #ifdef/#endif around those
functions; but... if I compile and distribute a binary RPM on my system, it
will be compiled with that symbol set, and it will segfault on an older
system... a further improvement is to set a switch for ./configure, to let
me avoid setting that variable... in configure.in I put

AC_ARG_ENABLE(wm-icon,
[  --enable-wm-icon   Builds the wm icon [default=yes]],
  enable_wm_icon="$enableval", enable_wm_icon=yes)

if test "x$enable_wm_icon" = "xyes"; then

CFLAGS_save=$CFLAGS
LIBS_save=$LIBS
CFLAGS=`gnome-config --cflags gnomeui`
LIBS=`gnome-config --libs gnomeui`

AC_CHECK_LIB(gnomeui, gnome_window_icon_set_default_from_file,[
AC_DEFINE(ICON_OK)], )

CFLAGS=$CFLAGS_save
LIBS=$LIBS_save

fi

and I specify ./configure --disable-wm-icon in the specfile. But this way no
one will care of the new feature, since the ones who are interested by such
a cosmetic improvement are the 'non-professional' users, the ones who often
are prone to download binary RPMS!!! So.... how can I do?

1) Should I forget it and print a nice 'only for >1.2.0' on the box, to
speak so?

2) Should I forget the icon? Being a game, it would be a nice detail! :)

3) Does anyone knows a routine to set that icon without using those
libcalls? I found something in xmms, but... applying on my app, puff! it
does nothing! :(

 best regards,
  mano :)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GnomerMind - an intriguing puzzle
             game for your GNOME!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://gnomermind.sourceforge.net
mano78 users sourceforge net
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]