localeDir = "%s%slocale" % (daboDir, os.sep) #locales = [("dabo.locale", (os.path.join(daboDir, "locale", "dabo.pot"),))] locales = [] def getLocales(arg, dirname, fnames): if ".svn" not in dirname and dirname[-1] != "\\": #po_files = tuple(glob.glob(os.path.join(dirname, "*.po"))) mo_files = tuple(glob.glob(os.path.join(dirname, "*.mo"))) if mo_files: subdir = os.path.join("dabo.locale", dirname[len(arg)+1:]) locales.append((subdir, mo_files)) os.path.walk(localeDir, getLocales, localeDir) # The applications App object contains all the meta info: app = App(MainFormClass=None) _appName = app.getAppInfo("appName") _appShortName = app.getAppInfo("appShortName") _appVersion = app.getAppInfo("appVersion") _appDescription = app.getAppInfo("appDescription") _copyright = app.getAppInfo("copyright") _authorName = app.getAppInfo("authorName") _authorEmail = app.getAppInfo("authorEmail") _authorURL = app.getAppInfo("authorURL") _authorPhone = app.getAppInfo("authorPhone") _appComments = ("This is custom software by %s.\r\n" "\r\n" "%s\r\n" "%s\r\n" "%s\r\n") % (_authorName, _authorEmail, _authorURL, _authorPhone)
app.NoneDisplay = "" # Set up a global connection to the database that all bizobjs will share: app.dbConnectionName = "monro_user" app.dbConnection = app.getConnectionByName(app.dbConnectionName) #app.dbConnection.LogEvents = ['All'] # Open one or more of the defined forms. A default one was picked by the app # generator, but you can change that here. Additionally, if form names were # passed on the command line, they will be opened instead of the default one # as long as they exist. app.ui.AnswersForm = dabo.ui.createClass("ui" + os.sep + "AnswersForm.cdxml") app.ui.AttachmentsForm = dabo.ui.createClass("ui" + os.sep + "AttachmentsForm.cdxml") app.ui.CommentsForm = dabo.ui.createClass("ui" + os.sep + "CommentsForm.cdxml") app.ui.ContactsForm = dabo.ui.createClass("ui" + os.sep + "ContactsForm.cdxml") app.ui.GetFilesForContactForm = dabo.ui.createClass("ui" + os.sep + "GetFilesForContactForm.cdxml") app.ui.GradesForm = dabo.ui.createClass("ui" + os.sep + "GradesForm.cdxml") app.ui.LessonsForm = dabo.ui.createClass("ui" + os.sep + "LessonsForm.cdxml") app.ui.StudentsForm = dabo.ui.createClass("ui" + os.sep + "StudentsForm.cdxml") app.ui.TeachersForm = dabo.ui.createClass("ui" + os.sep + "TeachersForm.cdxml") app.ui.PrintOrPreviewForm = dabo.ui.createClass("ui" + os.sep + "PrintOrPreviewForm.cdxml") app.ui.LessonSelector = dabo.ui.createClass("ui" + os.sep + "LessonSelector.cdxml") app.ui.CommentSelectorForm = dabo.ui.createClass("ui" + os.sep + "CommentSelectorForm.cdxml") app.DefaultForm = app.ui.StudentsForm app.FormsToOpen = [app.DefaultForm] app.startupForms() if app.MainForm != None: app.MainForm.Caption = 'WBSTools version ' + str(app.getAppInfo('appVersion') + ' user = ' + str(app.dbConnectionName)) # Start the application event loop: app.start()
app.setup() app.MainFormClass = app.ui.FrmMain app.PreferenceManager.setValue("fontsize", 11) app.NoneDisplay = "" # Set up a global connection to the database that all bizobjs will share: app.dbConnection = app.getConnectionByName("WBSRemoteUser") #app.dbConnection.LogEvents = ['All'] # Open one or more of the defined forms. A default one was picked by the app # generator, but you can change that here. Additionally, if form names were # passed on the command line, they will be opened instead of the default one # as long as they exist. app.ui.AnswersForm = dabo.ui.createClass("ui//AnswersForm.cdxml") app.ui.CommentsForm = dabo.ui.createClass("ui//CommentsForm.cdxml") app.ui.ContactsForm = dabo.ui.createClass("ui//ContactsForm.cdxml") app.ui.GradesForm = dabo.ui.createClass("ui//GradesForm.cdxml") app.ui.LessonsForm = dabo.ui.createClass("ui//LessonsForm.cdxml") app.ui.StudentsForm = dabo.ui.createClass("ui//StudentsForm.cdxml") app.ui.TeachersForm = dabo.ui.createClass("ui//TeachersForm.cdxml") app.ui.PrintOrPreviewForm = dabo.ui.createClass("ui//PrintOrPreviewForm.cdxml") app.ui.LessonSelector = dabo.ui.createClass("ui//LessonSelector.cdxml") app.ui.CommentSelectorForm = dabo.ui.createClass("ui//CommentSelectorForm.cdxml") app.DefaultForm = app.ui.StudentsForm app.FormsToOpen = [app.DefaultForm] app.startupForms() if app.MainForm != None: app.MainForm.Caption = 'WBSTools version ' + str(app.getAppInfo('appVersion')) # Start the application event loop: app.start()