Re: Multiple instances of applets
- From: Gregory Merchan <merchan phys lsu edu>
- To: Mark McLoughlin <mark skynet ie>
- Cc: Loban A Rahman <loban ugcs caltech edu>, Desktop Devel <desktop-devel-list gnome org>
- Subject: Re: Multiple instances of applets
- Date: Tue, 8 Apr 2003 17:06:50 -0500
On Wed, Apr 09, 2003 at 08:13:35AM +1200, Mark McLoughlin wrote:
> Hi Loban,
>
> On Wed, 2003-04-09 at 07:25, Loban A Rahman wrote:
> > Should all applets be required to allow multiple instances by the same
> > user?
> Yes.
>
> > Or can I force only one instance of a particular applet to be
> > alive at one time?
>
> Its not currently possible but I'm thinking of implementing a .server
> file flag that indicates that there should only be a single instance of
> an applet per-screen. When there is one instance of the applet on that
> screen, that applet wouldn't be in the menu anymore.
I think a setup like on Windows (check menu items) or removing the menu
interface in favor of maybe a check list would be better than having items
disappear from menus.
> It would be useful for the notification area ... I'm not sure what
> happens when you add a new notification area applet ... but I think
> it'll be fairly broken.
It shouldn't be. If it is, then there's a bug in the applet. Because the
notification area uses a protocol with an X selection manager, there can
be only one at a time. If it loses the selection, it should at least
disappear from the screen until it can regain it. It should only try to
regain it when the existing owner window is destroyed. It would probably
be better to just exit when the selection is lost and to not try to claim
the selection when the selection is owned.
Window managers and a clipboard manager make use of the same method, a
manager selection, for uniqueness. (For WM's it's the WM_Sn selection where
'n' is the screen number. For a clipboard manager it's the CLIPBOARD_MANAGER
selection.) Generally, a selection manager is unique to a display. With the
"_Sn" postfix one can be made unique to a screen.
Control panels can be made unique in the same way. I just checked on my
desktop: it's possible to run at least the keyboard control panel twice,
and it shouldn't be. This control panel could manage a selection to be
unique. If it's particular to a display, the selection might be
_GNOME_CONTROL_KEYBOARD; if to a screen, _GNOME_CONTROL_KEYBOARD_Sn.
Other control panels could have similarly named selections. Every one of
these should support a selection request which will cause the window of
an existing control panel to be displayed. That way the second launch of
a control panel can instead bring forth the existing window.
(Incidently, the keyboard control took "a really long time" to launch;
about 3 seconds here. At this time I've no idea why it's so slow.)
Cheers,
Greg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]