Blame SOURCES/RHEL-only-qt4_applet.patch

c8bceb
From 96937b7fdecb34597b06138d800f9a18100abbec Mon Sep 17 00:00:00 2001
c8bceb
From: Eric Garver <e@erig.me>
c8bceb
Date: Wed, 14 Nov 2018 12:59:57 -0500
c8bceb
Subject: [PATCH] fix qt4_applet patch
c8bceb
c8bceb
---
c8bceb
 src/firewall-applet.in | 157 ++++++++++++++++++++---------------------
c8bceb
 1 file changed, 78 insertions(+), 79 deletions(-)
c8bceb
c8bceb
diff --git a/src/firewall-applet.in b/src/firewall-applet.in
c8bceb
index 1d2cf7672174..05966ce1c80c 100755
c8bceb
--- a/src/firewall-applet.in
c8bceb
+++ b/src/firewall-applet.in
c8bceb
@@ -21,14 +21,14 @@
c8bceb
 #
c8bceb
 
c8bceb
 import sys
c8bceb
-from PyQt5 import QtGui, QtCore, QtWidgets
c8bceb
+from PyQt4 import QtGui, QtCore
c8bceb
 
c8bceb
 import gi
c8bceb
 gi.require_version('Notify', '0.7')
c8bceb
 from gi.repository import Notify
c8bceb
 
c8bceb
 import os
c8bceb
-from dbus.mainloop.pyqt5 import DBusQtMainLoop
c8bceb
+from dbus.mainloop.qt import DBusQtMainLoop
c8bceb
 import functools
c8bceb
 
c8bceb
 from firewall import config
c8bceb
@@ -78,20 +78,21 @@ def escape(text):
c8bceb
     return text
c8bceb
 
c8bceb
 def fromUTF8(text):
c8bceb
-    if PY2 and QtCore.QT_VERSION < 0x050000:
c8bceb
+    if PY2:
c8bceb
         return QtCore.QString.fromUtf8(text)
c8bceb
-    return text
c8bceb
+    else:
c8bceb
+        return text        
c8bceb
 
c8bceb
 # ZoneInterfaceEditor #########################################################
c8bceb
 
c8bceb
-class ZoneInterfaceEditor(QtWidgets.QDialog):
c8bceb
+class ZoneInterfaceEditor(QtGui.QDialog):
c8bceb
     def __init__(self, fw, interface, zone):
c8bceb
         self.fw = fw
c8bceb
         self.interface = interface
c8bceb
         self.zone = None
c8bceb
         self.title = _("Select zone for interface '%s'") % self.interface
c8bceb
 
c8bceb
-        QtWidgets.QDialog.__init__(self)
c8bceb
+        QtGui.QDialog.__init__(self)
c8bceb
         self.create_ui(zone)
c8bceb
 
c8bceb
     def create_ui(self, zone):
c8bceb
@@ -100,19 +101,19 @@ class ZoneInterfaceEditor(QtWidgets.QDialog):
c8bceb
 
c8bceb
         self.resize(100, 50)
c8bceb
 
c8bceb
-        vbox = QtWidgets.QVBoxLayout()
c8bceb
+        vbox = QtGui.QVBoxLayout()
c8bceb
         vbox.setSpacing(6)
c8bceb
 
c8bceb
-        label = QtWidgets.QLabel(fromUTF8(escape(self.title)))
c8bceb
+        label = QtGui.QLabel(fromUTF8(escape(self.title)))
c8bceb
         vbox.addWidget(label)
c8bceb
 
c8bceb
-        self.combo = QtWidgets.QComboBox()
c8bceb
+        self.combo = QtGui.QComboBox()
c8bceb
         self.fill_zone_combo()
c8bceb
         vbox.addWidget(self.combo)
c8bceb
 
