# Path: mcomix/preferences.py
# def read_preferences_file():
# def write_preferences_file():


import gtk
import gobject
from mcomix.preferences import prefs
"""slideshow.py - Slideshow handler."""



class Slideshow:

    """Slideshow handler that manages starting and stopping of slideshows."""

    def __init__(self, window):
        self._window = window
        self._running = False
        self._id = None

    def _start(self):
        if not self._running:
            self._id = gobject.timeout_add(prefs['slideshow delay'], self._next)
            self._running = True
            self._window.update_title()

    def _stop(self):
        if self._running:
            gobject.source_remove(self._id)
            self._running = False
            self._window.update_title()

    def _next(self):

# Path: mcomix/preferences.py
# def read_preferences_file():
# def write_preferences_file():


# Path: mcomix/slideshow.py
import gtk
import gobject
from mcomix.preferences import prefs

"""slideshow.py - Slideshow handler."""



class Slideshow:

    """Slideshow handler that manages starting and stopping of slideshows."""

    def __init__(self, window):
        self._window = window
        self._running = False
        self._id = None

    def _start(self):
        if not self._running:
            self._id = gobject.timeout_add(prefs['slideshow delay'], self._next)
            self._running = True
            self._window.update_title()

    def _stop(self):
        if self._running:
            gobject.source_remove(self._id)
            self._running = False
            self._window.update_title()

    def _next(self):

        if prefs['number of pixels to scroll per slideshow event'] != 0: