From c5d2a9bc98fb7d1ed85c69fc3007ab36b9fd96d5 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sun, 11 Mar 2007 15:41:47 +0000 Subject: allow setting startupnotify per execute action, default to disabled. use like this: programtruesomething descriptivename of an icon in the icon theme to show --- openbox/startupnotify.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'openbox/startupnotify.c') 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); -- cgit v1.2.3