c8bceb
-        buttonBox = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Ok
c8bceb
-                                           | QtWidgets.QDialogButtonBox.Cancel)
c8bceb
-        self.ok_button = buttonBox.button(QtWidgets.QDialogButtonBox.Ok)
c8bceb
+        buttonBox = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Ok
c8bceb
+                                           | QtGui.QDialogButtonBox.Cancel)
c8bceb
+        self.ok_button = buttonBox.button(QtGui.QDialogButtonBox.Ok)
c8bceb
         buttonBox.accepted.connect(self.ok)
c8bceb
         buttonBox.rejected.connect(self.hide)
c8bceb
         vbox.addWidget(buttonBox)
c8bceb
@@ -165,7 +166,7 @@ class ZoneConnectionEditor(ZoneInterfaceEditor):
c8bceb
         self.zone = None
c8bceb
         self.title = _("Select zone for connection '%s'") % self.connection_name
c8bceb
 
c8bceb
-        QtWidgets.QDialog.__init__(self)
c8bceb
+        QtGui.QDialog.__init__(self)
c8bceb
         self.create_ui(zone)
c8bceb
 
c8bceb
     def ok(self):
c8bceb
@@ -174,7 +175,7 @@ class ZoneConnectionEditor(ZoneInterfaceEditor):
c8bceb
             nm_set_zone_of_connection(self.get_zone(), self.connection)
c8bceb
         except Exception:
c8bceb
             text = _("Failed to set zone {zone} for connection {connection_name}")
