[glib/wip/gnotification] Activate application when default action is unset
- From: Lars Uebernickel <larsu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/gnotification] Activate application when default action is unset
- Date: Mon, 21 Oct 2013 16:33:30 +0000 (UTC)
commit 97c4a2f191babacf8f56646d50bec5ecd6aa0a0b
Author: Lars Uebernickel <lars uebernic de>
Date: Mon Oct 21 12:31:12 2013 -0400
Activate application when default action is unset
gio/gnotificationbackend.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/gio/gnotificationbackend.c b/gio/gnotificationbackend.c
index d5ced9c..a3bcde5 100644
--- a/gio/gnotificationbackend.c
+++ b/gio/gnotificationbackend.c
@@ -97,10 +97,16 @@ g_notification_backend_activate_action (GNotificationBackend *backend,
GVariant *parameter)
{
g_return_if_fail (G_IS_NOTIFICATION_BACKEND (backend));
- g_return_if_fail (name != NULL);
- if (g_str_has_prefix (name, "app."))
- g_action_group_activate_action (G_ACTION_GROUP (backend->application), name + 4, parameter);
+ if (name)
+ {
+ if (g_str_has_prefix (name, "app."))
+ g_action_group_activate_action (G_ACTION_GROUP (backend->application), name + 4, parameter);
+ }
+ else
+ {
+ g_application_activate (backend->application);
+ }
}
GDBusConnection *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]