Added TODO signals dbl click and enter key

This commit is contained in:
itdominator 2021-12-02 00:03:11 -06:00
parent c40be842d5
commit 8c69cdebe5
4 changed files with 964 additions and 950 deletions

View File

@ -14,8 +14,6 @@ SolarFM is a Gtk+ Python file manager.
<li>Add drive size free and consumed info to bottom bar.</li>
<li>Add simpleish plugin system to run bash/python scripts.</li>
<li>Add DnD context awareness for over folder drop.</li>
<li>Add double click event for App chooser.</li>
<li>Add enter key event for rename dialog.</li>
</ul>
# Images

View File

@ -3,7 +3,8 @@
# Gtk imports
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gio
gi.require_version('Gdk', '3.0')
from gi.repository import Gtk, Gdk, Gio
# Application imports
@ -82,7 +83,8 @@ class ShowHideMixin:
self.builder.get_object("appchooser_menu").hide()
def run_appchooser_launch(self, widget=None, eve=None):
self.builder.get_object("appchooser_select_btn").pressed()
dialog = widget.get_parent().get_parent()
dialog.response(Gtk.ResponseType.OK)
def show_context_menu(self, widget=None, eve=None):
self.builder.get_object("context_menu").run()
@ -100,7 +102,15 @@ class ShowHideMixin:
self.builder.get_object("edit_file_menu").run()
def hide_edit_file_menu(self, widget=None, eve=None):
self.builder.get_object("edit_file_menu").hide()
if widget:
name = widget.get_name()
if name == "rename":
self.builder.get_object("edit_file_menu").hide()
keyname = Gdk.keyval_name(eve.keyval).lower()
if "return" in keyname or "enter" in keyname:
self.builder.get_object("edit_file_menu").hide()
def hide_edit_file_menu_skip(self, widget=None, eve=None):
self.skip_edit = True

View File

@ -165,7 +165,9 @@ class WidgetFileActionMixin:
def copy_files(self):
wid, tid, view, iconview, store = self.get_current_state()
print(self.selected_files)
uris = self.format_to_uris(store, wid, tid, self.selected_files)
print(uris)
self.to_copy_files = uris
def paste_files(self):

File diff suppressed because it is too large Load Diff