MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / accept

Method accept

src/bitmessageqt/address_dialogs.py:317–354  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

315 QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self))
316
317 def accept(self):
318 self.hide()
319 # no chans / mailinglists
320 if self.acct.type != AccountMixin.NORMAL:
321 return
322
323 if not isinstance(self.acct, GatewayAccount):
324 return
325
326 if self.radioButtonRegister.isChecked() \
327 or self.radioButtonRegister.isHidden():
328 email = str(self.lineEditEmail.text().toUtf8())
329 self.acct.register(email)
330 self.config.set(self.acct.fromAddress, 'label', email)
331 self.config.set(self.acct.fromAddress, 'gateway', 'mailchuck')
332 self.config.save()
333 queues.UISignalQueue.put(('updateStatusBar', _translate(
334 "EmailGatewayDialog",
335 "Sending email gateway registration request"
336 )))
337 elif self.radioButtonUnregister.isChecked():
338 self.acct.unregister()
339 self.config.remove_option(self.acct.fromAddress, 'gateway')
340 self.config.save()
341 queues.UISignalQueue.put(('updateStatusBar', _translate(
342 "EmailGatewayDialog",
343 "Sending email gateway unregistration request"
344 )))
345 elif self.radioButtonStatus.isChecked():
346 self.acct.status()
347 queues.UISignalQueue.put(('updateStatusBar', _translate(
348 "EmailGatewayDialog",
349 "Sending email gateway status request"
350 )))
351 elif self.radioButtonSettings.isChecked():
352 self.data = self.acct
353
354 super(EmailGatewayDialog, self).accept()

Callers

nothing calls this directly

Calls 8

_translateFunction · 0.90
registerMethod · 0.80
setMethod · 0.80
putMethod · 0.80
unregisterMethod · 0.80
statusMethod · 0.80
saveMethod · 0.45
acceptMethod · 0.45

Tested by

no test coverage detected