1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-11-19 01:51:46 +00:00

record-row: Use STR_IS_NULL_OR_EMPTY macro

This commit is contained in:
Evangelos Ribeiro Tzaras 2022-07-23 14:21:54 +02:00
parent 8e23d77508
commit 0d6095b42a

View file

@ -334,7 +334,7 @@ setup_contact (CallsCallRecordRow *self)
"target", &target, "target", &target,
NULL); NULL);
if (!target || target[0] == '\0') { if (STR_IS_NULL_OR_EMPTY (target)) {
gtk_actionable_set_action_name (GTK_ACTIONABLE (self->button), NULL); gtk_actionable_set_action_name (GTK_ACTIONABLE (self->button), NULL);
g_simple_action_set_enabled (G_SIMPLE_ACTION (action_copy), FALSE); g_simple_action_set_enabled (G_SIMPLE_ACTION (action_copy), FALSE);
} else { } else {
@ -467,7 +467,7 @@ constructed (GObject *object)
gtk_actionable_set_action_name (GTK_ACTIONABLE (self->button), action_name); gtk_actionable_set_action_name (GTK_ACTIONABLE (self->button), action_name);
/* TODO add origin ID to action target */ /* TODO add origin ID to action target */
if (target && *target) if (!STR_IS_NULL_OR_EMPTY (target))
gtk_actionable_set_action_target (GTK_ACTIONABLE (self->button), gtk_actionable_set_action_target (GTK_ACTIONABLE (self->button),
"(ss)", target, ""); "(ss)", target, "");