Beispiel #1
0
 def _onShitTalkerSelected( self ):
    self.logStart()
    d = MainMenu._shitTalkerDict
    self._keyStroker.send( d.getValue() )
    self.log( "sent: {k}".format( k=d.getKey() ) )
    Log.pushStatus( "sent: {k}".format( k=d.getKey() ), COLOR.STATUS_DEFAULT )
    self.logEnd()
Beispiel #2
0
 def _onRuntimeConfigSelected( self ):
    self.logStart()
    d = MainMenu._runtimeConfigDict
    GlobalRuntime.setRuntimeConfig( d.getSubDictKey(), d.getValue() )
    self.log( "set {k}: {v}".format( k=d.getSubDictKey(), v=d.getValue() ) )
    Log.pushStatus( "set {k}: {v}".format( k=d.getSubDictKey(), v=d.getValue() ), COLOR.STATUS_DEFAULT )
    self.logEnd()
Beispiel #3
0
 def _onSuccessOpenSave(self):
     self.logStart()
     Log.pushStatus("opened", COLOR.STATUS_SUCCESS)
     self._accountDictLoader.saveToFile("{d}/{f}".format(
         d=DECRYPTED_MOUNT_DIR, f=PASSWORDS_FILE_NAME))
     Log.pushStatus("saved", COLOR.STATUS_SUCCESS)
     self._closeChain.run(onSuccess=self._onSuccessClose,
                          onError=self._onError)
     self.logEnd()
Beispiel #4
0
 def _onSysCmdSuccess( self ):
    d = MainMenu._sysCmdDict
    self.log()
    Log.pushStatus( "{k}{s}".format(
                s=" {sd}".format( sd=self._sysCmdTempDictName ) if self._sysCmdTempDictName else EMPTY_STRING,
                k=self._sysCmdTempKeyName ),
          COLOR.STATUS_SUCCESS )
    self._sysCmdTempDictName = None
    self._sysCmdTempKeyName = None
    del self._sysCmdProc
    self._sysCmdProc = None
 def onNextButtonDown(self, button):
     self.logStart()
     if self._accountDict.hasStringValue():
         if not self._confirmed:
             self._confirmed = True
         else:
             self._confirmed = False
             Log.pushStatus("{k} sent".format(k=self._accountDict.getKey()),
                            COLOR.STATUS_DEFAULT)
             self._keyStroker.send(self._accountDict.getValue())
     else:
         self._accountDict.openSubDict()
     self.logEnd()
Beispiel #6
0
    def savePasswords(self, password: str, onSuccess: object, onError: object):
        self.logStart()
        Log.pushStatus("opening", COLOR.STATUS_SUCCESS)
        self._parentOnSuccess = onSuccess
        self._parentOnError = onError

        self._openChain = ProcHandlerChain(procHandlerChain=[
            _getOpenCryptDeviceHandler(password), MOUNT_HANDLER
        ])

        self._openChain.run(onSuccess=self._onSuccessOpenSave,
                            onError=self._onError)
        self.logEnd()
Beispiel #7
0
    def onOkButtonDown(self, button):
        self.logStart("button {b}".format(b=button))

        if self._passwordList.isLoaded():
            self.passwordsLoaded()
        else:
            if not self._editingPassword:
                self._editingPassword = True
                self._pwTextElement.startEditing(
                    onEditingFinished=self.onPwEditFinished,
                    onEditingCancelled=self.onPwEditCancelled)
                Log.pushStatus("start edit", COLOR.STATUS_DEFAULT)

        self.logEnd()
Beispiel #8
0
 def _onError(self):
     self.logStart()
     Log.pushStatus("error", COLOR.STATUS_ERROR)
     self._umountChain.run(onSuccess=self._onErrorUnmounted,
                           onError=self._onErrorUnmounted)
     self.logEnd()
Beispiel #9
0
 def _onSuccessClose(self):
     self.logStart()
     Log.pushStatus("closed", COLOR.STATUS_SUCCESS)
     self._parentOnSuccess()
     self.logEnd()
Beispiel #10
0
 def onPasswordLoadError(self):
     Log.pushStatus("ERR loading pw", COLOR.STATUS_ERROR)
Beispiel #11
0
 def passwordsLoaded(self):
     Log.pushStatus("pws loaded", COLOR.STATUS_SUCCESS)
     self._dataWrapperElement.emptyChildren()
     self._dataWrapperElement.addChild(self._accountMenuElement)
     self._accountMenuElement.start()