Skip to content

Commit

Permalink
Refix for Guake#517
Browse files Browse the repository at this point in the history
Signed-off-by: Gaetan Semet <[email protected]>
  • Loading branch information
gsemet committed May 4, 2015
1 parent 9221561 commit 5d11204
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/guake/guake_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,17 +681,15 @@ def get_final_window_monitor(self):

def is_using_unity(self):
linux_distrib = platform.linux_distribution()
if linux_distrib[0].lower() == "ubuntu":
if float(linux_distrib[1]) - 0.01 >= 15.04:
if os.environ.get('DESKTOP_SESSION').lower() == "ubuntu":
return True
elif os.environ.get('DESKTOP_SESSION').lower() == "gnome": # gnome shell
return False
elif os.environ.get('DESKTOP_SESSION').lower() == "mate": # gnome Mate
return False
elif os.environ.get('DESKTOP_SESSION').lower() == "lubuntu": # gnome Lubuntu
return False
elif os.environ.get('DESKTOP_SESSION').lower() == "ubuntu":
if linux_distrib[0].lower() != "ubuntu":
return False

# http://askubuntu.com/questions/70296/is-there-an-environment-variable-that-is-set-for-unity
if float(linux_distrib[1]) - 0.01 <= 11.10:
if os.environ.get('DESKTOP_SESSION').lower() == "gnome".lower():
return True
else:
if os.environ.get('XDG_CURRENT_DESKTOP').lower() == "unity".lower():
return True
return False

Expand Down

0 comments on commit 5d11204

Please sign in to comment.