diff browser_side/menu.py @ 210:3092f6b1710c

browser side: make the OK button title for group selector configureable + few "cosmetic" changes (PEP 8...) fix bug 15 fix bug 33
author souliane <souliane@mailoo.org>
date Fri, 06 Sep 2013 15:40:33 +0200
parents a50ce9c06e0e
children e830a0c60d32
line wrap: on
line diff
--- a/browser_side/menu.py	Fri Jun 28 00:06:31 2013 +0200
+++ b/browser_side/menu.py	Fri Sep 06 15:40:33 2013 +0200
@@ -147,9 +147,9 @@
         menu_help = MenuBar(vertical=True)
         menu_help.addItem("Social contract", MenuCmd(self, "onSocialContract"))
         menu_help.addItem("About", MenuCmd(self, "onAbout"))
-        
+    
         menu_settings = MenuBar(vertical=True)
-        #menu_settings.addItem("Parameters", MenuCmd(self, "onParameters"))
+        menu_settings.addItem("Parameters", MenuCmd(self, "onParameters"))
         menu_settings.addItem("Upload avatar", MenuCmd(self, "onAvatarUpload")) # XXX: temporary, will change when a full profile will be managed in SàT
         
         menubar = LiberviaMenuBar()
@@ -220,7 +220,8 @@
         label = Label("new contact identifier (JID):")
         edit.setText('@libervia.org')
         edit.setWidth('100%')
-        _dialog = dialog.GroupSelector([label, edit], self.host.contact_panel.getGroups(), [], addContactCb)
+        _dialog = dialog.GroupSelector([label, edit], self.host.contact_panel.getGroups(), [],
+                                       "Add", addContactCb)
         _dialog.setHTML('Adding contact')
         _dialog.show()
 
@@ -243,7 +244,8 @@
         _jid = _contacts_list.getValue(_contacts_list.getSelectedIndex())
         _selected_groups = self.host.contact_panel.getContactGroups(_jid)
         _dialog = dialog.GroupSelector([Label('Which contact do you want to update ?'), _contacts_list],
-                                       self.host.contact_panel.getGroups(), _selected_groups, updateContactCb)
+                                       self.host.contact_panel.getGroups(), _selected_groups,
+                                       "Update", updateContactCb)
         _dialog.setHTML('Updating contact')
         _dialog.show()
 
@@ -329,7 +331,6 @@
             body.setCloseCb(_dialog.close) 
             _dialog.setSize('80%', '80%')
             _dialog.show()
-
         self.host.bridge.call('getParamsUI', gotParams)
 
     def onAvatarUpload(self):
@@ -337,6 +338,4 @@
         _dialog = dialog.GenericDialog("Avatar upload", body, options=['NO_CLOSE'])
         body.setCloseCb(_dialog.close)
         _dialog.setSize('40%', '40%')
-        
         _dialog.show()
-