From d1b3a44099330ffdc4a2a339b1057e625c54753f Mon Sep 17 00:00:00 2001 From: Ricardo Velhote Date: Fri, 14 Apr 2017 22:42:15 +0100 Subject: [PATCH] The boolean values written to the .desktop file must be lowercase --- indicator-bitcoin.desktop | 2 +- interface/menu_item.py | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/indicator-bitcoin.desktop b/indicator-bitcoin.desktop index fcc59bd..22bd91b 100644 --- a/indicator-bitcoin.desktop +++ b/indicator-bitcoin.desktop @@ -2,7 +2,7 @@ Categories=System Comment=A Bitcoin price indicator for Ubuntu based on most up-to-date price on Bitstamp Exec=/usr/share/indicator-bitcoin/indicator-bitcoin -Hidden=False +Hidden=false Icon=/usr/share/indicator-bitcoin/bitcoin.png Name=Bitcoin indicator StartupNotify=false diff --git a/interface/menu_item.py b/interface/menu_item.py index 8bdf0b5..d7ab7c5 100644 --- a/interface/menu_item.py +++ b/interface/menu_item.py @@ -96,11 +96,10 @@ def get_xdg_file(): return desktop.DesktopEntry(autostart_file), autostart_file @staticmethod - def set_autostart(item, data=None): + def set_autostart(item): """ - - :param item: - :param data: + Toggle event for the autostart option that belongs to the indicator menu + :param item: The item that was toggled :return: """ dfile, path = MenuItemAutostart.get_xdg_file() @@ -108,7 +107,11 @@ def set_autostart(item, data=None): if dfile is None: return - dfile.set("X-GNOME-Autostart-enabled", item.get_active()) + value = "false" + if item.get_active(): + value = "true" + + dfile.set("X-GNOME-Autostart-enabled", value) dfile.write(filename=path) @staticmethod