misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
evilsocket 2018-04-05 17:49:59 +02:00
parent 9fe5915e5b
commit f5163fce12
Failed to generate hash of commit
2 changed files with 29 additions and 26 deletions

View file

@ -76,12 +76,12 @@ class Dialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
else:
self._app_name_label.setText(app_name)
if app_icon is not None:
icon = QtGui.QIcon().fromTheme(app_icon)
pixmap = icon.pixmap(icon.actualSize(QtCore.QSize(48, 48)))
self._app_icon_label.setPixmap(pixmap)
else:
self._app_icon_label.clear()
if app_icon is None:
app_icon = "dialog-question"
icon = QtGui.QIcon().fromTheme(app_icon)
pixmap = icon.pixmap(icon.actualSize(QtCore.QSize(48, 48)))
self._app_icon_label.setPixmap(pixmap)
self._message_label.setText("<b>%s</b> is connecting to <b>%s</b> on %s port %d" % ( \
app_name or con.process_path,

View file

@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>562</width>
<height>409</height>
<height>309</height>
</rect>
</property>
<property name="sizePolicy">
@ -95,7 +95,7 @@
<property name="geometry">
<rect>
<x>490</x>
<y>370</y>
<y>270</y>
<width>61</width>
<height>31</height>
</rect>
@ -107,9 +107,9 @@
<widget class="QComboBox" name="durationCombo">
<property name="geometry">
<rect>
<x>380</x>
<y>370</y>
<width>97</width>
<x>330</x>
<y>270</y>
<width>131</width>
<height>31</height>
</rect>
</property>
@ -125,6 +125,9 @@
<height>50</height>
</size>
</property>
<property name="currentText">
<string>once</string>
</property>
<item>
<property name="text">
<string>once</string>
@ -160,9 +163,9 @@
<widget class="QComboBox" name="whatCombo">
<property name="geometry">
<rect>
<x>190</x>
<y>370</y>
<width>181</width>
<x>170</x>
<y>270</y>
<width>151</width>
<height>31</height>
</rect>
</property>
@ -180,7 +183,7 @@
</property>
<item>
<property name="text">
<string>this process</string>
<string>from this process</string>
</property>
</item>
<item>
@ -203,9 +206,9 @@
<property name="geometry">
<rect>
<x>10</x>
<y>140</y>
<y>130</y>
<width>541</width>
<height>211</height>
<height>131</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
@ -218,7 +221,7 @@
<item row="0" column="2">
<widget class="QLabel" name="sourceIPLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -376,7 +379,7 @@
<item row="1" column="2">
<widget class="QLabel" name="destIPLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -394,7 +397,7 @@
<item row="2" column="2">
<widget class="QLabel" name="destPortLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -412,7 +415,7 @@
<item row="3" column="2">
<widget class="QLabel" name="destHostLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -430,7 +433,7 @@
<item row="4" column="2">
<widget class="QLabel" name="uidLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -448,7 +451,7 @@
<item row="5" column="2">
<widget class="QLabel" name="pidLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -466,7 +469,7 @@
<item row="6" column="2">
<widget class="QLabel" name="argsLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -487,8 +490,8 @@
<property name="geometry">
<rect>
<x>10</x>
<y>370</y>
<width>171</width>
<y>270</y>
<width>151</width>
<height>31</height>
</rect>
</property>