diff options
Diffstat (limited to 'calendar/gui/e-calendar-table-config.c')
-rw-r--r-- | calendar/gui/e-calendar-table-config.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/calendar/gui/e-calendar-table-config.c b/calendar/gui/e-calendar-table-config.c index 588098950b..5750ceb8c9 100644 --- a/calendar/gui/e-calendar-table-config.c +++ b/calendar/gui/e-calendar-table-config.c @@ -1,12 +1,12 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Author : +/* + * Author : * JP Rosevear <jpr@ximian.com> * * 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 + * 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, @@ -28,7 +28,7 @@ struct _ECalendarTableConfigPrivate { ECalendarTable *table; ECellDateEditConfig *cell_config; - + GList *notifications; }; @@ -46,7 +46,7 @@ e_calendar_table_config_set_property (GObject *object, guint property_id, const ECalendarTableConfig *table_config; table_config = E_CALENDAR_TABLE_CONFIG (object); - + switch (property_id) { case PROP_TABLE: e_calendar_table_config_set_table (table_config, g_value_get_object (value)); @@ -63,7 +63,7 @@ e_calendar_table_config_get_property (GObject *object, guint property_id, GValue ECalendarTableConfig *table_config; table_config = E_CALENDAR_TABLE_CONFIG (object); - + switch (property_id) { case PROP_TABLE: g_value_set_object (value, e_calendar_table_config_get_table (table_config)); @@ -78,9 +78,9 @@ static void e_calendar_table_config_dispose (GObject *object) { ECalendarTableConfig *table_config = E_CALENDAR_TABLE_CONFIG (object); - + e_calendar_table_config_set_table (table_config, NULL); - + if (G_OBJECT_CLASS (e_calendar_table_config_parent_class)->dispose) G_OBJECT_CLASS (e_calendar_table_config_parent_class)->dispose (object); } @@ -90,11 +90,11 @@ e_calendar_table_config_finalize (GObject *object) { ECalendarTableConfig *table_config = E_CALENDAR_TABLE_CONFIG (object); ECalendarTableConfigPrivate *priv; - + priv = table_config->priv; g_free (priv); - + if (G_OBJECT_CLASS (e_calendar_table_config_parent_class)->finalize) G_OBJECT_CLASS (e_calendar_table_config_parent_class)->finalize (object); } @@ -104,7 +104,7 @@ e_calendar_table_config_class_init (ECalendarTableConfigClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GParamSpec *spec; - + /* Method override */ gobject_class->set_property = e_calendar_table_config_set_property; gobject_class->get_property = e_calendar_table_config_get_property; @@ -127,14 +127,14 @@ ECalendarTableConfig * e_calendar_table_config_new (ECalendarTable *table) { ECalendarTableConfig *table_config; - + table_config = g_object_new (e_calendar_table_config_get_type (), "table", table, NULL); return table_config; } ECalendarTable * -e_calendar_table_config_get_table (ECalendarTableConfig *table_config) +e_calendar_table_config_get_table (ECalendarTableConfig *table_config) { ECalendarTableConfigPrivate *priv; @@ -142,17 +142,17 @@ e_calendar_table_config_get_table (ECalendarTableConfig *table_config) g_return_val_if_fail (E_IS_CALENDAR_TABLE_CONFIG (table_config), NULL); priv = table_config->priv; - + return priv->table; } static void -set_timezone (ECalendarTable *table) +set_timezone (ECalendarTable *table) { ECalModel *model; icaltimezone *zone; - - zone = calendar_config_get_icaltimezone (); + + zone = calendar_config_get_icaltimezone (); model = e_calendar_table_get_model (table); if (model) e_cal_model_set_timezone (model, zone); @@ -163,14 +163,14 @@ timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer { ECalendarTableConfig *table_config = data; ECalendarTableConfigPrivate *priv; - + priv = table_config->priv; - + set_timezone (priv->table); } static void -set_twentyfour_hour (ECalendarTable *table) +set_twentyfour_hour (ECalendarTable *table) { ECalModel *model; gboolean use_24_hour; @@ -187,24 +187,24 @@ twentyfour_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gp { ECalendarTableConfig *table_config = data; ECalendarTableConfigPrivate *priv; - + priv = table_config->priv; - + set_twentyfour_hour (priv->table); } void -e_calendar_table_config_set_table (ECalendarTableConfig *table_config, ECalendarTable *table) +e_calendar_table_config_set_table (ECalendarTableConfig *table_config, ECalendarTable *table) { ECalendarTableConfigPrivate *priv; guint not; GList *l; - + g_return_if_fail (table_config != NULL); g_return_if_fail (E_IS_CALENDAR_TABLE_CONFIG (table_config)); priv = table_config->priv; - + if (priv->table) { g_object_unref (priv->table); priv->table = NULL; @@ -214,7 +214,7 @@ e_calendar_table_config_set_table (ECalendarTableConfig *table_config, ECalendar g_object_unref (priv->cell_config); priv->cell_config = NULL; } - + for (l = priv->notifications; l; l = l->next) calendar_config_remove_notification (GPOINTER_TO_UINT (l->data)); @@ -224,17 +224,17 @@ e_calendar_table_config_set_table (ECalendarTableConfig *table_config, ECalendar /* If the new view is NULL, return right now */ if (!table) return; - + priv->table = g_object_ref (table); /* Time zone */ set_timezone (table); - + not = calendar_config_add_notification_timezone (timezone_changed_cb, table_config); priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not)); /* 24 Hour format */ - set_twentyfour_hour (table); + set_twentyfour_hour (table); not = calendar_config_add_notification_24_hour_format (twentyfour_hour_changed_cb, table_config); priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not)); |