info->cancel = TRUE;
}
}
+typedef struct {
+ GtkProgressBar *progress;
+ gboolean not_finished;
+} KeepPulsing;
+
+static gboolean
+keep_pulsing (gpointer user_data)
+{
+ KeepPulsing *info = (KeepPulsing *) user_data;
+
+ gtk_progress_bar_pulse (info->progress);
+
+ if (!info->not_finished) {
+ g_object_unref (info->progress);
+ g_slice_free (KeepPulsing, info);
+ return FALSE;
+ }
+
+ return TRUE;
+}
GList*
modest_utils_get_supported_secure_authentication_methods (ModestTransportStoreProtocol proto,
info->cancel = FALSE;
info->error = NULL;
info->progress = gtk_progress_bar_new();
- /* TODO: Need logical_ID for the title: */
- info->dialog = gtk_dialog_new_with_buttons(_("Authentication"),
+
+ /* FIXME: the title (first arg) here is empty; there should be 'accountwizard_fi_authentication',
+ * but that does not exist yet; see bug #82487. so, for now, we simply leave it empty
+ */
+ info->dialog = gtk_dialog_new_with_buttons(" ",
parent_window, GTK_DIALOG_MODAL,
_("mcen_bd_dialog_cancel"),
GTK_RESPONSE_REJECT,
g_signal_connect(G_OBJECT(info->dialog), "response", G_CALLBACK(on_secure_auth_cancel), info);
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(info->dialog)->vbox),
- gtk_label_new("Checking for supported authentication types..."));
+ gtk_label_new(_("emev_ni_checking_supported_auth_methods")));
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(info->dialog)->vbox), info->progress);
gtk_widget_show_all(info->dialog);
- gtk_progress_bar_pulse(GTK_PROGRESS_BAR(info->progress));
+
+ KeepPulsing *pi = g_slice_new (KeepPulsing);
+ pi->progress = (GtkProgressBar *) g_object_ref (info->progress);
+ pi->not_finished = TRUE;
+
+ /* Starts the pulsing of the progressbar */
+ g_timeout_add (500, keep_pulsing, pi);
printf ("DEBUG: %s: STARTING.\n", __FUNCTION__);
+
tny_camel_account_get_supported_secure_authentication (
TNY_CAMEL_ACCOUNT (tny_account),
on_camel_account_get_supported_secure_authentication,
gtk_dialog_run (GTK_DIALOG (info->dialog));
+ pi->not_finished = FALSE;
+ /* pi is freed in the timeout itself to avoid a GCond here */
+
gtk_widget_destroy(info->dialog);
GList *result = info->result;