Tab dnd between windows (state not preserved, yet), plugin fix

This commit is contained in:
2022-11-02 22:06:30 -05:00
parent ee123c4916
commit 9cde8345cf
4 changed files with 21 additions and 3 deletions

View File

@@ -18,9 +18,9 @@ from __builtins__ import *
from app import Application
if __name__ == "__main__":
""" Set process title, get arguments, and create GTK main thread. """
def run():
try:
setproctitle(f"{app_name}")
faulthandler.enable() # For better debug info
@@ -47,3 +47,8 @@ if __name__ == "__main__":
except Exception as e:
traceback.print_exc()
quit()
if __name__ == "__main__":
""" Set process title, get arguments, and create GTK main thread. """
run()

View File

@@ -35,6 +35,7 @@ class TabMixin(GridMixin):
tab_widget = self.create_tab_widget(tab)
scroll, store = self.create_scroll_and_store(tab, wid)
index = notebook.append_page(scroll, tab_widget)
notebook.set_tab_detachable(scroll, True)
self.fm_controller.set_wid_and_tid(wid, tab.get_id())
path_entry.set_text(tab.get_current_directory())
@@ -67,6 +68,10 @@ class TabMixin(GridMixin):
self.fm_controller.save_state()
self.set_window_title()
# NOTE: Not actually getting called even tho set in the glade file...
def on_tab_dnded(self, notebook, page, x, y):
...
def on_tab_reorder(self, child, page_num, new_index):
wid, tid = page_num.get_name().split("|")
window = self.get_fm_window(wid)