[evolution/kill-bonobo] Get GnomeCalendar and the a11y stuff building.



commit bfd6635397f29dc7b0ad6b6a27101c241a7287b6
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Jul 27 15:41:54 2009 -0400

    Get GnomeCalendar and the a11y stuff building.

 a11y/Makefile.am                            |    2 -
 calendar/gui/Makefile.am                    |   52 ++++++++--------
 calendar/gui/e-calendar-view.c              |   27 --------
 calendar/gui/ea-calendar.c                  |   14 ++--
 calendar/gui/ea-gnome-calendar.c            |   37 +-----------
 calendar/gui/gnome-cal.c                    |   88 +++++++++++----------------
 modules/calendar/e-cal-shell-view-actions.c |   48 ++++++++++++++-
 modules/calendar/e-cal-shell-view-private.c |    4 +-
 widgets/misc/Makefile.am                    |    2 +
 widgets/misc/ea-calendar-item.c             |    2 +-
 {a11y => widgets/misc}/ea-cell-table.c      |    0
 {a11y => widgets/misc}/ea-cell-table.h      |    0
 12 files changed, 119 insertions(+), 157 deletions(-)
---
diff --git a/a11y/Makefile.am b/a11y/Makefile.am
index 1af91a6..eeb7b50 100644
--- a/a11y/Makefile.am
+++ b/a11y/Makefile.am
@@ -8,8 +8,6 @@ AM_CPPFLAGS =				\
 
 libevolution_a11y_la_SOURCES =		\
 	ea-factory.h			\
-	ea-cell-table.h			\
-	ea-cell-table.c			\
 	gal-a11y-util.c			\
 	gal-a11y-util.h			\
 	gal-a11y-factory.h
diff --git a/calendar/gui/Makefile.am b/calendar/gui/Makefile.am
index ff748ae..7bc52c9 100644
--- a/calendar/gui/Makefile.am
+++ b/calendar/gui/Makefile.am
@@ -171,33 +171,31 @@ libcal_gui_la_SOURCES =		\
 	tag-calendar.c				\
 	tag-calendar.h				\
 	weekday-picker.c			\
-	weekday-picker.h
-
-# no gnome-cal no a11y. FIXME: KILL-BONOBO
-#	ea-calendar.c			\
-#	ea-calendar.h			\
-#	ea-calendar-helpers.c		\
-#	ea-calendar-helpers.h		\
-#	ea-cal-view.c			\
-#	ea-cal-view.h			\
-#	ea-cal-view-event.c		\
-#	ea-cal-view-event.h		\
-#	ea-day-view.c			\
-#	ea-day-view.h			\
-#	ea-day-view-main-item.c		\
-#	ea-day-view-main-item.h		\
-#	ea-day-view-cell.c			\
-#	ea-day-view-cell.h			\
-#	ea-week-view.c			\
-#	ea-week-view.h			\
-#	ea-week-view-main-item.c		\
-#	ea-week-view-main-item.h		\
-#	ea-week-view-cell.c		\
-#	ea-week-view-cell.h		\
-#	ea-jump-button.c			\
-#	ea-jump-button.h			\
-#	ea-gnome-calendar.c		\
-#	ea-gnome-calendar.h
+	weekday-picker.h			\
+	ea-calendar.c				\
+	ea-calendar.h				\
+	ea-calendar-helpers.c			\
+	ea-calendar-helpers.h			\
+	ea-cal-view.c				\
+	ea-cal-view.h				\
+	ea-cal-view-event.c			\
+	ea-cal-view-event.h			\
+	ea-day-view.c				\
+	ea-day-view.h				\
+	ea-day-view-main-item.c			\
+	ea-day-view-main-item.h			\
+	ea-day-view-cell.c			\
+	ea-day-view-cell.h			\
+	ea-week-view.c				\
+	ea-week-view.h				\
+	ea-week-view-main-item.c		\
+	ea-week-view-main-item.h		\
+	ea-week-view-cell.c			\
+	ea-week-view-cell.h			\
+	ea-jump-button.c			\
+	ea-jump-button.h			\
+	ea-gnome-calendar.c			\
+	ea-gnome-calendar.h
 
 libcal_gui_la_LIBADD =					\
 	$(top_builddir)/composer/libcomposer.la				\
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 67607f8..27a3d6d 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -1194,30 +1194,6 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
 }
 
 static void
