develop #11

Merged
itdominator merged 36 commits from develop into master 2023-09-19 01:11:24 +00:00
3 changed files with 55 additions and 17 deletions
Showing only changes of commit b62b5040c7 - Show all commits

View File

@ -57,18 +57,36 @@ class TabMixin(GridMixin):
if notebook.get_n_pages() == 1:
return
tab_box = button.get_parent()
wid = int(notebook.get_name()[-1])
tid = self.get_id_from_tab_box(button.get_parent())
tid = self.get_id_from_tab_box(tab_box)
scroll = self.builder.get_object(f"{wid}|{tid}")
page = notebook.page_num(scroll)
icon_grid = scroll.get_children()[0]
store = icon_grid.get_model()
page_num = notebook.page_num(scroll)
tab = self.get_fm_window(wid).get_tab_by_id(tid)
watcher = tab.get_dir_watcher()
watcher.cancel()
self.get_fm_window(wid).delete_tab_by_id(tid)
notebook.remove_page(page)
store.clear()
icon_grid.destroy()
scroll.destroy()
tab_box.destroy()
notebook.remove_page(page_num)
del page_num
del store
del icon_grid
del scroll
del tab_box
del watcher
del tab
if not settings.is_trace_debug():
self.fm_controller.save_state()
self.set_window_title()
# NOTE: Not actually getting called even tho set in the glade file...

View File

@ -57,16 +57,36 @@ class TabMixin(GridMixin):
if notebook.get_n_pages() == 1:
return
tab_box = button.get_parent()
wid = int(notebook.get_name()[-1])
tid = self.get_id_from_tab_box(button.get_parent())
tid = self.get_id_from_tab_box(tab_box)
scroll = self.builder.get_object(f"{wid}|{tid}")
page = notebook.page_num(scroll)
icon_grid = scroll.get_children()[0]
store = icon_grid.get_model()
page_num = notebook.page_num(scroll)
tab = self.get_fm_window(wid).get_tab_by_id(tid)
watcher = tab.get_dir_watcher()
watcher.cancel()
self.get_fm_window(wid).delete_tab_by_id(tid)
notebook.remove_page(page)
icon_grid = scroll.get_children()[0]
store = icon_grid.get_model()
store.clear()
icon_grid.destroy()
scroll.destroy()
tab_box.destroy()
notebook.remove_page(page_num)
del page_num
del store
del icon_grid
del scroll
del tab_box
del watcher
del tab
if not settings.is_trace_debug():
self.fm_controller.save_state()
self.set_window_title()