PluginManager/PluginInstallDialog.py

branch
Py2 comp.
changeset 3060
5883ce99ee12
parent 3057
10516539f238
parent 3036
30c81c9e88b8
child 3145
a9de05d4a22f
equal deleted inserted replaced
3058:0a02c433f52d 3060:5883ce99ee12
146 "Plugin ZIP-Archives:\n{0}\n\nDestination:\n{1} ({2})")\ 146 "Plugin ZIP-Archives:\n{0}\n\nDestination:\n{1} ({2})")\
147 .format("\n".join(self.__createArchivesList()), 147 .format("\n".join(self.__createArchivesList()),
148 self.destinationCombo.currentText(), 148 self.destinationCombo.currentText(),
149 self.destinationCombo.itemData( 149 self.destinationCombo.itemData(
150 self.destinationCombo.currentIndex()) 150 self.destinationCombo.currentIndex())
151 ) 151 )
152 self.summaryEdit.setPlainText(msg) 152 self.summaryEdit.setPlainText(msg)
153 153
154 @pyqtSlot() 154 @pyqtSlot()
155 def on_addArchivesButton_clicked(self): 155 def on_addArchivesButton_clicked(self):
156 """ 156 """
348 if not packageName: 348 if not packageName:
349 return False, \ 349 return False, \
350 self.trUtf8( 350 self.trUtf8(
351 """<p>The plugin module <b>{0}</b> does not contain """ 351 """<p>The plugin module <b>{0}</b> does not contain """
352 """a 'packageName' attribute. Aborting...</p>""")\ 352 """a 'packageName' attribute. Aborting...</p>""")\
353 .format(pluginFileName), \ 353 .format(pluginFileName), \
354 False 354 False
355 355
356 if pyqtApi < 2: 356 if pyqtApi < 2:
357 return False, \ 357 return False, \
358 self.trUtf8( 358 self.trUtf8(
359 """<p>The plugin module <b>{0}</b> does not conform""" 359 """<p>The plugin module <b>{0}</b> does not conform"""
360 """ with the PyQt v2 API. Aborting...</p>""")\ 360 """ with the PyQt v2 API. Aborting...</p>""")\
361 .format(pluginFileName), \ 361 .format(pluginFileName), \
362 False 362 False
363 363
364 # check, if it is a plugin, that collides with others 364 # check, if it is a plugin, that collides with others
365 if not os.path.exists(os.path.join(destination, pluginFileName)) and \ 365 if not os.path.exists(os.path.join(destination, pluginFileName)) and \
366 packageName != "None" and \ 366 packageName != "None" and \
383 activatePlugin = False 383 activatePlugin = False
384 if not self.__external: 384 if not self.__external:
385 activatePlugin = \ 385 activatePlugin = \
386 not self.__pluginManager.isPluginLoaded( 386 not self.__pluginManager.isPluginLoaded(
387 installedPluginName) or \ 387 installedPluginName) or \
388 (self.__pluginManager.isPluginLoaded(installedPluginName) and \ 388 (self.__pluginManager.isPluginLoaded(installedPluginName) and
389 self.__pluginManager.isPluginActive(installedPluginName)) 389 self.__pluginManager.isPluginActive(installedPluginName))
390 # try to unload a plugin with the same name 390 # try to unload a plugin with the same name
391 self.__pluginManager.unloadPlugin(installedPluginName) 391 self.__pluginManager.unloadPlugin(installedPluginName)
392 392
393 # uninstall existing plugin first to get clean conditions 393 # uninstall existing plugin first to get clean conditions

eric ide

mercurial