changeset 49:f1d2eb9b2523

browser side: added about box
author Goffi <goffi@goffi.org>
date Thu, 26 May 2011 19:15:44 +0200
parents 153de5d461a4
children 72c51a4839cc
files browser_side/dialog.py browser_side/panels.py
diffstat 2 files changed, 14 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/browser_side/dialog.py	Thu May 26 18:44:31 2011 +0200
+++ b/browser_side/dialog.py	Thu May 26 19:15:44 2011 +0200
@@ -124,11 +124,12 @@
         self.callback = callback
         _body = VerticalPanel()
         _body.setSize('100%','100%')
-        _body.setHorizontalAlignment(HasAlignment.ALIGN_CENTER)
         _body.setSpacing(4)
         _body.add(widget)
         _body.setCellWidth(widget, '100%')
-        _body.add(Button("Close", self.onClose))
+        _close_button = Button("Close", self.onClose)
+        _body.add(_close_button)
+        _body.setCellHorizontalAlignment(_close_button, HasAlignment.ALIGN_CENTER)
         self.setHTML(title)
         self.setWidget(_body)
         self.panel.setWidth('100%')
--- a/browser_side/panels.py	Thu May 26 18:44:31 2011 +0200
+++ b/browser_side/panels.py	Thu May 26 19:15:44 2011 +0200
@@ -90,7 +90,16 @@
         _dialog.show()
 
     def onAbout(self):
-        dialog.SimpleDialog("About", "Libervia, a Salut à Toi project").show() 
+        _about = HTML("""<b>Libervia</b>, a Salut à Toi project<br />
+<br />
+You can contact the author at <a href="mailto:goffi@goffi.org">goffi@goffi.org</a><br />
+Blog available (mainly in french) at <a href="http://www.goffi.org" target="_blank">http://www.goffi.org</a><br />
+Project page: <a href="http://wiki.goffi.org/wiki/Salut_à_Toi"target="_blank">http://wiki.goffi.org/wiki/Salut_à_Toi</a><br />
+<br />
+Any help Welcome :)
+""")
+        _dialog = dialog.InfoDialog("About", _about)
+        _dialog.show()
     
     #Game menu
 
@@ -102,7 +111,7 @@
         dialog.ContactsChooser(self.host, onPlayersSelected, 3, text="Please select 3 other players").getContacts() 
 
     def onXiangqiGame(self):
-        Window.alert("A Xiangqi is planed, but not available yet")
+        Window.alert("A Xiangqi game is planed, but not available yet")
 
 class DropCell(DropWidget):
     """Cell in the middle grid which replace itself with the dropped widget on DnD"""