aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-table.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-table.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-table.c')
-rw-r--r--calendar/gui/e-calendar-table.c48
1 files changed, 23 insertions, 25 deletions
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c
index fc14a50800..74be935d5c 100644
--- a/calendar/gui/e-calendar-table.c
+++ b/calendar/gui/e-calendar-table.c
@@ -5,8 +5,7 @@
* Damon Chaplin <damon@ximian.com>
* Rodrigo Moya <rodrigo@ximian.com>
*
- * Copyright 2000, Ximian, Inc.
- * Copyright 2000, Ximian, Inc.
+ * Copyright 2000, 2001, 2002, 2003 Novell, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
@@ -42,15 +41,17 @@
#include <e-util/e-dialog-utils.h>
#include <widgets/misc/e-cell-date-edit.h>
#include <widgets/misc/e-cell-percent.h>
-#include "e-comp-editor-registry.h"
-#include "e-calendar-table.h"
-#include "e-cell-date-edit-text.h"
+
+#include "calendar-component.h"
#include "calendar-config.h"
-#include "e-cal-model-tasks.h"
-#include "print.h"
#include "dialogs/delete-comp.h"
#include "dialogs/delete-error.h"
#include "dialogs/task-editor.h"
+#include "e-cal-model-tasks.h"
+#include "e-calendar-table.h"
+#include "e-cell-date-edit-text.h"
+#include "e-comp-editor-registry.h"
+#include "print.h"
/* Pixmaps. */
#include "art/task.xpm"
@@ -316,8 +317,6 @@ e_calendar_table_init (ECalendarTable *cal_table)
GdkPixbuf *pixbuf;
GList *strings;
- cal_table->activity = NULL;
-
/* Create the model */
cal_table->model = (ECalModel *) e_cal_model_tasks_new ();
@@ -1435,32 +1434,31 @@ static char *test[] = {
/* Displays messages on the status bar */
#define EVOLUTION_TASKS_PROGRESS_IMAGE "evolution-tasks-mini.png"
-static GdkPixbuf *progress_icon[2] = { NULL, NULL };
+static GdkPixbuf *progress_icon = NULL;
void
e_calendar_table_set_status_message (ECalendarTable *cal_table, const gchar *message)
{
+ EActivityHandler *activity_handler = calendar_component_peek_activity_handler (calendar_component_peek ());
+
g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table));
if (!message || !*message) {
- if (cal_table->activity) {
- g_object_unref (cal_table->activity);
- cal_table->activity = NULL;
- }
- } else if (!cal_table->activity) {
- int display;
+ if (cal_table->activity_id != 0) {
+ e_activity_handler_operation_finished (activity_handler, cal_table->activity_id);
+ cal_table->activity_id = 0;
+ }
+ } else if (cal_table->activity_id == 0) {
char *client_id = g_strdup_printf ("%p", cal_table);
- if (progress_icon[0] == NULL)
- progress_icon[0] = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_TASKS_PROGRESS_IMAGE, NULL);
+ if (progress_icon == NULL)
+ progress_icon = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" EVOLUTION_TASKS_PROGRESS_IMAGE, NULL);
-#if 0 /* EPFIXME */
- cal_table->activity = evolution_activity_client_new (
- global_shell_client, client_id,
- progress_icon, message, TRUE, &display);
-#endif
+ cal_table->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_table->activity, message, -1.0);
+ } else {
+ evolution_activity_client_update (activity_handler, cal_table->activity_id, message, -1.0);
+ }
}