def setWindowTitle(self): allAppNames = [ repr(app) for app in self.allApps ] appNameDesc = ",".join(allAppNames) if self.dynamic: title = "TextTest dynamic GUI : " if self.name: title += self.name else: checkoutTitle = self.getCheckoutTitle() title += "testing " + appNameDesc + checkoutTitle + \ " (started at " + plugins.startTimeString() + ")" self.topWindow.set_title(title) else: if len(appNameDesc) > 0: appNameDesc = " for " + appNameDesc self.topWindow.set_title("TextTest static GUI : management of tests" + appNameDesc)
def setWindowTitle(self): guiText = "dynamic" if self.dynamic else "static" trailer = " - TextTest " + guiText + " GUI" if self.name: title = self.name + trailer elif self.dynamic: appNameDesc = self.dynamicAppNameTitle() checkoutTitle = self.getCheckoutTitle() title = appNameDesc + " tests" + checkoutTitle + \ " (started at " + plugins.startTimeString() + ")" + trailer else: appNameDesc = self.staticAppNameTitle() basicTitle = "test management" if len(appNameDesc) > 0: title = appNameDesc + " " + basicTitle + trailer else: title = basicTitle.capitalize() + trailer self.topWindow.set_title(title)
def __init__(self, optionMap, allApps): includeSite, includePersonal = optionMap.configPathOptions() self.readGtkRCFiles(includeSite, includePersonal) self.dynamic = not optionMap.has_key("gx") self.initialApps = self.storeInitial(allApps) self.interactiveActionHandler = InteractiveActionHandler(self.dynamic, allApps, optionMap) self.setUpGlobals(allApps, includePersonal) self.shortcutBarGUI = ShortcutBarGUI(includeSite, includePersonal) plugins.Responder.__init__(self) plugins.Observable.__init__(self) testCount = int(optionMap.get("count", 0)) initialStatus = "TextTest started at " + plugins.localtime() + "." # This is perhaps not an ideal design, throwing up the application creation dialog from the middle of a constructor. # Would possibly be better to move this, and all the code below, to a later call # At the moment that would be setObservers, not fantastic as a side-effect there either # Perhaps an entirely new call would be needed? [GB 20130524] if len(allApps) == 0: newApp, initialStatus = self.createNewApplication(optionMap) allApps.append(newApp) self.statusMonitor = statusviews.StatusMonitorGUI(initialStatus) self.textInfoGUI = textinfo.TextInfoGUI(self.dynamic) runName = optionMap.get("name", "").replace("<time>", plugins.startTimeString()) reconnect = optionMap.has_key("reconnect") self.runInfoGUI = textinfo.RunInfoGUI(self.dynamic, runName, reconnect) self.testRunInfoGUI = textinfo.TestRunInfoGUI(self.dynamic, reconnect) self.progressMonitor = statusviews.TestProgressMonitor(self.dynamic, testCount) self.progressBarGUI = statusviews.ProgressBarGUI(self.dynamic, testCount) self.idleManager = IdleHandlerManager() uiManager = gtk.UIManager() self.defaultActionGUIs, self.actionTabGUIs = self.interactiveActionHandler.getPluginGUIs(uiManager) self.menuBarGUI, self.toolBarGUI, testPopupGUI, testFilePopupGUI, appFilePopupGUI = self.createMenuAndToolBarGUIs(uiManager, includeSite, includePersonal) self.testColumnGUI = testtree.TestColumnGUI(self.dynamic, testCount) self.testTreeGUI = testtree.TestTreeGUI(self.dynamic, allApps, testPopupGUI, self.testColumnGUI) self.testFileGUI = filetrees.TestFileGUI(self.dynamic, testFilePopupGUI) self.appFileGUI = filetrees.ApplicationFileGUI(self.dynamic, allApps, appFilePopupGUI) self.rightWindowGUI = self.createRightWindowGUI() self.topWindowGUI = self.createTopWindowGUI(allApps, runName)
def notifyAllRead(self, suites): self.text = "" self.text += "\n".join(map(self.appInfo, suites)) + "\n" self.text += "Command line : " + plugins.commandLineString(sys.argv) + "\n\n" self.text += "Start time : " + plugins.startTimeString() + "\n" self.updateView()