diff browser_side/menu.py @ 181:c0b78a3af06d

browser side: web widget first draft
author Goffi <goffi@goffi.org>
date Sun, 24 Feb 2013 18:15:38 +0100
parents 9763dec220ed
children a50ce9c06e0e
line wrap: on
line diff
--- a/browser_side/menu.py	Sun Feb 24 15:58:19 2013 +0100
+++ b/browser_side/menu.py	Sun Feb 24 18:15:38 2013 +0100
@@ -38,6 +38,7 @@
 from jid import JID
 from tools import html_sanitize
 from xmlui import XMLUI
+import panels
 import dialog
 import re
 
@@ -127,6 +128,7 @@
         _item_tpl = "<img src='media/icons/menu/%s_menu_red.png' />%s"
 
         menu_general = MenuBar(vertical=True)
+        menu_general.addItem("Web widget", MenuCmd(self, "onWebWidget"))
         menu_general.addItem("Disconnect", MenuCmd(self, "onDisconnect"))
 
         menu_contacts = MenuBar(vertical=True)
@@ -169,6 +171,11 @@
         self.add(menubar)
 
     #General menu
+    def onWebWidget(self):
+        web_panel = panels.WebPanel(self.host, "http://www.goffi.org")
+        self.host.addTab(web_panel, "Web widget")
+
+
     def onDisconnect(self):
         def confirm_cb(answer):
             if answer: