def __init__(self, ctx, auto=-1, resize=False, parent=None): print("Wizard.__init__() 1") self.ctx = ctx self._auto = auto self._resize = resize self._spacer = 5 self._pages = {} self._paths = () self._currentPage = -1 self._currentPath = -1 self._firstPage = -1 self._lastPage = -1 self._multiPaths = False self._controller = None self._helpUrl = '' print("Wizard.__init__() 2") self._stringResource = getStringResource(self.ctx, g_identifier, g_extension) print("Wizard.__init__() 3") #self._dialog = getDialog(self.ctx, g_extension, 'Wizard') self._dialog = getDialog(self.ctx, g_extension, 'Wizard', self, parent) point = uno.createUnoStruct('com.sun.star.awt.Point', 0, 0) size = uno.createUnoStruct('com.sun.star.awt.Size', 85, 180) print("Wizard.__init__() 4") roadmap = self._getRoadmapControl('RoadmapControl1', point, size) print("Wizard.__init__() 5") roadmap.addItemListener(self) self._createPeer(parent) self._dialog.toFront() print("Wizard.__init__() 6")
def __init__(self, ctx): try: self.ctx = ctx self.stringResource = getStringResource(self.ctx, g_identifier, g_extension, 'OptionsDialog') print("PyOptionsDialog.__init__() 1") except Exception as e: print("PyOptionsDialog.__init__().Error: %s - %s" % (e, traceback.print_exc()))
def __init__(self, ctx): try: print("WizardMailer.__init__() 1") self.ctx = ctx msg = "Loading ... Done" #component = createService(self.ctx, 'com.sun.star.frame.Desktop').CurrentComponent #document = component.CurrentController.Frame #dispatcher = createService(self.ctx, 'com.sun.star.frame.DispatchHelper') #dispatcher.executeDispatch(document, '.uno:NewWindow', '', 0, ()) #package = createService(self.ctx, 'com.sun.star.deployment.ui.PackageManagerDialog') #wizard = createService(self.ctx, 'com.sun.star.ui.dialogs.Wizard') wizard = Wizard(self.ctx, g_wizard_page) print("WizardMailer.__init__() 2") controller = WizardController(self.ctx, wizard) #arguments = ((uno.Any('[]short', g_wizard_paths), controller), ) print("WizardMailer.__init__() 3") arguments = (g_wizard_paths, controller) #uno.invoke(wizard, 'initialize', arguments) wizard.initialize(arguments) print("WizardMailer.__init__() 4") self._stringResource = getStringResource(self.ctx, g_identifier, g_extension) logMessage(self.ctx, INFO, msg, 'WizardMailer', '__init__()') print(msg) #mri = createService(self.ctx, 'mytools.Mri') #mri.inspect(package) wizard.execute() except Exception as e: print("WizardMailer.__init__() ERROR: %s - %s" % (e, traceback.print_exc()))
def __init__(self, ctx, session, configuration, wizard): self.ctx = ctx self.session = session self.Configuration = configuration self.Wizard = wizard self.stringResource = getStringResource(self.ctx, g_identifier, 'OAuth2OOo')
def __init__(self, ctx): self.ctx = ctx self._pages = {} self._currentPageId = -1 self._disabledPages = [] self._roadmap = None self._stringResource = getStringResource(self.ctx, g_identifier, g_extension)
def __init__(self, ctx): self.ctx = ctx self._index = 0 self.stringResource = getStringResource(self.ctx, g_identifier, g_extension, 'OptionsDialog') msg = getMessage(self.ctx, g_message, 101) logMessage(self.ctx, INFO, msg, 'OptionsDialog', '__init__()')
def __init__(self, ctx, wizard): self.ctx = ctx self._wizard = wizard self._provider = createService(self.ctx, 'com.sun.star.awt.ContainerWindowProvider') self._stringResource = getStringResource(self.ctx, g_identifier, g_extension) self._configuration = getConfiguration(self.ctx, g_identifier, True) self._handler = WizardHandler(self.ctx, self._wizard) self._maxsize = self._configuration.getByName("MaxSizeMo") * MOTOBIT
def __init__(self, ctx): try: self.ctx = ctx self.stringResource = getStringResource(self.ctx, g_identifier, 'OAuth2OOo', 'OptionsDialog') self.service = createService(self.ctx, g_oauth2) logMessage(self.ctx, INFO, "Loading ... Done", 'OptionsDialog', '__init__()') except Exception as e: msg = "Error: %s - %s" % (e, traceback.print_exc()) logMessage(self.ctx, SEVERE, msg, 'OptionsDialog', '__init__()')
def __init__(self, ctx, session, url, username, autoclose): self.ctx = ctx self.Session = session self.Configuration = WizardSetting(self.ctx) self.ResourceUrl = url self.UserName = username self.AutoClose = autoclose self._pages = [1] self.AuthorizationCode = uno.createUnoStruct('com.sun.star.beans.Optional<string>') self.Server = WizardServer(self.ctx) self.Uuid = generateUuid() self.Wizard = Wizard(self.ctx) arguments = (g_wizard_paths, self) self.Wizard.initialize(arguments) self.Error = '' self.stringResource = getStringResource(self.ctx, g_identifier, 'OAuth2OOo')
def __init__(self, ctx, configuration, id, window, uuid, result): try: msg = "PageId: %s ..." % id self.ctx = ctx self.Configuration = configuration self.PageId = id self.Window = window self.Uuid = uuid self.AuthorizationCode = result self.FirstLoad = True self.stringResource = getStringResource(self.ctx, g_identifier, 'OAuth2OOo') msg += " Done" logMessage(self.ctx, INFO, msg, 'WizardPage', '__init__()') except Exception as e: msg = "Error: %s - %s" % (e, traceback.print_exc()) logMessage(self.ctx, SEVERE, msg, 'WizardPage', '__init__()')
def __init__(self, ctx): self.ctx = ctx self.configuration = getConfiguration(self.ctx, g_identifier, True) self.Setting = OAuth2Setting(self.ctx) version = self._getSSLVersion() self.Session = self._getSession(version) self._Url = '' self._Provider = KeyMap() self._Users = None self._UserName = '' self._User = KeyMap() self._parent = None self._Warnings = [] self._Error = None self.Error = '' self.stringResource = getStringResource(self.ctx, g_identifier, 'OAuth2OOo') self._SessionMode = OFFLINE
def __init__(self, ctx, auto=-1): self.ctx = ctx self._auto = auto self._pages = {} self._paths = () self._currentPage = -1 self._currentPath = -1 self._firstPage = -1 self._lastPage = -1 self._multiPaths = False self._controller = None self._helpUrl = '' self._stringResource = getStringResource(self.ctx, g_identifier, g_extension) self._dialog = getDialog(self.ctx, g_extension, 'Wizard', self) point = uno.createUnoStruct('com.sun.star.awt.Point', 0, 0) size = uno.createUnoStruct('com.sun.star.awt.Size', 85, 180) roadmap = self._getRoadmapControl('RoadmapControl1', point, size) roadmap.addItemListener(self)
def __init__(self, ctx, wizard, session, url, username, autoclose): self.ctx = ctx self._provider = createService( self.ctx, 'com.sun.star.awt.ContainerWindowProvider') self.Session = session self.Configuration = WizardSetting(self.ctx) self.ResourceUrl = url self.UserName = username self.AutoClose = autoclose self._pages = [1] self.AuthorizationCode = uno.createUnoStruct( 'com.sun.star.beans.Optional<string>') self.Server = WizardServer(self.ctx) self.Uuid = generateUuid() self._wizard = wizard self.Error = '' self._stringResource = getStringResource(self.ctx, g_identifier, 'OAuth2OOo') self._handler = WizardHandler(ctx, session, self.Configuration, wizard) path = getActivePath(self.Configuration) print("WizardController.__init__() %s" % path) self._wizard.activatePath(path, True)
def _getResource(ctx, fileresource): if fileresource not in g_resources: resource = getStringResource(ctx, g_identifier, _getPathResource(), fileresource) g_resources[fileresource] = resource return g_resources[fileresource]
def _getResultLocation(self, result): basename = 'Success' if result else 'Error' stringresource = getStringResource(self.ctx, g_identifier, 'OAuth2OOo') location = stringresource.resolveString('PageWizard3.%s.Url' % basename) return location
def _getResource(ctx, identifier=g_identifier): if identifier not in g_stringResource: resource = getStringResource(ctx, identifier, g_pathResource, g_fileResource) g_stringResource[identifier] = resource return g_stringResource[identifier]
def __init__(self, ctx): self.ctx = ctx self.stringResource = getStringResource(self.ctx, g_identifier, g_extension, 'OptionsDialog') logMessage(self.ctx, INFO, "Loading ... Done", 'OptionsDialog', '__init__()')