aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-list-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/e-cal-list-view.c')
-rw-r--r--calendar/gui/e-cal-list-view.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/calendar/gui/e-cal-list-view.c b/calendar/gui/e-cal-list-view.c
index d17f26889c..9ef25b92df 100644
--- a/calendar/gui/e-cal-list-view.c
+++ b/calendar/gui/e-cal-list-view.c
@@ -25,9 +25,7 @@
* ECalListView - display calendar events in an ETable.
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include "e-cal-list-view.h"
#include "ea-calendar.h"
@@ -43,6 +41,7 @@
#include <gtk/gtkvscrollbar.h>
#include <gtk/gtkwindow.h>
#include <gal/widgets/e-gui-utils.h>
+#include <gal/util/e-util.h>
#include <gal/e-table/e-table-memory-store.h>
#include <gal/e-table/e-cell-checkbox.h>
#include <gal/e-table/e-cell-toggle.h>
@@ -71,6 +70,8 @@
#include "goto.h"
#include "misc.h"
+static void e_cal_list_view_class_init (ECalListViewClass *class);
+static void e_cal_list_view_init (ECalListView *cal_list_view);
static void e_cal_list_view_destroy (GtkObject *object);
static GList *e_cal_list_view_get_selected_events (ECalendarView *cal_view);
@@ -88,7 +89,10 @@ static gboolean e_cal_list_view_on_table_right_click (GtkWidget *table, gint
GdkEvent *event, gpointer data);
static void e_cal_list_view_cursor_change_cb (ETable *etable, gint row, gpointer data);
-G_DEFINE_TYPE (ECalListView, e_cal_list_view, E_TYPE_CALENDAR_VIEW);
+static GtkTableClass *parent_class; /* Should be ECalendarViewClass? */
+
+E_MAKE_TYPE (e_cal_list_view, "ECalListView", ECalListView, e_cal_list_view_class_init,
+ e_cal_list_view_init, e_calendar_view_get_type ());
static void
e_cal_list_view_class_init (ECalListViewClass *class)
@@ -97,6 +101,7 @@ e_cal_list_view_class_init (ECalListViewClass *class)
GtkWidgetClass *widget_class;
ECalendarViewClass *view_class;
+ parent_class = g_type_class_peek_parent (class);
object_class = (GtkObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
view_class = (ECalendarViewClass *) class;
@@ -316,6 +321,7 @@ e_cal_list_view_new (void)
ECalModel *model;
model = E_CAL_MODEL (e_cal_model_calendar_new ());
+ e_cal_model_set_flags (model, E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES);
cal_list_view = g_object_new (e_cal_list_view_get_type (), "model", model, NULL);
if (!e_cal_list_view_construct (cal_list_view)) {
@@ -358,16 +364,16 @@ e_cal_list_view_destroy (GtkObject *object)
cal_list_view->table_scrolled = NULL;
}
- GTK_OBJECT_CLASS (e_cal_list_view_parent_class)->destroy (object);
+ GTK_OBJECT_CLASS (parent_class)->destroy (object);
}
static void
e_cal_list_view_show_popup_menu (ECalListView *cal_list_view, gint row, GdkEvent *gdk_event)
{
- GtkMenu *menu;
+ GtkMenu *popup;
- menu = e_calendar_view_create_popup_menu (E_CALENDAR_VIEW (cal_list_view));
- gtk_menu_popup(menu, NULL, NULL, NULL, NULL, gdk_event?gdk_event->button.button:0, gdk_event?gdk_event->button.time:gtk_get_current_event_time());
+ popup = e_calendar_view_create_popup_menu (E_CALENDAR_VIEW (cal_list_view));
+ e_popup_menu (popup, gdk_event);
}
static gboolean