diff browser_side/menu.py @ 148:8635bc9db9bf

added parameter management to test XMLUI, but it's currently deactivated for security reasons (need some configuration options) + separated mainTabPanel CSS from LiberviaTabPanel
author Goffi <goffi@goffi.org>
date Sun, 09 Dec 2012 23:42:08 +0100
parents 60ea800b7237
children 7e87c87b7952
line wrap: on
line diff
--- a/browser_side/menu.py	Sun Dec 09 23:38:30 2012 +0100
+++ b/browser_side/menu.py	Sun Dec 09 23:42:08 2012 +0100
@@ -35,6 +35,7 @@
 from pyjamas import Window
 from jid import JID
 from tools import html_sanitize
+from xmlui import XMLUI
 import dialog
 import re
 
@@ -93,6 +94,7 @@
         menu_help.addItem("About", MenuCmd(self, "onAbout"))
         
         menu_settings = MenuBar(vertical=True)
+        #menu_settings.addItem("Parameters", MenuCmd(self, "onParameters"))
         
         menubar = LiberviaMenuBar()
         
@@ -248,3 +250,16 @@
 
     def onXiangqiGame(self):
         Window.alert("A Xiangqi game is planed, but not available yet")
+
+    #Settings menu
+
+    def onParameters(self):
+        def gotParams(xmlui):
+            body = XMLUI(self.host, xmlui)
+            _dialog = dialog.GenericDialog("Parameters", body, options=['NO_CLOSE'])
+            body.setCloseCb(_dialog.close) 
+            _dialog.setSize('80%', '80%')
+            _dialog.show()
+
+        self.host.bridge.call('getParamsUI', gotParams)
+