After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 427478 - screensaver must be deactivated while in a slideshow
screensaver must be deactivated while in a slideshow
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: General
SVN
Other Linux
: Normal major
: ---
Assigned To: F-spot maintainers
F-spot maintainers
: 506753 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-04-08 02:21 UTC by Larry Ewing
Modified: 2008-01-01 22:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The IScreenSaver interface (391 bytes, text/x-csharp)
2007-09-19 19:52 UTC, Giacomo Rizzo
  Details
Inhibit screensaver patch (2.17 KB, patch)
2007-09-19 19:52 UTC, Giacomo Rizzo
reviewed Details | Review
All-in-one patch (3.01 KB, patch)
2007-09-22 16:20 UTC, Giacomo Rizzo
none Details | Review
alternate patch (2.86 KB, patch)
2007-09-23 12:48 UTC, Stephane Delcroix
committed Details | Review

Description Larry Ewing 2007-04-08 02:21:48 UTC
the screensaver mode of f-spot can start while a slideshow is running.
Comment 1 Julian Sikorski 2007-08-30 16:54:28 UTC
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
Comment 2 Giacomo Rizzo 2007-09-19 19:52:28 UTC
Created attachment 95861 [details]
The IScreenSaver interface

And that the related interface.
Comment 3 Giacomo Rizzo 2007-09-19 19:52:49 UTC
Created attachment 95862 [details] [review]
Inhibit screensaver patch

That should do the case. Thank to Stephane for code sample :)
Comment 4 Stephane Delcroix 2007-09-20 12:41:11 UTC
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
Comment 5 Giacomo Rizzo 2007-09-20 15:16:53 UTC
Ok, I'll work on it this night :)
Comment 6 Giacomo Rizzo 2007-09-22 16:20:45 UTC
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 :)
Comment 7 Stephane Delcroix 2007-09-23 10:27:05 UTC
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)
Comment 8 Stephane Delcroix 2007-09-23 12:48:41 UTC
Created attachment 96057 [details] [review]
alternate patch

fix the comments, and enable/disable the Screensaver correctly in PlayPause
Comment 9 Stephane Delcroix 2007-09-23 12:52:19 UTC
fixed in r3395
Comment 10 Maxxer 2008-01-01 22:10:07 UTC
*** Bug 506753 has been marked as a duplicate of this bug. ***