aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-table.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-08-08 09:43:09 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-08-09 09:03:18 +0800
commit3b0699fc304d0f4aecb261d19869de221f5d6abf (patch)
treeeb434f85371c9d5ae75a8425fc622c31e08baa5b /calendar/gui/e-calendar-table.c
parent65695ae516532a4b6e129a0703b1056a3996de0c (diff)
downloadgsoc2013-evolution-3b0699fc304d0f4aecb261d19869de221f5d6abf.tar
gsoc2013-evolution-3b0699fc304d0f4aecb261d19869de221f5d6abf.tar.gz
gsoc2013-evolution-3b0699fc304d0f4aecb261d19869de221f5d6abf.tar.bz2
gsoc2013-evolution-3b0699fc304d0f4aecb261d19869de221f5d6abf.tar.lz
gsoc2013-evolution-3b0699fc304d0f4aecb261d19869de221f5d6abf.tar.xz
gsoc2013-evolution-3b0699fc304d0f4aecb261d19869de221f5d6abf.tar.zst
gsoc2013-evolution-3b0699fc304d0f4aecb261d19869de221f5d6abf.zip
More refactoring of settings management.
Diffstat (limited to 'calendar/gui/e-calendar-table.c')
-rw-r--r--calendar/gui/e-calendar-table.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c
index 755dfebec0..a61477d081 100644
--- a/calendar/gui/e-calendar-table.c
+++ b/calendar/gui/e-calendar-table.c
@@ -287,6 +287,7 @@ calendar_table_query_tooltip_cb (ECalendarTable *cal_table,
GString *tmp2;
gchar buff[1001];
gboolean free_text = FALSE;
+ gboolean use_24_hour_format;
ECalComponent *new_comp;
ECalComponentOrganizer organizer;
ECalComponentDateTime dtstart, dtdue;
@@ -385,6 +386,7 @@ calendar_table_query_tooltip_cb (ECalendarTable *cal_table,
e_cal_component_get_due (new_comp, &dtdue);
default_zone = e_cal_model_get_timezone (model);
+ use_24_hour_format = e_cal_model_get_use_24_hour_format (model);
if (dtstart.tzid) {
zone = icalcomponent_get_timezone (e_cal_component_get_icalcomponent (new_comp), dtstart.tzid);
@@ -405,7 +407,7 @@ calendar_table_query_tooltip_cb (ECalendarTable *cal_table,
tmp_tm = icaltimetype_to_tm_with_zone (
dtstart.value, zone, default_zone);
e_time_format_date_and_time (
- &tmp_tm, calendar_config_get_24_hour_format (),
+ &tmp_tm, use_24_hour_format,
FALSE, FALSE, buff, 1000);
if (buff [0]) {
@@ -420,7 +422,7 @@ calendar_table_query_tooltip_cb (ECalendarTable *cal_table,
tmp_tm = icaltimetype_to_tm_with_zone (
dtdue.value, zone, default_zone);
e_time_format_date_and_time (
- &tmp_tm, calendar_config_get_24_hour_format (),
+ &tmp_tm, use_24_hour_format,
FALSE, FALSE, buff, 1000);
if (buff [0]) {
@@ -1614,12 +1616,15 @@ e_calendar_table_save_state (ECalendarTable *cal_table,
static struct tm
e_calendar_table_get_current_time (ECellDateEdit *ecde, gpointer data)
{
+ ECalendarTable *cal_table = data;
+ ECalModel *model;
icaltimezone *zone;
struct tm tmp_tm = { 0 };
struct icaltimetype tt;
/* Get the current timezone. */
- zone = calendar_config_get_icaltimezone ();
+ model = e_calendar_table_get_model (cal_table);
+ zone = e_cal_model_get_timezone (model);
tt = icaltime_from_timet_with_zone (time (NULL), FALSE, zone);