c8bceb
-            QtWidgets.QMessageBox.warning(None, fromUTF8(escape(self.title)),
c8bceb
+            QtGui.QMessageBox.warning(None, fromUTF8(escape(self.title)),
c8bceb
                                       escape(text.format(
c8bceb
                                           zone=self.get_zone(),
c8bceb
                                           connection_name=self.connection_name)))
c8bceb
@@ -189,7 +190,7 @@ class ZoneSourceEditor(ZoneInterfaceEditor):
c8bceb
         self.zone = None
c8bceb
         self.title = _("Select zone for source '%s'") % self.source
c8bceb
 
c8bceb
-        QtWidgets.QDialog.__init__(self)
c8bceb
+        QtGui.QDialog.__init__(self)
c8bceb
         self.create_ui(zone)
c8bceb
 
c8bceb
     def ok(self):
c8bceb
@@ -198,7 +199,7 @@ class ZoneSourceEditor(ZoneInterfaceEditor):
c8bceb
 
c8bceb
 # ShieldsEditor #########################################################
c8bceb
 
c8bceb
-class ShieldsEditor(QtWidgets.QDialog):
c8bceb
+class ShieldsEditor(QtGui.QDialog):
c8bceb
     def __init__(self, fw, settings, shields_up, shields_down):
c8bceb
         self.fw = fw
c8bceb
         self.settings = settings
c8bceb
@@ -206,63 +207,63 @@ class ShieldsEditor(QtWidgets.QDialog):
c8bceb
         self.shields_down = shields_down
c8bceb
         self.title = _("Configure Shields Up/Down Zones")
c8bceb
 
c8bceb
-        QtWidgets.QDialog.__init__(self)
c8bceb
+        QtGui.QDialog.__init__(self)
c8bceb
         self.create_ui()
c8bceb
 
c8bceb
     def create_ui(self):
c8bceb
         self.setWindowTitle(fromUTF8(escape(self.title)))
c8bceb
         self.rejected.connect(self.hide)
c8bceb
 
c8bceb
-        vbox = QtWidgets.QVBoxLayout()
c8bceb
+        vbox = QtGui.QVBoxLayout()
c8bceb
         vbox.setSpacing(6)
c8bceb
 
c8bceb
-        label = QtWidgets.QLabel(fromUTF8(escape(
c8bceb
+        label = QtGui.QLabel(fromUTF8(escape(
c8bceb
             _("Here you can select the zones used for Shields Up and "
c8bceb
               "Shields Down."))))
c8bceb
         label.setWordWrap(True)
c8bceb
         vbox.addWidget(label)
c8bceb
 
c8bceb
-        label = QtWidgets.QLabel(fromUTF8(escape(
c8bceb
+        label = QtGui.QLabel(fromUTF8(escape(
c8bceb
             _("This feature is useful for people using the default zones "
c8bceb
               "mostly. For users, that are changing zones of connections, it "
c8bceb
               "might be of limited use."))))
c8bceb
         label.setWordWrap(True)
c8bceb
         vbox.addWidget(label)
c8bceb
 
c8bceb
-        grid = QtWidgets.QGridLayout()
c8bceb
+        grid = QtGui.QGridLayout()
c8bceb
         grid.setSpacing(6)
c8bceb
 
c8bceb
-        label = QtWidgets.QLabel(fromUTF8(escape(_("Shields Up Zone:"))))
c8bceb
+        label = QtGui.QLabel(fromUTF8(escape(_("Shields Up Zone:"))))
c8bceb
         label.setWordWrap(True)
c8bceb
         grid.addWidget(label, 0, 0, 1, 1)
c8bceb
 
c8bceb
-        self.shields_up_combo = QtWidgets.QComboBox()
c8bceb
+        self.shields_up_combo = QtGui.QComboBox()
c8bceb
         #self.fill_combo(self.shields_up_combo)
c8bceb
         #self.set_shields_up(self.shields_up)
c8bceb
         grid.addWidget(self.shields_up_combo, 0, 1, 1, 1)
c8bceb
 
c8bceb
-        button = QtWidgets.QPushButton(_("Reset To Default"))
c8bceb
+        button = QtGui.QPushButton(_("Reset To Default"))
c8bceb
         button.clicked.connect(self.reset_shields_up)
c8bceb
         grid.addWidget(button, 0, 2, 1, 1)
c8bceb
 
c8bceb
-        label = QtWidgets.QLabel(fromUTF8(escape(_("Shields Down Zone:"))))
c8bceb
+        label = QtGui.QLabel(fromUTF8(escape(_("Shields Down Zone:"))))
c8bceb
         label.setWordWrap(True)
c8bceb
         grid.addWidget(label, 1, 0, 1, 1)
c8bceb
 
c8bceb
-        self.shields_down_combo = QtWidgets.QComboBox()
c8bceb
+        self.shields_down_combo = QtGui.QComboBox()
c8bceb
         #self.fill_combo(self.shields_down_combo)
c8bceb
         #self.set_shields_down(self.shields_down)
c8bceb
         grid.addWidget(self.shields_down_combo, 1, 1, 1, 1)
c8bceb
 
c8bceb
-        button = QtWidgets.QPushButton(_("Reset To Default"))
c8bceb
+        button = QtGui.QPushButton(_("Reset To Default"))
c8bceb
         button.clicked.connect(self.reset_shields_down)
c8bceb
         grid.addWidget(button, 1, 2, 1, 1)
c8bceb
 
c8bceb
         vbox.addLayout(grid)
c8bceb
 
c8bceb
-        buttonBox = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Ok
c8bceb
-                                           | QtWidgets.QDialogButtonBox.Cancel)
c8bceb
-        self.ok_button = buttonBox.button(QtWidgets.QDialogButtonBox.Ok)
c8bceb
+        buttonBox = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Ok
c8bceb
+                                           | QtGui.QDialogButtonBox.Cancel)
c8bceb
+        self.ok_button = buttonBox.button(QtGui.QDialogButtonBox.Ok)
c8bceb
         buttonBox.accepted.connect(self.ok)
c8bceb
         buttonBox.rejected.connect(self.hide)
c8bceb
         vbox.addWidget(buttonBox)
c8bceb
@@ -333,56 +334,56 @@ class ShieldsEditor(QtWidgets.QDialog):
c8bceb
 
c8bceb
 # AboutDialog #################################################################
c8bceb
 
c8bceb
-class AboutDialog(QtWidgets.QDialog):
c8bceb
+class AboutDialog(QtGui.QDialog):
c8bceb
     def __init__(self, name, icon, version, url, copyright, authors, license):
c8bceb
-        QtWidgets.QDialog.__init__(self)
c8bceb
+        QtGui.QDialog.__init__(self)
c8bceb
         self.setWindowIcon(icon)
c8bceb
         self.setWindowTitle(fromUTF8(escape(_("About %s" % name))))
c8bceb
         self.resize(500, 250)
c8bceb
 
c8bceb
-        vbox = QtWidgets.QVBoxLayout()
c8bceb
+        vbox = QtGui.QVBoxLayout()
c8bceb
         vbox.setSpacing(6)
c8bceb
 
c8bceb
-        hbox = QtWidgets.QHBoxLayout()
c8bceb
+        hbox = QtGui.QHBoxLayout()
c8bceb
         hbox.setSpacing(24)
c8bceb
 
c8bceb
-        label = QtWidgets.QLabel()
c8bceb
+        label = QtGui.QLabel()
c8bceb
         label.setPixmap(icon.pixmap(96))
c8bceb
         label.setMinimumSize(96, 96)
c8bceb
         label.setMaximumSize(96, 96)
c8bceb
         hbox.addWidget(label)
c8bceb
 
c8bceb
-        vbox2 = QtWidgets.QVBoxLayout()
c8bceb
+        vbox2 = QtGui.QVBoxLayout()
c8bceb
         vbox2.setSpacing(3)
c8bceb
 
c8bceb
-        label = QtWidgets.QLabel(name)
c8bceb
+        label = QtGui.QLabel(name)
c8bceb
         font = label.font()
c8bceb
         font.setPointSize(font.pointSize()*2)
c8bceb
         font.setBold(True)
c8bceb
         label.setFont(font)
c8bceb
         vbox2.addWidget(label)
c8bceb
 
c8bceb
-        vbox2.addWidget(QtWidgets.QLabel(version))
c8bceb
+        vbox2.addWidget(QtGui.QLabel(version))
c8bceb
 
c8bceb
-        label = QtWidgets.QLabel("%s" % (url, url))
c8bceb
+        label = QtGui.QLabel("%s" % (url, url))
c8bceb
         label.setTextFormat(QtCore.Qt.RichText)
c8bceb
         label.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction)
c8bceb
         label.setOpenExternalLinks(True)
c8bceb
 
c8bceb
         vbox2.addWidget(label)
c8bceb
 
c8bceb
-        vbox2.addWidget(QtWidgets.QLabel(copyright))
c8bceb
+        vbox2.addWidget(QtGui.QLabel(copyright))
c8bceb
 
c8bceb
         hbox.addLayout(vbox2)
c8bceb
 
c8bceb
         vbox.addLayout(hbox)
c8bceb
 
c8bceb
-        tabs = QtWidgets.QTabWidget()
c8bceb
+        tabs = QtGui.QTabWidget()
c8bceb
         tabs.setStyleSheet("QTabWidget::tab { padding: 1px 1px 1px 1px; }")
c8bceb
 
c8bceb
-        tab = QtWidgets.QWidget()
c8bceb
-        vbox3 = QtWidgets.QVBoxLayout()
c8bceb
-        textedit = QtWidgets.QPlainTextEdit()
c8bceb
+        tab = QtGui.QWidget()
c8bceb
+        vbox3 = QtGui.QVBoxLayout()
c8bceb
+        textedit = QtGui.QPlainTextEdit()
c8bceb
         #textedit.setStyleSheet("QPlainTextEdit { border: 0; padding: 0; }")
c8bceb
         textedit.setReadOnly(True)
c8bceb
         textedit.setPlainText(fromUTF8("\n".join(authors)))
c8bceb
@@ -390,9 +391,9 @@ class AboutDialog(QtWidgets.QDialog):
c8bceb
         tab.setLayout(vbox3)
c8bceb
         tabs.addTab(tab, fromUTF8(escape(_("Authors"))))
c8bceb
 
c8bceb
-        tab = QtWidgets.QWidget()
c8bceb
-        vbox3 = QtWidgets.QVBoxLayout()
c8bceb
-        textedit = QtWidgets.QPlainTextEdit()
c8bceb
+        tab = QtGui.QWidget()
c8bceb
+        vbox3 = QtGui.QVBoxLayout()
c8bceb
+        textedit = QtGui.QPlainTextEdit()
c8bceb
         #textedit.setStyleSheet("QPlainTextEdit { border: 0; padding: 0; }")
c8bceb
         textedit.setReadOnly(True)
c8bceb
         textedit.setPlainText(license)
c8bceb
@@ -402,7 +403,7 @@ class AboutDialog(QtWidgets.QDialog):
c8bceb
 
c8bceb
         vbox.addWidget(tabs)
c8bceb
 
c8bceb
-        buttonBox = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Close)
c8bceb
+        buttonBox = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Close)
c8bceb
         buttonBox.rejected.connect(self.hide)
c8bceb
         vbox.addWidget(buttonBox)
c8bceb
 
c8bceb
@@ -410,7 +411,7 @@ class AboutDialog(QtWidgets.QDialog):
c8bceb
 
c8bceb
 # TrayApplet ##################################################################
c8bceb
 
c8bceb
-class TrayApplet(QtWidgets.QSystemTrayIcon):
c8bceb
+class TrayApplet(QtGui.QSystemTrayIcon):
c8bceb
     def __init__(self):
c8bceb
         super(TrayApplet, self).__init__()
c8bceb
         self.name = _("Firewall Applet")
c8bceb
@@ -458,67 +459,67 @@ class TrayApplet(QtWidgets.QSystemTrayIcon):
c8bceb
 
c8bceb
         # urgencies
c8bceb
 
c8bceb
-        self.urgencies = { "noicon": QtWidgets.QSystemTrayIcon.NoIcon,
c8bceb
-                           "information": QtWidgets.QSystemTrayIcon.Information,
c8bceb
-                           "warning": QtWidgets.QSystemTrayIcon.Warning,
c8bceb
-                           "critical": QtWidgets.QSystemTrayIcon.Critical }
c8bceb
+        self.urgencies = { "noicon": QtGui.QSystemTrayIcon.NoIcon,
c8bceb
+                           "information": QtGui.QSystemTrayIcon.Information,
c8bceb
+                           "warning": QtGui.QSystemTrayIcon.Warning,
c8bceb
+                           "critical": QtGui.QSystemTrayIcon.Critical }
c8bceb
 
c8bceb
         # actions
c8bceb
 
c8bceb
-        self.shieldsupAction = QtWidgets.QAction(fromUTF8(escape(_("Shields Up"))),
c8bceb
+        self.shieldsupAction = QtGui.QAction(fromUTF8(escape(_("Shields Up"))),
c8bceb
                                              self)
c8bceb
         self.shieldsupAction.setCheckable(True)
c8bceb
         self.shieldsupAction.setChecked(False)
c8bceb
         self.shieldsupAction.triggered.connect(self.shieldsup_changed_cb)
c8bceb
 
c8bceb
-        self.notificationsAction = QtWidgets.QAction(
c8bceb
+        self.notificationsAction = QtGui.QAction(
c8bceb
             fromUTF8(escape(_("Enable Notifications"))), self)
c8bceb
         self.notificationsAction.setCheckable(True)
c8bceb
         self.notificationsAction.setChecked(False)
c8bceb
         self.notificationsAction.triggered.connect(self.notification_changed_cb)
c8bceb
 
c8bceb
-        self.settingsAction = QtWidgets.QAction(
c8bceb
+        self.settingsAction = QtGui.QAction(
c8bceb
             fromUTF8(escape(_("Edit Firewall Settings..."))), self)
c8bceb
         self.settingsAction.triggered.connect(self.configure_cb)
c8bceb
 
c8bceb
-        self.changeZonesAction = QtWidgets.QAction(
c8bceb
+        self.changeZonesAction = QtGui.QAction(
c8bceb
             fromUTF8(escape(_("Change Zones of Connections..."))), self)
c8bceb
         self.changeZonesAction.triggered.connect(self.nm_connection_editor)
c8bceb
 
c8bceb
-        self.shieldsAction = QtWidgets.QAction(
c8bceb
+        self.shieldsAction = QtGui.QAction(
c8bceb
             fromUTF8(escape(_("Configure Shields UP/Down Zones..."))), self)
c8bceb
         self.shieldsAction.triggered.connect(self.configure_shields)
c8bceb
 
c8bceb
-        self.panicAction = QtWidgets.QAction(
c8bceb
+        self.panicAction = QtGui.QAction(
c8bceb
             fromUTF8(escape(_("Block all network traffic"))), self)
c8bceb
         self.panicAction.setCheckable(True)
c8bceb
         self.panicAction.setChecked(False)
c8bceb
         self.panicAction.triggered.connect(self.panic_mode_cb)
c8bceb
 
c8bceb
-        self.aboutAction = QtWidgets.QAction(fromUTF8(escape(_("About"))), self)
c8bceb
+        self.aboutAction = QtGui.QAction(fromUTF8(escape(_("About"))), self)
c8bceb
         self.aboutAction.triggered.connect(self.about_dialog.exec_)
c8bceb
 
c8bceb
-        #self.quitAction = QtWidgets.QAction(fromUTF8(escape(_("Quit"))), self,
c8bceb
+        #self.quitAction = QtGui.QAction(fromUTF8(escape(_("Quit"))), self,
c8bceb
         #                                triggered=self.quit)
c8bceb
 
c8bceb
-        self.connectionsAction = QtWidgets.QWidgetAction(self)
c8bceb
-        self.connectionsAction.setDefaultWidget(QtWidgets.QLabel(
c8bceb
+        self.connectionsAction = QtGui.QWidgetAction(self)
c8bceb
+        self.connectionsAction.setDefaultWidget(QtGui.QLabel(
c8bceb
             fromUTF8(""+escape(_("Connections"))+" ")))
c8bceb
 
c8bceb
-        self.interfacesAction = QtWidgets.QWidgetAction(self)
c8bceb
-        self.interfacesAction.setDefaultWidget(QtWidgets.QLabel(
c8bceb
+        self.interfacesAction = QtGui.QWidgetAction(self)
c8bceb
+        self.interfacesAction.setDefaultWidget(QtGui.QLabel(
c8bceb
             fromUTF8(""+escape(_("Interfaces"))+" ")))
c8bceb
 
c8bceb
-        self.sourcesAction = QtWidgets.QWidgetAction(self)
c8bceb
-        self.sourcesAction.setDefaultWidget(QtWidgets.QLabel(
c8bceb
+        self.sourcesAction = QtGui.QWidgetAction(self)
c8bceb
+        self.sourcesAction.setDefaultWidget(QtGui.QLabel(
c8bceb
             fromUTF8(""+escape(_("Sources"))+" ")))
c8bceb
 
c8bceb
         # init
c8bceb
 
c8bceb
-        self.left_menu = QtWidgets.QMenu()
c8bceb
+        self.left_menu = QtGui.QMenu()
c8bceb
         self.left_menu.setStyleSheet('QMenu { margin: 5px; }')
c8bceb
 
c8bceb
-        self.right_menu = QtWidgets.QMenu()
c8bceb
+        self.right_menu = QtGui.QMenu()
c8bceb
         self.right_menu.addAction(self.shieldsupAction)
c8bceb
         self.right_menu.addAction(self.notificationsAction)
c8bceb
         self.right_menu.addSeparator()
c8bceb
@@ -637,7 +638,7 @@ class TrayApplet(QtWidgets.QSystemTrayIcon):
c8bceb
             self.setVisible(True)
c8bceb
 
c8bceb
     def activated_cb(self, reason):
c8bceb
-        if reason == QtWidgets.QSystemTrayIcon.Trigger:
c8bceb
+        if reason == QtGui.QSystemTrayIcon.Trigger:
c8bceb
             self.left_menu.popup(QtGui.QCursor.pos())
c8bceb
 
c8bceb
     def update_active_zones(self):
c8bceb
@@ -686,12 +687,12 @@ class TrayApplet(QtWidgets.QSystemTrayIcon):
c8bceb
             connection_name = connections[connection][1]
c8bceb
             if zone == "":
c8bceb
                 _binding = _("{entry} (Default Zone: {default_zone})")
c8bceb
-                action = QtWidgets.QAction(
c8bceb
+                action = QtGui.QAction(
c8bceb
                     fromUTF8(escape(
c8bceb
                         _binding.format(default_zone=self.default_zone,
c8bceb
                                         entry=connection_name))), self)
c8bceb
             else:
c8bceb
-                action = QtWidgets.QAction(
c8bceb
+                action = QtGui.QAction(
c8bceb
                     fromUTF8(escape(binding.format(zone=zone,
c8bceb
                                                    entry=connection_name))), self)
c8bceb
             action.triggered.connect(functools.partial(
c8bceb
@@ -704,7 +705,7 @@ class TrayApplet(QtWidgets.QSystemTrayIcon):
c8bceb
         # add other interfaces
c8bceb
         for interface in sorted(interfaces):
c8bceb
             zone = interfaces[interface]
c8bceb
-            action = QtWidgets.QAction(
c8bceb
+            action = QtGui.QAction(
c8bceb
                 fromUTF8(escape(binding.format(zone=zone, entry=interface))),
c8bceb
                 self)
c8bceb
             action.triggered.connect(functools.partial(
c8bceb
@@ -716,7 +717,7 @@ class TrayApplet(QtWidgets.QSystemTrayIcon):
c8bceb
 
c8bceb
         for source in sorted(sources):
c8bceb
             zone = sources[source]
c8bceb
-            action = QtWidgets.QAction(
c8bceb
+            action = QtGui.QAction(
c8bceb
                 fromUTF8(escape(binding.format(zone=zone, entry=source))),
c8bceb
                 self)
c8bceb
             action.triggered.connect(functools.partial(
c8bceb
@@ -938,10 +939,10 @@ class TrayApplet(QtWidgets.QSystemTrayIcon):
c8bceb
             os.system("%s &" % NM_CONNECTION_EDITOR)
c8bceb
 
c8bceb
     def warning(self, text):
c8bceb
-        QtWidgets.QMessageBox.warning(None, fromUTF8(escape(self.name)), text)
c8bceb
+        QtGui.QMessageBox.warning(None, fromUTF8(escape(self.name)), text)
c8bceb
 
c8bceb
     def error(self, text):
c8bceb
-        QtWidgets.QMessageBox.critical(None, fromUTF8(escape(self.name)), text)
c8bceb
+        QtGui.QMessageBox.critical(None, fromUTF8(escape(self.name)), text)
c8bceb
 
c8bceb
     def configure_cb(self, widget):
c8bceb
         os.system("firewall-config &")
c8bceb
@@ -977,8 +978,6 @@ class TrayApplet(QtWidgets.QSystemTrayIcon):
c8bceb
     def reloaded(self):
c8bceb
         if self.notificationsAction.isChecked():
c8bceb
             self.notify(escape(_("FirewallD has been reloaded.")))
c8bceb
-        self.update_active_zones()
c8bceb
-        self.update_tooltip()
c8bceb
 
c8bceb
     def default_zone_changed(self, zone):
c8bceb
         self.default_zone = zone
c8bceb
@@ -1124,7 +1123,7 @@ Options:
c8bceb
 # reset SIGINT signal to default
c8bceb
 signal.signal(signal.SIGINT, signal.SIG_DFL)
c8bceb
 
c8bceb
-app = QtWidgets.QApplication(sys.argv)
c8bceb
+app = QtGui.QApplication(sys.argv)
c8bceb
 app.setQuitOnLastWindowClosed(False)
c8bceb
 
c8bceb
 applet = TrayApplet()
c8bceb
-- 
c8bceb
2.18.0
c8bceb