Esempio n. 1
0
 def update_project(self):
     self.DeleteAllItems()
                 
     if not self.project:
         return 
     
     project = self.project
     
     # File System Events
     project.event_manager.register(FSEvent.get_key_of(FSEvent.CREATE), self._on_fs_create)
     project.event_manager.register(FSEvent.get_key_of(FSEvent.MODIFY), self._on_fs_modify)
     project.event_manager.register(FSEvent.get_key_of(FSEvent.DELETE), self._on_fs_delete)
     project.event_manager.register(FSEvent.get_key_of(FSEvent.MOVE), self._on_fs_move)
     
     root_fs_node = project.fs_manager.root
     
     root_tree_item_id = self.AddRoot("ROOT", 
                                      image=self.get_image_id_by_node(root_fs_node),
                                      data=wx.TreeItemData(root_fs_node))
     self._fs_node_to_tree_item_id[root_fs_node] = root_tree_item_id 
             
     if self._add_children(root_tree_item_id):
         self.SetItemHasChildren(root_tree_item_id, True)
         self.Expand(root_tree_item_id)
         
     self._init_image_list()
Esempio n. 2
0
    def update_project(self):
        self.DeleteAllItems()

        if not self.project:
            return

        project = self.project

        # File System Events
        project.event_manager.register(FSEvent.get_key_of(FSEvent.CREATE),
                                       self._on_fs_create)
        project.event_manager.register(FSEvent.get_key_of(FSEvent.MODIFY),
                                       self._on_fs_modify)
        project.event_manager.register(FSEvent.get_key_of(FSEvent.DELETE),
                                       self._on_fs_delete)
        project.event_manager.register(FSEvent.get_key_of(FSEvent.MOVE),
                                       self._on_fs_move)

        root_fs_node = project.fs_manager.root

        root_tree_item_id = self.AddRoot(
            "ROOT",
            image=self.get_image_id_by_node(root_fs_node),
            data=wx.TreeItemData(root_fs_node))
        self._fs_node_to_tree_item_id[root_fs_node] = root_tree_item_id

        if self._add_children(root_tree_item_id):
            self.SetItemHasChildren(root_tree_item_id, True)
            self.Expand(root_tree_item_id)

        self._init_image_list()
Esempio n. 3
0
    def update_project(self):
        em = self.project.event_manager

        # File System Events
        em.register(FSEvent.get_key_of(FSEvent.CREATE), self._on_fs_create)
        em.register(FSEvent.get_key_of(FSEvent.MODIFY), self._on_fs_modify)
        em.register(FSEvent.get_key_of(FSEvent.MOVE), self._on_fs_move)
        em.register(FSEvent.get_key_of(FSEvent.DELETE), self._on_fs_delete)

        self._init_image_list()
Esempio n. 4
0
    def update_project(self):
        em = self.project.event_manager

        # File System Events
        em.register(FSEvent.get_key_of(FSEvent.CREATE), self._on_fs_create)
        em.register(FSEvent.get_key_of(FSEvent.MODIFY), self._on_fs_modify)
        em.register(FSEvent.get_key_of(FSEvent.MOVE), self._on_fs_move)
        em.register(FSEvent.get_key_of(FSEvent.DELETE), self._on_fs_delete)

        self._init_image_list()