diff options
author | Alessandro Ghedini <al3xbio@gmail.com> | 2012-05-20 20:01:22 +0200 |
---|---|---|
committer | Alessandro Ghedini <al3xbio@gmail.com> | 2012-05-20 20:01:22 +0200 |
commit | a095c29cd9cc8e4a43d79548bc57b870c6e90bfa (patch) | |
tree | daf6e98fbb58b7f78213e98d9291255c151d8671 /src/gui/settingsWindow.vala | |
parent | b3977b8585efcd19a73e3bf7f25f41b01d9d4cae (diff) | |
parent | 87a5b11d7598fc1e5239e11972c5e03a38bbb672 (diff) |
Merge tag 'upstream/0.5.3'
Upstream version 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" + |