Index: src/functions.h =================================================================== --- src/functions.h (revision 29026) +++ src/functions.h (working copy) @@ -40,6 +40,10 @@ #define ORAGE_STR_EXISTS(str) ((str != NULL) && (str[0] != 0)) +#if !GLIB_CHECK_VERSION(2,14,0) +#define g_timeout_add_seconds(interval,func,data) \ + g_timeout_add((interval)*1000, func, data) +#endif typedef struct _OrageRc { void *rc; Index: src/interface.c =================================================================== --- src/interface.c (revision 29026) +++ src/interface.c (working copy) @@ -693,7 +693,7 @@ orage_mark_appointments(); xfical_alarm_build_list(FALSE); if (g_par.foreign_count == 1) /* we just added our first foreign file */ - g_timeout_add(30*1000, (GtkFunction) orage_foreign_files_check, NULL); + g_timeout_add_seconds(30, (GtkFunction) orage_foreign_files_check, NULL); return(TRUE); } Index: src/reminder.c =================================================================== --- src/reminder.c (revision 29026) +++ src/reminder.c (working copy) @@ -360,7 +360,7 @@ alarm->repeat_cnt++; /* need to do it once */ } - g_timeout_add(alarm->repeat_delay*1000 + g_timeout_add_seconds(alarm->repeat_delay , (GtkFunction) sound_alarm , (gpointer) alarm); } @@ -731,7 +731,7 @@ else { /* the change did not happen. Need to try again asap. */ secs_left = 1; } - g_par.day_timer = g_timeout_add(secs_left * 1000 + g_par.day_timer = g_timeout_add_seconds(secs_left , (GtkFunction) orage_day_change, NULL); } @@ -806,7 +806,7 @@ secs_to_alarm += 1; /* alarm needs to come a bit later */ if (secs_to_alarm < 1) /* were rare, but possible */ secs_to_alarm = 1; - g_par.alarm_timer = g_timeout_add(secs_to_alarm * 1000 + g_par.alarm_timer = g_timeout_add_seconds(secs_to_alarm , (GtkFunction) orage_alarm_clock, NULL); } } @@ -902,7 +902,7 @@ } orage_tooltip_update(NULL); - g_par.tooltip_timer = g_timeout_add(60*1000 + g_par.tooltip_timer = g_timeout_add_seconds(60 , (GtkFunction) orage_tooltip_update, NULL); return(FALSE); } @@ -927,7 +927,7 @@ * only when appoinments are updated in less than 1 minute apart. * Perhaps not worth fixing. * Should add another timer or static time to keep track of this */ - g_timeout_add(secs_left*1000 + g_timeout_add_seconds(secs_left , (GtkFunction) start_orage_tooltip_update, NULL); return(FALSE); } @@ -944,5 +944,5 @@ store_persistent_alarms(); /* keep track of alarms when orage is down */ /* We need to use timer since for some reason it does not work if we * do it here directly. Ugly, I know, but it works. */ - g_timeout_add(1*1000, (GtkFunction) reset_orage_tooltip_update, NULL); + g_timeout_add_seconds(1, (GtkFunction) reset_orage_tooltip_update, NULL); } Index: src/ical-code.c =================================================================== --- src/ical-code.c (revision 29026) +++ src/ical-code.c (working copy) @@ -808,7 +808,7 @@ #ifdef ORAGE_DEBUG orage_message(-10, P_N "closing file after 10 minutes"); #endif - file_close_timer = g_timeout_add(10*60*1000 + file_close_timer = g_timeout_add_seconds(10*60 , (GtkFunction)delayed_file_close, NULL); } } Index: src/main.c =================================================================== --- src/main.c (revision 29026) +++ src/main.c (working copy) @@ -482,7 +482,7 @@ /* start monitoring foreign file updates if we have foreign files */ if (g_par.foreign_count) - g_timeout_add(30*1000, (GtkFunction)orage_foreign_files_check, NULL); + g_timeout_add_seconds(30, (GtkFunction)orage_foreign_files_check, NULL); /* let's check if I got filename as a parameter */ initialized = TRUE;