Skip to content

Commit

Permalink
V0.57.0
Browse files Browse the repository at this point in the history
domhnallmorr committed Feb 27, 2024
1 parent 2605913 commit 1f1374a
Showing 3 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/controller/controller.py
Original file line number Diff line number Diff line change
@@ -563,7 +563,7 @@ def setup_quick_access_tree(self):
for link_id in self.model.config_data["quick_access_tree"][folder_id]["links"].keys():
text = self.model.config_data["quick_access_tree"][folder_id]["links"][link_id]["text"]
path = self.model.config_data["quick_access_tree"][folder_id]["links"][link_id]["path"]
self.add_new_link(folder_id, "new", text=text, path=path, link_id=link_id, update_config_data=False, open_folder=False)
self.add_new_link(folder_id, "new", text=text, path=path, link_id=link_id, update_config_data=False, open_folder=False, selection_set=False)


def delete_quick_access_folder(self, folder_id, update_config_data=True):
@@ -576,13 +576,13 @@ def delete_quick_access_folder(self, folder_id, update_config_data=True):
if update_config_data is True:
self.model.update_quick_access_tree_config_file()

def add_new_link(self, folder_id, mode, text=None, path=None, link_id=None, update_config_data=True, open_folder=True):
def add_new_link(self, folder_id, mode, text=None, path=None, link_id=None, update_config_data=True, open_folder=True, selection_set=True):
if text is None:
text, path = self.view.quick_access_tree.launch_new_link_window(self.mainapp.master, mode)

if text is not None:
link_id = self.model.quick_access_tree_model.add_new_link(folder_id, link_id, text, path)
self.view.quick_access_tree.insert_new_link(folder_id, link_id, text, open_folder)
self.view.quick_access_tree.insert_new_link(folder_id, link_id, text, open_folder, selection_set)

if update_config_data is True:
self.model.update_quick_access_tree_config_file()
9 changes: 5 additions & 4 deletions src/custom_widgets/quick_access_tree.py
Original file line number Diff line number Diff line change
@@ -117,14 +117,15 @@ def launch_new_link_window(self, master, mode, text=None, path=None):

return text, path

def insert_new_link(self, folder_id, link_id, text, open_folder=True):
def insert_new_link(self, folder_id, link_id, text, open_folder=True, selection_set=True):
self.insert(folder_id, "end", iid=link_id, text=text)

if open_folder is True:
self.item(folder_id, open=True)

self.selection_set(link_id)
self.focus(link_id)

if selection_set is True:
self.selection_set(link_id)
self.focus(link_id)

def update_link(self, link_id, text):
self.item(link_id, text=text)
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ def __init__(self, parent, *args, **kwargs):
self.controller = controller.Controller(root, parent, self)

# ----------------- VERSION -----------------------
self.version = "0.56.2"
self.version = "0.57.0"

# ----------------- WEEK NUMBER -----------------------
year, week_num, day_of_week = datetime.date.today().isocalendar()

0 comments on commit 1f1374a

Please sign in to comment.