GNOME Bugzilla – Bug 427478
screensaver must be deactivated while in a slideshow
Last modified: 2008-01-01 22:10:07 UTC
the screensaver mode of f-spot can start while a slideshow is running.
My guess is that screensaver is not stopped at all during slideshow. At least gnome-screensaver does happily start when slideshow is running. For reference, the method of halting it temporarily is described here: http://live.gnome.org/GnomeScreensaver/FrequentlyAskedQuestions#head-e2151a3d8feaaab341a17b9529529b80438b3cae
Created attachment 95861 [details] The IScreenSaver interface And that the related interface.
Created attachment 95862 [details] [review] Inhibit screensaver patch That should do the case. Thank to Stephane for code sample :)
this patch compile and works fine, but here's some comments to make it even better... - include new files directly in the patch like this: svn add src/IScreenSaver.cs svn diff > mypatch - there's multiple ways of starting (and stopping) the slideshow. this patch only handles the 'SlideShow' button. so, e.g., stopping the slideshow should uninhibit the screensaver, or starting the slideshow from fullscreen should inhibit it... so the right place for inhibiting/uninhibiting is probably PlayPause in FullScreenView.cs and also in the Destroy method of the same FSView. And also, MainWindow is already way to cluttered... - to avoid code duplication, and to hide implementation, you should embed the implementations details in a (static) class, e.g. FSpot.Utils.ScreenSaver. - catching exception on possible (probable) dbus issues is the RightThingToDo, but if you want to include the exception message in a string, just include ex.Message. Printing ex will print the full stacktrace as usual, ask for help when needed. I'm also marking this as part of the gnome-love program
Ok, I'll work on it this night :)
Created attachment 96018 [details] [review] All-in-one patch As suggested by Stephane, I included all files (now 3) in a single patch and moved the implementation code in a brand new file (ScreenSaverUtils.cs). Hope everything is ok (it seems to work here :D) and respect the F-Spot code policyes :)
almost there... some nitpicking comments though, but I'll fix that myself: - include the IScreenSaver interface in the ScreenSaver file - make the cookie a static property of the static class (so the FullScreenView don't have to care about the cookie)
Created attachment 96057 [details] [review] alternate patch fix the comments, and enable/disable the Screensaver correctly in PlayPause
fixed in r3395
*** Bug 506753 has been marked as a duplicate of this bug. ***