1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-06-30 15:49:31 +00:00

record-row: Fix passing widget instead of string as action target

When introducing the per protocol dial actions we started setting the widget
self->target as the action target instead of the target property of
self->record.

Bizzarely we only sometimes got greeted with a critical:

11:30:20.5184                 GLib[887977]:CRITICAL: g_variant_new_string: assertion 'g_utf8_validate (string, -1, NULL)' failed

Thread 1 "gnome-calls" received signal SIGTRAP, Trace/breakpoint trap.
g_logv (log_domain=0x7ffff7ea400e "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=<optimized out>) at ../../../glib/gmessages.c:1417
1417	../../../glib/gmessages.c: No such file or directory.
(gdb) bt
    at ../../../glib/gmessages.c:2898

Fixes: 687dd7ff383476523ae0a8a38879a171cb0b9a5a
Closes #398
This commit is contained in:
Evangelos Ribeiro Tzaras 2022-02-01 23:21:59 +01:00
parent d452e0a702
commit 896af6f8af

View file

@ -434,12 +434,14 @@ constructed (GObject *object)
g_autofree char *target_name = NULL;
g_autofree char *protocol = NULL;
g_autofree char *action_name = NULL;
g_autofree char *target = NULL;
g_object_get (self->record,
"inbound", &inbound,
"answered", &answered,
"end", &end,
"protocol", &protocol,
"target", &target,
NULL);
/* Fall back to "app.dial-tel" action if no protocol was given */
@ -452,7 +454,7 @@ constructed (GObject *object)
/* TODO add origin ID to action target */
gtk_actionable_set_action_target (GTK_ACTIONABLE (self->button),
"(ss)", self->target, "");
"(ss)", target, "");
setup_time (self, inbound, answered, end);
calls_date_time_unref (answered);