From 83d3724ff60065f0841db9b134e1372c507ab494 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Fri, 25 Sep 2020 16:26:35 +1200 Subject: [PATCH] online-accounts: Replace g_object_new with gtk widget methods This improves compile time type checking. --- panels/online-accounts/cc-online-accounts-panel.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/panels/online-accounts/cc-online-accounts-panel.c b/panels/online-accounts/cc-online-accounts-panel.c index e6d6a3dfb..642396cb3 100644 --- a/panels/online-accounts/cc-online-accounts-panel.c +++ b/panels/online-accounts/cc-online-accounts-panel.c @@ -797,13 +797,11 @@ on_account_added (GoaClient *client, goa_account_get_provider_name (account), goa_account_get_presentation_identity (account)); - label = g_object_new (GTK_TYPE_LABEL, - "ellipsize", PANGO_ELLIPSIZE_END, - "label", title, - "xalign", 0.0, - "use-markup", TRUE, - "hexpand", TRUE, - NULL); + label = gtk_label_new (NULL); + gtk_label_set_markup (GTK_LABEL (label), title); + gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END); + gtk_label_set_xalign (GTK_LABEL (label), 0.0); + gtk_widget_set_hexpand (label, TRUE); gtk_widget_show (label); gtk_container_add (GTK_CONTAINER (box), label);