prepare to release 1.9.0

+ added support of several custom commands
* fix parsing pkg label
This commit is contained in:
arcan1s 2014-05-20 10:07:01 +04:00
parent 90ca8c89f5
commit 2de09cec32
6 changed files with 27 additions and 15 deletions

View File

@ -1,7 +1,8 @@
Ver.1.9.0: Ver.1.9.0:
+ added support of several custom commands + added support of several custom commands ($customN)
+ added hdd speed label + added hdd speed label ($hddrN, $hddwN)
+ added actions to context menu (open readme and run ksysguard) + added actions to context menu (open readme and run ksysguard)
* fix parsing pkg label
- removed doubleclick event - removed doubleclick event
Ver.1.8.3: Ver.1.8.3:

View File

@ -1,7 +1,8 @@
Вер.1.9.0: Вер.1.9.0:
+ добавлена поддержка нескольких кастомных команд + добавлена поддержка нескольких кастомных команд ($customN)
+ добавлено поле скорости hdd + добавлено поле скорости hdd ($hddrN, $hddwN)
+ добавлены действия в контекстное меню (открыть readme и запустить ksysguard) + добавлены действия в контекстное меню (открыть readme и запустить ksysguard)
* исправлен парсинг поля pkg
- убрано событие по двойному клику - убрано событие по двойному клику
Вер.1.8.3: Вер.1.8.3:

View File

@ -20,7 +20,7 @@ optdepends=("amarok: for music player monitor"
makedepends=('automoc4' 'cmake') makedepends=('automoc4' 'cmake')
source=(https://github.com/arcan1s/pytextmonitor/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz) source=(https://github.com/arcan1s/pytextmonitor/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz)
install=${pkgname}.install install=${pkgname}.install
md5sums=('9cd2ebf4f2afa80c2bd1330c06c86d17') md5sums=('3b65c259a8042b8555ff689a68dfe247')
backup=('usr/share/config/extsysmon.conf') backup=('usr/share/config/extsysmon.conf')
prepare() { prepare() {

View File

@ -80,10 +80,10 @@ class ConfigDefinition:
dataengineConfig = unicode(KGlobal.dirs().localkdedir()) + "/share/config/extsysmon.conf" dataengineConfig = unicode(KGlobal.dirs().localkdedir()) + "/share/config/extsysmon.conf"
try: try:
item = QStringList()
for i in range(self.configpage.ui.listWidget_customCommand.count()):
item.append(self.configpage.ui.listWidget_customCommand.item(i).text())
with open(dataengineConfig, 'w') as deConfigFile: with open(dataengineConfig, 'w') as deConfigFile:
item = QStringList()
for i in range(self.configpage.ui.listWidget_customCommand.count()):
item.append(self.configpage.ui.listWidget_customCommand.item(i).text())
deConfigFile.write("CUSTOM=" + str(item.join(QString('@@'))) + "\n") deConfigFile.write("CUSTOM=" + str(item.join(QString('@@'))) + "\n")
deConfigFile.write("GPUDEV=" + str(self.configpage.ui.comboBox_gpudev.currentText()) + "\n") deConfigFile.write("GPUDEV=" + str(self.configpage.ui.comboBox_gpudev.currentText()) + "\n")
deConfigFile.write("HDDDEV=" + str(self.configpage.ui.comboBox_hdddev.currentText()) + "\n") deConfigFile.write("HDDDEV=" + str(self.configpage.ui.comboBox_hdddev.currentText()) + "\n")

View File

@ -118,8 +118,9 @@ class DataEngine:
updatedData['value'] = value updatedData['value'] = value
elif (sourceName == "custom"): elif (sourceName == "custom"):
updatedData['name'] = "custom" updatedData['name'] = "custom"
value = str(data[QString(u'custom')].toUtf8()).decode("utf-8") updatedData['value'] = {}
updatedData['value'] = value for singleData in data.keys():
updatedData['value'][str(singleData.toLower())] = str(data[singleData].toUtf8()).decode("utf-8")
elif ((sourceName[:4] == "disk") and (sourceName[-4:] == "rblk")): elif ((sourceName[:4] == "disk") and (sourceName[-4:] == "rblk")):
updatedData['name'] = "disk-r" updatedData['name'] = "disk-r"
updatedData['type'] = '/'.join(str(sourceName).split('/')[0:2]) updatedData['type'] = '/'.join(str(sourceName).split('/')[0:2])

View File

@ -623,8 +623,13 @@ class pyTextWidget(plasmascript.Applet):
"""function to prepare text""" """function to prepare text"""
line = self.ptm['vars']['formats'][name] line = self.ptm['vars']['formats'][name]
if (name == "custom"): if (name == "custom"):
if (line.split('$custom')[0] != line): cmds = range(len(text.keys()))
line = line.split('$custom')[0] + text + line.split('$custom')[1] cmds.reverse()
for i in cmds:
if (line.split('$custom' + str(i))[0] != line):
line = line.split('$custom' + str(i))[0] + \
text['custom'+str(i)] + \
line.split('$custom' + str(i))[1]
elif (name == "gpu"): elif (name == "gpu"):
if (line.split('$gpu')[0] != line): if (line.split('$gpu')[0] != line):
line = line.split('$gpu')[0] + text + line.split('$gpu')[1] line = line.split('$gpu')[0] + text + line.split('$gpu')[1]
@ -632,9 +637,13 @@ class pyTextWidget(plasmascript.Applet):
if (line.split('$gputemp')[0] != line): if (line.split('$gputemp')[0] != line):
line = line.split('$gputemp')[0] + getTemp(text, self.ptm['vars']['adv']['tempUnits']) + line.split('$gputemp')[1] line = line.split('$gputemp')[0] + getTemp(text, self.ptm['vars']['adv']['tempUnits']) + line.split('$gputemp')[1]
elif (name == "pkg"): elif (name == "pkg"):
for item in text.keys(): pkgs = range(len(text.keys()))
if (line.split('$' + item)[0] != line): pkgs.reverse()
line = line.split('$' + item)[0] + text[item] + line.split('$' + item)[1] for i in pkgs:
if (line.split('$pkgcount' + str(i))[0] != line):
line = line.split('$pkgcount' + str(i))[0] + \
text['pkgcount'+str(i)] + \
line.split('$pkgcount' + str(i))[1]
elif (name == "player"): elif (name == "player"):
if (line.split('$album')[0] != line): if (line.split('$album')[0] != line):
line = line.split('$album')[0] + text['album'] + line.split('$album')[1] line = line.split('$album')[0] + text['album'] + line.split('$album')[1]