aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-view.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2004-04-30 03:36:53 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-04-30 03:36:53 +0800
commit87e60de4aae77bc239ceb67aaa2c7c8bd6a24343 (patch)
tree36d286e28e9d702ade684a014b40810b89a2ebb0 /calendar/gui/e-calendar-view.c
parent68a179bc703eb13cbe758a28cec6cccf6bd8766b (diff)
downloadgsoc2013-evolution-87e60de4aae77bc239ceb67aaa2c7c8bd6a24343.tar.gz
gsoc2013-evolution-87e60de4aae77bc239ceb67aaa2c7c8bd6a24343.tar.zst
gsoc2013-evolution-87e60de4aae77bc239ceb67aaa2c7c8bd6a24343.zip
remove prototypes
2004-04-29 JP Rosevear <jpr@ximian.com> * gui/tasks-component.h (tasks_component_peek_source_list): remove prototypes * gui/tasks-component.c (source_removed_cb): unselect the source in the selector if source removed from calendar (create_component_view): create the activity handler and listen to source remove signal * gui/gnome-cal.h: add signals, protos * gui/gnome-cal.c (gnome_calendar_class_init): add source added and removed signals (client_cal_opened_cb): emit source removed signal (open_ecal): set the status message (backend_died_cb): emit source removed signal (gnome_calendar_set_activity_handler): allow an activity handler to be set (gnome_calendar_add_source): emit source added signal (gnome_calendar_remove_source): emit source removed signal (display_view): update the active activity handler * gui/e-tasks.h: add signal prototypes * gui/e-tasks.c (e_tasks_class_init): add source added and removed signals (backend_died_cb): emit source removed signal (e_tasks_add_todo_source): emit source added/removed signals (e_tasks_remove_todo_source): emit source removed signal * gui/e-calendar-view.h: add proto * gui/e-calendar-view.c (e_calendar_view_set_activity_handler): allow an activity handler to be set (e_calendar_view_set_status_message): use private activity handler (if any) to set status message * gui/e-calendar-table.h: add data member and proto * gui/e-calendar-table.c (e_calendar_table_set_activity_handler): allow an activity handler to be set (e_calendar_table_set_status_message): use private activity handler (if any) to set status message * gui/e-calendar-marshal.list: add extra marshallers * gui/calendar-component.h: kill protos * gui/calendar-component.c (source_removed_cb): unselect the source in the selector if source removed from calendar (create_component_view): create the activity handler and listen to source remove signal svn path=/trunk/; revision=25694
Diffstat (limited to 'calendar/gui/e-calendar-view.c')
-rw-r--r--calendar/gui/e-calendar-view.c39
1 files changed, 28 insertions, 11 deletions
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 5aae73b6a0..7562d83912 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -30,7 +30,8 @@
#include <gtk/gtkbindings.h>
#include <libgnome/gnome-i18n.h>
#include <gal/util/e-util.h>
-#include "e-util/e-dialog-utils.h"
+#include <e-util/e-dialog-utils.h>
+#include <e-util/e-icon-factory.h>
#include "e-calendar-marshal.h"
#include <libecal/e-cal-time-util.h>
#include <libecal/e-cal-component.h>
@@ -67,6 +68,7 @@ struct _ECalendarViewPrivate {
ECalModel *model;
/* Current activity (for the EActivityHandler, i.e. the status bar). */
+ EActivityHandler *activity_handler;
guint activity_id;
/* The popup menu */
@@ -529,31 +531,46 @@ 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)
+e_calendar_view_set_activity_handler (ECalendarView *cal_view, EActivityHandler *activity_handler)
{
-#if 0
- EActivityHandler *activity_handler = calendar_component_peek_activity_handler (calendar_component_peek ());
+ ECalendarViewPrivate *priv;
+
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
+ priv = cal_view->priv;
+
+ priv->activity_handler = activity_handler;
+}
+
+void
+e_calendar_view_set_status_message (ECalendarView *cal_view, const gchar *message)
+{
+ ECalendarViewPrivate *priv;
+
g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
+ priv = cal_view->priv;
+
+ if (!priv->activity_handler)
+ return;
+
if (!message || !*message) {
- 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;
+ if (priv->activity_id != 0) {
+ e_activity_handler_operation_finished (priv->activity_handler, priv->activity_id);
+ priv->activity_id = 0;
}
- } else if (cal_view->priv->activity_id == 0) {
+ } else if (priv->activity_id == 0) {
char *client_id = g_strdup_printf ("%p", cal_view);
if (progress_icon == NULL)
progress_icon = e_icon_factory_get_icon (EVOLUTION_CALENDAR_PROGRESS_IMAGE, 16);
- cal_view->priv->activity_id = e_activity_handler_operation_started (activity_handler, client_id, progress_icon, message, TRUE);
+ priv->activity_id = e_activity_handler_operation_started (priv->activity_handler, client_id, progress_icon, message, TRUE);
g_free (client_id);
} else {
- e_activity_handler_operation_progressing (activity_handler, cal_view->priv->activity_id, message, -1.0);
+ e_activity_handler_operation_progressing (priv->activity_handler, priv->activity_id, message, -1.0);
}
-#endif
}
GList *