mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 09:59:41 +02:00
feat: add notification popup to inform users of malicious ads on megadb
This commit is contained in:
@@ -16,7 +16,8 @@ def create_config():
|
||||
"autoresume": str(state.autoresume),
|
||||
"window_transparency": str(state.window_transparency),
|
||||
"accent_color": str(state.accent_color),
|
||||
"close_to_tray": str(state.close_to_tray)
|
||||
"close_to_tray": str(state.close_to_tray),
|
||||
"show_megadb_notification": str(state.show_megadb_notification)
|
||||
}
|
||||
|
||||
config["Network"] = {
|
||||
@@ -88,6 +89,7 @@ def read_config():
|
||||
state.window_transparency = config.getboolean("General", "window_transparency", fallback=state.window_transparency)
|
||||
state.accent_color = config.get("General", "accent_color", fallback=state.accent_color)
|
||||
state.close_to_tray = config.getboolean("General", "close_to_tray", fallback=state.close_to_tray)
|
||||
state.show_megadb_notification = config.getboolean("General", "show_megadb_notification", fallback=state.show_megadb_notification)
|
||||
|
||||
# Network
|
||||
state.api_url = config.get("Network", "api_url", fallback=state.api_url)
|
||||
|
||||
@@ -8,7 +8,7 @@ import platform
|
||||
|
||||
|
||||
|
||||
def save_settings(close=lambda: None, apiurl=None, download_path=None, down_speed_limit=None, up_speed_limit=None, image_path=None, autoresume=None, max_connections=None, max_downloads=None, bound_interface=None, image_width=None, image_offset=None, image_opacity=None, image_as_wallpaper=None, image_position=None, accent_color=None, close_to_tray=None):
|
||||
def save_settings(close=lambda: None, apiurl=None, download_path=None, down_speed_limit=None, up_speed_limit=None, image_path=None, autoresume=None, max_connections=None, max_downloads=None, bound_interface=None, image_width=None, image_offset=None, image_opacity=None, image_as_wallpaper=None, image_position=None, accent_color=None, close_to_tray=None, show_megadb_notification=None):
|
||||
if apiurl is not None:
|
||||
state.api_url = apiurl
|
||||
if download_path is not None:
|
||||
@@ -45,6 +45,8 @@ def save_settings(close=lambda: None, apiurl=None, download_path=None, down_spee
|
||||
qdarktheme.setup_theme("auto", custom_colors=custom_colors if custom_colors else None)
|
||||
if close_to_tray is not None:
|
||||
state.close_to_tray = close_to_tray
|
||||
if show_megadb_notification is not None:
|
||||
state.show_megadb_notification = show_megadb_notification
|
||||
|
||||
update_settings() # Update LibTorrent Session Settings
|
||||
consoleLog("Saved Settings")
|
||||
|
||||
@@ -31,6 +31,7 @@ class AppState(QObject):
|
||||
self.active_interfaces: List = []
|
||||
self.bound_interface: Any = None
|
||||
self.close_to_tray: bool = True
|
||||
self.show_megadb_notification: bool = True
|
||||
|
||||
# Image
|
||||
self._image_enabled: bool = False
|
||||
|
||||
Reference in New Issue
Block a user