+/*
+ * below some stuff to clearup statusbar messages after 1,5 seconds....
+ */
+typedef struct {
+ GtkWidget *status_bar;
+ GtkWidget *progress_bar;
+ guint msg_id;
+} StatusRemoveData;
+
+
+static gboolean
+on_statusbar_remove_msg (StatusRemoveData *data)
+{
+ gtk_statusbar_remove (GTK_STATUSBAR(data->status_bar), 0, data->msg_id);
+ g_free (data);
+
+ gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR(data->progress_bar), 1.0);
+
+ return FALSE;
+}
+
+
+static void
+statusbar_push (ModestWidgetFactory *self, guint context_id, const gchar *msg)
+{
+ guint id;
+ StatusRemoveData *data;
+ ModestWidgetFactoryPrivate *priv;
+
+ priv = MODEST_WIDGET_FACTORY_GET_PRIVATE(self);
+
+ if (!msg)
+ return;
+
+ id = gtk_statusbar_push (GTK_STATUSBAR(priv->status_bar), 0, msg);
+
+ data = g_new (StatusRemoveData, 1);
+ data->status_bar = priv->status_bar;
+ data->progress_bar = priv->progress_bar;
+ data->msg_id = id;
+
+ g_timeout_add (1500, (GSourceFunc)on_statusbar_remove_msg, data);
+}
+/****************************************************************************/
+
+