387 """ |
387 """ |
388 self.repositoryList.clear() |
388 self.repositoryList.clear() |
389 self.__stableItem = None |
389 self.__stableItem = None |
390 self.__unstableItem = None |
390 self.__unstableItem = None |
391 self.__unknownItem = None |
391 self.__unknownItem = None |
|
392 |
|
393 self.__newItems = 0 |
|
394 self.__updateLocalItems = 0 |
|
395 self.__updateRemoteItems = 0 |
392 |
396 |
393 self.downloadProgress.setValue(0) |
397 self.downloadProgress.setValue(0) |
394 self.__doneMethod = None |
398 self.__doneMethod = None |
395 |
399 |
396 if os.path.exists(self.pluginRepositoryFile): |
400 if os.path.exists(self.pluginRepositoryFile): |
427 self.repositoryList, |
431 self.repositoryList, |
428 ["", self.tr( |
432 ["", self.tr( |
429 "No plugin repository file available.\nSelect Update.") |
433 "No plugin repository file available.\nSelect Update.") |
430 ]) |
434 ]) |
431 self.repositoryList.resizeColumnToContents(1) |
435 self.repositoryList.resizeColumnToContents(1) |
|
436 |
|
437 self.newLabel.setText(self.tr("New: <b>{0}</b>") |
|
438 .format(self.__newItems)) |
|
439 self.updateLocalLabel.setText(self.tr("Local Updates: <b>{0}</b>") |
|
440 .format(self.__updateLocalItems)) |
|
441 self.updateRemoteLabel.setText(self.tr("Remote Updates: <b>{0}</b>") |
|
442 .format(self.__updateRemoteItems)) |
432 |
443 |
433 def __downloadFile(self, url, filename, doneMethod=None): |
444 def __downloadFile(self, url, filename, doneMethod=None): |
434 """ |
445 """ |
435 Private slot to download the given file. |
446 Private slot to download the given file. |
436 |
447 |
600 itm.setIcon(1, UI.PixmapCache.getIcon("empty.png")) |
611 itm.setIcon(1, UI.PixmapCache.getIcon("empty.png")) |
601 itm.setToolTip(1, self.tr("up-to-date")) |
612 itm.setToolTip(1, self.tr("up-to-date")) |
602 elif updateStatus == PluginRepositoryWidget.PluginStatusNew: |
613 elif updateStatus == PluginRepositoryWidget.PluginStatusNew: |
603 itm.setIcon(1, UI.PixmapCache.getIcon("download.png")) |
614 itm.setIcon(1, UI.PixmapCache.getIcon("download.png")) |
604 itm.setToolTip(1, self.tr("new download available")) |
615 itm.setToolTip(1, self.tr("new download available")) |
|
616 self.__newItems += 1 |
605 elif updateStatus == PluginRepositoryWidget.PluginStatusLocalUpdate: |
617 elif updateStatus == PluginRepositoryWidget.PluginStatusLocalUpdate: |
606 itm.setIcon(1, UI.PixmapCache.getIcon("updateLocal.png")) |
618 itm.setIcon(1, UI.PixmapCache.getIcon("updateLocal.png")) |
607 itm.setToolTip(1, self.tr("update installable")) |
619 itm.setToolTip(1, self.tr("update installable")) |
|
620 self.__updateLocalItems += 1 |
608 elif updateStatus == PluginRepositoryWidget.PluginStatusRemoteUpdate: |
621 elif updateStatus == PluginRepositoryWidget.PluginStatusRemoteUpdate: |
609 itm.setIcon(1, UI.PixmapCache.getIcon("updateRemote.png")) |
622 itm.setIcon(1, UI.PixmapCache.getIcon("updateRemote.png")) |
610 itm.setToolTip(1, self.tr("updated download available")) |
623 itm.setToolTip(1, self.tr("updated download available")) |
|
624 self.__updateRemoteItems += 1 |
611 |
625 |
612 def __updateStatus(self, filename, version): |
626 def __updateStatus(self, filename, version): |
613 """ |
627 """ |
614 Private method to check, if the given archive update status. |
628 Private method to check, if the given archive update status. |
615 |
629 |