summaryrefslogtreecommitdiff
path: root/src/eom-window.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-01-30 15:14:28 +0100
committerStefano Karapetsas <[email protected]>2014-01-30 15:14:28 +0100
commit99c48b1ee683814d250e06da860d484b408866a5 (patch)
tree8f9747890141ecb2239159bba04f51e84703bc5a /src/eom-window.c
parent50c379c71b53373aabae771aa205ee68cc554747 (diff)
downloadeom-99c48b1ee683814d250e06da860d484b408866a5.tar.bz2
eom-99c48b1ee683814d250e06da860d484b408866a5.tar.xz
Add random mode in slideshow mode
Closes #20 https://github.com/mate-desktop/eom/issues/20
Diffstat (limited to 'src/eom-window.c')
-rw-r--r--src/eom-window.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/eom-window.c b/src/eom-window.c
index b159e13..366b2dc 100644
--- a/src/eom-window.c
+++ b/src/eom-window.c
@@ -153,6 +153,7 @@ struct _EomWindowPrivate {
GtkWidget *fullscreen_popup;
GSource *fullscreen_timeout_source;
+ gboolean slideshow_random;
gboolean slideshow_loop;
gint slideshow_switch_timeout;
GSource *slideshow_switch_source;
@@ -1918,6 +1919,12 @@ slideshow_switch_cb (gpointer data)
eom_debug (DEBUG_WINDOW);
+ if (priv->slideshow_random) {
+ eom_thumb_view_select_single (EOM_THUMB_VIEW (priv->thumbview),
+ EOM_THUMB_VIEW_SELECT_RANDOM);
+ return TRUE;
+ }
+
if (!priv->slideshow_loop && slideshow_is_loop_end (window)) {
eom_window_stop_fullscreen (window, TRUE);
return FALSE;
@@ -2239,6 +2246,10 @@ eom_window_run_fullscreen (EomWindow *window, gboolean slideshow)
fullscreen_set_timeout (window);
if (slideshow) {
+ priv->slideshow_random =
+ g_settings_get_boolean (priv->fullscreen_settings,
+ EOM_CONF_FULLSCREEN_RANDOM);
+
priv->slideshow_loop =
g_settings_get_boolean (priv->fullscreen_settings,
EOM_CONF_FULLSCREEN_LOOP);
@@ -4653,6 +4664,7 @@ eom_window_init (EomWindow *window)
window->priv->fullscreen_popup = NULL;
window->priv->fullscreen_timeout_source = NULL;
+ window->priv->slideshow_random = FALSE;
window->priv->slideshow_loop = FALSE;
window->priv->slideshow_switch_timeout = 0;
window->priv->slideshow_switch_source = NULL;