mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-14 00:17:35 +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:
parent
d452e0a702
commit
896af6f8af
1 changed files with 3 additions and 1 deletions
|
@ -434,12 +434,14 @@ constructed (GObject *object)
|
||||||
g_autofree char *target_name = NULL;
|
g_autofree char *target_name = NULL;
|
||||||
g_autofree char *protocol = NULL;
|
g_autofree char *protocol = NULL;
|
||||||
g_autofree char *action_name = NULL;
|
g_autofree char *action_name = NULL;
|
||||||
|
g_autofree char *target = NULL;
|
||||||
|
|
||||||
g_object_get (self->record,
|
g_object_get (self->record,
|
||||||
"inbound", &inbound,
|
"inbound", &inbound,
|
||||||
"answered", &answered,
|
"answered", &answered,
|
||||||
"end", &end,
|
"end", &end,
|
||||||
"protocol", &protocol,
|
"protocol", &protocol,
|
||||||
|
"target", &target,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
/* Fall back to "app.dial-tel" action if no protocol was given */
|
/* 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 */
|
/* TODO add origin ID to action target */
|
||||||
gtk_actionable_set_action_target (GTK_ACTIONABLE (self->button),
|
gtk_actionable_set_action_target (GTK_ACTIONABLE (self->button),
|
||||||
"(ss)", self->target, "");
|
"(ss)", target, "");
|
||||||
|
|
||||||
setup_time (self, inbound, answered, end);
|
setup_time (self, inbound, answered, end);
|
||||||
calls_date_time_unref (answered);
|
calls_date_time_unref (answered);
|
||||||
|
|
Loading…
Reference in a new issue