Esempio n. 1
0
        def nim_updateShow(self):
            self.nim_shows = {}
            self.nim_shows = nimAPI.get_shows(self.nim_jobID)
            #print self.nim_shows

            showIndex = 0
            showIter = 0
            self.nim_showDict = {}
            try:
                self.nim_showChooser.clear()
                if self.nim_showChooser:
                    if len(self.nim_shows) > 0:
                        for show in self.nim_shows:
                            self.nim_showDict[show['showname']] = show['ID']
                        for key, value in sorted(self.nim_showDict.items(),
                                                 reverse=False):
                            self.nim_showChooser.addItem(key)
                            if nimHieroConnector.g_nim_showID:
                                if nimHieroConnector.g_nim_showID == value:
                                    print "Found matching showID, show=", key
                                    self.pref_show == key
                                    showIndex = showIter
                            else:
                                if self.pref_show == key:
                                    print "Found matching Show Name, show=", key
                                    showIndex = showIter
                            showIter += 1

                        if self.pref_show != '':
                            self.nim_showChooser.setCurrentIndex(showIndex)
            except:
                pass
Esempio n. 2
0
		def nim_updateShow(self):
			self.nim_shows = {}
			self.nim_shows = nimAPI.get_shows(self.nim_jobID)
			#print self.nim_shows

			self.nim_showDict = {}
			try:
				self.nim_showChooser.clear()
				if self.nim_showChooser:
					if len(self.nim_shows)>0:  
						for show in self.nim_shows:
							self.nim_showDict[show['showname']] = show['ID']
						for key, value in sorted(self.nim_showDict.items(), reverse=False):
							self.nim_showChooser.addItem(key)
			except:
				pass