-on_new_appointment (EPopup *ep, EPopupItem *pitem, gpointer data)
-{
-	ECalendarView *cal_view = data;
-
-	e_calendar_view_new_appointment (cal_view);
-}
-
-static void
-on_new_event (EPopup *ep, EPopupItem *pitem, gpointer data)
-{
-	ECalendarView *cal_view = data;
-
-	e_calendar_view_new_appointment_full (cal_view, TRUE, FALSE, FALSE);
-}
-
-static void
-on_new_meeting (EPopup *ep, EPopupItem *pitem, gpointer data)
-{
-	ECalendarView *cal_view = data;
-
-	e_calendar_view_new_appointment_full (cal_view, FALSE, TRUE, FALSE);
-}
-
-static void
 on_new_task (EPopup *ep, EPopupItem *pitem, gpointer data)
 {
 #if 0  /* KILL-BONOBO */
@@ -1746,9 +1722,6 @@ on_paste (EPopup *ep, EPopupItem *pitem, gpointer data)
 }
 
 static EPopupItem ecv_main_items [] = {
-	{ E_POPUP_ITEM, (gchar *) "00.new", (gchar *) N_("New _Appointment..."), on_new_appointment, NULL, (gchar *) "appointment-new", 0, 0 },
-	{ E_POPUP_ITEM, (gchar *) "10.newallday", (gchar *) N_("New All Day _Event"), on_new_event, NULL, (gchar *) "stock_new-24h-appointment", 0, 0},
-	{ E_POPUP_ITEM, (gchar *) "20.meeting", (gchar *) N_("New _Meeting"), on_new_meeting, NULL, (gchar *) "stock_new-meeting", 0, 0},
 	{ E_POPUP_ITEM, (gchar *) "30.task", (gchar *) N_("New _Task"), on_new_task, NULL, (gchar *) "stock_task", 0, 0},
 
 	{ E_POPUP_BAR, (gchar *) "40."},
diff --git a/calendar/gui/ea-calendar.c b/calendar/gui/ea-calendar.c
index 19e5a46..dcdf8bd 100644
--- a/calendar/gui/ea-calendar.c
+++ b/calendar/gui/ea-calendar.c
@@ -26,13 +26,13 @@
 #include "a11y/ea-factory.h"
 #include "ea-calendar.h"
 
-#include "calendar/ea-cal-view.h"
-#include "calendar/ea-cal-view-event.h"
-#include "calendar/ea-day-view.h"
-#include "calendar/ea-day-view-main-item.h"
-#include "calendar/ea-week-view.h"
-#include "calendar/ea-week-view-main-item.h"
-#include "calendar/ea-gnome-calendar.h"
+#include "calendar/gui/ea-cal-view.h"
+#include "calendar/gui/ea-cal-view-event.h"
+#include "calendar/gui/ea-day-view.h"
+#include "calendar/gui/ea-day-view-main-item.h"
+#include "calendar/gui/ea-week-view.h"
+#include "calendar/gui/ea-week-view-main-item.h"
+#include "calendar/gui/ea-gnome-calendar.h"
 
 EA_FACTORY (EA_TYPE_CAL_VIEW, ea_cal_view, ea_cal_view_new)
 EA_FACTORY (EA_TYPE_DAY_VIEW, ea_day_view, ea_day_view_new)
diff --git a/calendar/gui/ea-gnome-calendar.c b/calendar/gui/ea-gnome-calendar.c
index 78fd50f..8947845 100644
--- a/calendar/gui/ea-gnome-calendar.c
+++ b/calendar/gui/ea-gnome-calendar.c
@@ -23,6 +23,7 @@
 
 #include "ea-gnome-calendar.h"
 #include "calendar-commands.h"
+#include "e-calendar-view.h"
 #include <string.h>
 #include <gtk/gtk.h>
 #include <libecal/e-cal-time-util.h>
@@ -36,8 +37,6 @@ static G_CONST_RETURN gchar * ea_gnome_calendar_get_description (AtkObject *acce
 static gint ea_gnome_calendar_get_n_children (AtkObject* obj);
 static AtkObject * ea_gnome_calendar_ref_child (AtkObject *obj, gint i);
 
-static void ea_gcal_switch_view_cb (GtkNotebook *widget, GtkNotebookPage *page,
-				    guint index, gpointer data);
 static void ea_gcal_dates_change_cb (GnomeCalendar *gcal, gpointer data);
 
 static gpointer parent_class = NULL;
@@ -104,7 +103,6 @@ ea_gnome_calendar_new (GtkWidget *widget)
 	GObject *object;
 	AtkObject *accessible;
 	GnomeCalendar *gcal;
-	GtkWidget *notebook;
 
 	g_return_val_if_fail (GNOME_IS_CALENDAR (widget), NULL);
 
@@ -122,12 +120,6 @@ ea_gnome_calendar_new (GtkWidget *widget)
 	g_signal_connect (widget, "dates_shown_changed",
 			  G_CALLBACK (ea_gcal_dates_change_cb),
 			  accessible);
-	notebook = gnome_calendar_get_view_notebook_widget (gcal);
-	if (notebook) {
-		g_signal_connect (notebook, "switch_page",
-				  G_CALLBACK (ea_gcal_switch_view_cb),
-				  accessible);
-	}
 
 #ifdef ACC_DEBUG
 	printf ("EvoAcc: ea-gnome-calendar created: %p\n", (gpointer)accessible);
@@ -260,7 +252,7 @@ ea_gnome_calendar_get_n_children (AtkObject* obj)
 
 	if (!GTK_ACCESSIBLE (obj)->widget)
 		return -1;
-	return 3;
+	return 2;
 }
 
 static AtkObject *
@@ -295,11 +287,6 @@ ea_gnome_calendar_ref_child (AtkObject *obj, gint i)
 		childWidget = gnome_calendar_get_e_calendar_widget (calendarWidget);
 		child = gtk_widget_get_accessible (childWidget);
 		break;
-	case 2:
-		/* for todo list */
-		childWidget = GTK_WIDGET (gnome_calendar_get_task_pad (calendarWidget));
-		child = gtk_widget_get_accessible (childWidget);
-		break;
 	default:
 		break;
 	}
