[evolution-mapi] Add spinner to wait dialog



commit b6b66f3ab9675c66066404ebdbe7c087ca75a26c
Author: Milan Crha <mcrha redhat com>
Date:   Thu Jun 28 16:21:16 2012 +0200

    Add spinner to wait dialog

 src/configuration/e-mapi-config-utils.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/configuration/e-mapi-config-utils.c b/src/configuration/e-mapi-config-utils.c
index 69ce568..66a471e 100644
--- a/src/configuration/e-mapi-config-utils.c
+++ b/src/configuration/e-mapi-config-utils.c
@@ -158,7 +158,7 @@ e_mapi_config_utils_run_in_thread_with_feedback_general (GtkWindow *parent,
 					    GDestroyNotify free_user_data,
 					    gboolean run_modal)
 {
-	GtkWidget *dialog, *label, *content;
+	GtkWidget *dialog, *label, *content, *spinner, *box;
 	struct RunWithFeedbackData *rfd;
 
 	g_return_if_fail (with_object != NULL);
@@ -171,12 +171,20 @@ e_mapi_config_utils_run_in_thread_with_feedback_general (GtkWindow *parent,
 		GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
 		NULL);
 
+	box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+
+	spinner = gtk_spinner_new ();
+	gtk_spinner_start (GTK_SPINNER (spinner));
+	gtk_box_pack_start (GTK_BOX (box), spinner, FALSE, FALSE, 0);
+
 	label = gtk_label_new (description);
-	gtk_widget_show (label);
+	gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0);
+
+	gtk_widget_show_all (box);
 
 	content = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
 
-	gtk_container_add (GTK_CONTAINER (content), label);
+	gtk_container_add (GTK_CONTAINER (content), box);
 	gtk_container_set_border_width (GTK_CONTAINER (content), 12);
 
 	rfd = g_new0 (struct RunWithFeedbackData, 1);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]