expect autostart desktop files too
This commit is contained in:
@@ -226,11 +226,11 @@ class WelcomeScreen(Gtk.Window):
|
||||
def on_checkbox_toggled(self, checkbox):
|
||||
if checkbox.get_active():
|
||||
print("Welcome Screen will be opened on every boot.")
|
||||
if not os.path.islink(AUTOSTART_SYMLINK_PATH):
|
||||
if not os.path.isfile(AUTOSTART_SYMLINK_PATH):
|
||||
os.symlink(DESKTOP_FILE_PATH, AUTOSTART_SYMLINK_PATH)
|
||||
else:
|
||||
print("Welcome Screen will not be opened on every boot.")
|
||||
if os.path.islink(AUTOSTART_SYMLINK_PATH):
|
||||
if os.path.isfile(AUTOSTART_SYMLINK_PATH):
|
||||
os.unlink(AUTOSTART_SYMLINK_PATH)
|
||||
|
||||
def on_next_button_clicked(self, button):
|
||||
@@ -245,7 +245,7 @@ class WelcomeScreen(Gtk.Window):
|
||||
subprocess.Popen(command.split(' '), start_new_session=True)
|
||||
|
||||
def is_autostarted(self):
|
||||
return os.path.islink(AUTOSTART_SYMLINK_PATH)
|
||||
return os.path.isfile(AUTOSTART_SYMLINK_PATH)
|
||||
|
||||
|
||||
win = WelcomeScreen()
|
||||
|
Reference in New Issue
Block a user