diff options
| author | Mikael Magnusson <mikachu@comhem.se> | 2007-03-11 15:41:47 +0000 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@comhem.se> | 2007-03-11 15:41:47 +0000 |
| commit | c5d2a9bc98fb7d1ed85c69fc3007ab36b9fd96d5 (patch) | |
| tree | 27531a3b9b26adda3e1853ca8b8f62d88a1b76b6 /openbox/startupnotify.c | |
| parent | 923e0edfa80dbfe7e9fa90bee8f6bb2dfb2f9907 (diff) | |
allow setting startupnotify per execute action, default to disabled. use like this: <action name="execute"><execute>program</execute><startupnotify><enabled>true</enabled><name>something descriptive</name><icon>name of an icon in the icon theme to show</icon></startupnotify</action>
Diffstat (limited to 'openbox/startupnotify.c')
| -rw-r--r-- | openbox/startupnotify.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/openbox/startupnotify.c b/openbox/startupnotify.c index 5db9bd48..954b9d4a 100644 --- a/openbox/startupnotify.c +++ b/openbox/startupnotify.c @@ -32,7 +32,8 @@ Time sn_app_started(const gchar *id, const gchar *wmclass) return CurrentTime; } gboolean sn_get_desktop(gchar *id, guint *desktop) { return FALSE; } -gchar **sn_get_spawn_environment(char *program, Time time) +gchar **sn_get_spawn_environment(char *program, char *name, + char *icon_name, Time time) { return g_strdupv(environ); } @@ -225,7 +226,8 @@ static gboolean sn_launch_wait_timeout(gpointer data) return FALSE; /* don't repeat */ } -gchar **sn_get_spawn_environment(char *program, Time time) +gchar **sn_get_spawn_environment(char *program, char *name, + char *icon_name, Time time) { gchar **env, *desc; guint len; @@ -238,9 +240,9 @@ gchar **sn_get_spawn_environment(char *program, Time time) sn_launcher = sn_launcher_context_new(sn_display, ob_screen); } - sn_launcher_context_set_name(sn_launcher, program); + sn_launcher_context_set_name(sn_launcher, name ? name : program); sn_launcher_context_set_description(sn_launcher, desc); - sn_launcher_context_set_icon_name(sn_launcher, program); + sn_launcher_context_set_icon_name(sn_launcher, icon_name ? icon_name : program); sn_launcher_context_set_binary_name(sn_launcher, program); sn_launcher_context_initiate(sn_launcher, "openbox", program, time); id = sn_launcher_context_get_startup_id(sn_launcher); |
