This commit is contained in:
arcan1s
2014-03-31 02:28:55 +04:00
parent 284243f810
commit 05b65679d9
5 changed files with 44 additions and 44 deletions

View File

@ -37,8 +37,7 @@ class DataEngine:
def connectToEngine(self):
"""function to initializate engine"""
self.parent.systemmonitor = self.parent.dataEngine("systemmonitor")
if ((self.parent.gputempBool > 0) or (self.parent.gpuBool > 0) or (self.parent.hddtempBool > 0) or (self.parent.playerBool > 0)):
self.parent.extsysmon = self.parent.dataEngine("ext-sysmon")
self.parent.extsysmon = self.parent.dataEngine("ext-sysmon")
if (self.parent.timeBool > 0):
self.parent.timemon = self.parent.dataEngine("time")
@ -271,23 +270,23 @@ class DataEngine:
self.parent.label_hddtemp.setText(text)
elif (sourceName == "player"):
if (self.parent.player_name == 0):
album = str(data[QString(u'amarok_album')])
artist = str(data[QString(u'amarok_artist')])
progress = str(data[QString(u'amarok_progress')])
time = str(data[QString(u'amarok_duration')])
title = str(data[QString(u'amarok_title')])
album = str(data[QString(u'amarok_album')].toUtf8()).decode("utf-8")
artist = str(data[QString(u'amarok_artist')].toUtf8()).decode("utf-8")
progress = str(data[QString(u'amarok_progress')].toUtf8()).decode("utf-8")
time = str(data[QString(u'amarok_duration')].toUtf8()).decode("utf-8")
title = str(data[QString(u'amarok_title')].toUtf8()).decode("utf-8")
elif (self.parent.player_name == 1):
album = str(data[QString(u'mpd_album')])
artist = str(data[QString(u'mpd_artist')])
progress = str(data[QString(u'mpd_progress')])
time = str(data[QString(u'mpd_duration')])
title = str(data[QString(u'mpd_title')])
album = str(data[QString(u'mpd_album')].toUtf8()).decode("utf-8")
artist = str(data[QString(u'mpd_artist')].toUtf8()).decode("utf-8")
progress = str(data[QString(u'mpd_progress')].toUtf8()).decode("utf-8")
time = str(data[QString(u'mpd_duration')].toUtf8()).decode("utf-8")
title = str(data[QString(u'mpd_title')].toUtf8()).decode("utf-8")
elif (self.parent.player_name == 2):
album = str(data[QString(u'qmmp_album')])
artist = str(data[QString(u'qmmp_artist')])
progress = str(data[QString(u'qmmp_progress')])
time = str(data[QString(u'qmmp_duration')])
title = str(data[QString(u'qmmp_title')])
album = str(data[QString(u'qmmp_album')].toUtf8()).decode("utf-8")
artist = str(data[QString(u'qmmp_artist')].toUtf8()).decode("utf-8")
progress = str(data[QString(u'qmmp_progress')].toUtf8()).decode("utf-8")
time = str(data[QString(u'qmmp_duration')].toUtf8()).decode("utf-8")
title = str(data[QString(u'qmmp_title')].toUtf8()).decode("utf-8")
line = self.parent.playerFormat
if (line.split('$album')[0] != line):
line = line.split('$album')[0] + album + line.split('$album')[1]

View File

@ -305,9 +305,9 @@ class Reinit():
line = line.split('$artist')[0] + 'N\\A' + line.split('$artist')[1]
if (line.split('$progress')[0] != line):
line = line.split('$progress')[0] + '00:00' + line.split('$progress')[1]
if (line.split('$title') != line):
if (line.split('$title')[0] != line):
line = line.split('$title')[0] + 'N\\A' + line.split('$title')[1]
if (line.split('$time') != line):
if (line.split('$time')[0] != line):
line = line.split('$time')[0] + '00:00' + line.split('$time')[1]
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
self.parent.label_player.setText(text)

View File

@ -20,7 +20,7 @@ foreach (_current_PO_FILE ${_po_files})
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
DEPENDS ${_current_PO_FILE})
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo DESTINATION "share/apps/plasma/plasmoids/${SUBPROJECT}/locale/${_lang}/LC_MESSAGES" RENAME ${SUBPROJECT}.mo)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo DESTINATION "share/apps/plasma/plasmoids/${SUBPROJECT}/contents/locale/${_lang}/LC_MESSAGES" RENAME ${SUBPROJECT}.mo)
list (APPEND _gmoFiles ${_gmoFile})
endforeach (_current_PO_FILE)
add_custom_target (pofiles ALL DEPENDS ${_gmoFiles})