mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-04 01:15:52 +00:00
commit before merging
This commit is contained in:
@ -85,16 +85,25 @@ class ConfigWindow(QWidget):
|
||||
|
||||
def addHddDevice(self):
|
||||
"""function to add mount points"""
|
||||
self.ui.listWidget_hddDevice.clearSelection()
|
||||
if (self.ui.listWidget_hddDevice.count() > 9):
|
||||
self.ui.listWidget_hddDevice.takeItem(0)
|
||||
self.ui.listWidget_hddDevice.addItem(self.ui.comboBox_hddDevice.currentText())
|
||||
|
||||
|
||||
def addMount(self):
|
||||
"""function to add mount points"""
|
||||
self.ui.listWidget_mount.clearSelection()
|
||||
if (self.ui.listWidget_mount.count() > 9):
|
||||
self.ui.listWidget_mount.takeItem(0)
|
||||
self.ui.listWidget_mount.addItem(self.ui.comboBox_mount.currentText())
|
||||
|
||||
|
||||
def addTempDevice(self):
|
||||
"""function to add temperature device"""
|
||||
self.ui.listWidget_tempDevice.clearSelection()
|
||||
if (self.ui.listWidget_tempDevice.count() > 9):
|
||||
self.ui.listWidget_tempDevice.takeItem(0)
|
||||
self.ui.listWidget_tempDevice.addItem(self.ui.comboBox_tempDevice.currentText())
|
||||
|
||||
|
||||
|
@ -91,8 +91,7 @@ class DataEngine:
|
||||
|
||||
def dataUpdated(self, sourceName, data):
|
||||
"""function to update data"""
|
||||
if True:
|
||||
#try:
|
||||
try:
|
||||
if (sourceName == "system/uptime"):
|
||||
value = datetime.timedelta(0, int(round(float(data[QString(u'value')]), 1)))
|
||||
days = value.days
|
||||
@ -271,5 +270,5 @@ class DataEngine:
|
||||
self.parent.label_time.setText(text)
|
||||
|
||||
self.parent.update()
|
||||
#except:
|
||||
#pass
|
||||
except:
|
||||
pass
|
||||
|
Reference in New Issue
Block a user