Tab dnd between windows (state not preserved, yet), plugin fix
This commit is contained in:
parent
ee123c4916
commit
9cde8345cf
@ -122,4 +122,4 @@ class Plugin(PluginBase):
|
||||
|
||||
def set_arc_buffer_text(self, widget=None, eve=None):
|
||||
sid = widget.get_active_id()
|
||||
self.arc_command_buffer.set_text(self.arc_commands[int(sid)])
|
||||
self._arc_command_buffer.set_text(self.arc_commands[int(sid)])
|
||||
|
@ -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()
|
||||
|
@ -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)
|
||||
|
@ -1053,6 +1053,8 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
||||
<property name="margin-bottom">5</property>
|
||||
<property name="show-border">False</property>
|
||||
<property name="scrollable">True</property>
|
||||
<property name="group-name">sfm_windows</property>
|
||||
<signal name="create-window" handler="on_tab_dnded" swapped="no"/>
|
||||
<signal name="page-reordered" handler="on_tab_reorder" swapped="no"/>
|
||||
<signal name="switch-page" handler="on_tab_switch_update" swapped="no"/>
|
||||
<child>
|
||||
@ -1106,6 +1108,8 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
||||
<property name="margin-bottom">5</property>
|
||||
<property name="show-border">False</property>
|
||||
<property name="scrollable">True</property>
|
||||
<property name="group-name">sfm_windows</property>
|
||||
<signal name="create-window" handler="on_tab_dnded" swapped="no"/>
|
||||
<signal name="page-reordered" handler="on_tab_reorder" swapped="no"/>
|
||||
<signal name="switch-page" handler="on_tab_switch_update" swapped="no"/>
|
||||
<child>
|
||||
@ -1173,6 +1177,8 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
||||
<property name="margin-bottom">5</property>
|
||||
<property name="show-border">False</property>
|
||||
<property name="scrollable">True</property>
|
||||
<property name="group-name">sfm_windows</property>
|
||||
<signal name="create-window" handler="on_tab_dnded" swapped="no"/>
|
||||
<signal name="page-reordered" handler="on_tab_reorder" swapped="no"/>
|
||||
<signal name="switch-page" handler="on_tab_switch_update" swapped="no"/>
|
||||
<child>
|
||||
@ -1225,6 +1231,8 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
||||
<property name="margin-bottom">5</property>
|
||||
<property name="show-border">False</property>
|
||||
<property name="scrollable">True</property>
|
||||
<property name="group-name">sfm_windows</property>
|
||||
<signal name="create-window" handler="on_tab_dnded" swapped="no"/>
|
||||
<signal name="page-reordered" handler="on_tab_reorder" swapped="no"/>
|
||||
<signal name="switch-page" handler="on_tab_switch_update" swapped="no"/>
|
||||
<child>
|
||||
|
Loading…
Reference in New Issue
Block a user