@@ -309,26 +296,6 @@ ea_gnome_calendar_ref_child (AtkObject *obj, gint i)
 }
 
 static void
-ea_gcal_switch_view_cb (GtkNotebook *widget, GtkNotebookPage *page,
-			guint index, gpointer data)
-{
-	GtkWidget *new_widget;
-
-	new_widget = gtk_notebook_get_nth_page (widget, index);
-
-	/* views are always the second child in gnome calendar
-	 */
-	if (new_widget)
-		g_signal_emit_by_name (G_OBJECT(data), "children_changed::add",
-				       1, gtk_widget_get_accessible (new_widget), NULL);
-
-#ifdef ACC_DEBUG
-	printf ("AccDebug: view switch to widget %p (index=%d) \n",
-		(gpointer)new_widget, index);
-#endif
-}
-
-static void
 ea_gcal_dates_change_cb (GnomeCalendar *gcal, gpointer data)
 {
 	const gchar *new_name;
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index f0b20d3..e43c4d9 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -958,6 +958,7 @@ struct _mupdate_todo_msg {
 	GnomeCalendar *gcal;
 };
 
+#if 0 /* KILL-BONOBO */
 static void
 update_todo_view_async (struct _mupdate_todo_msg *msg)
 {
@@ -996,10 +997,12 @@ update_todo_view_async (struct _mupdate_todo_msg *msg)
 	g_object_unref (msg->gcal);
 	g_slice_free (struct _mupdate_todo_msg, msg);
 }
+#endif
 
 static void
 update_todo_view (GnomeCalendar *gcal)
 {
+#if 0 /* KILL-BONOBO */
 	struct _mupdate_todo_msg *msg;
 
 	msg = g_slice_new0 (struct _mupdate_todo_msg);
@@ -1007,11 +1010,13 @@ update_todo_view (GnomeCalendar *gcal)
 	msg->gcal = g_object_ref (gcal);
 
 	message_push ((Message *) msg);
+#endif
 }
 
 static void
 update_memo_view (GnomeCalendar *gcal)
 {
+#if 0 /* KILL-BONOBO */
 	GnomeCalendarPrivate *priv;
 	ECalModel *model, *view_model;
 	time_t start, end;
@@ -1043,11 +1048,13 @@ update_memo_view (GnomeCalendar *gcal)
 		g_free (iso_start);
 		g_free (iso_end);
 	}
+#endif
 }
 
 static void
 process_completed_tasks (GnomeCalendar *gcal, gboolean config_changed)
 {
+#if 0 /* KILL-BONOBO */
 	GnomeCalendarPrivate *priv;
 
 	g_return_if_fail (gcal != NULL);
@@ -1056,8 +1063,10 @@ process_completed_tasks (GnomeCalendar *gcal, gboolean config_changed)
 	priv = gcal->priv;
 
 	e_calendar_table_process_completed_tasks (E_CALENDAR_TABLE (priv->todo), priv->clients_list[E_CAL_SOURCE_TYPE_TODO], config_changed);
+#endif
 }
 
