276 |
276 |
277 if self.__isDownloadInstall: |
277 if self.__isDownloadInstall: |
278 self.closeAndInstall.emit() |
278 self.closeAndInstall.emit() |
279 else: |
279 else: |
280 if ui is None or not ui.notificationsEnabled(): |
280 if ui is None or not ui.notificationsEnabled(): |
281 E5MessageBox.information(self, |
281 E5MessageBox.information( |
|
282 self, |
282 self.trUtf8("Download Plugin Files"), |
283 self.trUtf8("Download Plugin Files"), |
283 self.trUtf8("""The requested plugins were downloaded.""")) |
284 self.trUtf8("""The requested plugins were downloaded.""")) |
284 self.downloadProgress.setValue(0) |
285 self.downloadProgress.setValue(0) |
285 |
286 |
286 # repopulate the list to update the refresh icons |
287 # repopulate the list to update the refresh icons |
318 self.repositoryList.resizeColumnToContents(2) |
319 self.repositoryList.resizeColumnToContents(2) |
319 self.__resortRepositoryList() |
320 self.__resortRepositoryList() |
320 url = Preferences.getUI("PluginRepositoryUrl5") |
321 url = Preferences.getUI("PluginRepositoryUrl5") |
321 if url != self.repositoryUrlEdit.text(): |
322 if url != self.repositoryUrlEdit.text(): |
322 self.repositoryUrlEdit.setText(url) |
323 self.repositoryUrlEdit.setText(url) |
323 E5MessageBox.warning(self, |
324 E5MessageBox.warning( |
|
325 self, |
324 self.trUtf8("Plugins Repository URL Changed"), |
326 self.trUtf8("Plugins Repository URL Changed"), |
325 self.trUtf8( |
327 self.trUtf8( |
326 """The URL of the Plugins Repository has""" |
328 """The URL of the Plugins Repository has""" |
327 """ changed. Select the "Update" button to get""" |
329 """ changed. Select the "Update" button to get""" |
328 """ the new repository file.""")) |
330 """ the new repository file.""")) |
329 else: |
331 else: |
330 E5MessageBox.critical(self, |
332 E5MessageBox.critical( |
|
333 self, |
331 self.trUtf8("Read plugins repository file"), |
334 self.trUtf8("Read plugins repository file"), |
332 self.trUtf8("<p>The plugins repository file <b>{0}</b> " |
335 self.trUtf8("<p>The plugins repository file <b>{0}</b> " |
333 "could not be read. Select Update</p>")\ |
336 "could not be read. Select Update</p>")\ |
334 .format(self.pluginRepositoryFile)) |
337 .format(self.pluginRepositoryFile)) |
335 else: |
338 else: |
383 if reply in self.__replies: |
386 if reply in self.__replies: |
384 self.__replies.remove(reply) |
387 self.__replies.remove(reply) |
385 if reply.error() != QNetworkReply.NoError: |
388 if reply.error() != QNetworkReply.NoError: |
386 ok = False |
389 ok = False |
387 if not self.__downloadCancelled: |
390 if not self.__downloadCancelled: |
388 E5MessageBox.warning(self, |
391 E5MessageBox.warning( |
|
392 self, |
389 self.trUtf8("Error downloading file"), |
393 self.trUtf8("Error downloading file"), |
390 self.trUtf8( |
394 self.trUtf8( |
391 """<p>Could not download the requested file""" |
395 """<p>Could not download the requested file""" |
392 """ from {0}.</p><p>Error: {1}</p>""" |
396 """ from {0}.</p><p>Error: {1}</p>""" |
393 ).format(self.__downloadURL, reply.errorString()) |
397 ).format(self.__downloadURL, reply.errorString()) |
620 args.append(applPath) |
624 args.append(applPath) |
621 args += self.cw.getDownloadedPlugins() |
625 args += self.cw.getDownloadedPlugins() |
622 |
626 |
623 if not os.path.isfile(applPath) or \ |
627 if not os.path.isfile(applPath) or \ |
624 not proc.startDetached(sys.executable, args): |
628 not proc.startDetached(sys.executable, args): |
625 E5MessageBox.critical(self, |
629 E5MessageBox.critical( |
|
630 self, |
626 self.trUtf8('Process Generation Error'), |
631 self.trUtf8('Process Generation Error'), |
627 self.trUtf8( |
632 self.trUtf8( |
628 '<p>Could not start the process.<br>' |
633 '<p>Could not start the process.<br>' |
629 'Ensure that it is available as <b>{0}</b>.</p>' |
634 'Ensure that it is available as <b>{0}</b>.</p>' |
630 ).format(applPath), |
635 ).format(applPath), |