aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-util
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2003-10-23 21:55:00 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-10-23 21:55:00 +0800
commit5fa4b831a798a0aabfdbd46903dbed9b1bde7262 (patch)
treeb49306296b9610feaad3129024b52e71be90eee2 /calendar/cal-util
parente047d6366a7a58e2bc05b1ba50b8c9b46d36febc (diff)
downloadgsoc2013-evolution-5fa4b831a798a0aabfdbd46903dbed9b1bde7262.tar
gsoc2013-evolution-5fa4b831a798a0aabfdbd46903dbed9b1bde7262.tar.gz
gsoc2013-evolution-5fa4b831a798a0aabfdbd46903dbed9b1bde7262.tar.bz2
gsoc2013-evolution-5fa4b831a798a0aabfdbd46903dbed9b1bde7262.tar.lz
gsoc2013-evolution-5fa4b831a798a0aabfdbd46903dbed9b1bde7262.tar.xz
gsoc2013-evolution-5fa4b831a798a0aabfdbd46903dbed9b1bde7262.tar.zst
gsoc2013-evolution-5fa4b831a798a0aabfdbd46903dbed9b1bde7262.zip
update g_date calls to non-deprecated calls
2003-10-23 JP Rosevear <jpr@ximian.com> * cal-util/cal-recur.c: update g_date calls to non-deprecated calls * cal-util/Makefile.am: turn off deprecated funcs * cal-client/Makefile.am: turn off deprecated funcs * cal-client/cal-client.c (cal_client_get_error_message): add OK message * pcs/cal-backend.[hc]: remove dead funcs * pcs/query.c: tidy headers svn path=/trunk/; revision=23035
Diffstat (limited to 'calendar/cal-util')
-rw-r--r--calendar/cal-util/Makefile.am10
-rw-r--r--calendar/cal-util/cal-recur.c34
2 files changed, 27 insertions, 17 deletions
diff --git a/calendar/cal-util/Makefile.am b/calendar/cal-util/Makefile.am
index 80eb0dc4f3..35bf23965b 100644
--- a/calendar/cal-util/Makefile.am
+++ b/calendar/cal-util/Makefile.am
@@ -1,5 +1,3 @@
-noinst_PROGRAMS = test-recur
-
INCLUDES = \
-DG_LOG_DOMAIN=\"cal-util\" \
-I$(top_srcdir) \
@@ -10,6 +8,14 @@ INCLUDES = \
-I$(top_srcdir)/libical/src \
$(EVOLUTION_CALENDAR_CFLAGS)
+AM_CFLAGS = \
+ -DGTK_DISABLE_DEPRECATED=1 \
+ -DGDK_DISABLE_DEPRECATED=1 \
+ -DG_DISABLE_DEPRECATED=1 \
+ -DGNOME_DISABLE_DEPRECATED=1
+
+noinst_PROGRAMS = test-recur
+
#
# cal util library
#
diff --git a/calendar/cal-util/cal-recur.c b/calendar/cal-util/cal-recur.c
index 123198676c..160a253730 100644
--- a/calendar/cal-util/cal-recur.c
+++ b/calendar/cal-util/cal-recur.c
@@ -20,9 +20,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*/
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include <stdlib.h>
#include <string.h>
+#include <glib.h>
#include <libgnome/gnome-i18n.h>
#include <cal-util/cal-recur.h>
#include <cal-util/timeutil.h>
@@ -1439,7 +1443,7 @@ cal_object_compute_duration (CalObjTime *start,
g_date_set_dmy (&end_date, end->day, end->month + 1,
end->year);
- *days = g_date_julian (&end_date) - g_date_julian (&start_date);
+ *days = g_date_get_julian (&end_date) - g_date_get_julian (&start_date);
start_seconds = start->hour * 3600 + start->minute * 60
+ start->second;
end_seconds = end->hour * 3600 + end->minute * 60 + end->second;
@@ -2233,10 +2237,10 @@ cal_obj_weekly_find_start_position (CalObjTime *event_start,
/* Calculate the start of the weeks corresponding to the event start
and interval start. */
- event_start_julian = g_date_julian (&event_start_date);
+ event_start_julian = g_date_get_julian (&event_start_date);
event_start_julian -= recur_data->weekday_offset;
- interval_start_julian = g_date_julian (&interval_start_date);
+ interval_start_julian = g_date_get_julian (&interval_start_date);
interval_start_weekday_offset = cal_obj_time_weekday_offset (interval_start, recur_data->recur);
interval_start_julian -= interval_start_weekday_offset;
@@ -2328,8 +2332,8 @@ cal_obj_daily_find_start_position (CalObjTime *event_start,
g_date_set_dmy (&interval_start_date, interval_start->day,
interval_start->month + 1, interval_start->year);
- event_start_julian = g_date_julian (&event_start_date);
- interval_start_julian = g_date_julian (&interval_start_date);
+ event_start_julian = g_date_get_julian (&event_start_date);
+ interval_start_julian = g_date_get_julian (&interval_start_date);
if (event_start_julian < interval_start_julian) {
days = interval_start_julian - event_start_julian
@@ -2400,8 +2404,8 @@ cal_obj_hourly_find_start_position (CalObjTime *event_start,
interval_start->month + 1,
interval_start->year);
- event_start_julian = g_date_julian (&event_start_date);
- interval_start_julian = g_date_julian (&interval_start_date);
+ event_start_julian = g_date_get_julian (&event_start_date);
+ interval_start_julian = g_date_get_julian (&interval_start_date);
hours = (interval_start_julian - event_start_julian) * 24;
hours += interval_start->hour - event_start->hour;
@@ -2472,8 +2476,8 @@ cal_obj_minutely_find_start_position (CalObjTime *event_start,
interval_start->month + 1,
interval_start->year);
- event_start_julian = g_date_julian (&event_start_date);
- interval_start_julian = g_date_julian (&interval_start_date);
+ event_start_julian = g_date_get_julian (&event_start_date);
+ interval_start_julian = g_date_get_julian (&interval_start_date);
minutes = (interval_start_julian - event_start_julian)
* 24 * 60;
@@ -2546,8 +2550,8 @@ cal_obj_secondly_find_start_position (CalObjTime *event_start,
interval_start->month + 1,
interval_start->year);
- event_start_julian = g_date_julian (&event_start_date);
- interval_start_julian = g_date_julian (&interval_start_date);
+ event_start_julian = g_date_get_julian (&event_start_date);
+ interval_start_julian = g_date_get_julian (&interval_start_date);
seconds = (interval_start_julian - event_start_julian)
* 24 * 60 * 60;
@@ -3668,7 +3672,7 @@ cal_obj_time_weekday (CalObjTime *cotime)
g_date_set_dmy (&date, cotime->day, cotime->month + 1, cotime->year);
/* This results in a value of 0 (Monday) - 6 (Sunday). */
- weekday = g_date_weekday (&date) - 1;
+ weekday = g_date_get_weekday (&date) - 1;
return weekday;
}
@@ -3687,7 +3691,7 @@ cal_obj_time_weekday_offset (CalObjTime *cotime,
g_date_set_dmy (&date, cotime->day, cotime->month + 1, cotime->year);
/* This results in a value of 0 (Monday) - 6 (Sunday). */
- weekday = g_date_weekday (&date) - 1;
+ weekday = g_date_get_weekday (&date) - 1;
/* This calculates the offset of our day from the start of the week.
We just add on a week (to avoid any possible negative values) and
@@ -3708,7 +3712,7 @@ cal_obj_time_day_of_year (CalObjTime *cotime)
g_date_clear (&date, 1);
g_date_set_dmy (&date, cotime->day, cotime->month + 1, cotime->year);
- return g_date_day_of_year (&date);
+ return g_date_get_day_of_year (&date);
}
@@ -3727,7 +3731,7 @@ cal_obj_time_find_first_week (CalObjTime *cotime,
/* Find out the weekday of the 1st of the year, 0 (Mon) - 6 (Sun). */
g_date_clear (&date, 1);
g_date_set_dmy (&date, 1, 1, cotime->year);
- weekday = g_date_weekday (&date) - 1;
+ weekday = g_date_get_weekday (&date) - 1;
/* Calculate the first day of the year that starts a new week, i.e. the
first week_start_day after weekday, using 0 = 1st Jan.