[gnome-builder] update-manager: tweak notification



commit 22d7b0cd2518f834ed8d1de2515e9d7fccf70982
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jan 16 19:46:22 2020 -0800

    update-manager: tweak notification

 src/plugins/update-manager/gbp-update-manager-app-addin.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/update-manager/gbp-update-manager-app-addin.c 
b/src/plugins/update-manager/gbp-update-manager-app-addin.c
index e792684be..765e238f7 100644
--- a/src/plugins/update-manager/gbp-update-manager-app-addin.c
+++ b/src/plugins/update-manager/gbp-update-manager-app-addin.c
@@ -64,8 +64,11 @@ on_update_install_cb (GObject      *object,
     }
   else
     {
-      ide_notification_withdraw (self->update_notif);
-      g_clear_object (&self->update_notif);
+      if (self->update_notif != NULL)
+        {
+          ide_notification_withdraw (self->update_notif);
+          g_clear_object (&self->update_notif);
+        }
     }
 
   IDE_EXIT;
@@ -155,6 +158,9 @@ on_update_available_cb (GbpUpdateManagerAppAddin *self,
       ide_notification_set_id (self->update_notif, "org.gnome.builder.update-available");
       ide_notification_set_icon_name (self->update_notif, "software-update-available-symbolic");
       ide_notification_set_title (self->update_notif, _("Update Available"));
+      ide_notification_set_body (self->update_notif, _("An update to Builder is available. Builder can 
download and install it for you."));
+      ide_notification_set_urgent (self->update_notif, TRUE);
+      ide_notification_add_button (self->update_notif, _("Update"), NULL, "app.update-builder");
       ide_notification_attach (self->update_notif, IDE_OBJECT (context));
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]