Commits

Vladimir Kolev committed c9358f5

Updated threads names as part of the new code improvements

Comments (0)

Files changed (2)

 import dbus
 import dbus.service
 import dbus.glib
-from lib.tfuncs import t_init
-from lib.tfuncs import t_download
-from lib.tfuncs import t_play
-from lib.tfuncs import t_search
-from lib.tfuncs import t_key_listener
-from lib.tfuncs import t_lyrics
-from lib.tfuncs import t_update
+from lib.tfuncs import InitThread
+from lib.tfuncs import DownloadThread
+from lib.tfuncs import PlayThread
+from lib.tfuncs import SearchThread
+from lib.tfuncs import KeyListenerThread
+from lib.tfuncs import LyricsThread
+from lib.tfuncs import UpdateThread
 import lib.guihelpers
 import locale
 import gettext
                                           password_hash=CONFIG['lastpass'])
 
         builder.connect_signals(self)
-        self.tlisten = t_key_listener(self)
+        self.tlisten = KeyListenerThread(self)
         self.tlisten.start()
         if CONFIG['update_checked'] == 0:
             self.check_for_update(None)
         nmarkup = _("<b>You are using the latest version!</b>")
         CONFIG['update_checked'] = 1
         CONFIG.write()
-        t = t_update(BASEPATH, markup, nmarkup, othertext)
+        t = UpdateThread(BASEPATH, markup, nmarkup, othertext)
         t.start()
 
     def icon_clicked(self, widget, data=None):
             self.player.set_state(gst.STATE_NULL)
             song = self.playlist_song(index)
             self.set_songinfos(song)
-            t = t_play(self, song,
+            t = PlayThread(self, song,
                        int(CONFIG['repeat_playlist']),
                       self.lastfm)
             t.start()
         Tries to retrieve lyrics for selected song from the playlist.
         """
         if self.current_song != None:
-            t = t_lyrics(self, '%s/data/lyrics_dialog.ui' % BASEPATH,
+            t = LyricsThread(self, '%s/data/lyrics_dialog.ui' % BASEPATH,
                         self.current_song['ArtistName'], self.current_song['SongName'])
             t.start()
             #lyric = lib.lyrdblib.search(song['ArtistName'],
                 compl = CONFIG['completition'] + widget.get_text() + "|"
                 CONFIG['completition'] = compl
                 CONFIG.write()
-            search_thread = t_search(self, widget.get_text(), "Songs")
+            search_thread = SearchThread(self, widget.get_text(), "Songs")
             search_thread.start()
 
     def play_selected(self, widget, data=None, row=None):
             
             if filename != None:
                 try:
-                    tDownload = t_download(self, song, filename)
+                    tDownload = DownloadThread(self, song, filename)
                     tDownload.start()
                 except:
                     pass
     else:
         app = SharkDown()
         service = SingleService(app)
-        init_thread = t_init(app)
+        init_thread = InitThread(app)
         init_thread.run()
         gtk.main()
 gettext.install(APP, localedir=DIR, unicode=True)
 
 
-class t_init(threading.Thread):
+class InitThread(threading.Thread):
     def __init__(self, _frame):
         threading.Thread.__init__(self)
         self.frame = _frame
                     print e.args
 
 
-class t_download(threading.Thread):
+class DownloadThread(threading.Thread):
 
     def __init__(self, _window, _song, _filename):
         """
             pass
 
 
-class t_play(threading.Thread):
+class PlayThread(threading.Thread):
 
     def __init__(self, _window, _song, _conf, _lastfm):
         """
 #            self.win.play_button.set_stock_id(gtk.STOCK_MEDIA_STOP)
             
 
-class t_key_listener(threading.Thread):
+class KeyListenerThread(threading.Thread):
 
     def __init__(self, _window):
         """
             elif what == 'Previous':
                 self.win.play_previous(self.win.prev_button)
 
-class t_search(threading.Thread):
+class SearchThread(threading.Thread):
 
     def __init__(self, _window, _term, _type):
         """
                                     item])
 
 
-class t_update(threading.Thread):
+class UpdateThread(threading.Thread):
     
     def __init__(self, _basepath, _updatemsg, _noupdate, _secondary):
         """
             dialog.show_all()
 
 
-class t_lyrics(threading.Thread):
+class LyricsThread(threading.Thread):
 
     def __init__(self, _parent, _uifile, _artist, _song):
         """