summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2020-09-25 16:26:35 +1200
committerRobert Ancell <robert.ancell@gmail.com>2020-10-19 04:07:53 +0000
commit83d3724ff60065f0841db9b134e1372c507ab494 (patch)
tree27ccbd02be08f4e326dfaa92e88a9c0b4612d314
parente09e53a8c236c1836640b3112581fcdd7445f336 (diff)
downloadgnome-control-center-83d3724ff60065f0841db9b134e1372c507ab494.tar.gz
online-accounts: Replace g_object_new with gtk widget methods
This improves compile time type checking.
-rw-r--r--panels/online-accounts/cc-online-accounts-panel.c12
1 files 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);