Ejemplo n.º 1
0
 def _logInfo(self, dialog):
     version = ' '.join(sys.version.split())
     msg = getMessage(self._ctx, g_message, 121, version)
     logMessage(self._ctx, INFO, msg, "OptionsDialog", "_logInfo()")
     path = os.pathsep.join(sys.path)
     msg = getMessage(self._ctx, g_message, 122, path)
     logMessage(self._ctx, INFO, msg, "OptionsDialog", "_logInfo()")
     url = getLoggerUrl(self._ctx)
     self._setDialogText(dialog, url)
Ejemplo n.º 2
0
 def _getDriverVersion(self):
     try:
         service = '%s.Driver' % g_identifier
         driver = createService(self._ctx, service)
         url = 'sdbc:hsqldb:mem:///dbversion'
         connection = driver.connect(url, ())
         version = connection.getMetaData().getDriverVersion()
         connection.close()
         return version
     except UnoException as e:
         msg = getMessage(self._ctx, g_message, 141, e.Message)
         logMessage(self._ctx, SEVERE, msg, 'OptionsDialog',
                    '_getDriverVersion()')
     except Exception as e:
         msg = getMessage(self._ctx, g_message, 142,
                          (e, traceback.print_exc()))
         logMessage(self._ctx, SEVERE, msg, 'OptionsDialog',
                    '_getDriverVersion()')
Ejemplo n.º 3
0
 def __init__(self, ctx):
     self._ctx = ctx
     self.stringResource = getStringResource(ctx, g_identifier, g_extension,
                                             'OptionsDialog')
     msg = getMessage(ctx, g_message, 101)
     logMessage(ctx, INFO, msg, 'OptionsDialog', '__init__()')
Ejemplo n.º 4
0
 def _clearLog(self, dialog):
     clearLogger()
     msg = getMessage(self._ctx, g_message, 111)
     logMessage(self._ctx, INFO, msg, 'OptionsDialog', '_clearLog()')
     url = getLoggerUrl(self._ctx)
     self._setDialogText(dialog, url)
Ejemplo n.º 5
0
 def _loadVersion(self, dialog):
     if self._isUpdated():
         version = getMessage(self._ctx, g_message, 131)
     else:
         version = self._getDriverVersion()
     dialog.getControl('Label3').Text = version