aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-view.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2003-07-22 23:38:21 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2003-07-22 23:38:21 +0800
commit70ef8a70ea16d9f63b2751e8e460404866ca3e76 (patch)
tree8c7aa19fb69acab87d6148dba51b398b19538b4b /calendar/gui/e-cal-view.c
parent82ff4d63795c0e6ee67190f082046537435b392c (diff)
downloadgsoc2013-evolution-70ef8a70ea16d9f63b2751e8e460404866ca3e76.tar.gz
gsoc2013-evolution-70ef8a70ea16d9f63b2751e8e460404866ca3e76.tar.zst
gsoc2013-evolution-70ef8a70ea16d9f63b2751e8e460404866ca3e76.zip
removed e_day_view_set_calendar prototype.
2003-07-21 Rodrigo Moya <rodrigo@ximian.com> * gui/e-day-view.[ch]: removed e_day_view_set_calendar prototype. (e_day_view_set_status_message): removed. * gui/e-week-view.[ch] (e_week_view_set_status_message): removed. * gui/e-cal-view.[ch] (e_cal_view_set_status_message): new functions. (e_cal_view_destroy): unref activity client. * gui/gnome-cal.c: updated to e_*_view/e_cal_view. svn path=/trunk/; revision=21890
Diffstat (limited to 'calendar/gui/e-cal-view.c')
-rw-r--r--calendar/gui/e-cal-view.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/calendar/gui/e-cal-view.c b/calendar/gui/e-cal-view.c
index 3c35995a60..6272f0eab9 100644
--- a/calendar/gui/e-cal-view.c
+++ b/calendar/gui/e-cal-view.c
@@ -23,11 +23,19 @@
#include <config.h>
#include <gal/util/e-util.h>
+#include "evolution-activity-client.h"
#include "e-cal-view.h"
+/* Used for the status bar messages */
+#define EVOLUTION_CALENDAR_PROGRESS_IMAGE "evolution-calendar-mini.png"
+static GdkPixbuf *progress_icon[2] = { NULL, NULL };
+
struct _ECalViewPrivate {
/* The GnomeCalendar we are associated to */
GnomeCalendar *calendar;
+
+ /* The activity client used to show messages on the status bar. */
+ EvolutionActivityClient *activity;
};
static void e_cal_view_class_init (ECalViewClass *klass);
@@ -81,6 +89,11 @@ e_cal_view_destroy (GtkObject *object)
g_return_if_fail (E_IS_CAL_VIEW (cal_view));
if (cal_view->priv) {
+ if (cal_view->priv->activity) {
+ g_object_unref (cal_view->priv->activity);
+ cal_view->priv->activity = NULL;
+ }
+
g_free (cal_view->priv);
cal_view->priv = NULL;
}
@@ -107,3 +120,30 @@ e_cal_view_set_calendar (ECalView *cal_view, GnomeCalendar *calendar)
cal_view->priv->calendar = calendar;
}
+
+void
+e_cal_view_set_status_message (ECalView *cal_view, const gchar *message)
+{
+ extern EvolutionShellClient *global_shell_client; /* ugly */
+
+ g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+
+ if (!message || !*message) {
+ if (cal_view->priv->activity) {
+ g_object_unref (cal_view->priv->activity);
+ cal_view->priv->activity = NULL;
+ }
+ } else if (!cal_view->priv->activity) {
+ int display;
+ char *client_id = g_strdup_printf ("%p", cal_view);
+
+ if (progress_icon[0] == NULL)
+ progress_icon[0] = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_CALENDAR_PROGRESS_IMAGE, NULL);
+ cal_view->priv->activity = evolution_activity_client_new (
+ global_shell_client, client_id,
+ progress_icon, message, TRUE, &display);
+
+ g_free (client_id);
+ } else
+ evolution_activity_client_update (cal_view->priv->activity, message, -1.0);
+}