minor improvements

master
idziubenko 3 years ago
parent 31c1931ce3
commit 2aeba9c0a3

@ -72,7 +72,7 @@ class SysTray(QtWidgets.QSystemTrayIcon):
ICON_NO_UPDATE = "/usr/share/pixmaps/calculate-console-update-no.svg" ICON_NO_UPDATE = "/usr/share/pixmaps/calculate-console-update-no.svg"
def __init__(self, parent): def __init__(self, parent):
super(SysTray, self).__init__() super().__init__()
self.parent = parent self.parent = parent
self.timeout = 0 self.timeout = 0
@ -160,7 +160,7 @@ class CheckThread(QtWidgets.QMainWindow, UpdateInfo):
interval = 5 * MINUTE interval = 5 * MINUTE
def __init__(self, bus): def __init__(self, bus):
super(CheckThread, self).__init__() super().__init__()
UpdateInfo.__init__(self) UpdateInfo.__init__(self)
self.bus = bus self.bus = bus

@ -142,7 +142,7 @@ class MainFrameRes(qt.QWidget):
self.updateGeometry() self.updateGeometry()
def show_bottom(self): def show_bottom(self):
debug(20, "SHOW BOTTOM PAGE") # debug(20, "SHOW BOTTOM PAGE")
max_val = self._parent.main_frame.verticalScrollBar().maximum() max_val = self._parent.main_frame.verticalScrollBar().maximum()
current_val = \ current_val = \
self._parent.main_frame.verticalScrollBar().sliderPosition() self._parent.main_frame.verticalScrollBar().sliderPosition()

@ -1665,7 +1665,7 @@ class FlowLayout(qt.QLayout):
return height return height
def setGeometry(self, rect): def setGeometry(self, rect):
super(FlowLayout, self).setGeometry(rect) super().setGeometry(rect)
self.doLayout(rect, False) self.doLayout(rect, False)
def sizeHint(self): def sizeHint(self):
@ -2452,7 +2452,7 @@ class ClientSignal(qt.QThread):
except urllib2.URLError: except urllib2.URLError:
reply = 2 reply = 2
except Exception as e: except Exception as e:
show_msg (e.message, 'no connection to server!') show_msg (e, 'no connection to server!')
if reply == 0: if reply == 0:
#if not self.ClientObj.has_connect: #if not self.ClientObj.has_connect:
self.connect_count.emit(self.ClientObj.host_name, self.connect_count.emit(self.ClientObj.host_name,

@ -129,7 +129,7 @@ def listToArrayArray(client, _list, _type='string'):
return array_array return array_array
class switch(object): class switch():
def __init__(self, value): def __init__(self, value):
self.value = value self.value = value
self.fall = False self.fall = False

Loading…
Cancel
Save