def on_set_texteditor(self, o): CustomizeOpenWithDialog(self.dialog, 'text/plain').run()
def on_set_browser(self, o): CustomizeOpenWithDialog(self.dialog, 'text/html').run() app = ApplicationManager.get_default_application('text/html') for alt in ('x-scheme-handler/http', 'x-scheme-handler/https'): ApplicationManager.set_default_application(alt, app)