Esempio n. 1
0
    def __init__(self, initial_page, parent=None):
        """
        @param initial_page: name of the WizardStep to start on
        @type  initial_page: str
        @param parent: parent window
        @type  window: gtk.Window subclass or None
        """
        GladeWindow.__init__(self, parent=parent)

        self.page = None
        self.page_stack = []
        self.pages = {}
        self.state = {}

        # these should be filled by subclasses
        assert self.name
        assert self.steps

        # HACK warning, it would be better to pass in the wizard
        # to each step
        self.window1.wizard = self

        # instantiate steps
        for cls in self.steps:
            page = cls(self, self.name + '-')
            self.pages[cls.name] = page
            page.show()

        self._setup_ui()
        self.set_page(initial_page)
Esempio n. 2
0
    def __init__(self, initial_page, parent=None):
        """
        @param initial_page: name of the WizardStep to start on
        @type  initial_page: str
        @param parent: parent window
        @type  window: gtk.Window subclass or None
        """
        GladeWindow.__init__(self, parent=parent)

        self.page = None
        self.page_stack = []
        self.pages = {}
        self.state = {}

        # these should be filled by subclasses
        assert self.name
        assert self.steps

        # HACK warning, it would be better to pass in the wizard
        # to each step
        self.window1.wizard = self

        # instantiate steps
        for cls in self.steps:
            page = cls(self, self.name + '-')
            self.pages[cls.name] = page
            page.show()

        self._setup_ui()
        self.set_page(initial_page)
Esempio n. 3
0
 def __init__(self):
     debugLevels = log.getLevelNames()
     GladeWindow.__init__(self)
     pos = 0
     self._debugLevelCode = {}
     for level in debugLevels:
         if level == 'ERROR':
             continue
         self.level_selection.get_model().insert(pos, [level])
         self._debugLevelCode[pos] = log.getLevelInt(level)
         pos = pos+1
Esempio n. 4
0
 def __init__(self):
     debugLevels = log.getLevelNames()
     GladeWindow.__init__(self)
     pos = 0
     self._debugLevelCode = {}
     for level in debugLevels:
         if level == 'ERROR':
             continue
         self.level_selection.get_model().insert(pos, [level])
         self._debugLevelCode[pos] = log.getLevelInt(level)
         pos = pos + 1
Esempio n. 5
0
    def __init__(self, parent_window=None):
        self._useMain = True

        GladeWindow.__init__(self, parent_window)
        for k, v in self.widgets.items():
            setattr(self, k, v)
        self.window.set_icon_from_file(os.path.join(configure.imagedir,
                                                    'flumotion.png'))
        self.window.connect_after('realize', self.on_window_realize)
        self.window.connect('destroy', self.on_window_destroy)

        self.sidebar = _WizardSidebar(self)
        self.sidebar.connect('step-chosen', self.on_sidebar_step_chosen)
        self.sidebar.set_size_request(160, -1)
        self.hbox_main.pack_start(self.sidebar, False, False)
        self.hbox_main.reorder_child(self.sidebar, 0)
        self.sidebar.show()
Esempio n. 6
0
    def __init__(self, parent_window=None):
        self._useMain = True

        GladeWindow.__init__(self, parent_window)
        for k, v in self.widgets.items():
            setattr(self, k, v)
        self.window.set_icon_from_file(os.path.join(configure.imagedir,
                                                    'flumotion.png'))
        self.window.connect_after('realize', self.on_window_realize)
        self.window.connect('destroy', self.on_window_destroy)

        self.sidebar = _WizardSidebar(self)
        self.sidebar.connect('step-chosen', self.on_sidebar_step_chosen)
        self.sidebar.set_size_request(160, -1)
        self.hbox_main.pack_start(self.sidebar, False, False)
        self.hbox_main.reorder_child(self.sidebar, 0)
        self.sidebar.show()