aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-model.c
diff options
context:
space:
mode:
authorHans Petter Jansson <hpj@ximian.com>2003-10-10 13:29:36 +0800
committerHans Petter <hansp@src.gnome.org>2003-10-10 13:29:36 +0800
commit907f7999167285dcb8bb680d93da09eab94d794c (patch)
tree2ba2d97798520128ffb1f264e6a28351de9a867f /calendar/gui/e-cal-model.c
parent6cccb0c60fca242f9c34f161abede3515986e23e (diff)
downloadgsoc2013-evolution-907f7999167285dcb8bb680d93da09eab94d794c.tar.gz
gsoc2013-evolution-907f7999167285dcb8bb680d93da09eab94d794c.tar.zst
gsoc2013-evolution-907f7999167285dcb8bb680d93da09eab94d794c.zip
Add e-cal-list-view.etspec. (libevolution_calendar_la_SOURCES): Add
2003-10-10 Hans Petter Jansson <hpj@ximian.com> * 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
Diffstat (limited to 'calendar/gui/e-cal-model.c')
-rw-r--r--calendar/gui/e-cal-model.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 8a68cd07e5..1c231f9c72 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -272,13 +272,28 @@ static char *
get_classification (ECalModelComponent *comp_data)
{
icalproperty *prop;
+ icalproperty_class class;
prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_CLASS_PROPERTY);
- if (prop)
- return (char *) icalproperty_get_class (prop);
+ if (!prop)
+ return _("Public");
+
+ class = icalproperty_get_class (prop);
+
+ switch (class)
+ {
+ case ICAL_CLASS_PUBLIC:
+ return _("Public");
+ case ICAL_CLASS_PRIVATE:
+ return _("Private");
+ case ICAL_CLASS_CONFIDENTIAL:
+ return _("Confidential");
+ default:
+ return _("Unknown");
+ }
- return _("Public");
+ return _("Unknown");
}
static const char *
@@ -579,14 +594,19 @@ ecm_set_value_at (ETableModel *etm, int col, int row, const void *value)
switch (col) {
case E_CAL_MODEL_FIELD_CATEGORIES :
set_categories (comp_data, value);
+ break;
case E_CAL_MODEL_FIELD_CLASSIFICATION :
set_classification (comp_data, value);
+ break;
case E_CAL_MODEL_FIELD_DESCRIPTION :
set_description (comp_data, value);
+ break;
case E_CAL_MODEL_FIELD_DTSTART :
set_dtstart (model, comp_data, value);
+ break;
case E_CAL_MODEL_FIELD_SUMMARY :
set_summary (comp_data, value);
+ break;
}
if (cal_client_update_objects (comp_data->client, comp_data->icalcomp) != CAL_CLIENT_RESULT_SUCCESS)
@@ -858,7 +878,9 @@ ecm_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data)
for (l = assigned_colors[i].uris; l != NULL; l = l->next) {
if (!strcmp ((const char *) l->data,
cal_client_get_uri (comp_data->client)))
+ {
return assigned_colors[i].color;
+ }
}
}