[gnome-software/wip/gs-dbus-helper-use-non-NULL-values-for-actions] gs-dbus-helper: Use non-NULL values for GNotification actions
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/gs-dbus-helper-use-non-NULL-values-for-actions] gs-dbus-helper: Use non-NULL values for GNotification actions
- Date: Wed, 7 Sep 2022 15:43:03 +0000 (UTC)
commit 36a22f58bd9f692b727c06d1b60e966d5b84f425
Author: Milan Crha <mcrha redhat com>
Date: Wed Sep 7 17:40:18 2022 +0200
gs-dbus-helper: Use non-NULL values for GNotification actions
There are printed runtime warnings on the console when the values are NULL,
thus make sure the functions do not pass NULL to the functions.
src/gs-dbus-helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-dbus-helper.c b/src/gs-dbus-helper.c
index 594ee788e..5e8b67650 100644
--- a/src/gs-dbus-helper.c
+++ b/src/gs-dbus-helper.c
@@ -329,8 +329,8 @@ notify_search_resources (GsExtrasPageMode mode,
n = g_notification_new (title);
g_notification_set_body (n, body);
/* 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_notification_add_button_with_target (n, _("Find in Software"), "app.install-resources",
"(s^assss)", mode_string, resources, "", desktop_id ? desktop_id : "", ident ? ident : "");
+ g_notification_set_default_action_and_target (n, "app.install-resources", "(s^assss)", mode_string,
resources, "", desktop_id ? desktop_id : "", ident ? ident : "");
gs_application_send_notification (GS_APPLICATION (g_application_get_default ()), "install-resources",
n, 60);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]