changeset 776:627b9073a2ec

browser side: the new menu 'help/official room chat' launch the default_muc room, which can be used to get some help
author Goffi <goffi@goffi.org>
date Sun, 29 Nov 2015 22:58:38 +0100
parents 08c6e097ff5d
children c3358ea316e5
files src/browser/libervia_main.py src/browser/sat_browser/menu.py
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/browser/libervia_main.py	Wed Nov 25 19:39:20 2015 +0100
+++ b/src/browser/libervia_main.py	Sun Nov 29 22:58:38 2015 +0100
@@ -300,6 +300,7 @@
         # separator and right hand menus
         self.menus.addMenuItem(C.MENU_GLOBAL, [], quick_menus.MenuSeparator())
 
+        self.menus.addMenu(C.MENU_GLOBAL, (D_(u"Help"), D_("Official chat room")), top_extra={'icon': 'help'}, callback=main_menu.onOfficialChatRoom)
         self.menus.addMenu(C.MENU_GLOBAL, (D_(u"Help"), D_("Social contract")), top_extra={'icon': 'help'}, callback=main_menu.onSocialContract)
         self.menus.addMenu(C.MENU_GLOBAL, (D_(u"Help"), D_("About")), callback=main_menu.onAbout)
         self.menus.addMenu(C.MENU_GLOBAL, (D_(u"Settings"), D_("Account")), top_extra={'icon': 'settings'}, callback=main_menu.onAccount)
--- a/src/browser/sat_browser/menu.py	Wed Nov 25 19:39:20 2015 +0100
+++ b/src/browser/sat_browser/menu.py	Sun Nov 29 22:58:38 2015 +0100
@@ -100,6 +100,10 @@
 
     # Help menu
 
+    def onOfficialChatRoom(self):
+        nick = self.host.whoami.node
+        self.host.bridge.joinMUC(self.host.default_muc, nick, profile=C.PROF_KEY_NONE, callback=lambda dummy: None, errback=self.host.showFailureRoomInvalid)
+
     def onSocialContract(self):
         _frame = Frame('contrat_social.html')
         _frame.setStyleName('infoFrame')