Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-application.c
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@yandex.ru>2006-12-03 20:54:44 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2006-12-03 20:54:44 (GMT)
commit8ac50cf59cc976bd26bcb5575a4443d0319463ba (patch)
treed787ffcfb6f70d73c714e02433d08e8b44b70c1e /shell/ev-application.c
parent4094f85bec2a1f27274e42411555fc1ede846775 (diff)
Move screensaver handling to application. No more message on startup.
2006-12-03 Nickolay V. Shmyrev <nshmyrev@yandex.ru> * cut-n-paste/totem-screensaver/totem-scrsaver.c: (screensaver_init_dbus), (totem_scrsaver_new), (totem_scrsaver_init): * cut-n-paste/totem-screensaver/totem-scrsaver.h: * shell/ev-application.c: (ev_application_register_service), (ev_application_screensaver_enable), (ev_application_screensaver_disable): * shell/ev-application.h: * shell/ev-window.c: (ev_window_run_presentation), (ev_window_stop_presentation), (build_comments_string), (ev_window_init): Move screensaver handling to application. No more message on startup.
Diffstat (limited to 'shell/ev-application.c')
-rw-r--r--shell/ev-application.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/shell/ev-application.c b/shell/ev-application.c
index 7f912f2..aee7390 100644
--- a/shell/ev-application.c
+++ b/shell/ev-application.c
@@ -109,7 +109,9 @@ ev_application_register_service (EvApplication *application)
dbus_g_connection_register_g_object (connection,
"/org/gnome/evince/Evince",
G_OBJECT (application));
-
+
+ application->scr_saver = totem_scrsaver_new (connection);
+
return TRUE;
}
#endif /* ENABLE_DBUS */
@@ -551,3 +553,14 @@ const gchar* ev_application_get_chooser_uri (EvApplication *application)
return application->last_chooser_uri;
}
+void ev_application_screensaver_enable (EvApplication *application)
+{
+ if (application->scr_saver)
+ totem_scrsaver_enable (application->scr_saver);
+}
+
+void ev_application_screensaver_disable (EvApplication *application)
+{
+ if (application->scr_saver)
+ totem_scrsaver_disable (application->scr_saver);
+}