Improved selection bounds on rename

This commit is contained in:
itdominator 2024-02-12 19:58:23 -06:00
parent a47bd23e78
commit fec0d26ab7
2 changed files with 4 additions and 5 deletions

View File

@ -50,6 +50,9 @@ class RenameWidget:
def show_rename_file_menu(self, widget=None, eve=None): def show_rename_file_menu(self, widget=None, eve=None):
if widget: if widget:
widget.grab_focus() 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() response = self._rename_file_menu.run()
if response == Gtk.ResponseType.CLOSE: if response == Gtk.ResponseType.CLOSE:

View File

@ -83,13 +83,9 @@ class TabMixin(GridMixin):
self.builder.dereference_object(f"{wid}|{tid}") self.builder.dereference_object(f"{wid}|{tid}")
store.clear() store.clear()
# store.run_dispose()
icon_grid.destroy() icon_grid.destroy()
# icon_grid.run_dispose()
scroll.destroy() scroll.destroy()
#scroll.run_dispose()
tab_box.destroy() tab_box.destroy()
#tab_box.run_dispose()
del store del store
del icon_grid del icon_grid