OT: libstartup-notification?

Erik Harrison erikharrison at gmail.com
Mon Feb 25 21:17:19 CET 2008


On Mon, Feb 25, 2008 at 2:49 PM, Brian J. Tarricone <bjt23 at cornell.edu> wrote:
>
> Enrico Tröger wrote:
>  > Hi,
>  >
>  > sorry for being off-topic but I'm not sure where to ask this and I know
>  > some of you might be able to help me. I'll try to get it a little
>  > on-topic :D.
>  >
>  > What exactly is libstartup-notification meant to be?
>  > Is it to be used by a desktop environment(like Xfce) which calls other
>  > applications and to get feedback about the started application?
>  > Or is it meant to be a general interface for applications which start
>  > other applications?
>  > And how to use?
>  >
>  > The background: I was thinking of adding support for
>  > libstartupnotification in Geany so that when a user in Xfce starts
>  > Geany with a panel launcher or via the menu system, Xfce knows that
>  > Geany is starting up and gives feedback to the user by changing the
>  > mouse cursor or whatever.
>  > My understanding of this was, that the started application(Geany) sends
>  > a signal with libstartupnotification when it has finished starting up.
>  > But first, I don't know how to do and I don't find any example code.
>  > And the strange thing is, it seems already to work. When I start Geany
>  > from the panel(I have a launcher item for it) a new window appears in
>  > the task list only with the title "geany" and when Geany has finished
>  > starting the title in the task bar changes to the real Geany window
>  > title, e.g. "file - dir - Geany".
>  > So, does startup notification already work without any need of any
>  > action of the started app itself?
>  > Or am I completely wrong?
>
>  Try adding StartupNotify=true to the app's desktop file, or just check
>  the box in the panel launcher prefs, and see if it works.  I coulda
>  sworn that gtk did the startup notification magic automatically now.

It does. gdk_notify_startup_complete() is automatically called when
the first window is displayed by an application, since Gtk+2.2. Look
at the GtkWindow class if you need to override the automagic handling.

Setting StartupNotification to True in Geany's .desktop makes
launching Geany from the panel work as expected.

>  Could be wrong, though.  Otherwise, see xfce_exec() in libxfcegui4 for
>  how we use SN from the launcher side.
>
>         -brian
>
>  _______________________________________________
>  Xfce4-dev mailing list
>  Xfce4-dev at xfce.org
>  http://foo-projects.org/mailman/listinfo/xfce4-dev
>



-- 
Erik
"Look at me still talking when there is Science to do"



More information about the Xfce4-dev mailing list