From 87a5b11d7598fc1e5239e11972c5e03a38bbb672 Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Sun, 20 May 2012 20:01:21 +0200 Subject: Imported Upstream version 0.5.3 --- src/gui/settingsWindow.vala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/gui/settingsWindow.vala') 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" + -- cgit v1.2.3