aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-view.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2003-12-02 13:24:02 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2003-12-02 13:24:02 +0800
commit49e7dd311ec4652cbd87fe6f7627c54ab20f4782 (patch)
treede7f360836c95134d1c57a52391a7fb4ee58388e /calendar/gui/e-calendar-view.c
parent89dc17247f41b4d82f4a973fa6f4a8358cd0f42c (diff)
downloadgsoc2013-evolution-49e7dd311ec4652cbd87fe6f7627c54ab20f4782.tar
gsoc2013-evolution-49e7dd311ec4652cbd87fe6f7627c54ab20f4782.tar.gz
gsoc2013-evolution-49e7dd311ec4652cbd87fe6f7627c54ab20f4782.tar.bz2
gsoc2013-evolution-49e7dd311ec4652cbd87fe6f7627c54ab20f4782.tar.lz
gsoc2013-evolution-49e7dd311ec4652cbd87fe6f7627c54ab20f4782.tar.xz
gsoc2013-evolution-49e7dd311ec4652cbd87fe6f7627c54ab20f4782.tar.zst
gsoc2013-evolution-49e7dd311ec4652cbd87fe6f7627c54ab20f4782.zip
Replace member "activity" with an "activity_id".
* gui/e-calendar-table.h (struct _ECalendarTable): Replace member "activity" with an "activity_id". * gui/e-cal-view.c (struct _ECalendarViewPrivate): Replace member "activity" with "activity_id". (e_calendar_view_destroy): Don't unref activity here anymore. (e_calendar_view_set_status_message): Report progress using the EActivityHandler off the CalendarComponent. * gui/calendar-component.c (struct _CalendarComponentPrivate): New member activity_handler. (calendar_component_init): Init. (calendar_component_peek_activity_handler): New. (impl_dispose): Unref. (impl_createControls): Return an ETaskBar for the statusbar control. svn path=/trunk/; revision=23565
Diffstat (limited to 'calendar/gui/e-calendar-view.c')
-rw-r--r--calendar/gui/e-calendar-view.c42
1 files changed, 17 insertions, 25 deletions
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 8b8d29bdaf..4d2db99905 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -30,8 +30,9 @@
#include "e-util/e-dialog-utils.h"
#include "e-calendar-marshal.h"
#include <libecal/e-cal-time-util.h>
-#include "evolution-activity-client.h"
+
#include "calendar-commands.h"
+#include "calendar-component.h"
#include "calendar-config.h"
#include "comp-util.h"
#include "e-cal-model-calendar.h"
@@ -50,7 +51,7 @@
/* Used for the status bar messages */
#define EVOLUTION_CALENDAR_PROGRESS_IMAGE "evolution-calendar-mini.png"
-static GdkPixbuf *progress_icon[2] = { NULL, NULL };
+static GdkPixbuf *progress_icon = NULL;
struct _ECalendarViewPrivate {
/* The GnomeCalendar we are associated to */
@@ -59,8 +60,8 @@ struct _ECalendarViewPrivate {
/* The calendar model we are monitoring */
ECalModel *model;
- /* The activity client used to show messages on the status bar. */
- EvolutionActivityClient *activity;
+ /* Current activity (for the EActivityHandler, i.e. the status bar). */
+ guint activity_id;
/* clipboard selections */
gchar *clipboard_selection;
@@ -360,11 +361,6 @@ e_calendar_view_destroy (GtkObject *object)
cal_view->priv->model = NULL;
}
- if (cal_view->priv->activity) {
- g_object_unref (cal_view->priv->activity);
- cal_view->priv->activity = NULL;
- }
-
if (cal_view->priv->clipboard_selection) {
g_free (cal_view->priv->clipboard_selection);
cal_view->priv->clipboard_selection = NULL;
@@ -516,31 +512,27 @@ e_calendar_view_set_use_24_hour_format (ECalendarView *cal_view, gboolean use_24
void
e_calendar_view_set_status_message (ECalendarView *cal_view, const gchar *message)
{
+ EActivityHandler *activity_handler = calendar_component_peek_activity_handler (calendar_component_peek ());
+
g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
if (!message || !*message) {
- if (cal_view->priv->activity) {
- g_object_unref (cal_view->priv->activity);
- cal_view->priv->activity = NULL;
+ if (cal_view->priv->activity_id != 0) {
+ e_activity_handler_operation_finished (activity_handler, cal_view->priv->activity_id);
+ cal_view->priv->activity_id = 0;
}
- } else if (!cal_view->priv->activity) {
-#if 0
- int display;
-#endif
+ } else if (cal_view->priv->activity_id == 0) {
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);
+ if (progress_icon == NULL)
+ progress_icon = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_CALENDAR_PROGRESS_IMAGE, NULL);
-#if 0
- cal_view->priv->activity = evolution_activity_client_new (
- global_shell_client, client_id,
- progress_icon, message, TRUE, &display);
-#endif
+ cal_view->priv->activity_id = e_activity_handler_operation_started (activity_handler, client_id, progress_icon, message, TRUE);
g_free (client_id);
- } else
- evolution_activity_client_update (cal_view->priv->activity, message, -1.0);
+ } else {
+ e_activity_handler_operation_progressing (activity_handler, cal_view->priv->activity_id, message, -1.0);
+ }
}
GList *