Open GoogleCodeExporter opened 8 years ago
Hi,
here is a patch:
--- gdevilspie.0 2014-05-29 15:22:19.140058066 +0200
+++ gdevilspie.new 2014-05-29 15:20:35.668053528 +0200
@@ -47,13 +47,16 @@
DISABLE_XDG=""
try:
- import xdg.DesktopEntry
+ import xdg.BaseDirectory
except:
error = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, "Make sure that Python-xdg is correctly installed if you need autostart handling.")
response = error.run()
error.destroy()
DISABLE_XDG="True"
+#Please increse this part
+import xdg.DesktopEntry
+
import gettext
_ = gettext.gettext
PACKAGE = "gdevilspie"
@@ -542,12 +545,12 @@
if ( DISABLE_XDG == "True" ):
self.DaemonAutostart.set_sensitive(False)
else:
- if (os.path.exists(xdg.DesktopEntry.xdg_config_home +
"/autostart/devilspie.desktop")):
- df = xdg.DesktopEntry.DesktopEntry(xdg.DesktopEntry.xdg_config_home +
"/autostart/devilspie.desktop")
+ if (os.path.exists(xdg.BaseDirectory.xdg_config_home +
"/autostart/devilspie.desktop")):
+ df = xdg.DesktopEntry.DesktopEntry(xdg.BaseDirectory.xdg_config_home +
"/autostart/devilspie.desktop")
if (df.get('X-GNOME-Autostart-enabled') == 'true'):
self.DaemonAutostart.set_active(True)
else:
- df = xdg.DesktopEntry.DesktopEntry(xdg.DesktopEntry.xdg_config_home +
"/autostart/devilspie.desktop")
+ df = xdg.DesktopEntry.DesktopEntry(xdg.BaseDirectory.xdg_config_home +
"/autostart/devilspie.desktop")
df.set('Name','Devilspie')
df.set('Exec','devilspie')
df.set('X-GNOME-Autostart-enabled','false')
@@ -555,7 +558,7 @@
def on_DaemonAutostart_toggled(self,widget):
- df = xdg.DesktopEntry.DesktopEntry(xdg.DesktopEntry.xdg_config_home +
"/autostart/devilspie.desktop")
+ df = xdg.DesktopEntry.DesktopEntry(xdg.BaseDirectory.xdg_config_home +
"/autostart/devilspie.desktop")
if (widget.get_active()):
df.set('X-GNOME-Autostart-enabled','true')
df.write()
Original comment by tuxmoura...@gmail.com
on 29 May 2014 at 1:28
I just saw the patch on issue 20, same as mine.
Original comment by tuxmoura...@gmail.com
on 29 May 2014 at 1:32
Original issue reported on code.google.com by
steve.ke...@gmail.com
on 17 May 2014 at 7:29