- while True:
- dialog.show_all()
- result = dialog.run()
- dialog.hide()
- if result == gtk.RESPONSE_CANCEL:
- return None
- elif result == gtk.RESPONSE_OK:
- self._gc.set_string('/apps/maemo/hermes/facebook_session_key', '')
- self._gc.set_string('/apps/maemo/hermes/facebook_secret_key', '')
- self._gc.set_string('/apps/maemo/hermes/facebook_uid', '')
- else:
- break
+ clear = hildon.Button(gtk.HILDON_SIZE_FINGER_HEIGHT,
+ hildon.BUTTON_ARRANGEMENT_VERTICAL,
+ title = _("Clear authorisation"))
+ clear.connect('clicked', self._clear_auth)
+ dialog.vbox.add(clear)
+
+ dialog.show_all()
+ result = dialog.run()
+ dialog.hide()
+ if result == gtk.RESPONSE_CANCEL or result == gtk.RESPONSE_DELETE_EVENT:
+ return None