PluginMqttMonitor.py

branch
eric7
changeset 141
864edfb1bb63
parent 139
b7ca79939cc7
child 143
51bc5bcc672a
--- a/PluginMqttMonitor.py	Sat Dec 23 19:45:41 2023 +0100
+++ b/PluginMqttMonitor.py	Sat Jan 06 13:10:46 2024 +0100
@@ -22,6 +22,16 @@
 except ImportError:
     from UI import PixmapCache as EricPixmapCache
 
+try:
+    from eric7.UI.UserInterface import UserInterfaceSide
+
+    _Side = UserInterfaceSide.Right
+except ImportError:
+    # backward compatibility for eric < 24.2
+    from eric7.UI.UserInterface import UserInterface
+
+    _Side = UserInterface.RightSide
+
 from MqttMonitor.MqttProtocols import MqttProtocols
 
 # Start-Of-Header
@@ -29,7 +39,7 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "10.4.2"
+version = "10.5.0"
 className = "MqttMonitorPlugin"
 packageName = "MqttMonitor"
 shortDescription = "Plug-in implementing a tool to connect to a MQTT broker"
@@ -194,7 +204,7 @@
             else "mqtt22-{0}".format(iconSuffix)
         )
         self.__ui.addSideWidget(
-            self.__ui.RightSide,
+            _Side,
             self.__widget,
             EricPixmapCache.getIcon(os.path.join("MqttMonitor", "icons", iconName)),
             self.tr("MQTT Monitor"),

eric ide

mercurial