--- a/PluginManager/PluginUninstallDialog.py Sun Mar 30 22:00:14 2014 +0200 +++ b/PluginManager/PluginUninstallDialog.py Thu Apr 03 23:05:31 2014 +0200 @@ -54,14 +54,17 @@ self.__external = False self.pluginDirectoryCombo.addItem( - self.trUtf8("User plugins directory"), + self.tr("User plugins directory"), self.__pluginManager.getPluginDir("user")) globalDir = self.__pluginManager.getPluginDir("global") if globalDir is not None and os.access(globalDir, os.W_OK): self.pluginDirectoryCombo.addItem( - self.trUtf8("Global plugins directory"), + self.tr("Global plugins directory"), globalDir) + + msh = self.minimumSizeHint() + self.resize(max(self.width(), msh.width()), msh.height()) @pyqtSlot(int) def on_pluginDirectoryCombo_currentIndexChanged(self, index): @@ -104,8 +107,8 @@ if not self.__pluginManager.unloadPlugin(pluginName): E5MessageBox.critical( self, - self.trUtf8("Plugin Uninstallation"), - self.trUtf8( + self.tr("Plugin Uninstallation"), + self.tr( """<p>The plugin <b>{0}</b> could not be unloaded.""" """ Aborting...</p>""").format(pluginName)) return False @@ -116,8 +119,8 @@ if not hasattr(module, "packageName"): E5MessageBox.critical( self, - self.trUtf8("Plugin Uninstallation"), - self.trUtf8( + self.tr("Plugin Uninstallation"), + self.tr( """<p>The plugin <b>{0}</b> has no 'packageName'""" """ attribute. Aborting...</p>""").format(pluginName)) return False @@ -169,8 +172,8 @@ except OSError as err: E5MessageBox.critical( self, - self.trUtf8("Plugin Uninstallation"), - self.trUtf8( + self.tr("Plugin Uninstallation"), + self.tr( """<p>The plugin package <b>{0}</b> could not be""" """ removed. Aborting...</p>""" """<p>Reason: {1}</p>""").format(packageDir, str(err))) @@ -181,8 +184,8 @@ if ui.notificationsEnabled(): ui.showNotification( UI.PixmapCache.getPixmap("plugin48.png"), - self.trUtf8("Plugin Uninstallation"), - self.trUtf8( + self.tr("Plugin Uninstallation"), + self.tr( """<p>The plugin <b>{0}</b> was uninstalled""" """ successfully from {1}.</p>""") .format(pluginName, pluginDirectory)) @@ -190,8 +193,8 @@ E5MessageBox.information( self, - self.trUtf8("Plugin Uninstallation"), - self.trUtf8( + self.tr("Plugin Uninstallation"), + self.tr( """<p>The plugin <b>{0}</b> was uninstalled successfully""" """ from {1}.</p>""") .format(pluginName, pluginDirectory)) @@ -220,9 +223,10 @@ size = self.cw.size() self.__layout.addWidget(self.cw) self.resize(size) + self.setWindowTitle(self.cw.windowTitle()) - self.cw.buttonBox.accepted[()].connect(self.accept) - self.cw.buttonBox.rejected[()].connect(self.reject) + self.cw.buttonBox.accepted.connect(self.accept) + self.cw.buttonBox.rejected.connect(self.reject) class PluginUninstallWindow(E5MainWindow): @@ -240,9 +244,10 @@ size = self.cw.size() self.setCentralWidget(self.cw) self.resize(size) + self.setWindowTitle(self.cw.windowTitle()) self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) - self.cw.buttonBox.accepted[()].connect(self.close) - self.cw.buttonBox.rejected[()].connect(self.close) + self.cw.buttonBox.accepted.connect(self.close) + self.cw.buttonBox.rejected.connect(self.close)