[gnome-software/859-app-has-been-installed-notifications-sit-around-indefinitely: 115/116] gs-dbus-helper: Use GsApplication notification API




commit df05be23561ab84d87e131d5166a19dd1d99c889
Author: Milan Crha <mcrha redhat com>
Date:   Wed May 25 21:04:56 2022 +0200

    gs-dbus-helper: Use GsApplication notification API
    
    To auto-withdraw notifications after an hour.

 src/gs-dbus-helper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/gs-dbus-helper.c b/src/gs-dbus-helper.c
index 4ef5e1fee..594ee788e 100644
--- a/src/gs-dbus-helper.c
+++ b/src/gs-dbus-helper.c
@@ -17,6 +17,7 @@
 
 #include "gnome-software-private.h"
 
+#include "gs-application.h"
 #include "gs-dbus-helper.h"
 #include "gs-packagekit-generated.h"
 #include "gs-packagekit-modify2-generated.h"
@@ -330,7 +331,7 @@ notify_search_resources (GsExtrasPageMode   mode,
        /* TRANSLATORS: this is a button that launches gnome-software */
        g_notification_add_button_with_target (n, _("Find in Software"), "app.install-resources", 
"(s^assss)", mode_string, resources, "", desktop_id, ident);
        g_notification_set_default_action_and_target (n, "app.install-resources", "(s^assss)", mode_string, 
resources, "", desktop_id, ident);
-       g_application_send_notification (g_application_get_default (), "install-resources", n);
+       gs_application_send_notification (GS_APPLICATION (g_application_get_default ()), "install-resources", 
n, 60);
 }
 
 typedef struct _InstallResourcesData {


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