From 1f8419306acd36008a3fb940386cf1521491bdf4 Mon Sep 17 00:00:00 2001 From: kharts Date: Thu, 25 Jun 2015 21:37:40 +0300 Subject: [PATCH] Change Torrent client icon - now depends of client type --- Core.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Core.py b/Core.py index d78f258..e7d3892 100644 --- a/Core.py +++ b/Core.py @@ -114,7 +114,7 @@ class Core: self.drawItem('< %s >' % self.localize('Download Status'), 'DownloadStatus', image=self.ROOT + '/icons/download.png', contextMenu=DLScontextMenu, replaceMenu=False) self.drawItem('< %s >' % self.localize('Torrent-client Browser'), 'uTorrentBrowser', - image=self.ROOT + '/icons/torrent-client.png') + image=self.ROOT + '/icons/' + self.getTorrentClientIcon()) self.drawItem('< %s >' % self.localize('.torrent Player'), 'torrentPlayer', image=self.ROOT + '/icons/torrentPlayer.png') self.drawItem('< %s >' % self.localize('Search Control Window'), 'controlCenter', @@ -1816,4 +1816,15 @@ class Core: def returnRussian(self, params={}): i=delete_russian(ok=True, action='return') - showMessage(self.localize('Return Russian stuff'),self.localize('%d files have been returned')%i) \ No newline at end of file + showMessage(self.localize('Return Russian stuff'),self.localize('%d files have been returned')%i) + + def getTorrentClientIcon(self): + client = self.__settings__.getSetting("torrent") + if client == '1': + return 'transmission.png' + elif client == '2': + return 'vuze.png' + elif client == '3': + return 'deluge.png' + else: + return 'torrent-client.png'