Pastebin is 300% more awesome when you are logged in. Sign Up, it's FREE!
Guest

gmbox-xdg.patch

By: a guest on Oct 8th, 2010  |  syntax: Diff  |  size: 0.68 KB  |  hits: 127  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. --- config.py.orig      2010-10-08 18:39:38.405000001 +0800
  2. +++ config.py   2010-10-08 18:39:13.914000000 +0800
  3. @@ -4,6 +4,7 @@
  4.  import sys
  5.  import os
  6.  import gtk
  7. +import glib
  8.  
  9.  def get_module_path():
  10.      if hasattr(sys, "frozen"):
  11. @@ -30,7 +31,7 @@
  12.      if os.access(MODULE_PATH, os.W_OK):
  13.          return "%s/download" % MODULE_PATH
  14.      else:
  15. -        return os.path.expanduser("~/music")
  16. +        return glib.get_user_special_dir(2)
  17.  
  18.  # default config
  19.  CONFIG = {
  20. @@ -59,7 +60,7 @@
  21.  
  22.  CONFIG_PATHS = [
  23.      "%s/gmbox.cfg" % MODULE_PATH,
  24. -    os.path.expanduser("~/.gmbox.cfg")
  25. +    os.path.join(glib.get_user_config_dir(), "gmbox.cfg")
  26.  ]
  27.  
  28.  def load_config_file():