Example #1
0
 def on_stacks_changed(self, obj, key, action):
     logger.debug("Stack Changed: {0}, Action: {1}".format(key, action))
     if action is StackChangeAction.INSERT:
         stack_container = SCCueList(self.__main_window, self.__main_window.project[key])
         self.append_page(stack_container, stack_container.get_title_widget())
     elif action is StackChangeAction.DELETE:
         self.remove_page(key)
     self.update_show_tabs()
     self.show_all()
Example #2
0
    def on_project_changed(self, p):
        if self.__project is not None and self.__cbid is not None:
            logger.debug("Disconnecting callbacks from previous project")
            self.__project.disconnect(self.__cbid)

        self.__project = p
        self.__cbid = self.__project.connect('stack-changed', self.on_stacks_changed)

        for i in range(0, self.get_n_pages()):
            self.remove_page(-1)
        for stack in p.cue_stacks:
            stack_container = SCCueList(self.__main_window, stack)
            self.append_page(stack_container, stack_container.get_title_widget())
        self.update_show_tabs()
        self.show_all()