+#if 0 /* KILL-BONOBO */
 static gboolean
 update_todo_view_cb (GnomeCalendar *gcal)
 {
@@ -1070,6 +1079,7 @@ update_todo_view_cb (GnomeCalendar *gcal)
 
 	return TRUE;
 }
+#endif
 
 static gboolean
 update_marcus_bains_line_cb (GnomeCalendar *gcal)
@@ -1208,15 +1218,19 @@ month_view_adjustment_changed_cb (GtkAdjustment *adjustment, GnomeCalendar *gcal
 static void
 view_progress_cb (ECalModel *model, const gchar *message, gint percent, ECalSourceType type, GnomeCalendar *gcal)
 {
+#if 0  /* KILL-BONOBO */
 	if (type == E_CAL_SOURCE_TYPE_EVENT)
 		e_calendar_view_set_status_message (E_CALENDAR_VIEW (gcal->priv->week_view), message, percent);
+#endif
 }
 
 static void
 view_done_cb (ECalModel *model, ECalendarStatus status, ECalSourceType type, GnomeCalendar *gcal)
 {
+#if 0  /* KILL-BONOBO */
 	if (type == E_CAL_SOURCE_TYPE_EVENT)
 		e_calendar_view_set_status_message (E_CALENDAR_VIEW (gcal->priv->week_view), NULL, -1);
+#endif
 }
 
 GtkWidget *
@@ -1302,7 +1316,9 @@ setup_widgets (GnomeCalendar *gcal)
 	/* update_todo_view (gcal); */
 
 	/* Timeout check to hide completed items */
+#if 0 /* KILL-BONOBO */
 	priv->update_timeout = g_timeout_add_full (G_PRIORITY_LOW, 60000, (GSourceFunc) update_todo_view_cb, gcal, NULL);
+#endif
 
 	/* Create the model for the views */
 	cal_model = (ECalModel *) e_cal_model_calendar_new ();
@@ -1386,9 +1402,9 @@ setup_widgets (GnomeCalendar *gcal)
 	gtk_widget_show (label);
 	gtk_widget_show (vbox);
 
+#if 0 /* KILL-BONOBO */
 	e_cal_model_set_default_time_func (e_memo_table_get_model (E_MEMO_TABLE (priv->memo)), gc_get_default_time, gcal);
-
-	e_cal_model_set_default_time_func (e_memo_table_get_model (E_MEMO_TABLE (priv->memo)), gc_get_default_time, gcal);
+#endif
 
 	update_memo_view (gcal);
 }
@@ -1426,8 +1442,6 @@ gnome_calendar_init (GnomeCalendar *gcal)
 	priv->todo_sexp = g_strdup ("#t");
 	priv->memo_sexp = g_strdup ("#t");
 
-	priv->view_instance = NULL;
-
 	priv->visible_start = -1;
 	priv->visible_end = -1;
 	priv->updating = FALSE;
@@ -1805,7 +1819,6 @@ set_view (GnomeCalendar *gcal, GnomeCalendarViewType view_type, gboolean range_s
 	priv->range_selected = range_selected;
 	priv->current_view_type = view_type;
 
-	gal_view_instance_set_current_view_id (priv->view_instance, view_id);
 	focus_current_view (gcal);
 }
 
@@ -1912,6 +1925,7 @@ static void gnome_calendar_change_view (GnomeCalendar *gcal, GnomeCalendarViewTy
 }
 
 /* Callback used when the view collection asks us to display a particular view */
+#if 0  /* KILL-BONOBO */
 static void
 display_view_cb (GalViewInstance *view_instance, GalView *view, gpointer data)
 {
@@ -1950,41 +1964,7 @@ display_view_cb (GalViewInstance *view_instance, GalView *view, gpointer data)
 	gnome_calendar_notify_dates_shown_changed (gcal);
 
 }
