mirror of
https://github.com/Snigdha-OS/snigdhaos-welcome.git
synced 2025-09-20 22:14:56 +02:00
🧹 chore: add enhanced functions
This commit is contained in:
@@ -649,9 +649,14 @@ class Main(Gtk.Window):
|
|||||||
print(f"[ERROR]: Error in startup_toggle: {e}")
|
print(f"[ERROR]: Error in startup_toggle: {e}")
|
||||||
|
|
||||||
def save_settings(self, state):
|
def save_settings(self, state):
|
||||||
|
try:
|
||||||
|
# Open the settings file in write mode and save the state (autostart)
|
||||||
with open(GUI.Settings, "w") as f:
|
with open(GUI.Settings, "w") as f:
|
||||||
f.write("autostart=" + str(state))
|
f.write(f"autostart={state}")
|
||||||
f.close()
|
print(f"[INFO]: Settings saved: autostart={state}")
|
||||||
|
except Exception as e:
|
||||||
|
# Handle any errors that occur while saving settings
|
||||||
|
print(f"[ERROR]: Failed to save settings: {e}")
|
||||||
|
|
||||||
def load_settings(self):
|
def load_settings(self):
|
||||||
line = "True"
|
line = "True"
|
||||||
|
Reference in New Issue
Block a user