Export to GitHub

gdevilspie - issue #22

gdevilspie crashes on startup


Posted on May 17, 2014 by Swift Dog

What steps will reproduce the problem? 1. run gdevilspie 2. 3.

What is the expected output? What do you see instead? I get: Traceback (most recent call last): File "/usr/bin/gdevilspie", line 893, in <module> MainWindow = RulesListWindow() File "/usr/bin/gdevilspie", line 374, in init self.UpdateAutostartStatus() File "/usr/bin/gdevilspie", line 545, in UpdateAutostartStatus if (os.path.exists(xdg.DesktopEntry.xdg_config_home + "/autostart/devilspie.desktop")): AttributeError: 'module' object has no attribute 'xdg_config_home'

What version of the product are you using? On what operating system? gdevilspie 0.5 Ubuntu 14.04

Please provide any additional information below.

Comment #1

Posted on May 29, 2014 by Grumpy Camel

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()

Comment #2

Posted on May 29, 2014 by Grumpy Camel

I just saw the patch on issue 20, same as mine.

Status: New

Labels:
Type-Defect Priority-Medium