Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » TrayItem platforms
TrayItem platforms [message #442569] Wed, 08 September 2004 10:02 Go to next message
Max is currently offline MaxFriend
Messages: 28
Registered: July 2009
Junior Member
On which platforms are TrayItem supported?

Windows is the only one I know of for sure. Anyone else?

--
Regards Max rotvel AT bolignet-aarhus DOT dk
Re: TrayItem platforms [message #442571 is a reply to message #442569] Wed, 08 September 2004 11:41 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
gtk also

"Max" <this@address.is.invalid> wrote in message
news:MPG.1ba8f712e700ce4c989682@news.eclipse.org...
> On which platforms are TrayItem supported?
>
> Windows is the only one I know of for sure. Anyone else?
>
> --
> Regards Max rotvel AT bolignet-aarhus DOT dk
Re: TrayItem platforms [message #443111 is a reply to message #442571] Sat, 18 September 2004 15:32 Go to previous messageGo to next message
Max is currently offline MaxFriend
Messages: 28
Registered: July 2009
Junior Member
So it should be safe to use the following simple workaround to determine
if a platform has Tray support?

private boolean platformHasTray()
{
String pf = SWT.getPlatform();
return (pf.equals("win32") || pf.equals("gtk")) ? true : false;
}

I hope that a similar api will be added to SWT. In
https://bugs.eclipse.org/bugs/show_bug.cgi?id=64923 it's mentioned that
this will be added "post 3.0", which is now :-)


In article <chmqu3$qf4$1@eclipse.org>, grant_gayed@ca.ibm.com says...
> gtk also
>
> "Max" <this@address.is.invalid> wrote in message
> news:MPG.1ba8f712e700ce4c989682@news.eclipse.org...
> > On which platforms are TrayItem supported?
> >
> > Windows is the only one I know of for sure. Anyone else?
> >
> > --
> > Regards Max rotvel AT bolignet-aarhus DOT dk
>
>
>

--
Regards Max rotvel AT bolignet-aarhus DOT dk
Re: TrayItem platforms [message #443137 is a reply to message #443111] Mon, 20 September 2004 13:27 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
The Tray and TrayItem classes exist on all platforms, including the
non-supported platforms (as stubs), so you can just write your code with the
assumption that tray support is available. If your application is written
like this and is run on a platform that does not have tray support then no
tray item will be shown, but your application will otherwise run fine.

However if you want to change your application behaviour according to
whether the tray is available or not (ie.-
https://bugs.eclipse.org/bugs/show_bug.cgi?id=64923 ) then differentiating
according to the platform string should be fine.

Grant

"Max" <this@address.is.invalid> wrote in message
news:MPG.1bb6737c7a1c7cf0989682@news.eclipse.org...
> So it should be safe to use the following simple workaround to determine
> if a platform has Tray support?
>
> private boolean platformHasTray()
> {
> String pf = SWT.getPlatform();
> return (pf.equals("win32") || pf.equals("gtk")) ? true : false;
> }
>
> I hope that a similar api will be added to SWT. In
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=64923 it's mentioned that
> this will be added "post 3.0", which is now :-)
>
>
> In article <chmqu3$qf4$1@eclipse.org>, grant_gayed@ca.ibm.com says...
> > gtk also
> >
> > "Max" <this@address.is.invalid> wrote in message
> > news:MPG.1ba8f712e700ce4c989682@news.eclipse.org...
> > > On which platforms are TrayItem supported?
> > >
> > > Windows is the only one I know of for sure. Anyone else?
> > >
> > > --
> > > Regards Max rotvel AT bolignet-aarhus DOT dk
> >
> >
> >
>
> --
> Regards Max rotvel AT bolignet-aarhus DOT dk
Previous Topic:Scrolling tabitems
Next Topic:FindReplace Dialog in SWT Text Widget Standalone App?
Goto Forum:
  


Current Time: Sat Apr 27 03:30:36 GMT 2024

Powered by FUDForum. Page generated in 0.03646 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top