Bringing to latest changes #3
@ -75,6 +75,11 @@ class Controller(UIMixin, KeyboardSignalsMixin, IPCSignalsMixin, ExceptionHookMi
|
||||
data = method(*(self, *parameters))
|
||||
self.plugins.set_message_on_plugin(type, data)
|
||||
|
||||
def open_terminal(self, widget=None, eve=None):
|
||||
wid, tid = self.window_controller.get_active_wid_and_tid()
|
||||
view = self.get_fm_window(wid).get_view_by_id(tid)
|
||||
dir = view.get_current_directory()
|
||||
view.execute(f"{view.terminal_app}", dir)
|
||||
|
||||
def save_load_session(self, action="save_session"):
|
||||
wid, tid = self.window_controller.get_active_wid_and_tid()
|
||||
@ -107,7 +112,6 @@ class Controller(UIMixin, KeyboardSignalsMixin, IPCSignalsMixin, ExceptionHookMi
|
||||
|
||||
save_load_dialog.hide()
|
||||
|
||||
|
||||
def load_session(self, session_json):
|
||||
if debug:
|
||||
print(f"Session Data: {session_json}")
|
||||
@ -162,8 +166,6 @@ class Controller(UIMixin, KeyboardSignalsMixin, IPCSignalsMixin, ExceptionHookMi
|
||||
self.empty_trash()
|
||||
|
||||
if action == "create":
|
||||
self.create_files()
|
||||
self.show_new_file_menu()
|
||||
if action in ["save_session", "save_session_as", "load_session"]:
|
||||
self.save_load_session(action)
|
||||
|
||||
self.ctrlDown = False
|
||||
|
@ -87,8 +87,8 @@ class WidgetFileActionMixin:
|
||||
def do_file_search(self, widget, eve=None):
|
||||
query = widget.get_text()
|
||||
self.search_iconview.unselect_all()
|
||||
for i, file in enumerate(self.search_view.files):
|
||||
if query and query in file.lower():
|
||||
for i, file in enumerate(self.search_view.get_files()):
|
||||
if query and query in file[0].lower():
|
||||
path = Gtk.TreePath().new_from_indices([i])
|
||||
self.search_iconview.select_path(path)
|
||||
|
||||
|
@ -182,9 +182,11 @@ class WindowMixin(TabMixin):
|
||||
def grid_icon_double_click(self, iconview, item, data=None):
|
||||
try:
|
||||
if self.ctrlDown and self.shiftDown:
|
||||
self.unset_keys_and_data()
|
||||
self.execute_files(in_terminal=True)
|
||||
return
|
||||
elif self.ctrlDown:
|
||||
self.unset_keys_and_data()
|
||||
self.execute_files()
|
||||
return
|
||||
|
||||
|
@ -47,6 +47,7 @@ class KeyboardSignalsMixin:
|
||||
|
||||
|
||||
if self.ctrlDown and self.shiftDown and keyname == "t":
|
||||
self.unset_keys_and_data()
|
||||
self.trash_files()
|
||||
|
||||
|
||||
@ -57,6 +58,7 @@ class KeyboardSignalsMixin:
|
||||
if isinstance(focused_obj, Gtk.IconView):
|
||||
self.is_searching = True
|
||||
wid, tid, self.search_view, self.search_iconview, store = self.get_current_state()
|
||||
self.unset_keys_and_data()
|
||||
self.popup_search_files(wid, keyname)
|
||||
return
|
||||
|
||||
@ -79,26 +81,30 @@ class KeyboardSignalsMixin:
|
||||
if (self.ctrlDown and keyname == "up") or (self.ctrlDown and keyname == "u"):
|
||||
self.builder.get_object("go_up").released()
|
||||
if self.ctrlDown and keyname == "l":
|
||||
self.unset_keys_and_data()
|
||||
self.builder.get_object("path_entry").grab_focus()
|
||||
if self.ctrlDown and keyname == "t":
|
||||
self.builder.get_object("create_tab").released()
|
||||
if self.ctrlDown and keyname == "o":
|
||||
self.unset_keys_and_data()
|
||||
self.open_files()
|
||||
if self.ctrlDown and keyname == "w":
|
||||
self.keyboard_close_tab()
|
||||
if self.ctrlDown and keyname == "h":
|
||||
self.show_hide_hidden_files()
|
||||
if (self.ctrlDown and keyname == "e"):
|
||||
self.unset_keys_and_data()
|
||||
self.rename_files()
|
||||
if self.ctrlDown and keyname == "c":
|
||||
self.to_cut_files.clear()
|
||||
self.copy_files()
|
||||
self.to_cut_files.clear()
|
||||
if self.ctrlDown and keyname == "x":
|
||||
self.to_copy_files.clear()
|
||||
self.cut_files()
|
||||
if self.ctrlDown and keyname == "v":
|
||||
self.paste_files()
|
||||
if self.ctrlDown and keyname == "n":
|
||||
self.unset_keys_and_data()
|
||||
self.show_new_file_menu()
|
||||
|
||||
|
||||
@ -110,11 +116,11 @@ class KeyboardSignalsMixin:
|
||||
else:
|
||||
top_main_menubar.show()
|
||||
if keyname == "delete":
|
||||
self.unset_keys_and_data()
|
||||
self.delete_files()
|
||||
if keyname == "f2":
|
||||
self.unset_keys_and_data()
|
||||
self.rename_files()
|
||||
if keyname == "f4":
|
||||
wid, tid = self.window_controller.get_active_wid_and_tid()
|
||||
view = self.get_fm_window(wid).get_view_by_id(tid)
|
||||
dir = view.get_current_directory()
|
||||
view.execute(f"{view.terminal_app}", dir)
|
||||
self.unset_keys_and_data()
|
||||
self.open_terminal()
|
||||
|
@ -1144,6 +1144,11 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
||||
<property name="can-focus">False</property>
|
||||
<property name="stock">gtk-save</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="image5">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="stock">gtk-execute</property>
|
||||
</object>
|
||||
<object class="GtkTextBuffer" id="message_buffer"/>
|
||||
<object class="GtkImage" id="open_with_img">
|
||||
<property name="visible">True</property>
|
||||
@ -1459,6 +1464,16 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
||||
<property name="can-focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem">
|
||||
<property name="label">Terminal</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="image">image5</property>
|
||||
<property name="use-stock">False</property>
|
||||
<signal name="button-release-event" handler="open_terminal" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem">
|
||||
<property name="visible">True</property>
|
||||
@ -2397,6 +2412,24 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label">gtk-new</property>
|
||||
<property name="name">create</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="tooltip-text" translatable="yes">New File/Folder...</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="use-stock">True</property>
|
||||
<signal name="button-release-event" handler="do_action_from_menu_controls" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label" translatable="yes">Rename</property>
|
||||
@ -2405,7 +2438,6 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="tooltip-text" translatable="yes">Rename...</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="image">rename_img2</property>
|
||||
<property name="always-show-image">True</property>
|
||||
<signal name="button-release-event" handler="do_action_from_menu_controls" swapped="no"/>
|
||||
@ -2413,7 +2445,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">4</property>
|
||||
<property name="position">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -2431,7 +2463,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">5</property>
|
||||
<property name="position">6</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -2449,7 +2481,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">6</property>
|
||||
<property name="position">7</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -2467,7 +2499,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">7</property>
|
||||
<property name="position">8</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -2485,7 +2517,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">8</property>
|
||||
<property name="position">9</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -2502,7 +2534,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">9</property>
|
||||
<property name="position">10</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -2518,7 +2550,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">10</property>
|
||||
<property name="position">11</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -2537,7 +2569,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">11</property>
|
||||
<property name="position">12</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -2555,7 +2587,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">12</property>
|
||||
<property name="position">13</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -2574,7 +2606,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">13</property>
|
||||
<property name="position">14</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
Loading…
Reference in New Issue
Block a user