gen2brain / volti

Volti is GTK+ application for controlling audio volume from system tray/notification area
GNU General Public License v3.0
28 stars 8 forks source link

Volti preference window will not show if current dir contains a dir called src #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If volti is launched from a directory that contains a sub-directory called src, 
the preferences window will not show when selected from the right click menu 
and this error is shown:

 Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/volti/menu.py", line 52, in show_preferences
    self.main.preferences.open()
  File "/usr/lib/python2.7/site-packages/volti/preferences.py", line 89, in open
    _PREFERENCES.init_builder()
  File "/usr/lib/python2.7/site-packages/volti/preferences.py", line 119, in init_builder
    self.tree.add_from_file(self.glade)
glib.GError: Failed to open file 'data/preferences.glade': No such file or 
directory

config.py contains this:

         if not os.path.isdir(os.path.join(".","src")):
             for base in ["/usr/share", "/usr/local/share"]:
                 if os.path.isdir(os.path.join(base, self.app_name)):
                     self.res_dir = os.path.join(base, self.app_name)
                     self.locale_dir = os.path.join(base, "locale")
                     break

If a directory called src exists, then res_dir and locale_dir stay set to None, 
so preferences.glade file is not found.

Any reason for the src directory check?

Original issue reported on code.google.com by andyheas...@gmail.com on 9 Nov 2010 at 2:36

GoogleCodeExporter commented 9 years ago
src dir is checked because that way you can start volti when you unpack 
archive, without prior installing, but it needs fixing...Thanks

Original comment by gen2br...@gmail.com on 10 Nov 2010 at 8:22

GoogleCodeExporter commented 9 years ago

Original comment by gen2br...@gmail.com on 29 Dec 2010 at 9:46