diff --git a/src/Tools/__pycache__/diary_frontend.cpython-39.pyc b/src/Tools/__pycache__/diary_frontend.cpython-39.pyc index 03d8bee..d00c05e 100644 Binary files a/src/Tools/__pycache__/diary_frontend.cpython-39.pyc and b/src/Tools/__pycache__/diary_frontend.cpython-39.pyc differ diff --git a/src/Tools/diary_frontend.py b/src/Tools/diary_frontend.py index 45da2eb..8bbd81d 100644 --- a/src/Tools/diary_frontend.py +++ b/src/Tools/diary_frontend.py @@ -70,7 +70,7 @@ def setup_label_frames(self): self.notes_frame = LabelFrame(self.top, text="Notes:") self.notes_frame.pack(expand=True, fill=BOTH, padx=self.mainapp.default_padx, pady=self.mainapp.default_pady) self.notes_frame.grid_columnconfigure(1, weight=1) - self.notes_frame.grid_rowconfigure(0, weight=1) + self.notes_frame.grid_rowconfigure(1, weight=1) def setup_labels(self): today = date.today() @@ -90,6 +90,8 @@ def setup_buttons(self): ttk.Button(self.date_frame, text=u'\u2192', command=self.forward_one_day, style='primary.TButton').grid(row=0, column=4, padx=2) self.date_frame.grid_columnconfigure(1, weight=1) + ttk.Button(self.notes_frame, image=self.mainapp.bullet_point_dark_icon2, command=self.add_bullet_point, style='primary.TButton').grid(row=0, column=0, padx=self.mainapp.default_padx, pady=self.mainapp.default_pady) + def back_one_day(self): self.get_text_input() self.date = self.date - datetime.timedelta(days=1) @@ -110,18 +112,24 @@ def calender_select(self): def setup_text_widget(self): self.general_text = tk.Text(self.notes_frame)# width=110, height=10) #self.general_text.pack(side=LEFT, expand=True, fill=BOTH, padx=self.mainapp.default_padx, pady=self.mainapp.default_pady) - self.general_text.grid(row=0, column=0, columnspan=2, sticky="NSEW") + self.general_text.grid(row=1, column=0, columnspan=2, sticky="NSEW", padx=self.mainapp.default_padx, pady=self.mainapp.default_pady) vsb = autoscrollbar.AutoScrollbar(self.notes_frame, orient="vertical", command=self.general_text.yview) - vsb.grid(row=0, column=2, columnspan=1, sticky="NS") + vsb.grid(row=1, column=2, columnspan=1, sticky="NS") self.general_text.configure(yscrollcommand=vsb.set) # Add any text present in database_thread txt = self.backend.read_date_from_database(self.date) self.general_text.insert("end", txt["General"]) + self.general_text.bind('', self.enter_event) - + def add_bullet_point(self): + self.general_text.insert("insert", u"\u2022" + " ") + + def enter_event(self, event): + pass + def get_text_input(self): self.data[self.date] = {"General": self.general_text.get("1.0","end")} diff --git a/src/__pycache__/tkexplorer_icons.cpython-39.pyc b/src/__pycache__/tkexplorer_icons.cpython-39.pyc index d0c1f51..23a28c2 100644 Binary files a/src/__pycache__/tkexplorer_icons.cpython-39.pyc and b/src/__pycache__/tkexplorer_icons.cpython-39.pyc differ diff --git a/src/main.py b/src/main.py index 8468298..cdb2928 100644 --- a/src/main.py +++ b/src/main.py @@ -46,9 +46,10 @@ def __init__(self, parent, *args, **kwargs): self.setup_tabs() #config_file_manager.write_config_file(self) self.load_plugins() - + self.last_session = copy.deepcopy(self.last_session_init) + def setup_variables(self): - self.version = "0.33.2" + self.version = "0.33.3" self.parent.title(f"Tk Path Finder V{self.version}") self.config_data = config_file_manager.load_config_file(self) self.plugin_folder = ".\Plugins" @@ -84,6 +85,7 @@ def setup_variables(self): '.rar': ['RAR File', self.rar_icon2], '.torrent': ['Torrent File', self.new_icon2], '.txt': ['Text File', self.text_icon2], + '.xls': ['Excel Worksheet 97-2003', self.excel_icon2], '.xlsm': ['Marco Enabled Excel Worksheet', self.excel_icon2], '.xlsx': ['Excel Worksheet', self.excel_icon2], '.zip': ['ZIP File', self.zip_icon2], @@ -139,9 +141,9 @@ def setup_variables(self): # --------------- LAST SESSION --------------- if "last_session" in self.config_data.keys(): - self.last_session = self.config_data["last_session"] + self.last_session_init = self.config_data["last_session"] else: - self.last_session = None + self.last_session_init = None # --------------- GET THEMES --------------- self.themes = {"light": [], "dark":[]} @@ -301,6 +303,7 @@ def switch_style(self, style): def gen_session_data(self): self.session = [] + for tab in self.notebook.children.keys(): if "tab" in str(type(self.notebook.children[tab])).lower(): if self.notebook.children[tab].tab_type == "root": diff --git a/src/notes.db b/src/notes.db index cb7f68a..cf0b30b 100644 Binary files a/src/notes.db and b/src/notes.db differ diff --git a/src/tk_path_finder_config.json b/src/tk_path_finder_config.json index 4800d4f..f50bc08 100644 --- a/src/tk_path_finder_config.json +++ b/src/tk_path_finder_config.json @@ -72,7 +72,7 @@ { "0": [ { - "Tk Path Finder": "C:\\Users\\domhn\\Documents\\Python\\Tk Path Finder" + "src": "C:\\Users\\domhn\\Documents\\Python\\Tk Path Finder\\src" } ] } diff --git a/src/tkexplorer_icons.py b/src/tkexplorer_icons.py index 2b1398a..ccc4a6a 100644 --- a/src/tkexplorer_icons.py +++ b/src/tkexplorer_icons.py @@ -107,6 +107,9 @@ def setup_icons(mainapp): data = "iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAYAAAA4TnrqAAAABmJLR0QA/wD/AP+gvaeTAAANFElEQVR4nO2be3Dc1XXHP9/fb7XyQ37HdqgLuPiFI3sXvCtDwCkhpBBCoQ3TkA6p25mEoYTw8GLiJLQUTZiQQIJkmpAMzSSdNBPSQCZNIMyQtontAiZGK9taWeC3DX6AAdmWZVmP1e+e/rG70q7wY7WyZJno+9f+zr33d8/97rnnnnvu/cEIRjCCEYzgfQmdaQXOJKIbEzPo1mcMmxOMnnB3U2V118nqe0Ol2OlEpO6uBQNpH00uXxJJJp62bnab2T+CdZ6KKIDQQDo9E4gmly8xBVcBm/qWzXtxxbhgenvX9jnf6Txe20hy2SJD3zDc1QCId4CxznlPFdP3WUeWmasGNb23AIXr0z/WwfLlwK78osqm6rDffrgatELgZ8UtGO8CrZsW16wtpu+zahpGk8uXIK4yY3LfskjynvsEn8JPT8uXV65NTA51tKwCfZUsUYYdMWkfMB/TI8X2f1ZZluFuAUBMypdH6u5agOwBADP1ELkw9ZVJdHW+YMaHet5htCLtklkUeCkVr/llsf2fNZYVS946BrgRQKjgT5ZCDwJlAJ6nUQBYtafOzidFAVHNgjcEUaDDyd2OsGJ1OGssq1sV12M2rq98YV3iAsP+KvfsLENkpL5lKeITPRW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QmCC" + mainapp.bullet_point_dark_icon2 = ImageTk.PhotoImage(decode_base64_image(size, data)) + def decode_base64_image(size, data): msg = base64.b64decode(data)