v1.9.6: S3 navigation — Backspace/Alt+Left to go back, right-click empty area menu

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chrome-storm-c442
2026-03-03 08:12:51 -05:00
parent f233d5cf70
commit 2a56ececd1
3 changed files with 19 additions and 2 deletions

View File

@@ -211,6 +211,9 @@ class S3Tab(ctk.CTkFrame):
# Double-click to enter prefix (folder) or download file
self._tree.bind("<Double-1>", self._on_double_click)
# Backspace / Alt+Left to go back
self._tree.bind("<BackSpace>", lambda e: self._go_back())
self._tree.bind("<Alt-Left>", lambda e: self._go_back())
# Right-click context menu
self._ctx_menu = tk.Menu(self._tree, tearoff=0)
@@ -239,6 +242,17 @@ class S3Tab(ctk.CTkFrame):
)
self._tree.bind("<Button-3>", self._on_right_click)
# Empty area context menu (back + new folder)
self._bg_menu = tk.Menu(self._tree, tearoff=0)
self._bg_menu.add_command(
label=icon_text("back", t("s3_back")),
command=self._go_back,
)
self._bg_menu.add_command(
label=icon_text("add", t("s3_new_folder")),
command=self._create_folder,
)
# Dark treeview style
style = ttk.Style()
style.configure("Dark.Treeview",
@@ -517,6 +531,10 @@ class S3Tab(ctk.CTkFrame):
"""Show context menu on right-click."""
item_id = self._tree.identify_row(event.y)
if not item_id:
# Clicked on empty area — show background menu
self._bg_menu.entryconfigure(0,
state="normal" if self._current_prefix else "disabled")
self._bg_menu.tk_popup(event.x_root, event.y_root)
return
self._tree.selection_set(item_id)
# Check if it's a file (not a folder)
@@ -526,7 +544,6 @@ class S3Tab(ctk.CTkFrame):
name = str(name)
is_folder = name.endswith("/")
# Enable/disable menu items based on type
state = "normal" if not is_folder else "disabled"
file_state = "normal" if not is_folder else "disabled"
self._ctx_menu.entryconfigure(0, state=file_state) # Link 48h
self._ctx_menu.entryconfigure(1, state=file_state) # Link permanent

Binary file not shown.

View File

@@ -1,6 +1,6 @@
"""Version info for ServerManager."""
__version__ = "1.9.5"
__version__ = "1.9.6"
__app_name__ = "ServerManager"
__author__ = "aibot777"
__description__ = "Desktop GUI for managing remote servers"