Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-window.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2007-07-29 16:10:27 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2007-07-29 16:10:27 (GMT)
commit0de4e4076b4198674b6fa77c8281cd62a293f2fe (patch)
treef07dac3c125ed3c1d615b954afb9dc9407ccc20b /shell/ev-window.c
parent5a3601d1ccfc1adf3f91e60f6de27e3ee1a5c6a2 (diff)
Use g_timeout_add_seconds instead of g_timeout_add when available.
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. svn path=/trunk/; revision=2594
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r--shell/ev-window.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 233067b..cdc41ea 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -211,7 +211,7 @@ struct _EvWindowPrivate {
#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"
@@ -2902,9 +2902,16 @@ presentation_set_timeout (EvWindow *window)
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));
}