comparison src/plugins/plugin_xep_0055.py @ 802:9007bb133009

core, frontends: XMLUI refactoring: - XMLUI now use objects with 2 main classes: widgets (button, label, etc), and container which contain widgets according to a layout - widgets and containers classes are found through introspection, thereby it's really easy to add a new one - there is still the AddWidgetName helper, for example AddText('jid', 'test@example.net') will add a StringWidget with name "jid" and default value "test@example.net" - container can be inside other containers. changeContainer change the first parent container
author Goffi <goffi@goffi.org>
date Tue, 04 Feb 2014 18:19:00 +0100
parents 7f2082b192ed
children 743b757777d3
comparison
equal deleted inserted replaced
801:02ee9ef95277 802:9007bb133009
73 @param profile: %(doc_profile)s 73 @param profile: %(doc_profile)s
74 74
75 """ 75 """
76 form_ui = xml_tools.XMLUI("form", title=_("Search directory"), submit_id=self.__menu_cb_id) 76 form_ui = xml_tools.XMLUI("form", title=_("Search directory"), submit_id=self.__menu_cb_id)
77 form_ui.addText(_("Please enter the search jid"), 'instructions') 77 form_ui.addText(_("Please enter the search jid"), 'instructions')
78 form_ui.changeLayout("pairs") 78 form_ui.changeContainer("pairs")
79 form_ui.addLabel("jid") 79 form_ui.addLabel("jid")
80 form_ui.addString("jid", value="users.jabberfr.org") # TODO: replace users.jabberfr.org by any XEP-0055 compatible service discovered on current server 80 form_ui.addString("jid", value="users.jabberfr.org") # TODO: replace users.jabberfr.org by any XEP-0055 compatible service discovered on current server
81 return {'xmlui': form_ui.toXml()} 81 return {'xmlui': form_ui.toXml()}
82 82
83 def _getSearchUI(self, to_jid_s, profile_key): 83 def _getSearchUI(self, to_jid_s, profile_key):