Re: GUnique [Was: gnome-utils branched for GNOME 2.16]
- From: "Elijah Newren" <newren gmail com>
- To: "Havoc Pennington" <hp redhat com>
- Cc: desktop-devel-list gnome org
- Subject: Re: GUnique [Was: gnome-utils branched for GNOME 2.16]
- Date: Sun, 24 Sep 2006 21:23:15 -0600
On 9/24/06, Havoc Pennington <hp redhat com> wrote:
Though I guess either way, you have essentially zero chance of getting
this right without using libstartup-notification ... which might be the
bigger picture point.
Actually as long as you aren't forking/execing a new process,
libstartup-notification isn't really needed anymore -- or soon won't
be (see e.g. bug 347375). The EWMH, gtk+, and metacity have been
extended a bit so that libstartup-notification is only really needed
for launching processes (and special apps like metacity and
wnck-applet) these days. Of course, if you have a single instance app
or open windows in response to messages from other applications then
you still have work to do, it's just been reduced...
Also important to libdbus human-readability is the bus name the app
owns, so it'd be nice to have org.gnome.GEdit rather than
org.gnome.GUniqueApp.gedit
There's a kind of impedance mismatch between dbus and some more basic
ipc... with dbus you can have the bus launch things. So if you have a
.service file, you can just unconditionally do:
app = new Proxy("org.gnome.GEdit");
app.Launch(uris, props);
And gedit will be started if it isn't already, and reused otherwise,
with no race conditions.
Uh, with no race conditions affecting the number of gedit processes, I
think you mean. There's focus and workspace race conditions, unless
D-Bus launches gedit appropriately (e.g. uses
libstartup-notification). Is it possible to have D-Bus launch using
libstartup-notification?
Elijah
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]