(self)
| 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() |
nothing calls this directly
no test coverage detected