Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,6 @@ The project uses GitHub Actions for multi-platform builds (`.github/workflows/re
## Notes

- **ADB Binaries**: Stored in `src/platform-tools/` - do not modify or delete unless explictly instructed to
- **Python Version**: Requires Python 3.13 (< 3.14)
- **Python Version**: Requires Python 3.13 or 3.14 (>=3.13, <3.15)
- **Package Mode**: Poetry is configured with `package-mode = false`
- **License**: First-run license agreement required on Windows
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pyinstaller = "^6.1.0"

[tool.black]
line-length = 88
target-version = ['py313']
target-version = ['py313', 'py314']

[tool.mypy]
python_version = "3.13"
Expand Down
56 changes: 2 additions & 54 deletions src/gui/dialogs/dialog_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,58 +211,6 @@ def on_close():
dialog.protocol("WM_DELETE_WINDOW", on_close)
ok_button.config(command=on_close)

def show_disable_debugging_reminder(self) -> None:
"""Show reminder to disable USB debugging after transfer."""
msg = (
"Transfer completed!\n\n"
"For security, please disable USB debugging when done:\n"
"Settings → Developer Options → disable 'USB debugging'."
)
messagebox.showinfo("Disable USB Debugging", msg)

def show_transfer_stats(
self, stats: dict, operation: str, deduplicator=None
) -> None:
"""Show transfer statistics dialog.

Args:
stats: Dictionary containing transfer statistics
operation: Type of operation ("Pull" or "Push")
deduplicator: Optional deduplicator instance for byte formatting
"""
# Format bytes saved
bytes_saved_str = ""
if stats["bytes_saved"] > 0:
if deduplicator and hasattr(deduplicator, "format_bytes"):
bytes_saved_str = (
f" ({deduplicator.format_bytes(stats['bytes_saved'])} saved)"
)
else:
bytes_saved_str = f" ({stats['bytes_saved']} bytes saved)"

# Build message
title = f"{operation} Transfer Complete"

if stats["total_files"] == 0:
message = "No files were found to transfer."
else:
message_parts = [
f"Transfer completed successfully!\n",
f"Files found: {stats['total_files']}",
f"Files transferred: {stats['transferred']}",
f"Duplicate files skipped: {stats['skipped']}{bytes_saved_str}",
]

if stats["skipped"] > 0:
message_parts.append(
f"\nDuplicate detection helped avoid unnecessary transfers!"
)

message = "\n".join(message_parts)

# Show dialog
messagebox.showinfo(title, message)

def show_error(self, title: str, message: str) -> None:
"""Show an error dialog.

Expand Down Expand Up @@ -386,7 +334,7 @@ def cancel_selection():
side="right"
)

def show_transfer_stats(self, stats: dict, operation: str):
def show_transfer_stats(self, stats: dict, operation: str) -> None:
"""Show transfer statistics in a dialog.

Args:
Expand Down Expand Up @@ -437,7 +385,7 @@ def show_transfer_stats(self, stats: dict, operation: str):
# Close button
tk.Button(main_frame, text="Close", command=stats_window.destroy).pack()

def show_disable_debugging_reminder(self):
def show_disable_debugging_reminder(self) -> None:
"""Show reminder about disabling USB debugging after transfer."""
messagebox.showinfo(
"Security Reminder",
Expand Down
1 change: 0 additions & 1 deletion src/managers/transfer_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ def _transfer_thread(
lambda: self.dialog_manager.show_transfer_stats(
stats,
direction.capitalize(),
self.device_manager.adb_manager.deduplicator,
),
)

Expand Down
Loading