Re: A cross-platform status icon api



On Mon, 2005-09-05 at 23:25 +0200, Hans Breuer wrote:
> On 04.09.2005 22:59, Matthias Clasen wrote:
> > On Sun, 2005-09-04 at 15:27 +0200, Hans Breuer wrote:
> > 
> >>On 30.08.2005 00:37, Matthias Clasen wrote:
> >>[...]
> >>
> >>>cvs as of today has
> >>>
> >>
> >>Trying to make it compile on win32 implies that two files
> >>should be renamed :
> >>
> >>gtkstatusicon-x11.c has nothing X11 specific in it. At least
> >>it compiles on win32 without any change. So it probably should
> >>be named gtkstatusicon.c
> >>
> >>gtktrayicon.c is highly X11 dependent so it should be
> >>called gtktrayicon-x11.c
> >>
> >>I have done the renaming in my local tree and also created
> >>a currently empty implementation of gtktrayicon-win32.c.
> >>With it HEAD could be compiled again on win32.
> >>
> > 
> > 
> > No, this is backwards. gtkstatusicon-x11.c is named like it is because
> > it is the X11-specific implementation of the statusicon api. 
> Yeah, trying to implement something with it I noticed that, too.
> 
> > gtktrayicon.c may compile on win32, but that is completely irrelevant, 
>       ^^^^^
> gtkstatusicon-x11 does, gtktrayicon.c does *not*. How do you suggest to
> call the win32 specific file ?

I thought it would be gtkstatusicon-win32.c, following the example of
how the plug/socket code is organized.

> 
> Also gtkstatusicon-x11.c not only implements the fdo spec but it also
> defines a bunch of status icon api. Not only 21 functions but additionally
> quite some properties. Should all this be duplicated to get the
> cross-platform status api ?

Hmm, good point. When I did that code I thought a clean separation
between the X and win32 implementations would be better, but 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.

Matthias




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