Mercurial > libervia-web
diff src/browser/sat_browser/menu.py @ 616:1c0d5a87c554 frontends_multi_profiles
browser_side: add and use method displayWidget to harmonize widget's management in Libervia (not completely done, there are some issues)
author | souliane <souliane@mailoo.org> |
---|---|
date | Wed, 11 Feb 2015 11:18:13 +0100 |
parents | 6016c74ee323 |
children | 30180021f203 |
line wrap: on
line diff
--- a/src/browser/sat_browser/menu.py Tue Feb 10 20:52:02 2015 +0100 +++ b/src/browser/sat_browser/menu.py Wed Feb 11 11:18:13 2015 +0100 @@ -33,6 +33,7 @@ from constants import Const as C import file_tools import xmlui +import chat import panels import dialog import contact_group @@ -98,7 +99,7 @@ # General menu def onWebWidget(self): - web_widget = self.host.widgets.getOrCreateWidget(panels.WebPanel, C.WEB_PANEL_DEFAULT_URL, profile=C.PROF_KEY_NONE, on_existing_widget=C.WIDGET_RECREATE) + web_widget = self.host.displayWidget(panels.WebPanel, C.WEB_PANEL_DEFAULT_URL) self.host.setSelected(web_widget) def onDisconnect(self): @@ -156,7 +157,7 @@ if room_jid not in [room.bare for room in self.host.room_list]: self.host.bridge.call('joinMUC', lambda room_jid: invite(room_jid, contacts), room_jid, nick) else: - self.host.getOrCreateLiberviaWidget(panels.ChatPanel, {'item': room_jid, 'type_': "group"}, True, jid.JID(room_jid).bare) + self.host.displayWidget(chat.Chat, room_jid, type_="group", new_tab=jid.JID(room_jid).bare) invite(room_jid, contacts) dialog.RoomAndContactsChooser(self.host, join, ok_button="Join", visible=(True, False))