gjdwebserver-overlay/net-voip/gnome-calls/files/add-call-back-button.patch
Gerben Jan Dijkman 5667210552 Added Gnome Calls
2021-07-14 14:59:08 +02:00

38 lines
1.3 KiB
Diff

From c43bfe3ebb9c0f98c143b8b3e777058d5c1c11e3 Mon Sep 17 00:00:00 2001
From: Evangelos Ribeiro Tzaras <devrtz@fortysixandtwo.eu>
Date: Tue, 8 Sep 2020 05:10:11 +0200
Subject: [PATCH] src/calls-notifier.c: Add call-back button
---
src/calls-notifier.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/calls-notifier.c b/src/calls-notifier.c
index 292c559..076e2c6 100644
--- a/src/calls-notifier.c
+++ b/src/calls-notifier.c
@@ -46,6 +46,7 @@ notify (CallsNotifier *self, CallsCall *call)
g_autoptr(GNotification) notification;
g_autofree gchar *msg = NULL;
g_autofree gchar *ref = NULL;
+ g_autofree gchar *label_callback = NULL;
const char *name;
notification = g_notification_new (_("Missed call"));
@@ -57,6 +58,12 @@ notify (CallsNotifier *self, CallsCall *call)
msg = g_strdup_printf (_("Missed call from %s"), calls_call_get_number (call));
g_notification_set_body (notification, msg);
+
+ if (calls_call_get_number (call)) {
+ label_callback = g_strdup_printf ("app.dial::%s", calls_call_get_number (call));
+ g_notification_add_button (notification, _("Call back"), label_callback);
+ }
+
ref = g_strdup_printf ("missed-call-%s", calls_call_get_number (call) ?: "unknown");
g_application_send_notification (app, ref, notification);
}
--
2.26.2