Improved selection bounds on rename
This commit is contained in:
parent
a47bd23e78
commit
fec0d26ab7
@ -50,6 +50,9 @@ class RenameWidget:
|
||||
def show_rename_file_menu(self, widget=None, eve=None):
|
||||
if widget:
|
||||
widget.grab_focus()
|
||||
end_i = widget.get_text().rfind(".")
|
||||
if end_i > 0:
|
||||
widget.select_region(0, end_i)
|
||||
|
||||
response = self._rename_file_menu.run()
|
||||
if response == Gtk.ResponseType.CLOSE:
|
||||
@ -78,4 +81,4 @@ class RenameWidget:
|
||||
def hide_rename_file_menu_enter_key(self, widget=None, eve=None):
|
||||
keyname = Gdk.keyval_name(eve.keyval).lower()
|
||||
if keyname in ["return", "enter"]:
|
||||
self._rename_file_menu.hide()
|
||||
self._rename_file_menu.hide()
|
@ -83,13 +83,9 @@ class TabMixin(GridMixin):
|
||||
self.builder.dereference_object(f"{wid}|{tid}")
|
||||
|
||||
store.clear()
|
||||
# store.run_dispose()
|
||||
icon_grid.destroy()
|
||||
# icon_grid.run_dispose()
|
||||
scroll.destroy()
|
||||
#scroll.run_dispose()
|
||||
tab_box.destroy()
|
||||
#tab_box.run_dispose()
|
||||
|
||||
del store
|
||||
del icon_grid
|
||||
|
Loading…
Reference in New Issue
Block a user