From 907f7999167285dcb8bb680d93da09eab94d794c Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Fri, 10 Oct 2003 05:29:36 +0000 Subject: Add e-cal-list-view.etspec. (libevolution_calendar_la_SOURCES): Add 2003-10-10 Hans Petter Jansson * calendar/gui/Makefile.am (etspec_DATA): Add e-cal-list-view.etspec. (libevolution_calendar_la_SOURCES): Add e-cal-list-view.[ch]. * calendar/gui/calendar-commands.c (show_list_view_clicked): Implement. (calendar_get_text_for_folder_bar_label): Add case for list view. Use month case and tweak it so it doesn't show "%d - %d" if the time span contains only one day. (verbs): Add list view. (pixmaps): Add list view. * calendar/gui/calendar-view-factory.c (calendar_view_factory_get_title): Add list view case. (calendar_view_factory_get_type_code): Add list view case. * calendar/gui/control-factory.c (get_prop): Add list view case. * calendar/gui/e-cal-model.c (get_classification): Fix to conform to updated libical. (ecm_set_value_at): Add missing break statements. (ecm_get_color_for_component): Add braces for clarity. * calendar/gui/gnome-cal.c (gnome_calendar_get_current_view_widget): Add list view case. (get_focus_location): Add list view case. (connect_list_view_focus): Implement. (setup_widgets): Set up list view. (gnome_calendar_direction): Add list view case. (set_view): Add list view case. (gnome_calendar_setup_view_menus): Add list view factory. (gnome_calendar_construct): Account for list view. (gnome_calendar_update_config_settings): Account for list view. (get_days_shown): Implement list view case. * calendar/gui/gnome-cal.h (GnomeCalendarViewType): Add list view. * calendar/gui/e-cal-list-view.[ch]: Implement ECalListView, subclassing ECalView. * ui/evolution-calendar.xml: Add calendar list view task button. * art/listview.xpm: Add calendar list view icon. svn path=/trunk/; revision=22850 --- calendar/gui/e-cal-list-view.h | 98 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 calendar/gui/e-cal-list-view.h (limited to 'calendar/gui/e-cal-list-view.h') diff --git a/calendar/gui/e-cal-list-view.h b/calendar/gui/e-cal-list-view.h new file mode 100644 index 0000000000..edf2e843e2 --- /dev/null +++ b/calendar/gui/e-cal-list-view.h @@ -0,0 +1,98 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ + +/* + * Authors: + * Hans Petter Jansson + * + * Copyright 2003, Ximian, 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 + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + */ +#ifndef _E_CAL_LIST_VIEW_H_ +#define _E_CAL_LIST_VIEW_H_ + +#include +#include +#include +#include + +#include "e-cal-view.h" +#include "gnome-cal.h" +#include "evolution-activity-client.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* + * ECalListView - displays calendar events in an ETable. + */ + +#define E_CAL_LIST_VIEW(obj) GTK_CHECK_CAST (obj, e_cal_list_view_get_type (), ECalListView) +#define E_CAL_LIST_VIEW_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_cal_list_view_get_type (), ECalListViewClass) +#define E_IS_CAL_LIST_VIEW(obj) GTK_CHECK_TYPE (obj, e_cal_list_view_get_type ()) + + +typedef struct _ECalListView ECalListView; +typedef struct _ECalListViewClass ECalListViewClass; + +struct _ECalListView +{ + ECalView cal_view; + + /* The main display table */ + ETableScrolled *table_scrolled; + + /* The path to the table's state file */ + gchar *table_state_path; + + /* S-expression for query and the query object */ + CalQuery *query; + + /* The default category for new events */ + gchar *default_category; + + /* Date editing cell */ + ECellDateEdit *dates_cell; + + /* The last ECalViewEvent we returned from e_cal_list_view_get_selected_events(), to be freed */ + ECalViewEvent *cursor_event; + + /* Idle handler ID for setting a new ETableModel */ + gint set_table_id; +}; + +struct _ECalListViewClass +{ + ECalViewClass parent_class; +}; + + +GtkType e_cal_list_view_get_type (void); +GtkWidget *e_cal_list_view_construct (ECalListView *cal_list_view, const gchar *table_state_path); + +GtkWidget *e_cal_list_view_new (const gchar *table_state_path); + +void e_cal_list_view_set_query (ECalListView *cal_list_view, const gchar *sexp); +void e_cal_list_view_set_default_category (ECalListView *cal_list_view, const gchar *category); +gboolean e_cal_list_view_get_range_shown (ECalListView *cal_list_view, GDate *start_date, + gint *days_shown); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _E_CAL_LIST_VIEW_H_ */ -- cgit v1.2.3