Пример #1
0
class SerpentineApplication (Application):
    """When no operations are left in SerpentineApplication it will exit.
    An operation can be writing the files to cd or showing the main window.
    This enables us to close the main window and continue showing the progress
    dialog. This object should be simple enough for D-Bus export.
    """
    def __init__ (self):
        Application.__init__ (self)
        self.__window = SerpentineWindow (self)
        self.preferences.dialog.set_transient_for (self.window_widget)
        self.__window.listeners.append (self)
        self._load_plugins ()


    window_widget = property (lambda self: self.__window)
    
    music_list = property (lambda self: self.window_widget.music_list)

    music_list_gw = property (lambda self: self.window_widget.masterer.music_list_gateway)
    
    def write_files (self):
        return Application.write_files (self, self.window_widget)
    
    # TODO: decouple the window from SerpentineApplication ?
    def show_window (self):
        # Starts the window operation
        self.__window.start ()
        self.operations.append (self.__window)
    
    def close_window (self):
        # Stops the window operation
        if self.__window.running:
            self.__window.stop ()
    
    def stop (self):
        # Clean window object
        Application.stop (self)
        self.__window.destroy ()
        del self.__window
Пример #2
0
class SerpentineApplication(Application):
    """When no operations are left in SerpentineApplication it will exit.
    An operation can be writing the files to cd or showing the main window.
    This enables us to close the main window and continue showing the progress
    dialog. This object should be simple enough for D-Bus export.
    """
    def __init__(self, locations):
        Application.__init__(self, locations)
        self.__window = SerpentineWindow(self)
        self.preferences.dialog.set_transient_for(self.window_widget)
        self.__window.listeners.append(self)
        self._load_plugins()

    window_widget = property(lambda self: self.__window)

    music_list = property(lambda self: self.window_widget.music_list)

    music_list_gw = property(
        lambda self: self.window_widget.masterer.music_list_gateway)

    def write_files(self):
        return Application.write_files(self, self.window_widget)

    # TODO: decouple the window from SerpentineApplication ?
    def show_window(self):
        # Starts the window operation
        self.__window.start()
        self.running_ops.append(self.__window)

    def close_window(self):
        # Stops the window operation
        if self.__window.running:
            self.__window.stop()

    def stop(self):
        # Clean window object
        Application.stop(self)
        self.__window.destroy()
        del self.__window
Пример #3
0
 def __init__ (self):
     Application.__init__ (self)
     self.__window = SerpentineWindow (self)
     self.preferences.dialog.set_transient_for (self.window_widget)
     self.__window.listeners.append (self)
     self._load_plugins ()
Пример #4
0
 def __init__(self, locations):
     Application.__init__(self, locations)
     self.__window = SerpentineWindow(self)
     self.preferences.dialog.set_transient_for(self.window_widget)
     self.__window.listeners.append(self)
     self._load_plugins()