-
-struct _mclient_msg {
-	Message header;
-	ECalModel *model;
-	ECal *client;
-};
-
-static void
-add_mclient_async (struct _mclient_msg *msg)
-{
-	e_cal_model_add_client (msg->model, msg->client);
-
-	g_object_unref (msg->client);
-	g_object_unref (msg->model);
-	g_slice_free (struct _mclient_msg, msg);
-}
-
-static void
-add_mclient (ECalModel *model, ECal *client)
-{
-	struct _mclient_msg *msg;
-
-	msg = g_slice_new0 (struct _mclient_msg);
-	msg->header.func = (MessageFunc) add_mclient_async;
-	msg->model = g_object_ref (model);
-	msg->client = g_object_ref (client);
-
-	message_push ((Message *) msg);
-}
-
-static void
-non_intrusive_error_remove(GtkWidget *w, gpointer data)
-{
-	g_hash_table_remove(non_intrusive_error_table, data);
-}
+#endif
 
 struct _mclient_msg {
 	Message header;
@@ -2057,7 +2037,7 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal)
 		}
 
 		w = e_error_new(NULL, "calendar:server-version", NULL);
-		e_calendar_utils_show_error_silent (w);
+		/*e_calendar_utils_show_error_silent (w);  KILL-BONOBO */
 		g_hash_table_insert (non_intrusive_error_table, id, g_object_ref(w));
 		g_signal_connect(w, "destroy", G_CALLBACK(non_intrusive_error_remove), id);
 
@@ -2078,7 +2058,7 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal)
 		}
 
 		w = e_error_new(GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))), "calendar:unable-to-load-the-calendar", e_cal_get_error_message (status), NULL);
-		e_calendar_utils_show_error_silent (w);
+		/*e_calendar_utils_show_error_silent (w);  KILL-BONOBO */
 		g_hash_table_insert (non_intrusive_error_table, id, g_object_ref(w));
 		g_signal_connect(w, "destroy", G_CALLBACK(non_intrusive_error_remove), id);
 	default:
@@ -2099,7 +2079,7 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal)
 	g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, client_cal_opened_cb, NULL);
 
 	msg = g_strdup_printf (_("Loading appointments at %s"), e_cal_get_uri (ecal));
-	e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), msg, -1);
+	/*e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), msg, -1);  KILL-BONOBO */
 	g_free (msg);
 
 	/* add client to the views */
@@ -2109,7 +2089,7 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal)
 	/* update date navigator query */
 	update_query (gcal);
 
-	e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL, -1);
+	/*e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL, -1);  KILL-BONOBO */
 }
 
 static void
@@ -2186,7 +2166,7 @@ open_ecal (GnomeCalendar *gcal, ECal *cal, gboolean only_if_exists, open_func of
 	e_cal_set_default_timezone (cal, zone, NULL);
 
 	msg = g_strdup_printf (_("Opening %s"), e_cal_get_uri (cal));
-	e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), msg, -1);
+	/*e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), msg, -1);  KILL-BONOBO */
 
 	g_free (msg);
 
@@ -2217,7 +2197,7 @@ backend_error_cb (ECal *client, const gchar *message, gpointer data)
 	}
 
 	dialog = (GtkDialog *)e_error_new(GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))), "calendar:error-on-loading-the-calendar", uristr, message, NULL);
-	e_calendar_utils_show_error_silent(GTK_WIDGET (dialog));
+	/* e_calendar_utils_show_error_silent(GTK_WIDGET (dialog));  KILL-BONOBO */
 
 	g_hash_table_insert (non_intrusive_error_table, id, g_object_ref(dialog));
 	g_signal_connect(GTK_WIDGET (dialog), "destroy", G_CALLBACK(non_intrusive_error_remove), id);
@@ -2248,7 +2228,7 @@ backend_died_cb (ECal *ecal, gpointer data)
 
 	id = g_strdup ("calendar:calendar-crashed");
 
-	e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL, -1);
+	/* e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL, -1); KILL-BONOBO */
 
 	g_signal_emit (gcal, gnome_calendar_signals[SOURCE_REMOVED], 0, source);
 
@@ -2261,7 +2241,7 @@ backend_died_cb (ECal *ecal, gpointer data)
 	}
 
 	w = e_error_new(GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))), "calendar:backend_died", NULL);
-	e_calendar_utils_show_error_silent (w);
+	/* e_calendar_utils_show_error_silent (w); KILL-BONOBO */
 	g_hash_table_insert (non_intrusive_error_table, (gpointer) id, g_object_ref(w));
 	g_signal_connect((GtkObject *)w, "destroy", G_CALLBACK(non_intrusive_error_remove), (gpointer) id);
 }
@@ -2549,6 +2529,7 @@ gnome_calendar_get_selected_time_range (GnomeCalendar *gcal,
  *
  * Opens a task editor dialog for a new task. dtstart or dtend can be NULL.
  **/
+#if 0 /* KILL-BONOBO */
 void
 gnome_calendar_new_task		(GnomeCalendar *gcal, time_t *dtstart, time_t *dtend)
 {
@@ -2600,6 +2581,7 @@ gnome_calendar_new_task		(GnomeCalendar *gcal, time_t *dtstart, time_t *dtend)
 
 	gtk_window_present (GTK_WINDOW (editor));
 }
+#endif
 
 /* Returns the selected time range for the current view. Note that this may be
    different from the fields in the GnomeCalendar, since the view may clip
@@ -2867,7 +2849,7 @@ gnome_calendar_paste_clipboard (GnomeCalendar *gcal)
 	g_return_if_fail (GNOME_IS_CALENDAR (gcal));
 
 	view_type = gnome_calendar_get_view (gcal);
-	view = gnome_calendar_get_calendar_view (view_type);
+	view = gnome_calendar_get_calendar_view (gcal, view_type);
 
 	e_calendar_view_paste_clipboard (view);
 }
@@ -2989,10 +2971,10 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than)
 				"                      (make-time \"%s\"))",
 				start, end);
 
-	e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), _("Purging"), -1);
+	/*e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), _("Purging"), -1);  KILL-BONOBO */
 
 	/* FIXME Confirm expunge */
-	for (l = priv->clients_list[E_CAL_SOURCE_TYPE_EVENT]; l != NULL; l = l->next) {
+	for (l = priv->clients_list; l != NULL; l = l->next) {
 		ECal *client = l->data;
 		GList *objects, *m;
 		gboolean read_only;
@@ -3047,7 +3029,7 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than)
 		g_list_free (objects);
 	}
 
-	e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL, -1);
+	/* e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL, -1);  KILL-BONOBO */
 
 	g_free (sexp);
 	g_free (start);
