Re: A cross-platform status icon api
- From: Tor Lillqvist <tml iki fi>
- To: gtk-devel-list gnome org
- Subject: Re: A cross-platform status icon api
- Date: Thu, 3 Nov 2005 19:13:35 +0200
Matthias Clasen writes (a long time ago):
> looking at the code in gtkstatusicon-x11.c, only a few lines deal
> with the tray icon. Do you think it would be feasible to #ifdef out
> the platform-specifc parts without too much pain ? If so, then we
> should probably do the cvs surgery to rename gtktrayicon.c to
> gtktrayicon-x11.c and gtkstatusicon-x11.c gtkstatusicon.c.
I now added Win32 specific bits to gtkstatusicon.c (i.e. what used to
be gtkstatusicon-x11.c when the above was written). Seems to work fine
now on Win32.
It turns out gtkstatusicon.c needed ifdefs spread out here and there,
though, so the code does not look very elegant currently. What do you
think, should I try to move the backend-specific snippets to separate
functions so that the mass of the code would be ifdef-free, with only
two backend-specific blocks? (I think keeping the backend-specific
parts in the same file would be cleaner that splitting the
backend-specific parts out to separate files, as done in
gtkplug/socket. In retrospect, that was perhaps not such a good idea,
it made the code more complex and harder to read than necessary.)
--tml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]