diff --git a/src/__pycache__/root_tab.cpython-39.pyc b/src/__pycache__/root_tab.cpython-39.pyc index 7de5fcd..d58cf68 100644 Binary files a/src/__pycache__/root_tab.cpython-39.pyc and b/src/__pycache__/root_tab.cpython-39.pyc differ diff --git a/src/main.py b/src/main.py index f63ae97..c67b3eb 100644 --- a/src/main.py +++ b/src/main.py @@ -49,7 +49,7 @@ def __init__(self, parent, *args, **kwargs): self.last_session = copy.deepcopy(self.last_session_init) def setup_variables(self): - self.version = "0.33.4" + self.version = "0.33.5" self.parent.title(f"Tk Path Finder V{self.version}") self.config_data = config_file_manager.load_config_file(self) self.plugin_folder = ".\Plugins" @@ -233,13 +233,14 @@ def create_root_tab(self): def delete_root_tab(self, tab): if len(self.notebook.tabs()) > 1: - self.notebook.forget(tab) + tab.destroy() self.gen_session_data() def delete_branch_tab(self, tab): if len(tab.root_tab.notebook.tabs()) > 1: tab.root_tab.branch_tab_deleted(tab) - tab.root_tab.notebook.forget(tab) + tab.destroy() + self.gen_session_data() def setup_main_frames(self): #self.top_frame = Frame(self.parent) # for toolbar and address bar diff --git a/src/notes.db b/src/notes.db index f68630b..b29d181 100644 Binary files a/src/notes.db and b/src/notes.db differ diff --git a/src/root_tab.py b/src/root_tab.py index e5ef6f3..9771beb 100644 --- a/src/root_tab.py +++ b/src/root_tab.py @@ -8,13 +8,12 @@ def right_click(event): clicked_tab = event.widget.mainapp.notebook.tk.call(event.widget.mainapp.notebook._w, "identify", "tab", event.x, event.y) - #tab_object = event.widget.nametowidget(event.widget.select(clicked_tab)) event.widget.select(clicked_tab) tab_object = event.widget.nametowidget(event.widget.select()) popup_menu = tk.Menu(event.widget, tearoff=0) popup_menu.add_command(label="Add Root Tab", command=event.widget.mainapp.create_root_tab, image=event.widget.mainapp.plus_icon2, compound='left') popup_menu.add_command(label="Rename Root Tab", command=tab_object.rename_tab, image=event.widget.mainapp.edit_icon2, compound='left') - popup_menu.add_command(label="Delete Root Tab", command=lambda tab=clicked_tab: event.widget.mainapp.delete_root_tab(tab), image=event.widget.mainapp.delete_icon2, compound='left') + popup_menu.add_command(label="Delete Root Tab", command=lambda tab=tab_object: event.widget.mainapp.delete_root_tab(tab), image=event.widget.mainapp.delete_icon2, compound='left') try: popup_menu.tk_popup(event.x_root, event.y_root, 0) @@ -72,7 +71,7 @@ def create_branch_tab(self): self.notebook.add(tab, image=self.mainapp.branch_icon2, compound=tk.LEFT, text="Desktop") tab.update_tab(tab.explorer.current_directory) #initalise the treeview data in branch tab self.branch_tabs[self.id] = tab - + self.mainapp.gen_session_data() return tab def rename_tab(self): diff --git a/src/tk_path_finder_config.json b/src/tk_path_finder_config.json index f50bc08..af91cb8 100644 --- a/src/tk_path_finder_config.json +++ b/src/tk_path_finder_config.json @@ -73,6 +73,19 @@ "0": [ { "src": "C:\\Users\\domhn\\Documents\\Python\\Tk Path Finder\\src" + }, + { + "src": "C:\\Users\\domhn\\Documents\\Python\\Tk Path Finder\\src" + } + ] + }, + { + "1": [ + { + "src": "C:\\Users\\domhn\\Documents\\Python\\Tk Path Finder\\src" + }, + { + "2": "C:\\Users\\domhn\\Documents\\Python\\Tk Path Finder\\src" } ] }