@@ -3084,7 +3066,7 @@ gnome_calendar_edit_appointment (GnomeCalendar *gcal,
 	if (!src_uid || !comp_uid)
 		return;
 
-	for (l = gcal->priv->clients_list[E_CAL_SOURCE_TYPE_EVENT]; l != NULL; l = l->next) {
+	for (l = gcal->priv->clients_list; l != NULL; l = l->next) {
 		ESource *client_src;
 
 		client = l->data;
diff --git a/modules/calendar/e-cal-shell-view-actions.c b/modules/calendar/e-cal-shell-view-actions.c
index 1358a06..f3ed11e 100644
--- a/modules/calendar/e-cal-shell-view-actions.c
+++ b/modules/calendar/e-cal-shell-view-actions.c
@@ -397,7 +397,23 @@ static void
 action_event_all_day_new_cb (GtkAction *action,
                              ECalShellView *cal_shell_view)
 {
-        /* FIXME */
+	ECalShellContent *cal_shell_content;
+	GnomeCalendarViewType view_type;
+	ECalendarView *calendar_view;
+	GnomeCalendar *calendar;
+
+	/* These are just for readability. */
+	gboolean all_day = TRUE;
+	gboolean meeting = FALSE;
+	gboolean no_past_date = FALSE;
+
+	cal_shell_content = cal_shell_view->priv->cal_shell_content;
+	calendar = e_cal_shell_content_get_calendar (cal_shell_content);
+	view_type = gnome_calendar_get_view (calendar);
+	calendar_view = gnome_calendar_get_calendar_view (calendar, view_type);
+
+	e_calendar_view_new_appointment_full (
+		calendar_view, all_day, meeting, no_past_date);
 }
 
 static void
@@ -486,7 +502,23 @@ static void
 action_event_meeting_new_cb (GtkAction *action,
                              ECalShellView *cal_shell_view)
 {
-        /* FIXME */
+	ECalShellContent *cal_shell_content;
+	GnomeCalendarViewType view_type;
+	ECalendarView *calendar_view;
+	GnomeCalendar *calendar;
+
+	/* These are just for readability. */
+	gboolean all_day = FALSE;
+	gboolean meeting = TRUE;
+	gboolean no_past_date = FALSE;
+
+	cal_shell_content = cal_shell_view->priv->cal_shell_content;
+	calendar = e_cal_shell_content_get_calendar (cal_shell_content);
+	view_type = gnome_calendar_get_view (calendar);
+	calendar_view = gnome_calendar_get_calendar_view (calendar, view_type);
+
+	e_calendar_view_new_appointment_full (
+		calendar_view, all_day, meeting, no_past_date);
 }
 
 static void
@@ -500,7 +532,17 @@ static void
 action_event_new_cb (GtkAction *action,
                      ECalShellView *cal_shell_view)
 {
-        /* FIXME */
+	ECalShellContent *cal_shell_content;
+	GnomeCalendarViewType view_type;
+	ECalendarView *calendar_view;
+	GnomeCalendar *calendar;
+
+	cal_shell_content = cal_shell_view->priv->cal_shell_content;
+	calendar = e_cal_shell_content_get_calendar (cal_shell_content);
+	view_type = gnome_calendar_get_view (calendar);
+	calendar_view = gnome_calendar_get_calendar_view (calendar, view_type);
+
+	e_calendar_view_new_appointment (calendar_view);
 }
 
 static void
diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c
index 19d29a0..c6d1029 100644
--- a/modules/calendar/e-cal-shell-view-private.c
+++ b/modules/calendar/e-cal-shell-view-private.c
@@ -442,7 +442,7 @@ e_cal_shell_view_execute_search (ECalShellView *cal_shell_view)
 	text = e_shell_content_get_search_text (shell_content);
 
 	shell_window = e_shell_view_get_shell_window (shell_view);
-	action = GTK_RADIO_ACTION (ACTION (CAL_SEARCH_ANY_FIELD_CONTAINS));
+	action = GTK_RADIO_ACTION (ACTION (CALENDAR_SEARCH_ANY_FIELD_CONTAINS));
 	value = gtk_radio_action_get_current_value (action);
 
 	if (text == NULL || *text == '\0') {
@@ -475,7 +475,7 @@ e_cal_shell_view_execute_search (ECalShellView *cal_shell_view)
 	g_string_free (string, TRUE);
 
 	range_search = FALSE;
-	range_start = range_end = 0;
+	start_range = end_range = 0;
 
 	/* Apply selected filter. */
 	value = e_shell_content_get_filter_value (shell_content);
diff --git a/widgets/misc/Makefile.am b/widgets/misc/Makefile.am
index c210393..ebd5562 100644
--- a/widgets/misc/Makefile.am
+++ b/widgets/misc/Makefile.am
@@ -87,6 +87,7 @@ widgetsinclude_HEADERS =			\
 	e-url-entry.h				\
 	ea-calendar-cell.h			\
 	ea-calendar-item.h			\
+	ea-cell-table.h				\
 	ea-widgets.h
 
 libemiscwidgets_la_SOURCES =			\
@@ -147,6 +148,7 @@ libemiscwidgets_la_SOURCES =			\
 	e-url-entry.c				\
 	ea-calendar-cell.c			\
 	ea-calendar-item.c			\
+	ea-cell-table.c				\
 	ea-widgets.c
 
 libemiscwidgets_la_LDFLAGS = $(NO_UNDEFINED)
diff --git a/widgets/misc/ea-calendar-item.c b/widgets/misc/ea-calendar-item.c
index 56a01b5..9dcb834 100644
--- a/widgets/misc/ea-calendar-item.c
+++ b/widgets/misc/ea-calendar-item.c
@@ -30,7 +30,7 @@
 #include <libedataserver/e-data-server-util.h>
 #include "ea-calendar-item.h"
 #include "ea-calendar-cell.h"
-#include "a11y/ea-cell-table.h"
+#include "ea-cell-table.h"
 
 #define EA_CALENDAR_COLUMN_NUM E_CALENDAR_COLS_PER_MONTH
 
diff --git a/a11y/ea-cell-table.c b/widgets/misc/ea-cell-table.c
similarity index 100%
rename from a11y/ea-cell-table.c
rename to widgets/misc/ea-cell-table.c
diff --git a/a11y/ea-cell-table.h b/widgets/misc/ea-cell-table.h
similarity index 100%
rename from a11y/ea-cell-table.h
rename to widgets/misc/ea-cell-table.h



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]