diff options
author | Alessandro Ghedini <al3xbio@gmail.com> | 2012-05-20 20:01:21 +0200 |
---|---|---|
committer | Alessandro Ghedini <al3xbio@gmail.com> | 2012-05-20 20:01:21 +0200 |
commit | 87a5b11d7598fc1e5239e11972c5e03a38bbb672 (patch) | |
tree | cb14cf8d0ce50cac3bd909183f86710e6fa74056 /src/gui/settingsWindow.vala | |
parent | 5cf585bfd897084175f1b8f8f0d8c1c27614f288 (diff) |
Imported Upstream version 0.5.3upstream/0.5.3
Diffstat (limited to 'src/gui/settingsWindow.vala')
-rw-r--r-- | src/gui/settingsWindow.vala | 6 |
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" + |