]> git.0d.be Git - empathy.git/commitdiff
Add a GtkSpinner to notify the RequestContactInfo progress
authorXavier Claessens <xclaesse@gmail.com>
Thu, 3 Jun 2010 16:08:45 +0000 (18:08 +0200)
committerXavier Claessens <xclaesse@gmail.com>
Tue, 15 Jun 2010 11:04:39 +0000 (13:04 +0200)
libempathy-gtk/empathy-contact-widget.c

index 5b03c597e1d26d394c678d8792c0fe9337f2ea9f..72fe321d75be8b1f5dc020b455577267409fde03 100644 (file)
@@ -123,6 +123,7 @@ typedef struct
   GtkWidget *vbox_details;
   GtkWidget *table_details;
   GtkWidget *hbox_details_requested;
   GtkWidget *vbox_details;
   GtkWidget *table_details;
   GtkWidget *hbox_details_requested;
+  GtkWidget *spinner_details;
   GList *details_to_set;
   GCancellable *details_cancellable;
 
   GList *details_to_set;
   GCancellable *details_cancellable;
 
@@ -184,6 +185,11 @@ static void
 contact_widget_details_setup (EmpathyContactWidget *information)
 {
   gtk_widget_hide (information->vbox_details);
 contact_widget_details_setup (EmpathyContactWidget *information)
 {
   gtk_widget_hide (information->vbox_details);
+
+  information->spinner_details = gtk_spinner_new ();
+  gtk_box_pack_end (GTK_BOX (information->hbox_details_requested),
+      information->spinner_details, TRUE, TRUE, 0);
+  gtk_widget_show (information->spinner_details);
 }
 
 static void
 }
 
 static void
@@ -424,6 +430,7 @@ contact_widget_details_notify_cb (EmpathyContactWidget *information)
     }
 
   gtk_widget_hide (information->hbox_details_requested);
     }
 
   gtk_widget_hide (information->hbox_details_requested);
+  gtk_spinner_stop (GTK_SPINNER (information->spinner_details));
 }
 
 static void
 }
 
 static void
@@ -493,6 +500,7 @@ contact_widget_details_feature_prepared_cb (GObject *object,
   gtk_widget_show (information->vbox_details);
   gtk_widget_show (information->hbox_details_requested);
   gtk_widget_hide (information->table_details);
   gtk_widget_show (information->vbox_details);
   gtk_widget_show (information->hbox_details_requested);
   gtk_widget_hide (information->table_details);
+  gtk_spinner_start (GTK_SPINNER (information->spinner_details));
 
   contact = empathy_contact_get_tp_contact (information->contact);
   g_assert (information->details_cancellable == NULL);
 
   contact = empathy_contact_get_tp_contact (information->contact);
   g_assert (information->details_cancellable == NULL);