[gnome-software] update monitor: Set default actions for the update done notifications
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] update monitor: Set default actions for the update done notifications
- Date: Thu, 30 Apr 2015 17:23:10 +0000 (UTC)
commit 2cf4d54682d78d9effdf9c1b2fd0266c991ce930
Author: Kalev Lember <kalevlember gmail com>
Date: Thu Apr 30 19:18:40 2015 +0200
update monitor: Set default actions for the update done notifications
In 3.16, gnome-shell "archives" unread notifications and only shows the
notification body for archived notifications, without any buttons.
This commit adds a default action to make sure that clicking on the
notification body opens up the expected gnome-software view.
https://bugzilla.gnome.org/show_bug.cgi?id=748582
src/gs-update-monitor.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c
index c822c6c..dfd037e 100644
--- a/src/gs-update-monitor.c
+++ b/src/gs-update-monitor.c
@@ -160,10 +160,13 @@ show_installed_updates_notification (GsUpdateMonitor *monitor)
g_notification_set_body (notification, message);
icon = g_themed_icon_new ("gnome-software-symbolic");
g_notification_set_icon (notification, icon);
- if (pk_results_get_exit_code (results) == PK_EXIT_ENUM_SUCCESS)
+ if (pk_results_get_exit_code (results) == PK_EXIT_ENUM_SUCCESS) {
g_notification_add_button_with_target (notification, _("Review"), "app.set-mode", "s",
"updated");
- else
+ g_notification_set_default_action_and_target (notification, "app.set-mode", "s", "updated");
+ } else {
g_notification_add_button (notification, _("Show Details"), "app.show-offline-update-error");
+ g_notification_set_default_action (notification, "app.show-offline-update-error");
+ }
g_notification_add_button (notification, _("OK"), "app.clear-offline-updates");
g_application_send_notification (monitor->application, "offline-updates", notification);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]