Use set_label api for incoming server captions
authorJose Dapena Paz <jdapena@igalia.com>
Mon, 19 Jan 2009 10:44:33 +0000 (10:44 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Mon, 19 Jan 2009 10:44:33 +0000 (10:44 +0000)
pmo-trunk-r7172

src/hildon2/modest-default-account-settings-dialog.c
src/hildon2/modest-easysetup-wizard-dialog.c

index 8bcab9c..5ec31a0 100644 (file)
@@ -662,7 +662,7 @@ update_incoming_server_title (ModestDefaultAccountSettingsDialog *self,
        with_asterisk = g_strconcat (incomingserver_title, "*", NULL);
        g_free (incomingserver_title);
        
-       g_object_set (G_OBJECT (priv->caption_incoming), "label", with_asterisk, NULL);
+       modest_maemo_utils_captioned_set_label (priv->caption_incoming, with_asterisk, FALSE);
        g_free (with_asterisk);
 }
 
index f84c648..22c0d36 100644 (file)
@@ -636,15 +636,6 @@ update_incoming_server_title (ModestEasysetupWizardDialog *self)
                gchar* incomingserver_title;
                const gchar *protocol_display_name;
                ModestProtocol *protocol;
-               GtkWidget *label;
-               GList *children;
-
-               /* Get the label and change it. This is ugly */
-               children = gtk_container_get_children (GTK_CONTAINER (priv->caption_incoming));
-               label = (GtkWidget *) children->data;
-
-               if (!GTK_IS_LABEL (label))
-                       return;
 
                protocol = modest_protocol_registry_get_protocol_by_type (protocol_registry, 
                                                                          protocol_type);
@@ -653,7 +644,7 @@ update_incoming_server_title (ModestEasysetupWizardDialog *self)
                incomingserver_title = g_strdup_printf(_("mcen_li_emailsetup_servertype"), 
                                                       protocol_display_name);
 
-               gtk_label_set_markup (GTK_LABEL (label), incomingserver_title);
+               modest_maemo_utils_captioned_set_label (priv->caption_incoming, incomingserver_title, TRUE);
 
                g_free(incomingserver_title);
        }