[gnome-settings-daemon] media-keys: Add helper to launch either of 2 desktop files
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] media-keys: Add helper to launch either of 2 desktop files
- Date: Thu, 15 Nov 2012 06:30:35 +0000 (UTC)
commit dbf41fafea55052c1957f4cb80926e3ebc63ce5b
Author: Bastien Nocera <hadess hadess net>
Date: Thu Nov 15 07:28:30 2012 +0100
media-keys: Add helper to launch either of 2 desktop files
plugins/media-keys/gsd-media-keys-manager.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index 463385a..ab0d457 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -889,6 +889,26 @@ do_execute_desktop (GsdMediaKeysManager *manager,
} else {
g_warning ("Could not find application '%s'", desktop);
}
+
+static void
+do_execute_desktop_or_desktop (GsdMediaKeysManager *manager,
+ const char *desktop,
+ const char *alt_desktop;
+ gint64 timestamp)
+{
+ GDesktopAppInfo *app_info;
+
+ app_info = g_desktop_app_info_new (desktop);
+ if (app_info == NULL)
+ app_info = g_desktop_app_info_new (alt_desktop);
+
+ if (app_info != NULL) {
+ launch_app (G_APP_INFO (app_info), timestamp);
+ g_object_unref (app_info);
+ return;
+ }
+
+ g_warning ("Could not find application '%s' or '%s'", desktop, alt_desktop);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]