+2007-07-29 Carlos Garcia Campos <carlosgc@gnome.org>
+
+ * cut-n-paste/totem-screensaver/totem-scrsaver.c:
+ (screensaver_disable_x11):
+ * shell/ev-metadata-manager.c: (ev_metadata_arm_timeout):
+ * shell/ev-window.c: (presentation_set_timeout):
+ * shell/ev-view.c: (ev_view_presentation_transition_start):
+
+ Use g_timeout_add_seconds instead of g_timeout_add when
+ available.
+
2007-07-29 Carlos Garcia Campos <carlosgc@gnome.org>
* shell/ev-sidebar-thumbnails.c: (ev_sidebar_thumbnails_init):
if (scr->priv->timeout != 0)
{
+#if GLIB_CHECK_VERSION (2, 13, 0)
+ g_timeout_add_seconds (scr->priv->timeout / 2,
+ (GSourceFunc) fake_event, scr);
+#else
g_timeout_add (scr->priv->timeout / 2 * 1000,
- (GSourceFunc) fake_event, scr);
+ (GSourceFunc) fake_event, scr);
+#endif
} else {
- g_timeout_add (XSCREENSAVER_MIN_TIMEOUT / 2 * 1000,
+#if GLIB_CHECK_VERSION (2, 13, 0)
+ g_timeout_add_seconds (XSCREENSAVER_MIN_TIMEOUT / 2,
(GSourceFunc) fake_event, scr);
+#else
+ g_timeout_add (XSCREENSAVER_MIN_TIMEOUT / 2 * 1000,
+ (GSourceFunc) fake_event, scr);
+#endif
}
return;
{
if (ev_metadata_manager->timeout_id)
return;
+#if GLIB_CHECK_VERSION (2, 13, 5)
+ ev_metadata_manager->timeout_id =
+ g_timeout_add_seconds_full (G_PRIORITY_DEFAULT_IDLE,
+ 2,
+ (GSourceFunc)ev_metadata_manager_save,
+ NULL,
+ NULL);
+#else
ev_metadata_manager->timeout_id =
g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE,
2000, /* 2 sec */
(GSourceFunc)ev_metadata_manager_save,
NULL,
NULL);
+#endif
}
/**
duration = ev_document_transition_get_page_duration (EV_DOCUMENT_TRANSITION (view->document),
view->current_page);
- if (duration > 0)
- view->trans_timeout_id = g_timeout_add (duration * 1000,
- (GSourceFunc) transition_next_page,
- view);
+ if (duration > 0) {
+#if GLIB_CHECK_VERSION (2, 13, 0)
+ view->trans_timeout_id =
+ g_timeout_add_seconds (duration,
+ (GSourceFunc) transition_next_page,
+ view);
+#else
+ view->trans_timeout_id =
+ g_timeout_add (duration * 1000,
+ (GSourceFunc) transition_next_page,
+ view);
+#endif
+ }
}
void
#define GCONF_LOCKDOWN_SAVE "/desktop/gnome/lockdown/disable_save_to_disk"
#define GCONF_LOCKDOWN_PRINT "/desktop/gnome/lockdown/disable_printing"
-#define PRESENTATION_TIMEOUT 5 * 1000
+#define PRESENTATION_TIMEOUT 5
#define SIDEBAR_DEFAULT_SIZE 132
#define LINKS_SIDEBAR_ID "links"
if (window->priv->presentation_timeout_id > 0) {
g_source_remove (window->priv->presentation_timeout_id);
}
-
+
+#if GLIB_CHECK_VERSION (2, 13, 0)
+ window->priv->presentation_timeout_id =
+ g_timeout_add_seconds (PRESENTATION_TIMEOUT,
+ (GSourceFunc)presentation_timeout_cb, window);
+#else
window->priv->presentation_timeout_id =
- g_timeout_add (PRESENTATION_TIMEOUT, (GSourceFunc)presentation_timeout_cb, window);
+ g_timeout_add (PRESENTATION_TIMEOUT * 1000,
+ (GSourceFunc)presentation_timeout_cb, window);
+#endif
ev_view_show_cursor (EV_VIEW (window->priv->view));
}