Commits

Vladimir Kolev committed 1259cda

os and sys import should be before using them in gsharkdown.py

get_selected_rows was missing a return statement

The AppIndicator should be working when after install we add the icons to the
hicolor theme with a command

sudo xdg-icon-resource install --theme hicolor --novendor --size 16 [path_to_original] [accessible name]

Comments (0)

Files changed (3)

 by the grooveshark.com service
 """
 
+import os
+import sys
+
 # Imports with dependency check
 # Imports PyGtk
 try:
     HAVE_INDICATOR = False
     
 # Common imports
-import os
-import sys
 import dbus
 import dbus.service
 import dbus.glib

lib/AbstractSongList.py

         return range(len(self.get_model()))
     
     def get_selected_rows(self):
-        self.get_view().get_selection().get_selected_rows()[1]
+        return self.get_view().get_selection().get_selected_rows()[1]
         

lib/guihelpers.py

         so we can access the gSharkDown methods.
         """
         if env().HAVE_INDICATOR == True:
-            if os.path.exists('/usr/share/pixmaps/gsharkdown'):
-                icons_path = '/usr/share/pixmaps/gsharkdown'
-            else:
-                icons_path = "%s/_pixmaps/gsharkdown" % env().BASEPATH
+            #if os.path.exists('/usr/share/pixmaps/gsharkdown'):
+            #    icons_path = '/usr/share/pixmaps/gsharkdown'
+            #else:
+            #    icons_path = "%s/_pixmaps/gsharkdown" % env().BASEPATH
+            #print icons_path
             self.ind = appindicator.Indicator("gsharkdown-client",
-                                    "gsharkdown-messages",
-                                    appindicator.CATEGORY_APPLICATION_STATUS,
-                                    icons_path)
+                                   "gsharkdown_16",
+                                    appindicator.CATEGORY_APPLICATION_STATUS)
             self.ind.set_status(appindicator.STATUS_ACTIVE)
             self.ind.set_attention_icon("gsharkdown_16_playing")
             self.ind.set_icon("gsharkdown_16")
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.