Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorWouter Bolsterlee <wbolster@cvs.gnome.org>2006-11-21 23:54:14 (GMT)
committer Wouter Bolsterlee <wbolster@src.gnome.org>2006-11-21 23:54:14 (GMT)
commit949bd66322de613217672824798fbc7973c8b314 (patch)
treea7f347ce58f77cd93be83e7e4cd3fa70932b2c2d /shell
parent3f6b889102d20dba9778902f42741b2fdcb47f9b (diff)
cut-n-paste/totem-screensaver/.cvsignore
2006-11-22 Wouter Bolsterlee <wbolster@cvs.gnome.org> * configure.ac: * cut-n-paste/Makefile.am: * cut-n-paste/totem-screensaver/.cvsignore * cut-n-paste/totem-screensaver/Makefile.am: * cut-n-paste/totem-screensaver/README: * cut-n-paste/totem-screensaver/totem-scrsaver.c: * cut-n-paste/totem-screensaver/totem-scrsaver.h: * shell/Makefile.am: * shell/ev-window.c: (ev_window_run_presentation), (ev_window_stop_presentation), (ev_window_cmd_help_about), (ev_window_init): Implemented screensaver enabling/disabling for presentation mode (not fullscreen mode). Code stolen from Totem (with some minor tweaks). Fixes bug #338889.
Diffstat (limited to 'shell')
-rw-r--r--shell/Makefile.am3
-rw-r--r--shell/ev-window.c19
2 files changed, 19 insertions, 3 deletions
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 30dde9e..3033504 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -4,6 +4,7 @@ INCLUDES= \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/cut-n-paste/zoom-control/ \
-I$(top_srcdir)/cut-n-paste/toolbar-editor/ \
+ -I$(top_srcdir)/cut-n-paste/totem-screensaver/ \
-I$(top_srcdir)/backend \
-I$(top_srcdir)/properties \
-DGNOMELOCALEDIR=\"$(datadir)/locale\" \
@@ -82,6 +83,7 @@ evince_SOURCES= \
ev-stock-icons.h \
main.c
+
if WITH_GNOME_PRINT
evince_SOURCES+= \
ev-print-job.c \
@@ -92,6 +94,7 @@ endif
evince_LDADD= \
$(top_builddir)/cut-n-paste/zoom-control/libephyzoom.la \
$(top_builddir)/cut-n-paste/toolbar-editor/libtoolbareditor.la \
+ $(top_builddir)/cut-n-paste/totem-screensaver/libtotemscrsaver.la \
$(top_builddir)/properties/libevproperties.la \
$(top_builddir)/lib/libev.la \
$(SHELL_LIBS) \
diff --git a/shell/ev-window.c b/shell/ev-window.c
index c7d39cd..7442654 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -89,6 +89,8 @@
#include <libgnomevfs/gnome-vfs-utils.h>
#include <gconf/gconf-client.h>
+#include "totem-scrsaver.h"
+
#include <string.h>
typedef enum {
@@ -148,7 +150,10 @@ struct _EvWindowPrivate {
GtkWidget *fullscreen_toolbar;
GtkWidget *fullscreen_popup;
guint fullscreen_timeout_id;
-
+
+ /* Screensaver */
+ TotemScrsaver *screensaver;
+
/* Popup link */
GtkWidget *view_popup;
EvLink *link;
@@ -2535,6 +2540,8 @@ ev_window_run_presentation (EvWindow *window)
window);
fullscreen_set_timeout (window);
+ totem_scrsaver_disable (window->priv->screensaver);
+
if (!ev_window_is_empty (window))
ev_metadata_manager_set_boolean (window->priv->uri, "presentation", TRUE);
}
@@ -2561,6 +2568,8 @@ ev_window_stop_presentation (EvWindow *window)
window);
fullscreen_clear_timeout (window);
+ totem_scrsaver_enable (window->priv->screensaver);
+
if (!ev_window_is_empty (window))
ev_metadata_manager_set_boolean (window->priv->uri, "presentation", FALSE);
}
@@ -3157,7 +3166,7 @@ ev_window_cmd_help_about (GtkAction *action, EvWindow *ev_window)
"name", _("Evince"),
"version", VERSION,
"copyright",
- _("\xc2\xa9 1996-2005 The Evince authors"),
+ _("\xc2\xa9 1996-2007 The Evince authors"),
"license", license_trans,
"website", "http://www.gnome.org/projects/evince",
"comments", comments,
@@ -4621,7 +4630,11 @@ ev_window_init (EvWindow *ev_window)
g_signal_connect_swapped (G_OBJECT (ev_window->priv->view), "drag-data-received",
G_CALLBACK (drag_data_received_cb),
ev_window);
-
+
+ /* Screensaver */
+
+ ev_window->priv->screensaver = totem_scrsaver_new ();
+
/* Set it user interface params */
ev_window_setup_recent (ev_window);