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.
This commit is contained in:
parent
18ce52a72e
commit
adc76e42cc
|
|
@ -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] = []
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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...")
|
||||
|
|
|
|||
Loading…
Reference in New Issue