def populate_list(self): # Can't have a list when there's no connection :P try: self.applist = parsecontents.list(repo=HOST) except Exception: QMessageBox.critical( self, 'OSC-DL: Critical Network Error', 'Could not connect to the Open Shop Channel server.\n' 'Cannot continue. :(\n' 'Please check your internet connection, or report this incident.' ) sys.exit(1) for item in self.applist: self.ui.listAppsWidget.addItem(item) self.ui.listAppsWidget.setCurrentRow(0) self.ui.AppsAmountLabel.setText( str(self.ui.listAppsWidget.count()) + " Apps")
def populate(self): self.ui.ViewMetadataBtn.clicked.connect(self.view_metadata) self.applist = parsecontents.list() self.ui.actionAbout_OSC_DL.setText("osc-dl Version v" + version) for item in self.applist: self.ui.listAppsWidget.addItem(item)
def populate(self): for item in parsecontents.list(): self.apps_listbox.insert('end', item)