From adc76e42cc4e2fbdb12fa17c749d64e9d45e454b Mon Sep 17 00:00:00 2001 From: LemonNexus Date: Wed, 11 Feb 2026 15:27:39 +0000 Subject: [PATCH] refactor: reorganize default directories to Documents/Entropia Universe/ Changed default locations: - Screenshots: Documents/Entropia Universe/Screenshots - Icons: Documents/Entropia Universe/Icons This provides better organization and easier access for users. All directories are created automatically if they don't exist. --- modules/auto_screenshot.py | 5 ++++- modules/inventory_scanner.py | 2 +- ui/gallery_dialog.py | 7 ++++--- ui/main_window.py | 5 ++--- ui/settings_dialog.py | 4 ++-- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/modules/auto_screenshot.py b/modules/auto_screenshot.py index 5a30c96..9fe019e 100644 --- a/modules/auto_screenshot.py +++ b/modules/auto_screenshot.py @@ -21,7 +21,10 @@ class AutoScreenshot: """ def __init__(self, screenshot_dir: Optional[Path] = None): - self.screenshot_dir = screenshot_dir or Path.home() / ".lemontropia" / "screenshots" + # Default to Documents/Entropia Universe/Screenshots + if screenshot_dir is None: + screenshot_dir = Path.home() / "Documents" / "Entropia Universe" / "Screenshots" + self.screenshot_dir = screenshot_dir self.screenshot_dir.mkdir(parents=True, exist_ok=True) self.session_screenshots: List[Path] = [] diff --git a/modules/inventory_scanner.py b/modules/inventory_scanner.py index 051cb82..e8f6138 100644 --- a/modules/inventory_scanner.py +++ b/modules/inventory_scanner.py @@ -141,7 +141,7 @@ class InventoryScanner: self.item_slot_gap = 4 # Gap between slots # Icon extraction settings - self.icon_output_dir = Path.home() / ".lemontropia" / "extracted_icons" + self.icon_output_dir = Path.home() / "Documents" / "Entropia Universe" / "Icons" self.icon_output_dir.mkdir(parents=True, exist_ok=True) # Detection results cache diff --git a/ui/gallery_dialog.py b/ui/gallery_dialog.py index 1a3ad6a..647e71b 100644 --- a/ui/gallery_dialog.py +++ b/ui/gallery_dialog.py @@ -70,8 +70,8 @@ class GalleryDialog(QDialog): # Initialize database self.db = DatabaseManager() - # Ensure screenshots directory exists - self.screenshots_dir = Path(__file__).parent.parent / "data" / "screenshots" + # Ensure screenshots directory exists - default to Documents/Entropia Universe/Screenshots + self.screenshots_dir = Path.home() / "Documents" / "Entropia Universe" / "Screenshots" self.screenshots_dir.mkdir(parents=True, exist_ok=True) # State @@ -761,7 +761,8 @@ class ScreenshotCapture: def __init__(self, db: Optional[DatabaseManager] = None): self.db = db or DatabaseManager() - self.screenshots_dir = Path(__file__).parent.parent / "data" / "screenshots" + # Default to Documents/Entropia Universe/Screenshots + self.screenshots_dir = Path.home() / "Documents" / "Entropia Universe" / "Screenshots" self.screenshots_dir.mkdir(parents=True, exist_ok=True) def capture(self, session_id: int, trigger_event: str = "manual", diff --git a/ui/main_window.py b/ui/main_window.py index c7b0529..54985b8 100644 --- a/ui/main_window.py +++ b/ui/main_window.py @@ -1927,9 +1927,8 @@ class MainWindow(QMainWindow): try: from modules.auto_screenshot import AutoScreenshot - # Create screenshot manager - use gallery dialog's screenshots directory - screenshots_dir = Path(__file__).parent.parent / "data" / "screenshots" - auto_screenshot = AutoScreenshot(screenshots_dir) + # Create screenshot manager - AutoScreenshot now uses Documents/Entropia Universe/Screenshots by default + auto_screenshot = AutoScreenshot() # Create hotkey manager (pass parent window for Qt shortcuts) self._screenshot_hotkeys = ScreenshotHotkeyManager(self, auto_screenshot) diff --git a/ui/settings_dialog.py b/ui/settings_dialog.py index d650518..c5edf8b 100644 --- a/ui/settings_dialog.py +++ b/ui/settings_dialog.py @@ -184,7 +184,7 @@ class SettingsDialog(QDialog): # Screenshots directory screenshots_layout = QHBoxLayout() self.screenshots_dir_edit = QLineEdit(self._screenshots_dir) - self.screenshots_dir_edit.setPlaceholderText("Default: data/screenshots/") + self.screenshots_dir_edit.setPlaceholderText(r"Default: Documents\Entropia Universe\Screenshots") screenshots_layout.addWidget(self.screenshots_dir_edit) screenshots_browse = QPushButton("Browse...") @@ -196,7 +196,7 @@ class SettingsDialog(QDialog): # Icons directory icons_layout = QHBoxLayout() self.icons_dir_edit = QLineEdit(self._icons_dir) - self.icons_dir_edit.setPlaceholderText("Default: ~/.lemontropia/extracted_icons/") + self.icons_dir_edit.setPlaceholderText(r"Default: Documents\Entropia Universe\Icons") icons_layout.addWidget(self.icons_dir_edit) icons_browse = QPushButton("Browse...")