Compare commits
No commits in common. "4ed4aa17d2eaa3e99a1f94273fe03739050411cf" and "2472f8011175e4c7e04e87429c4de8df4042894d" have entirely different histories.
4ed4aa17d2
...
2472f80111
1 changed files with 0 additions and 22 deletions
|
|
@ -33,9 +33,6 @@ class MainWindow(Gtk.ApplicationWindow):
|
|||
def __init__(self, *args: Any, **kwargs: Any):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
# Directory history stack
|
||||
self.directory_history: list[str] = []
|
||||
|
||||
# For overlay text timeout
|
||||
self.overlay_hide_time = 0.0
|
||||
self.last_position_save = 0.0
|
||||
|
|
@ -151,8 +148,6 @@ class MainWindow(Gtk.ApplicationWindow):
|
|||
file_item = cast(FileItem, selected_item)
|
||||
|
||||
if file_item.file_type == FileType.DIRECTORY:
|
||||
# Save current directory before changing
|
||||
self.directory_history.append(os.getcwd())
|
||||
os.chdir(file_item.full_path)
|
||||
self._populate_file_list()
|
||||
return
|
||||
|
|
@ -374,23 +369,6 @@ class MainWindow(Gtk.ApplicationWindow):
|
|||
self._toggle_watched_status()
|
||||
return True
|
||||
|
||||
elif keyval == Gdk.keyval_from_name("BackSpace"):
|
||||
if self.directory_history:
|
||||
prev_dir = self.directory_history.pop()
|
||||
current_dir_name = Path(os.getcwd()).name
|
||||
os.chdir(prev_dir)
|
||||
self._populate_file_list()
|
||||
|
||||
# Find and select the directory we came from
|
||||
for i in range(self.list_store.get_n_items()):
|
||||
item = self.list_store.get_item(i)
|
||||
if item and cast(FileItem, item).name == current_dir_name:
|
||||
self.list_view.scroll_to(
|
||||
i, Gtk.ListScrollFlags.SELECT | Gtk.ListScrollFlags.FOCUS, None
|
||||
)
|
||||
break
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def _on_key_pressed(
|
||||
|
|
|
|||
Loading…
Reference in a new issue