summaryrefslogtreecommitdiff
path: root/src/gui/settingsWindow.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/settingsWindow.vala')
-rw-r--r--src/gui/settingsWindow.vala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/settingsWindow.vala b/src/gui/settingsWindow.vala
index 0e7af20..60bfcf3 100644
--- a/src/gui/settingsWindow.vala
+++ b/src/gui/settingsWindow.vala
@@ -152,17 +152,21 @@ public class SettingsWindow : GLib.Object {
/////////////////////////////////////////////////////////////////////
private void on_autostart_toggled(Gtk.ToggleButton check_box) {
+
bool active = check_box.active;
if (!active && FileUtils.test(Paths.autostart, FileTest.EXISTS)) {
+ Config.global.auto_start = false;
// delete the autostart file
FileUtils.remove (Paths.autostart);
}
else if (active && !FileUtils.test(Paths.autostart, FileTest.EXISTS)) {
+ Config.global.auto_start = true;
+
string autostart_entry =
"#!/usr/bin/env xdg-open\n" +
"[Desktop Entry]\n" +
"Name=Gnome-Pie\n" +
- "Exec=gnome-pie\n" +
+ "Exec=" + Paths.executable + "\n" +
"Encoding=UTF-8\n" +
"Type=Application\n" +
"X-GNOME-Autostart-enabled=true\n" +