You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(8) |
Sep
(3) |
Oct
(5) |
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
(7) |
Mar
(17) |
Apr
(37) |
May
|
Jun
(46) |
Jul
(40) |
Aug
(2) |
Sep
(4) |
Oct
(2) |
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <umg...@us...> - 2007-06-25 13:22:31
|
Revision: 457 http://svn.sourceforge.net/pybridge/?rev=457&view=rev Author: umgangee Date: 2007-06-25 06:21:30 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Update to include locale and manpage files. Modified Paths: -------------- trunk/pybridge/MANIFEST.in Modified: trunk/pybridge/MANIFEST.in =================================================================== --- trunk/pybridge/MANIFEST.in 2007-06-25 13:20:33 UTC (rev 456) +++ trunk/pybridge/MANIFEST.in 2007-06-25 13:21:30 UTC (rev 457) @@ -1,6 +1,6 @@ include MANIFEST.in -include AUTHORS COPYING INSTALL NEWS README -include glade/*.glade -recursive-include locale *.mo +include AUTHORS COPYING INSTALL NEWS README bin/pybridge.desktop +include glade/*.glade man/* +recursive-include locale */LC_MESSAGES/pybridge.mo recursive-include pixmaps *.ico *.png *.svg - +prune locale/src This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-25 13:20:38
|
Revision: 456 http://svn.sourceforge.net/pybridge/?rev=456&view=rev Author: umgangee Date: 2007-06-25 06:20:33 -0700 (Mon, 25 Jun 2007) Log Message: ----------- new() method should be setUp(). Modified Paths: -------------- trunk/pybridge/pybridge/ui/dialog_newtable.py Modified: trunk/pybridge/pybridge/ui/dialog_newtable.py =================================================================== --- trunk/pybridge/pybridge/ui/dialog_newtable.py 2007-06-25 13:17:29 UTC (rev 455) +++ trunk/pybridge/pybridge/ui/dialog_newtable.py 2007-06-25 13:20:33 UTC (rev 456) @@ -28,7 +28,7 @@ glade_name = 'dialog_newtable' - def new(self): + def setUp(self): pass This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-25 13:17:29
|
Revision: 455 http://svn.sourceforge.net/pybridge/?rev=455&view=rev Author: umgangee Date: 2007-06-25 06:17:29 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Updated NEWS file for 0.3.0. Modified Paths: -------------- trunk/pybridge/NEWS Modified: trunk/pybridge/NEWS =================================================================== --- trunk/pybridge/NEWS 2007-06-25 13:14:59 UTC (rev 454) +++ trunk/pybridge/NEWS 2007-06-25 13:17:29 UTC (rev 455) @@ -1,3 +1,57 @@ +===================== +0.3.0 (25 June 2007) +===================== + +New features +------------ + + - Architecture: + + - Separation of bridge game logic from 'table' code in [Local|Remote]Table + and Game classes. This enables other games to be implemented as separate + packages and to be supported by the existing network code. + + + - Bridge facilities: + + - Implementation of Thomas Andrews' "impossible bridge book" algorithm, + which provides a one-to-one correspondence between all possible hand deals + and numerical index values. + See http://bridge.thomasoandrews.com/impossible/ for details. + + + - Miscellaneous: + + - Use ConfigObj to provide settings management for the graphical client. + This introduces a dependency on ConfigObj. + + - Manual pages included in source distribution. + + + - Server: + + - Use SQLObject (an object relational mapper, see http://www.sqlobject.org/) + to provide user account database; replaces the flat-file username/password + structure used previously. This introduces a dependency on SQLObject and + a compatible database backend - see the INSTALL file for more information. + + + - User interface: + + - Card area display reimplemented in Cairo, with enhancements: + + - Rotation of table view when user selects a position to play. + + - Separation of display canvas from card and hand logic, for reusability. + The canvas module may be useful for other projects. + + - Introduction of a preferences dialog, allowing user to customise the + appearance of the bridge game display. + + - Error notification to user when connection is dropped unexpectedly; + require confirmation when user requests disconnection whilst playing game. + + ====================== 0.2.1 (16 August 2006) ====================== @@ -3,11 +57,11 @@ Bug fixes -========= +--------- -- Fixed setup.py script to install source package and supporting files in the - standard /usr/ directories. + - Fixed setup.py script to install source package and supporting files in the + standard /usr/ directories. -- Updated pybridge.environment and bin/* scripts to work with both the source - and installation directory layouts. + - Updated pybridge.environment and bin/* scripts to work with both the source + and installation directory layouts. @@ -16,28 +70,28 @@ 0.2.0 (14 August 2006) ====================== -New Features -============ +New features +------------ -- Substantial rewrite of network code. Focus on splitting discrete services - into separate components and making full use of Twisted's pb.Cacheable. - (Support for other games can be added simply by writing new table modules - for server and client subclassing LocalTable and RemoteTable respectively.) + - Substantial rewrite of network code. Focus on splitting discrete services + into separate components and making full use of Twisted's pb.Cacheable. + (Support for other games can be added simply by writing new table modules + for server and client subclassing LocalTable and RemoteTable respectively.) -- Introduction of an event handler and callback mechanism, which provides an - indirect interface between network code and user interface components. + - Introduction of an event handler and callback mechanism, which provides an + indirect interface between network code and user interface components. -- Facelift for user interface: tables now display as separate windows, - enhancements to CardArea display widget, new icons and logo artwork. + - Facelift for user interface: tables now display as separate windows, + enhancements to CardArea display widget, new icons and logo artwork. -- Basic table chat support. + - Basic table chat support. -- Initial support for internationalization and localization via gettext. + - Initial support for internationalization and localization via gettext. ==================== 0.1.0 (19 July 2006) ==================== -- Initial release. + - Initial release. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-25 13:15:04
|
Revision: 454 http://svn.sourceforge.net/pybridge/?rev=454&view=rev Author: umgangee Date: 2007-06-25 06:14:59 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Provide user with option of drawing suits as symbols. This is useful for GTK on win32, which does not appear to render suit symbols correctly. Modified Paths: -------------- trunk/pybridge/glade/pybridge.glade trunk/pybridge/pybridge/ui/config.py trunk/pybridge/pybridge/ui/dialog_preferences.py trunk/pybridge/pybridge/ui/vocabulary.py Modified: trunk/pybridge/glade/pybridge.glade =================================================================== --- trunk/pybridge/glade/pybridge.glade 2007-06-25 11:36:23 UTC (rev 453) +++ trunk/pybridge/glade/pybridge.glade 2007-06-25 13:14:59 UTC (rev 454) @@ -326,51 +326,51 @@ <property name="column_spacing">8</property> <property name="row_spacing">2</property> <child> - <widget class="GtkLabel" id="label_tabletype"> + <widget class="GtkLabel" id="label63"> <property name="visible">True</property> <property name="xalign">0</property> + <property name="label" translatable="yes">ID:</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label65"> + <widget class="GtkLabel" id="label_tableid"> <property name="visible">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes">Type:</property> </widget> <packing> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label_tableid"> + <widget class="GtkLabel" id="label65"> <property name="visible">True</property> <property name="xalign">0</property> + <property name="label" translatable="yes">Type:</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label63"> + <widget class="GtkLabel" id="label_tabletype"> <property name="visible">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes">ID:</property> </widget> <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> @@ -464,24 +464,24 @@ <property name="column_spacing">8</property> <property name="row_spacing">2</property> <child> - <widget class="GtkLabel" id="label_personname"> + <widget class="GtkLabel" id="label67"> <property name="visible">True</property> <property name="xalign">0</property> + <property name="label" translatable="yes">Name:</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label67"> + <widget class="GtkLabel" id="label_personname"> <property name="visible">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes">Name:</property> </widget> <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> @@ -568,23 +568,30 @@ <property name="column_spacing">8</property> <property name="row_spacing">4</property> <child> - <widget class="GtkEntry" id="entry_portnum"> - <property name="width_request">80</property> + <widget class="GtkLabel" id="label_portnum"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="max_length">5</property> - <property name="invisible_char">*</property> - <signal name="changed" handler="on_field_changed"/> + <property name="xalign">0</property> + <property name="label" translatable="yes">Port:</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> + <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> + <widget class="GtkLabel" id="label_hostname"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Host Name:</property> + </widget> + <packing> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> <widget class="GtkEntry" id="entry_hostname"> <property name="width_request">140</property> <property name="visible">True</property> @@ -599,26 +606,19 @@ </packing> </child> <child> - <widget class="GtkLabel" id="label_hostname"> + <widget class="GtkEntry" id="entry_portnum"> + <property name="width_request">80</property> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Host Name:</property> + <property name="can_focus">True</property> + <property name="max_length">5</property> + <property name="invisible_char">*</property> + <signal name="changed" handler="on_field_changed"/> </widget> <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label_portnum"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Port:</property> - </widget> - <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> @@ -661,20 +661,26 @@ <property name="column_spacing">8</property> <property name="row_spacing">4</property> <child> - <widget class="GtkEntry" id="entry_password"> - <property name="width_request">120</property> + <widget class="GtkLabel" id="label_username"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="max_length">40</property> - <property name="visibility">False</property> - <property name="invisible_char">*</property> - <signal name="changed" handler="on_field_changed"/> + <property name="xalign">0</property> + <property name="label" translatable="yes">User Name:</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label_password"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Password:</property> + </widget> + <packing> <property name="top_attach">1</property> <property name="bottom_attach">2</property> + <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> @@ -694,29 +700,23 @@ </packing> </child> <child> - <widget class="GtkLabel" id="label_password"> + <widget class="GtkEntry" id="entry_password"> + <property name="width_request">120</property> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Password:</property> + <property name="can_focus">True</property> + <property name="max_length">40</property> + <property name="visibility">False</property> + <property name="invisible_char">*</property> + <signal name="changed" handler="on_field_changed"/> </widget> <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> - <child> - <widget class="GtkLabel" id="label_username"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">User Name:</property> - </widget> - <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> </widget> </child> <child> @@ -839,16 +839,6 @@ <property name="column_spacing">4</property> <property name="row_spacing">2</property> <child> - <widget class="GtkLabel" id="label_tablename"> - <property name="visible">True</property> - <property name="label" translatable="yes">Table Name:</property> - </widget> - <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> <widget class="GtkEntry" id="entry_tablename"> <property name="width_request">140</property> <property name="visible">True</property> @@ -862,6 +852,16 @@ <property name="y_options"></property> </packing> </child> + <child> + <widget class="GtkLabel" id="label_tablename"> + <property name="visible">True</property> + <property name="label" translatable="yes">Table Name:</property> + </widget> + <packing> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> </widget> </child> </widget> @@ -1131,14 +1131,23 @@ <property name="column_spacing">8</property> <property name="row_spacing">2</property> <child> - <widget class="GtkLabel" id="label_vuln"> + <widget class="GtkLabel" id="label59"> <property name="visible">True</property> <property name="xalign">0</property> - <property name="use_markup">True</property> + <property name="label" translatable="yes">Dealer:</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label60"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Vulnerability:</property> + </widget> + <packing> <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> @@ -1158,29 +1167,20 @@ </packing> </child> <child> - <widget class="GtkLabel" id="label60"> + <widget class="GtkLabel" id="label_vuln"> <property name="visible">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes">Vulnerability:</property> + <property name="use_markup">True</property> </widget> <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> - <child> - <widget class="GtkLabel" id="label59"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Dealer:</property> - </widget> - <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> </widget> <packing> <property name="expand">False</property> @@ -1454,6 +1454,72 @@ <property name="column_spacing">8</property> <property name="row_spacing">4</property> <child> + <widget class="GtkFileChooserButton" id="background"> + <property name="width_request">160</property> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <signal name="selection_changed" handler="on_background_changed"/> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + <child> + <widget class="GtkComboBox" id="cardstyle"> + <property name="width_request">160</property> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <signal name="changed" handler="on_cardstyle_changed"/> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label_background"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Background:</property> + </widget> + <packing> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label_cardstyle"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Card Style:</property> + </widget> + <packing> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label_suitcolours"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Suit Colours:</property> + </widget> + <packing> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> <widget class="GtkHBox" id="hbox2"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -1470,7 +1536,7 @@ <widget class="GtkLabel" id="label_clubcolour"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="label" translatable="yes">♣</property> + <property name="label" translatable="yes">C</property> <property name="use_markup">True</property> </widget> </child> @@ -1490,7 +1556,7 @@ <widget class="GtkLabel" id="label_diamondcolour"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="label" translatable="yes">♦</property> + <property name="label" translatable="yes">D</property> <property name="use_markup">True</property> </widget> </child> @@ -1511,7 +1577,7 @@ <widget class="GtkLabel" id="label_heartcolour"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="label" translatable="yes">♥</property> + <property name="label" translatable="yes">H</property> <property name="use_markup">True</property> </widget> </child> @@ -1532,7 +1598,7 @@ <widget class="GtkLabel" id="label_spadecolour"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="label" translatable="yes">♠</property> + <property name="label" translatable="yes">S</property> <property name="use_markup">True</property> </widget> </child> @@ -1550,78 +1616,24 @@ <property name="bottom_attach">3</property> </packing> </child> - <child> - <widget class="GtkLabel" id="label_suitcolours"> - <property name="visible">True</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Suit Colours:</property> - </widget> - <packing> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label_cardstyle"> - <property name="visible">True</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Card Style:</property> - </widget> - <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label_background"> - <property name="visible">True</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Background:</property> - </widget> - <packing> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkComboBox" id="cardstyle"> - <property name="width_request">160</property> - <property name="visible">True</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <signal name="changed" handler="on_cardstyle_changed"/> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - </packing> - </child> - <child> - <widget class="GtkFileChooserButton" id="background"> - <property name="width_request">160</property> - <property name="visible">True</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <signal name="selection_changed" handler="on_background_changed"/> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - </packing> - </child> </widget> <packing> <property name="expand">False</property> </packing> </child> <child> + <widget class="GtkCheckButton" id="check_suitsymbols"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="label" translatable="yes">Display suits as symbols?</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + <child> <widget class="GtkLabel" id="label_changenote"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -1630,7 +1642,7 @@ <property name="wrap">True</property> </widget> <packing> - <property name="position">1</property> + <property name="position">2</property> </packing> </child> </widget> Modified: trunk/pybridge/pybridge/ui/config.py =================================================================== --- trunk/pybridge/pybridge/ui/config.py 2007-06-25 11:36:23 UTC (rev 453) +++ trunk/pybridge/pybridge/ui/config.py 2007-06-25 13:14:59 UTC (rev 454) @@ -38,6 +38,7 @@ [Appearance] CardStyle = string BackgroundImage = string + SuitSymbols = boolean(default=True) [[Colours]] Club = int_list(3, 3) Modified: trunk/pybridge/pybridge/ui/dialog_preferences.py =================================================================== --- trunk/pybridge/pybridge/ui/dialog_preferences.py 2007-06-25 11:36:23 UTC (rev 453) +++ trunk/pybridge/pybridge/ui/dialog_preferences.py 2007-06-25 13:14:59 UTC (rev 454) @@ -27,7 +27,7 @@ from pybridge.bridge.symbols import Suit -SUIT_LABEL_TEMPLATE = "<span color=\'%s\' size=\'xx-large\'>%s</span>" +SUIT_LABEL_TEMPLATE = "<span color=\'%s\' size=\'x-large\'>%s</span>" class DialogPreferences(GladeWrapper): @@ -76,7 +76,10 @@ label = getattr(self, 'label_%scolour' % suit.key.lower()) label.set_markup(SUIT_LABEL_TEMPLATE % (hexrep, SUIT_SYMBOLS[suit])) + use_suitsymbols = config['Appearance'].get('SuitSymbols') + self.check_suitsymbols.set_active(use_suitsymbols) + # Signal handlers. @@ -128,5 +131,7 @@ iter = self.cardstyle.get_active_iter() config['Appearance']['CardStyle'] = model.get_value(iter, 0) + config['Appearance']['SuitSymbols'] = self.check_suitsymbols.get_active() + wm.close(self) Modified: trunk/pybridge/pybridge/ui/vocabulary.py =================================================================== --- trunk/pybridge/pybridge/ui/vocabulary.py 2007-06-25 11:36:23 UTC (rev 453) +++ trunk/pybridge/pybridge/ui/vocabulary.py 2007-06-25 13:14:59 UTC (rev 454) @@ -103,12 +103,20 @@ Suit.Spade: _('Spades'), } -SUIT_SYMBOLS = { - Suit.Club: u'\N{BLACK CLUB SUIT}', - Suit.Diamond: u'\N{BLACK DIAMOND SUIT}', - Suit.Heart: u'\N{BLACK HEART SUIT}', - Suit.Spade: u'\N{BLACK SPADE SUIT}', -} +if config['Appearance'].get('SuitSymbols'): + SUIT_SYMBOLS = { + Suit.Club: u'\N{BLACK CLUB SUIT}', + Suit.Diamond: u'\N{BLACK DIAMOND SUIT}', + Suit.Heart: u'\N{BLACK HEART SUIT}', + Suit.Spade: u'\N{BLACK SPADE SUIT}', + } +else: + SUIT_SYMBOLS = { + Suit.Club: 'C', + Suit.Diamond: 'D', + Suit.Heart: 'H', + Suit.Spade: 'S', + } STRAIN_NAMES = { Strain.Club: _('Club'), @@ -118,19 +126,28 @@ Strain.NoTrump: _('No Trump'), } -STRAIN_SYMBOLS = { - Strain.Club: u'\N{BLACK CLUB SUIT}', - Strain.Diamond: u'\N{BLACK DIAMOND SUIT}', - Strain.Heart: u'\N{BLACK HEART SUIT}', - Strain.Spade: u'\N{BLACK SPADE SUIT}', - Strain.NoTrump: u'NT', -} +if config['Appearance'].get('SuitSymbols'): + STRAIN_SYMBOLS = { + Strain.Club: u'\N{BLACK CLUB SUIT}', + Strain.Diamond: u'\N{BLACK DIAMOND SUIT}', + Strain.Heart: u'\N{BLACK HEART SUIT}', + Strain.Spade: u'\N{BLACK SPADE SUIT}', + Strain.NoTrump: 'NT', + } +else: + STRAIN_SYMBOLS = { + Strain.Club: 'C', + Strain.Diamond: 'D', + Strain.Heart: 'H', + Strain.Spade: 'S', + Strain.NoTrump: 'NT', + } VULN_SYMBOLS = { Vulnerable.All: _('All'), - Vulnerable.NorthSouth : _('N/S'), - Vulnerable.EastWest : _('E/W'), - Vulnerable.None : _('None'), + Vulnerable.NorthSouth: _('N/S'), + Vulnerable.EastWest: _('E/W'), + Vulnerable.None: _('None'), } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-25 11:36:23
|
Revision: 453 http://svn.sourceforge.net/pybridge/?rev=453&view=rev Author: umgangee Date: 2007-06-25 04:36:23 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Fix SQLObject sqlite connection string for win32 systems. Modified Paths: -------------- trunk/pybridge/pybridge/server/database.py Modified: trunk/pybridge/pybridge/server/database.py =================================================================== --- trunk/pybridge/pybridge/server/database.py 2007-06-25 10:16:56 UTC (rev 452) +++ trunk/pybridge/pybridge/server/database.py 2007-06-25 11:36:23 UTC (rev 453) @@ -35,10 +35,17 @@ engine = config['Database'].get('Engine', 'sqlite') # Default to SQLite. if engine == 'sqlite': - dbfile = config['Database'].get('DatabaseName', + dbpath = config['Database'].get('DatabaseName', env.find_config_server('pybridge-server.db')) - connection_string = "sqlite://" + dbfile + # SQLObject uses a special syntax to specify path on Windows systems. + # This code block is from http://simpleweb.essienitaessien.com/example + if(dbpath[1] == ':'): + s = re.sub('\\\\', '/', dbpath) # Change '\' to '/' + s = re.sub(':', '|', s, 1) # Special for sqlite + dbpath = '/' + s + connection_string = "sqlite://" + dbpath + else: username = config['Database'].get('Username', '') password = config['Database'].get('Password', '') @@ -60,7 +67,7 @@ connection_string += '/' + dbname try: - connection = connectionForURI(connection_string) # TODO: fix for Win32. + connection = connectionForURI(connection_string) log.msg("Connection to %s database succeeded" % engine) except Exception, e: log.err(e) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-25 10:16:54
|
Revision: 452 http://svn.sourceforge.net/pybridge/?rev=452&view=rev Author: umgangee Date: 2007-06-25 03:16:56 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Add a desktop entry for PyBridge program. Modified Paths: -------------- trunk/pybridge/setup.py Added Paths: ----------- trunk/pybridge/bin/pybridge.desktop Added: trunk/pybridge/bin/pybridge.desktop =================================================================== --- trunk/pybridge/bin/pybridge.desktop (rev 0) +++ trunk/pybridge/bin/pybridge.desktop 2007-06-25 10:16:56 UTC (rev 452) @@ -0,0 +1,9 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=PyBridge +Comment[en]=An online contract bridge game +Exec=pybridge +Icon=/usr/share/pybridge/pixmaps/pybridge.png +Terminal=false +Type=Application +Categories=Application;Game;CardGame Modified: trunk/pybridge/setup.py =================================================================== --- trunk/pybridge/setup.py 2007-06-25 09:46:35 UTC (rev 451) +++ trunk/pybridge/setup.py 2007-06-25 10:16:56 UTC (rev 452) @@ -21,10 +21,10 @@ url = 'http://sourceforge.net/projects/pybridge/', description = 'A free online bridge game.', download_url = 'http://sourceforge.net/project/showfiles.php?group_id=114287', - packages = ['pybridge', 'pybridge.bridge', 'pybridge.interfaces', - 'pybridge.network', 'pybridge.server', 'pybridge.ui'], + packages = ['pybridge', 'pybridge.bridge', 'pybridge.interfaces', 'pybridge.network', 'pybridge.server', 'pybridge.ui'], scripts = ['bin/pybridge', 'bin/pybridge-server'], - data_files = [('share/doc/pybridge', ['AUTHORS', 'COPYING', 'INSTALL', 'NEWS', 'README']), + data_files = [('share/applications', ['bin/pybridge.desktop']), + ('share/doc/pybridge', ['AUTHORS', 'COPYING', 'INSTALL', 'NEWS', 'README']), ('share/pybridge/glade', glob.glob('glade/*.glade')), ('share/pybridge/pixmaps', glob.glob('pixmaps/*')), ], This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-25 09:46:38
|
Revision: 451 http://svn.sourceforge.net/pybridge/?rev=451&view=rev Author: umgangee Date: 2007-06-25 02:46:35 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Add a confirmation dialog when user requests to leave table whilst playing a game. Modified Paths: -------------- trunk/pybridge/pybridge/ui/window_bridgetable.py Modified: trunk/pybridge/pybridge/ui/window_bridgetable.py =================================================================== --- trunk/pybridge/pybridge/ui/window_bridgetable.py 2007-06-24 16:28:19 UTC (rev 450) +++ trunk/pybridge/pybridge/ui/window_bridgetable.py 2007-06-25 09:46:35 UTC (rev 451) @@ -615,10 +615,30 @@ def on_leavetable_clicked(self, widget, *args): - d = client.leaveTable(self.table.id) - d.addErrback(self.errback) + # If user is currently playing a game, request confirmation. + if self.player and self.table.game.inProgress(): + dialog = gtk.MessageDialog(parent=self.window, flags=gtk.DIALOG_MODAL, + type=gtk.MESSAGE_QUESTION) + dialog.set_title(_('Leave table?')) + dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL) + dialog.add_button(_('Leave Table'), gtk.RESPONSE_OK) + dialog.set_markup(_('Are you sure you wish to leave this table?')) + dialog.format_secondary_text(_('You are currently playing a game. Leaving may forfeit the game, or incur penalties.')) + def dialog_response_cb(dialog, response_id): + dialog.destroy() + if response_id == gtk.RESPONSE_OK: + d = client.leaveTable(self.table.id) + d.addErrback(self.errback) + dialog.connect('response', dialog_response_cb) + dialog.show() + + else: + d = client.leaveTable(self.table.id) + d.addErrback(self.errback) + + def on_chat_message_changed(self, widget, *args): sensitive = self.chat_message.get_text() != '' self.chat_send.set_property('sensitive', sensitive) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-24 16:28:22
|
Revision: 450 http://svn.sourceforge.net/pybridge/?rev=450&view=rev Author: umgangee Date: 2007-06-24 09:28:19 -0700 (Sun, 24 Jun 2007) Log Message: ----------- Update and augment readme files for 0.3.0. Modified Paths: -------------- trunk/pybridge/AUTHORS trunk/pybridge/INSTALL trunk/pybridge/README Modified: trunk/pybridge/AUTHORS =================================================================== --- trunk/pybridge/AUTHORS 2007-06-24 10:03:36 UTC (rev 449) +++ trunk/pybridge/AUTHORS 2007-06-24 16:28:19 UTC (rev 450) @@ -1,6 +1,10 @@ Authors: Michael Banks <mi...@ba...> + + +Contributors: + Sourav K. Mandal <so...@so...> Modified: trunk/pybridge/INSTALL =================================================================== --- trunk/pybridge/INSTALL 2007-06-24 10:03:36 UTC (rev 449) +++ trunk/pybridge/INSTALL 2007-06-24 16:28:19 UTC (rev 450) @@ -6,15 +6,22 @@ python setup.py install -We recommend that, if your distribution provides PyBridge packages, you should -install from packages. Packages are available for Debian GNU/Linux and its -derivatives (including Ubuntu) thanks to David Watson <dw...@de...>. - Alternatively, you can run PyBridge from the extracted tarball archive. Change -to the PyBridge "bin/" directory, then type "./pybridge" to run the graphical -client, or "./pybridge-server" to run the standalone server. +to the PyBridge 'bin/' directory, then type './pybridge' to run the graphical +client, or './pybridge-server' to run the standalone server. +PyBridge packages are available for Debian GNU/Linux and Ubuntu systems, thanks +to David Watson <dw...@de...>. Please visit: + - For Debian: http://packages.debian.org/pybridge/ + - For Ubuntu: http://packages.ubuntu.com/pybridge/ + +Users of Microsoft Windows may wish to use the 'py2exe' PyBridge distribution, +which provides native executable (.exe) versions of the 'pybridge' and +'pybridge-server' scripts, and bundles all the library software (see below) +required to run PyBridge. + + Requirements ============ @@ -46,7 +53,7 @@ By default, the standalone server creates and uses a SQLite database in the ~/.pybridge/ directory. This is suitable for hosting LAN games, but if you wish to operate a high-load PyBridge server on the Internet, it may be necessary -to switch to an external RDBMS, such as MySQL or PostgreSQL. +to switch to an external database server, such as MySQL or PostgreSQL. To change the database settings, edit the ~/.pybridge/server.cfg file. The fields to change are documented in the pybridge/server/config.py module. Modified: trunk/pybridge/README =================================================================== --- trunk/pybridge/README 2007-06-24 10:03:36 UTC (rev 449) +++ trunk/pybridge/README 2007-06-24 16:28:19 UTC (rev 450) @@ -21,20 +21,22 @@ - Connect to a public server. A list of known public servers can be found on the project website. - - Run a game server yourself, using the pybridge-server script. + - Run a PyBridge game server yourself, using the pybridge-server script. -When connecting to a server for the first time, you need to ensure that the -"Register as New User" checkbox is ticked. +When connecting to a PyBridge server for the first time, you need to ensure +that the "Register as New User" checkbox is ticked. -Installation instructions can be found in the INSTALL file. Details of changes -made in this release can be found in the NEWS file. +Installation instructions can be found in the INSTALL file. Details of new +features, bug fixes and other changes can be found in the NEWS file. Your feedback, bug reports and ideas for new features are especially welcome. -Forums: http://sourceforge.net/forum/?group_id=114287 -Bug reports: http://sourceforge.net/tracker/?group_id=114287&atid=667822 -Feature requests: http://sourceforge.net/tracker/?group_id=114287&atid=667825 + - Forums: http://sourceforge.net/forum/?group_id=114287 + - Bug reports: http://sourceforge.net/tracker/?group_id=114287&atid=667822 + + - Feature ideas: http://sourceforge.net/tracker/?group_id=114287&atid=667825 + If you are a competent (or aspiring!) Python programmer and would like to contribute code to PyBridge, then please get in touch with the developers! This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-24 10:03:35
|
Revision: 449 http://svn.sourceforge.net/pybridge/?rev=449&view=rev Author: umgangee Date: 2007-06-24 03:03:36 -0700 (Sun, 24 Jun 2007) Log Message: ----------- A one-line fix to ensure table is dereferenced when bidbox is destroyed, so reference count of table object goes to 0 when user leaves. Modified Paths: -------------- trunk/pybridge/pybridge/ui/window_bidbox.py Modified: trunk/pybridge/pybridge/ui/window_bidbox.py =================================================================== --- trunk/pybridge/pybridge/ui/window_bidbox.py 2007-06-23 15:41:22 UTC (rev 448) +++ trunk/pybridge/pybridge/ui/window_bidbox.py 2007-06-24 10:03:36 UTC (rev 449) @@ -92,6 +92,7 @@ def tearDown(self): if self.table: self.table.game.detach(self.eventHandler) + self.table = None # Dereference table. def setCallSelectHandler(self, handler): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-23 15:41:25
|
Revision: 448 http://svn.sourceforge.net/pybridge/?rev=448&view=rev Author: umgangee Date: 2007-06-23 08:41:22 -0700 (Sat, 23 Jun 2007) Log Message: ----------- Build bidding box with PyGTK code, instead of Glade, to facilitate colourised bid buttons and straightforward mapping between Call objects and their button representations. Modified Paths: -------------- trunk/pybridge/glade/pybridge.glade trunk/pybridge/pybridge/ui/window_bidbox.py trunk/pybridge/pybridge/ui/window_bridgetable.py Modified: trunk/pybridge/glade/pybridge.glade =================================================================== --- trunk/pybridge/glade/pybridge.glade 2007-06-23 14:47:07 UTC (rev 447) +++ trunk/pybridge/glade/pybridge.glade 2007-06-23 15:41:22 UTC (rev 448) @@ -326,51 +326,51 @@ <property name="column_spacing">8</property> <property name="row_spacing">2</property> <child> - <widget class="GtkLabel" id="label63"> + <widget class="GtkLabel" id="label_tabletype"> <property name="visible">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes">ID:</property> </widget> <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label_tableid"> + <widget class="GtkLabel" id="label65"> <property name="visible">True</property> <property name="xalign">0</property> + <property name="label" translatable="yes">Type:</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label65"> + <widget class="GtkLabel" id="label_tableid"> <property name="visible">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes">Type:</property> </widget> <packing> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label_tabletype"> + <widget class="GtkLabel" id="label63"> <property name="visible">True</property> <property name="xalign">0</property> + <property name="label" translatable="yes">ID:</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> @@ -464,24 +464,24 @@ <property name="column_spacing">8</property> <property name="row_spacing">2</property> <child> - <widget class="GtkLabel" id="label67"> + <widget class="GtkLabel" id="label_personname"> <property name="visible">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes">Name:</property> </widget> <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label_personname"> + <widget class="GtkLabel" id="label67"> <property name="visible">True</property> <property name="xalign">0</property> + <property name="label" translatable="yes">Name:</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> @@ -534,665 +534,6 @@ </widget> </child> </widget> - <widget class="GtkWindow" id="window_bidbox"> - <property name="visible">True</property> - <property name="title" translatable="yes">Bidding Box</property> - <property name="resizable">False</property> - <property name="skip_taskbar_hint">True</property> - <property name="focus_on_map">False</property> - <property name="gravity">GDK_GRAVITY_NORTH_EAST</property> - <signal name="delete_event" handler="on_window_bidbox_delete_event"/> - <child> - <widget class="GtkVBox" id="calls"> - <property name="visible">True</property> - <child> - <widget class="GtkButton" id="button_pass"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Pass</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - <child> - <widget class="GtkHSeparator" id="hseparator2"> - <property name="visible">True</property> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">1</property> - </packing> - </child> - <child> - <widget class="GtkTable" id="table_bids"> - <property name="visible">True</property> - <property name="n_rows">7</property> - <property name="n_columns">5</property> - <child> - <widget class="GtkButton" id="button_bid_1_nt"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">1NT</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_1_spade"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">1♠</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_1_heart"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">1♥</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_1_diamond"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">1♦</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_1_club"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">1♣</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_3_diamond"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">3♦</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_2_diamond"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">2♦</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_2_club"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">2♣</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_2_nt"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">2NT</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_3_nt"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">3NT</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_4_nt"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">4NT</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_5_nt"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">5NT</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_6_nt"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">6NT</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_7_nt"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">7NT</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">6</property> - <property name="bottom_attach">7</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_7_spade"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">7♠</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">6</property> - <property name="bottom_attach">7</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_7_heart"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">7♥</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">6</property> - <property name="bottom_attach">7</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_7_diamond"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">7♦</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">6</property> - <property name="bottom_attach">7</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_7_club"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">7♣</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="top_attach">6</property> - <property name="bottom_attach">7</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_6_club"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">6♣</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_6_diamond"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">6♦</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_6_heart"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">6♥</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_6_spade"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">6♠</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_5_heart"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">5♥</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_5_diamond"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">5♦</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_5_club"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">5♣</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_4_club"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">4♣</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_4_diamond"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">4♦</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_4_heart"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">4♥</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_4_spade"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">4♠</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_3_heart"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">3♥</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_3_club"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">3♣</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_2_heart"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">2♥</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_2_spade"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">2♠</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_3_spade"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">3♠</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="button_bid_5_spade"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">5♠</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - <packing> - <property name="position">2</property> - </packing> - </child> - <child> - <widget class="GtkHSeparator" id="hseparator1"> - <property name="visible">True</property> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">3</property> - </packing> - </child> - <child> - <widget class="GtkHBox" id="doubles"> - <property name="visible">True</property> - <child> - <widget class="GtkButton" id="button_double"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Double</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - </child> - <child> - <widget class="GtkButton" id="button_redouble"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Redouble</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - </widget> - <packing> - <property name="position">4</property> - </packing> - </child> - </widget> - </child> - </widget> <widget class="GtkDialog" id="dialog_connection"> <property name="visible">True</property> <property name="title" translatable="yes">Connect to Server</property> @@ -1227,30 +568,23 @@ <property name="column_spacing">8</property> <property name="row_spacing">4</property> <child> - <widget class="GtkLabel" id="label_portnum"> + <widget class="GtkEntry" id="entry_portnum"> + <property name="width_request">80</property> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Port:</property> + <property name="can_focus">True</property> + <property name="max_length">5</property> + <property name="invisible_char">*</property> + <signal name="changed" handler="on_field_changed"/> </widget> <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label_hostname"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Host Name:</property> - </widget> - <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> <widget class="GtkEntry" id="entry_hostname"> <property name="width_request">140</property> <property name="visible">True</property> @@ -1265,19 +599,26 @@ </packing> </child> <child> - <widget class="GtkEntry" id="entry_portnum"> - <property name="width_request">80</property> + <widget class="GtkLabel" id="label_hostname"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="max_length">5</property> - <property name="invisible_char">*</property> - <signal name="changed" handler="on_field_changed"/> + <property name="xalign">0</property> + <property name="label" translatable="yes">Host Name:</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label_portnum"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Port:</property> + </widget> + <packing> <property name="top_attach">1</property> <property name="bottom_attach">2</property> + <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> @@ -1320,26 +661,20 @@ <property name="column_spacing">8</property> <property name="row_spacing">4</property> <child> - <widget class="GtkLabel" id="label_username"> + <widget class="GtkEntry" id="entry_password"> + <property name="width_request">120</property> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">User Name:</property> + <property name="can_focus">True</property> + <property name="max_length">40</property> + <property name="visibility">False</property> + <property name="invisible_char">*</property> + <signal name="changed" handler="on_field_changed"/> </widget> <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label_password"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Password:</property> - </widget> - <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> @@ -1359,23 +694,29 @@ </packing> </child> <child> - <widget class="GtkEntry" id="entry_password"> - <property name="width_request">120</property> + <widget class="GtkLabel" id="label_password"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="max_length">40</property> - <property name="visibility">False</property> - <property name="invisible_char">*</property> - <signal name="changed" handler="on_field_changed"/> + <property name="xalign">0</property> + <property name="label" translatable="yes">Password:</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> + <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> + <child> + <widget class="GtkLabel" id="label_username"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">User Name:</property> + </widget> + <packing> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> </widget> </child> <child> @@ -1498,6 +839,16 @@ <property name="column_spacing">4</property> <property name="row_spacing">2</property> <child> + <widget class="GtkLabel" id="label_tablename"> + <property name="visible">True</property> + <property name="label" translatable="yes">Table Name:</property> + </widget> + <packing> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> <widget class="GtkEntry" id="entry_tablename"> <property name="width_request">140</property> <property name="visible">True</property> @@ -1511,16 +862,6 @@ <property name="y_options"></property> </packing> </child> - <child> - <widget class="GtkLabel" id="label_tablename"> - <property name="visible">True</property> - <property name="label" translatable="yes">Table Name:</property> - </widget> - <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> </widget> </child> </widget> @@ -1790,23 +1131,14 @@ <property name="column_spacing">8</property> <property name="row_spacing">2</property> <child> - <widget class="GtkLabel" id="label59"> + <widget class="GtkLabel" id="label_vuln"> <property name="visible">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes">Dealer:</property> + <property name="use_markup">True</property> </widget> <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label60"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Vulnerability:</property> - </widget> - <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> @@ -1826,20 +1158,29 @@ </packing> </child> <child> - <widget class="GtkLabel" id="label_vuln"> + <widget class="GtkLabel" id="label60"> <property name="visible">True</property> <property name="xalign">0</property> - <property name="use_markup">True</property> + <property name="label" translatable="yes">Vulnerability:</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> + <child> + <widget class="GtkLabel" id="label59"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Dealer:</property> + </widget> + <packing> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> </widget> <packing> <property name="expand">False</property> @@ -2113,72 +1454,6 @@ <property name="column_spacing">8</property> <property name="row_spacing">4</property> <child> - <widget class="GtkFileChooserButton" id="background"> - <property name="width_request">160</property> - <property name="visible">True</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <signal name="selection_changed" handler="on_background_changed"/> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - </packing> - </child> - <child> - <widget class="GtkComboBox" id="cardstyle"> - <property name="width_request">160</property> - <property name="visible">True</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <signal name="changed" handler="on_cardstyle_changed"/> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label_background"> - <property name="visible">True</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Background:</property> - </widget> - <packing> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label_cardstyle"> - <property name="visible">True</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Card Style:</property> - </widget> - <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label_suitcolours"> - <property name="visible">True</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Suit Colours:</property> - </widget> - <packing> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> <widget class="GtkHBox" id="hbox2"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -2275,6 +1550,72 @@ <property name="bottom_attach">3</property> </packing> </child> + <child> + <widget class="GtkLabel" id="label_suitcolours"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Suit Colours:</property> + </widget> + <packing> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label_cardstyle"> + <property name="visible">True</property> + ... [truncated message content] |
From: <umg...@us...> - 2007-06-23 14:47:11
|
Revision: 447 http://svn.sourceforge.net/pybridge/?rev=447&view=rev Author: umgangee Date: 2007-06-23 07:47:07 -0700 (Sat, 23 Jun 2007) Log Message: ----------- Add hash method to Call and Bid objects, to enable their use in dicts as keys. Replace __str__ with __repr__. Modified Paths: -------------- trunk/pybridge/pybridge/bridge/call.py Modified: trunk/pybridge/pybridge/bridge/call.py =================================================================== --- trunk/pybridge/pybridge/bridge/call.py 2007-06-23 11:27:56 UTC (rev 446) +++ trunk/pybridge/pybridge/bridge/call.py 2007-06-23 14:47:07 UTC (rev 447) @@ -24,7 +24,14 @@ class Call(pb.Copyable, pb.RemoteCopy): """Abstract class, inherited by Bid, Pass, Double and Redouble.""" + def __hash__(self): + return hash(self.__class__.__name__) + + def __repr__(self): + return "%s()" % self.__class__.__name__ + + class Bid(Call): """A Bid represents a statement of a level and a strain. @@ -60,10 +67,14 @@ return 1 - def __str__(self): - return "%s %s" % (self.level, self.strain) + def __hash__(self): + return hash((self.level, self.strain)) + def __repr__(self): + return "Bid(%s, %s)" % (self.level, self.strain) + + def getStateToCopy(self): return self.level, self.strain @@ -78,29 +89,20 @@ class Pass(Call): """A Pass represents an abstention from the bidding.""" - def __str__(self): - return "Pass" - pb.setUnjellyableForClass(Pass, Pass) class Double(Call): """A Double over an opponent's current bid.""" - def __str__(self): - return "Double" - pb.setUnjellyableForClass(Double, Double) class Redouble(Call): """A Redouble over an opponent's double of partnership's current bid.""" - def __str__(self): - return "Redouble" - pb.setUnjellyableForClass(Redouble, Redouble) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-23 11:28:00
|
Revision: 446 http://svn.sourceforge.net/pybridge/?rev=446&view=rev Author: umgangee Date: 2007-06-23 04:27:56 -0700 (Sat, 23 Jun 2007) Log Message: ----------- Enhancements to dialog_preferences window. Modified Paths: -------------- trunk/pybridge/glade/pybridge.glade Modified: trunk/pybridge/glade/pybridge.glade =================================================================== --- trunk/pybridge/glade/pybridge.glade 2007-06-22 15:50:38 UTC (rev 445) +++ trunk/pybridge/glade/pybridge.glade 2007-06-23 11:27:56 UTC (rev 446) @@ -326,51 +326,51 @@ <property name="column_spacing">8</property> <property name="row_spacing">2</property> <child> - <widget class="GtkLabel" id="label_tabletype"> + <widget class="GtkLabel" id="label63"> <property name="visible">True</property> <property name="xalign">0</property> + <property name="label" translatable="yes">ID:</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label65"> + <widget class="GtkLabel" id="label_tableid"> <property name="visible">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes">Type:</property> </widget> <packing> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label_tableid"> + <widget class="GtkLabel" id="label65"> <property name="visible">True</property> <property name="xalign">0</property> + <property name="label" translatable="yes">Type:</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label63"> + <widget class="GtkLabel" id="label_tabletype"> <property name="visible">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes">ID:</property> </widget> <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> @@ -464,24 +464,24 @@ <property name="column_spacing">8</property> <property name="row_spacing">2</property> <child> - <widget class="GtkLabel" id="label_personname"> + <widget class="GtkLabel" id="label67"> <property name="visible">True</property> <property name="xalign">0</property> + <property name="label" translatable="yes">Name:</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label67"> + <widget class="GtkLabel" id="label_personname"> <property name="visible">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes">Name:</property> </widget> <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> @@ -574,27 +574,25 @@ <property name="n_rows">7</property> <property name="n_columns">5</property> <child> - <widget class="GtkButton" id="button_bid_5_spade"> + <widget class="GtkButton" id="button_bid_1_nt"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">5♠</property> + <property name="label" translatable="yes">1NT</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> + <property name="left_attach">4</property> + <property name="right_attach">5</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_3_spade"> + <widget class="GtkButton" id="button_bid_1_spade"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">3♠</property> + <property name="label" translatable="yes">1♠</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> @@ -602,198 +600,208 @@ <packing> <property name="left_attach">3</property> <property name="right_attach">4</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_2_spade"> + <widget class="GtkButton" id="button_bid_1_heart"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">2♠</property> + <property name="label" translatable="yes">1♥</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> + <property name="left_attach">2</property> + <property name="right_attach">3</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_2_heart"> + <widget class="GtkButton" id="button_bid_1_diamond"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">2♥</property> + <property name="label" translatable="yes">1♦</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_3_club"> + <widget class="GtkButton" id="button_bid_1_club"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">3♣</property> + <property name="label" translatable="yes">1♣</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_3_heart"> + <widget class="GtkButton" id="button_bid_3_diamond"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">3♥</property> + <property name="label" translatable="yes">3♦</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="top_attach">2</property> <property name="bottom_attach">3</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_4_spade"> + <widget class="GtkButton" id="button_bid_2_diamond"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">4♠</property> + <property name="label" translatable="yes">2♦</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_4_heart"> + <widget class="GtkButton" id="button_bid_2_club"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">4♥</property> + <property name="label" translatable="yes">2♣</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_4_diamond"> + <widget class="GtkButton" id="button_bid_2_nt"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">4♦</property> + <property name="label" translatable="yes">2NT</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_4_club"> + <widget class="GtkButton" id="button_bid_3_nt"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">4♣</property> + <property name="label" translatable="yes">3NT</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkButton" id="button_bid_4_nt"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">4NT</property> + <property name="relief">GTK_RELIEF_NONE</property> + <property name="use_underline">True</property> + <signal name="clicked" handler="on_call_clicked"/> + </widget> + <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> <property name="top_attach">3</property> <property name="bottom_attach">4</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_5_club"> + <widget class="GtkButton" id="button_bid_5_nt"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">5♣</property> + <property name="label" translatable="yes">5NT</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> <property name="top_attach">4</property> <property name="bottom_attach">5</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_5_diamond"> + <widget class="GtkButton" id="button_bid_6_nt"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">5♦</property> + <property name="label" translatable="yes">6NT</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_5_heart"> + <widget class="GtkButton" id="button_bid_7_nt"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">5♥</property> + <property name="label" translatable="yes">7NT</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_6_spade"> + <widget class="GtkButton" id="button_bid_7_spade"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">6♠</property> + <property name="label" translatable="yes">7♠</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> @@ -801,16 +809,16 @@ <packing> <property name="left_attach">3</property> <property name="right_attach">4</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_6_heart"> + <widget class="GtkButton" id="button_bid_7_heart"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">6♥</property> + <property name="label" translatable="yes">7♥</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> @@ -818,16 +826,16 @@ <packing> <property name="left_attach">2</property> <property name="right_attach">3</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_6_diamond"> + <widget class="GtkButton" id="button_bid_7_diamond"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">6♦</property> + <property name="label" translatable="yes">7♦</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> @@ -835,46 +843,46 @@ <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_6_club"> + <widget class="GtkButton" id="button_bid_7_club"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">6♣</property> + <property name="label" translatable="yes">7♣</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_7_club"> + <widget class="GtkButton" id="button_bid_6_club"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">7♣</property> + <property name="label" translatable="yes">6♣</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="top_attach">6</property> - <property name="bottom_attach">7</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_7_diamond"> + <widget class="GtkButton" id="button_bid_6_diamond"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">7♦</property> + <property name="label" translatable="yes">6♦</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> @@ -882,16 +890,16 @@ <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> - <property name="top_attach">6</property> - <property name="bottom_attach">7</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_7_heart"> + <widget class="GtkButton" id="button_bid_6_heart"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">7♥</property> + <property name="label" translatable="yes">6♥</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> @@ -899,16 +907,16 @@ <packing> <property name="left_attach">2</property> <property name="right_attach">3</property> - <property name="top_attach">6</property> - <property name="bottom_attach">7</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_7_spade"> + <widget class="GtkButton" id="button_bid_6_spade"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">7♠</property> + <property name="label" translatable="yes">6♠</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> @@ -916,210 +924,215 @@ <packing> <property name="left_attach">3</property> <property name="right_attach">4</property> - <property name="top_attach">6</property> - <property name="bottom_attach">7</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_7_nt"> + <widget class="GtkButton" id="button_bid_5_heart"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">7NT</property> + <property name="label" translatable="yes">5♥</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">6</property> - <property name="bottom_attach">7</property> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_6_nt"> + <widget class="GtkButton" id="button_bid_5_diamond"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">6NT</property> + <property name="label" translatable="yes">5♦</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_5_nt"> + <widget class="GtkButton" id="button_bid_5_club"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">5NT</property> + <property name="label" translatable="yes">5♣</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> <property name="top_attach">4</property> <property name="bottom_attach">5</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_4_nt"> + <widget class="GtkButton" id="button_bid_4_club"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">4NT</property> + <property name="label" translatable="yes">4♣</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> <property name="top_attach">3</property> <property name="bottom_attach">4</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_3_nt"> + <widget class="GtkButton" id="button_bid_4_diamond"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">3NT</property> + <property name="label" translatable="yes">4♦</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_2_nt"> + <widget class="GtkButton" id="button_bid_4_heart"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">2NT</property> + <property name="label" translatable="yes">4♥</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_2_club"> + <widget class="GtkButton" id="button_bid_4_spade"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">2♣</property> + <property name="label" translatable="yes">4♠</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_2_diamond"> + <widget class="GtkButton" id="button_bid_3_heart"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">2♦</property> + <property name="label" translatable="yes">3♥</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_3_diamond"> + <widget class="GtkButton" id="button_bid_3_club"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">3♦</property> + <property name="label" translatable="yes">3♣</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> <property name="top_attach">2</property> <property name="bottom_attach">3</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_1_club"> + <widget class="GtkButton" id="button_bid_2_heart"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">1♣</property> + <property name="label" translatable="yes">2♥</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_1_diamond"> + <widget class="GtkButton" id="button_bid_2_spade"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">1♦</property> + <property name="label" translatable="yes">2♠</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_1_heart"> + <widget class="GtkButton" id="button_bid_3_spade"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">1♥</property> + <property name="label" translatable="yes">3♠</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkButton" id="button_bid_1_spade"> + <widget class="GtkButton" id="button_bid_5_spade"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">1♠</property> + <property name="label" translatable="yes">5♠</property> <property name="relief">GTK_RELIEF_NONE</property> <property name="use_underline">True</property> <signal name="clicked" handler="on_call_clicked"/> @@ -1127,24 +1140,11 @@ <packing> <property name="left_attach">3</property> <property name="right_attach">4</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> <property name="y_options"></property> </packing> </child> - <child> - <widget class="GtkButton" id="button_bid_1_nt"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">1NT</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_call_clicked"/> - </widget> - <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="y_options"></property> - </packing> - </child> </widget> <packing> <property name="position">2</property> @@ -1218,7 +1218,7 @@ <property name="visible">True</property> <property name="top_padding">4</property> <property name="bottom_padding">4</property> - <property name="left_padding">12</property> + <property name="left_padding">16</property> <child> <widget class="GtkTable" id="table1"> <property name="visible">True</property> @@ -1227,23 +1227,30 @@ <property name="column_spacing">8</property> <property name="row_spacing">4</property> <child> - <widget class="GtkEntry" id="entry_portnum"> - <property name="width_request">80</property> + <widget class="GtkLabel" id="label_portnum"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="max_length">5</property> - <property name="invisible_char">*</property> - <signal name="changed" handler="on_field_changed"/> + <property name="xalign">0</property> + <property name="label" translatable="yes">Port:</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> + <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> + <widget class="GtkLabel" id="label_hostname"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Host Name:</property> + </widget> + <packing> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> <widget class="GtkEntry" id="entry_hostname"> <property name="width_request">140</property> <property name="visible">True</property> @@ -1258,26 +1265,19 @@ </packing> </child> <child> - <widget class="GtkLabel" id="label_hostname"> + <widget class="GtkEntry" id="entry_portnum"> + <property name="width_request">80</property> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Host Name:</property> + <property name="can_focus">True</property> + <property name="max_length">5</property> + <property name="invisible_char">*</property> + <signal name="changed" handler="on_field_changed"/> </widget> <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label_portnum"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Port:</property> - </widget> - <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> @@ -1286,7 +1286,7 @@ </widget> </child> <child> - <widget class="GtkLabel" id="label61"> + <widget class="GtkLabel" id="label_server"> <property name="visible">True</property> <property name="label" translatable="yes"><b>Server Address</b></property> <property name="use_markup">True</property> @@ -1307,7 +1307,7 @@ <property name="visible">True</property> <property name="top_padding">4</property> <property name="bottom_padding">4</property> - <property name="left_padding">12</property> + <property name="left_padding">16</property> <child> <widget class="GtkVBox" id="vbox18"> <property name="visible">True</property> @@ -1320,20 +1320,26 @@ <property name="column_spacing">8</property> <property name="row_spacing">4</property> <child> - <widget class="GtkEntry" id="entry_password"> - <property name="width_request">120</property> + <widget class="GtkLabel" id="label_username"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="max_length">40</property> - <property name="visibility">False</property> - <property name="invisible_char">*</property> - <signal name="changed" handler="on_field_changed"/> + <property name="xalign">0</property> + <property name="label" translatable="yes">User Name:</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label_password"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Password:</property> + </widget> + <packing> <property name="top_attach">1</property> <property name="bottom_attach">2</property> + <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> @@ -1353,29 +1359,23 @@ </packing> </child> <child> - <widget class="GtkLabel" id="label_password"> + <widget class="GtkEntry" id="entry_password"> + <property name="width_request">120</property> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Password:</property> + <property name="can_focus">True</property> + <property name="max_length">40</property> + <property name="visibility">False</property> + <property name="invisible_char">*</property> + <signal name="changed" handler="on_field_changed"/> </widget> <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> - <child> - <widget class="GtkLabel" id="label_username"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">User Name:</property> - </widget> - <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> </widget> </child> <child> @@ -1498,16 +1498,6 @@ <property name="column_spacing">4</property> <property name="row_spacing">2</property> <child> - <widget class="GtkLabel" id="label_tablename"> - <property name="visible">True</property> - <property name="label" translatable="yes">Table Name:</property> - </widget> - <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> <widget class="GtkEntry" id="entry_tablename"> <property name="width_request">140</property> <property name="visible">True</property> @@ -1521,6 +1511,16 @@ <property name="y_options"></property> </packing> </child> + <child> + <widget class="GtkLabel" id="label_tablename"> + <property name="visible">True</property> + <property name="label" translatable="yes">Table Name:</property> + </widget> + <packing> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> </widget> </child> </widget> @@ -1790,14 +1790,23 @@ <property name="column_spacing">8</property> <property name="row_spacing">2</property> <child> - <widget class="GtkLabel" id="label_vuln"> + <widget class="GtkLabel" id="label59"> <property name="visible">True</property> <property name="xalign">0</property> - <property name="use_markup">True</property> + <property name="label" translatable="yes">Dealer:</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label60"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Vulnerability:</property> + ... [truncated message content] |
From: <umg...@us...> - 2007-06-22 15:50:40
|
Revision: 445 http://svn.sourceforge.net/pybridge/?rev=445&view=rev Author: umgangee Date: 2007-06-22 08:50:38 -0700 (Fri, 22 Jun 2007) Log Message: ----------- Enhance documentation for 0.3.0. Modified Paths: -------------- trunk/pybridge/INSTALL trunk/pybridge/README Modified: trunk/pybridge/INSTALL =================================================================== --- trunk/pybridge/INSTALL 2007-06-22 15:42:48 UTC (rev 444) +++ trunk/pybridge/INSTALL 2007-06-22 15:50:38 UTC (rev 445) @@ -2,25 +2,52 @@ =================== If you want to install PyBridge, change to the directory where you unpacked the -tarball, then type (as root): +source tarball, then type (as root): python setup.py install -Alternatively, you can run PyBridge from the extracted tarball. Change to the -PyBridge "bin/" directory, then type "./pybridge" to run the client, or -"./pybridge-server" to run the game server. +We recommend that, if your distribution provides PyBridge packages, you should +install from packages. Packages are available for Debian GNU/Linux and its +derivatives (including Ubuntu) thanks to David Watson <dw...@de...>. +Alternatively, you can run PyBridge from the extracted tarball archive. Change +to the PyBridge "bin/" directory, then type "./pybridge" to run the graphical +client, or "./pybridge-server" to run the standalone server. + Requirements ============ -You'll need the following software installed to run PyBridge: +You will need the following software installed to run PyBridge: -- Python (>= 2.3) - http://www.python.org/ -- Twisted Core (>= 1.3) - http://twistedmatrix.com/trac/wiki/TwistedCore -- Zope Interface (>= 3.0) - http://www.zope.org/Products/ZopeInterface -- GTK+ (>= 2.6, >= 2.8 recommended) - http://www.gtk.org/ -- PyGTK (>= 2.6, >= 2.8 recommended) - http://www.pygtk.org/ + - Python (>= 2.4) - http://www.python.org/ + - Twisted Core (>= 2.0) - http://twistedmatrix.com/trac/wiki/TwistedCore + - Zope Interface (>= 3.0) - http://www.zope.org/Products/ZopeInterface -(The GTK+ and PyGTK libraries are not necessary to run the standalone server.) +To run the PyBridge client, the following software is also required: + + - GTK+ (>= 2.8) - http://www.gtk.org/ + - PyGTK (>= 2.8) - http://www.pygtk.org/ + - Cairo (>= 1.0) - http://cairographics.org/ + - PyCairo (>= 1.0) - http://cairographics.org/pycairo/ + - ConfigObj (>= 4.0) -http://www.voidspace.org.uk/python/configobj.html + + +To run the standalone PyBridge server, the following software is also required: + + - SQLObject (>= 0.7) - http://www.sqlobject.org/ + - A database server compatible with SQLObject: see "Configuring the Server". + + +Configuring the Server +====================== + +By default, the standalone server creates and uses a SQLite database in the +~/.pybridge/ directory. This is suitable for hosting LAN games, but if you wish +to operate a high-load PyBridge server on the Internet, it may be necessary +to switch to an external RDBMS, such as MySQL or PostgreSQL. + +To change the database settings, edit the ~/.pybridge/server.cfg file. The +fields to change are documented in the pybridge/server/config.py module. + Modified: trunk/pybridge/README =================================================================== --- trunk/pybridge/README 2007-06-22 15:42:48 UTC (rev 444) +++ trunk/pybridge/README 2007-06-22 15:50:38 UTC (rev 445) @@ -1,13 +1,16 @@ -PyBridge 0.2.1 - a free online bridge game +PyBridge 0.3.0 - a free online bridge game http://pybridge.sourceforge.net/ http://sourceforge.net/projects/pybridge/ +About PyBridge +============== + PyBridge allows you to play the card game of (contract) bridge, with human players, over the Internet or a local network. There are many Web resources for learning to play bridge. A good starting point -is the Wikipedia: see http://en.wikipedia.org/wiki/Contract_bridge . +is the Wikipedia: see http://en.wikipedia.org/wiki/Contract_bridge. Release Notes @@ -15,10 +18,10 @@ To use PyBridge, you need to connect to a game server. You have two options: -- Connect to a public server. A list of known public servers can be found on - the project website. + - Connect to a public server. A list of known public servers can be found on + the project website. -- Run a game server yourself, with the pybridge-server script. + - Run a game server yourself, using the pybridge-server script. When connecting to a server for the first time, you need to ensure that the "Register as New User" checkbox is ticked. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-22 15:42:46
|
Revision: 444 http://svn.sourceforge.net/pybridge/?rev=444&view=rev Author: umgangee Date: 2007-06-22 08:42:48 -0700 (Fri, 22 Jun 2007) Log Message: ----------- Relocate translatable bridge elements to vocabulary module. Modified Paths: -------------- trunk/pybridge/pybridge/ui/dialog_preferences.py Modified: trunk/pybridge/pybridge/ui/dialog_preferences.py =================================================================== --- trunk/pybridge/pybridge/ui/dialog_preferences.py 2007-06-22 15:40:14 UTC (rev 443) +++ trunk/pybridge/pybridge/ui/dialog_preferences.py 2007-06-22 15:42:48 UTC (rev 444) @@ -23,17 +23,10 @@ import pybridge.environment as env from config import config from manager import wm +from vocabulary import * from pybridge.bridge.symbols import Suit -SUIT_NAMES = {Suit.Club: _('Club'), Suit.Diamond: _('Diamond'), - Suit.Heart: _('Heart'), Suit.Spade: _('Spade') } - -SUIT_SYMBOLS = {Suit.Club: u'\N{BLACK CLUB SUIT}', - Suit.Diamond: u'\N{BLACK DIAMOND SUIT}', - Suit.Heart: u'\N{BLACK HEART SUIT}', - Suit.Spade: u'\N{BLACK SPADE SUIT}' } - SUIT_LABEL_TEMPLATE = "<span color=\'%s\' size=\'xx-large\'>%s</span>" @@ -43,10 +36,11 @@ def setUp(self): - # Allow user to select only image files for background. + # Allow user to select only PNG images for background. filter_pixbufs = gtk.FileFilter() - filter_pixbufs.add_pixbuf_formats() - filter_pixbufs.set_name(_('Images')) + #filter_pixbufs.add_pixbuf_formats() + filter_pixbufs.add_pattern('*.png') + filter_pixbufs.set_name(_('PNG images')) self.background.add_filter(filter_pixbufs) # Build a list of card decks from which the user may choose. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-22 15:40:34
|
Revision: 443 http://svn.sourceforge.net/pybridge/?rev=443&view=rev Author: umgangee Date: 2007-06-22 08:40:14 -0700 (Fri, 22 Jun 2007) Log Message: ----------- Load the saved port number from correct field in config file. Modified Paths: -------------- trunk/pybridge/pybridge/ui/dialog_connection.py Modified: trunk/pybridge/pybridge/ui/dialog_connection.py =================================================================== --- trunk/pybridge/pybridge/ui/dialog_connection.py 2007-06-22 15:37:46 UTC (rev 442) +++ trunk/pybridge/pybridge/ui/dialog_connection.py 2007-06-22 15:40:14 UTC (rev 443) @@ -37,7 +37,7 @@ connection = config['Connection'] if connection: self.entry_hostname.set_text(connection.get('HostAddress', 'localhost')) - self.entry_portnum.set_text(str(connection.get('Port', TCP_PORT))) + self.entry_portnum.set_text(str(connection.get('PortNumber', TCP_PORT))) self.entry_username.set_text(connection.get('Username', '')) password = connection.get('Password', '').decode('rot13') self.entry_password.set_text(password) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-22 15:37:47
|
Revision: 442 http://svn.sourceforge.net/pybridge/?rev=442&view=rev Author: umgangee Date: 2007-06-22 08:37:46 -0700 (Fri, 22 Jun 2007) Log Message: ----------- Remove reference to obsolete pybridge.settings module. Modified Paths: -------------- trunk/pybridge/pybridge/ui/__init__.py Modified: trunk/pybridge/pybridge/ui/__init__.py =================================================================== --- trunk/pybridge/pybridge/ui/__init__.py 2007-06-22 15:34:52 UTC (rev 441) +++ trunk/pybridge/pybridge/ui/__init__.py 2007-06-22 15:37:46 UTC (rev 442) @@ -22,12 +22,10 @@ from twisted.internet import reactor -import pybridge.environment as env -from pybridge.settings import Settings - import locale import gettext locale.setlocale(locale.LC_ALL, '') +import pybridge.environment as env gettext.bindtextdomain('pybridge', env.get_localedir()) gettext.textdomain('pybridge') gettext.install('pybridge') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-22 15:34:51
|
Revision: 441 http://svn.sourceforge.net/pybridge/?rev=441&view=rev Author: umgangee Date: 2007-06-22 08:34:52 -0700 (Fri, 22 Jun 2007) Log Message: ----------- Push version number to 0.3.0, add extra metadata. Modified Paths: -------------- trunk/pybridge/pybridge/__init__.py Modified: trunk/pybridge/pybridge/__init__.py =================================================================== --- trunk/pybridge/pybridge/__init__.py 2007-06-22 15:33:12 UTC (rev 440) +++ trunk/pybridge/pybridge/__init__.py 2007-06-22 15:34:52 UTC (rev 441) @@ -1 +1,10 @@ -__version__ = '0.2.1' +""" +PyBridge - a free online bridge game. +""" + +__version__ = '0.3.0' + +__author__ = 'Michael Banks <mi...@ba...>' +__license__ = 'GNU General Public License, Version 2 or later' +__url__ = 'http://pybridge.sourceforge.net/' + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-22 15:33:14
|
Revision: 440 http://svn.sourceforge.net/pybridge/?rev=440&view=rev Author: umgangee Date: 2007-06-22 08:33:12 -0700 (Fri, 22 Jun 2007) Log Message: ----------- Use ConfigObj to manage database connection configuration, remove homebrew ConfigParser wrapper. Modified Paths: -------------- trunk/pybridge/pybridge/server/__init__.py trunk/pybridge/pybridge/server/database.py Added Paths: ----------- trunk/pybridge/pybridge/server/config.py Removed Paths: ------------- trunk/pybridge/pybridge/settings.py Modified: trunk/pybridge/pybridge/server/__init__.py =================================================================== --- trunk/pybridge/pybridge/server/__init__.py 2007-06-22 15:30:41 UTC (rev 439) +++ trunk/pybridge/pybridge/server/__init__.py 2007-06-22 15:33:12 UTC (rev 440) @@ -19,11 +19,13 @@ from twisted.cred import checkers, credentials, portal from twisted.spread import pb +import config +config.load() + from pybridge.server.checker import Checker from pybridge.server.realm import Realm from pybridge.server.server import Server - server = Server() realm = Realm() checker = Checker() Added: trunk/pybridge/pybridge/server/config.py =================================================================== --- trunk/pybridge/pybridge/server/config.py (rev 0) +++ trunk/pybridge/pybridge/server/config.py 2007-06-22 15:33:12 UTC (rev 440) @@ -0,0 +1,55 @@ +# PyBridge -- online contract bridge made easy. +# Copyright (C) 2004-2007 PyBridge Project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +""" +Manages PyBridge server configuration file. +""" + +from StringIO import StringIO +from configobj import ConfigObj +from validate import Validator + +import pybridge.environment as env + +# Config spec +spec = StringIO("""# PyBridge server configuration file + +[Database] + Engine = option('sqlite', 'sapdb', 'postgresql', 'firebird', 'maxdb', 'sybase', 'interbase', 'psycopg', 'mysql', 'mssql', 'postgres', default='sqlite') + DatabaseName = string # Or path to database file if using sqlite. + User = string # Not used with sqlite. + Password = string # Not used with sqlite. + Host = string # Leave empty for localhost. + Port = integer # Leave empty for default. +""") + + +config = None +val = Validator() + +def load(): + global config + filename = env.find_config_server('server.cfg') + config = ConfigObj(filename, create_empty=True, configspec=spec) + config.validate(val, copy=True) + +def save(): + global config + config.validate(val, copy=True) + config.write() + Modified: trunk/pybridge/pybridge/server/database.py =================================================================== --- trunk/pybridge/pybridge/server/database.py 2007-06-22 15:30:41 UTC (rev 439) +++ trunk/pybridge/pybridge/server/database.py 2007-06-22 15:33:12 UTC (rev 440) @@ -22,48 +22,51 @@ from sqlobject.inheritance import InheritableSQLObject from twisted.python import log -import pybridge.environment as env -from pybridge.settings import Settings +from config import config +from pybridge import environment as env -# TODO: when fields are not empty, avoid writing default values to fields. - -configfile = env.find_config_server('server.cfg') -settings = Settings(configfile, ['database']) - - # Initiate connection to the appropriate database backend. # See http://sqlobject.org/SQLObject.html#declaring-the-class # This code has been tested with the SQLite database backend. If you experience # problems with databases supported by SQLObject, please file a bug report. -backend = settings.database.get('backend', 'sqlite') # Default to SQLite. -settings.database['backend'] = backend +engine = config['Database'].get('Engine', 'sqlite') # Default to SQLite. -if backend == 'sqlite': - dbfile = settings.database.get('dbfile') - if dbfile is None: - dbfile = env.find_config_server('pybridge-server.db') - settings.database['dbfile'] = dbfile +if engine == 'sqlite': + dbfile = config['Database'].get('DatabaseName', + env.find_config_server('pybridge-server.db')) connection_string = "sqlite://" + dbfile + else: - username = settings.database.get('username', '') - password = settings.database.get('password', '') - hostname = settings.database.get('hostname', 'localhost') - dbname = settings.database.get('dbname', 'pybridge') - connection_string = "%s://%s:%s/%s" % (username, password, hostname, dbname) + username = config['Database'].get('Username', '') + password = config['Database'].get('Password', '') + host = config['Database'].get('Host', 'localhost') + port = config['Database'].get('Port', '') + dbname = config['Database'].get('DatabaseName', 'pybridge') -settings.save() + # Standard URI syntax (from http://sqlobject.org/SQLObject.html): + # scheme://[user[:password]@]host[:port]/database[?parameters] + connection_string = engine + '://' + if username: + connection_string += username + if password: + connection_string += ':' + password + connection_string += '@' + connection_string += host + if port: + connection_string += ':' + str(port) + connection_string += '/' + dbname try: connection = connectionForURI(connection_string) # TODO: fix for Win32. - log.msg("Connection to %s database succeeded" % backend) + log.msg("Connection to %s database succeeded" % engine) except Exception, e: log.err(e) log.msg("Could not connect to %s database with URI: %s" - % (backend, connection_string)) - log.msg("Please check configuration file %s" % configfile) + % (engine, connection_string)) + log.msg("Please check configuration file.") raise SystemExit # Database connection is required for server operation. sqlhub.processConnection = connection # Set all SQLObjects to use connection. Deleted: trunk/pybridge/pybridge/settings.py =================================================================== --- trunk/pybridge/pybridge/settings.py 2007-06-22 15:30:41 UTC (rev 439) +++ trunk/pybridge/pybridge/settings.py 2007-06-22 15:33:12 UTC (rev 440) @@ -1,53 +0,0 @@ -# PyBridge -- online contract bridge made easy. -# Copyright (C) 2004-2007 PyBridge Project. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -import ConfigParser - - -class Settings: - """A wrapper for ConfigParser.""" - - - def __init__(self, path, sections): - """Make section key/value pairs into attributes of this object. - - @param path: the location of configuration file to load. - @param sections: a list of section names to be made available. - """ - self._path = path - self._config = ConfigParser.SafeConfigParser() - self._config.read(path) - - for section in sections: - # Create sections if they do not exist. - if not self._config.has_section(section): - self._config.add_section(section) - # Make items in section available as - items = {} - for key, value in self._config.items(section): - items[key] = value - setattr(self, section.lower(), items) # self.<section> = items - - - def save(self): - """Writes contents of section/item dicts back to file.""" - for section in self._config.sections(): - for key, value in getattr(self, section.lower()).items(): - self._config.set(section, key, value) - self._config.write(file(self._path, 'w')) - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-22 15:30:39
|
Revision: 439 http://svn.sourceforge.net/pybridge/?rev=439&view=rev Author: umgangee Date: 2007-06-22 08:30:41 -0700 (Fri, 22 Jun 2007) Log Message: ----------- Use cardstyle/background specified by user in preferences, relocate translatable bridge elements to vocabulary module. Modified Paths: -------------- trunk/pybridge/pybridge/ui/canvas.py trunk/pybridge/pybridge/ui/cardarea.py Modified: trunk/pybridge/pybridge/ui/canvas.py =================================================================== --- trunk/pybridge/pybridge/ui/canvas.py 2007-06-22 15:26:18 UTC (rev 438) +++ trunk/pybridge/pybridge/ui/canvas.py 2007-06-22 15:30:41 UTC (rev 439) @@ -20,15 +20,16 @@ import cairo import pybridge.environment as env +from config import config class CairoCanvas(gtk.DrawingArea): - """Provides a simple canvas layer for . - - Overlapping items. - """ + """Provides a simple canvas layer for the display of graphics.""" - background_path = env.find_pixmap('baize.png') + # TODO: enhance documentation. + + background_path = config['Appearance'].get('Background', + env.find_pixmap('baize.png')) background = cairo.ImageSurface.create_from_png(background_path) pattern = cairo.SurfacePattern(background) pattern.set_extend(cairo.EXTEND_REPEAT) @@ -89,7 +90,8 @@ """ @param id: unique identifier for source. @param source: if specified, ImageSurface. - @param xy: if specified, tuple providing (x, y) coords for source in backing. + @param xy: if specified, tuple providing (x, y) coords for source + in backing. @param z_index: if specified, integer. @param opacity: if specified, integer in range 0 to 1. """ Modified: trunk/pybridge/pybridge/ui/cardarea.py =================================================================== --- trunk/pybridge/pybridge/ui/cardarea.py 2007-06-22 15:26:18 UTC (rev 438) +++ trunk/pybridge/pybridge/ui/cardarea.py 2007-06-22 15:30:41 UTC (rev 439) @@ -23,6 +23,8 @@ import pybridge.environment as env from canvas import CairoCanvas +from config import config +from vocabulary import * from pybridge.bridge.card import Card from pybridge.bridge.symbols import Direction, Rank, Suit @@ -36,10 +38,7 @@ # The red-black-red-black ordering convention. RED_BLACK = [Suit.Diamond, Suit.Club, Suit.Heart, Suit.Spade] -DIRECTION_SYMBOLS = {Direction.North : _('North'), Direction.East : _('East'), - Direction.South : _('South'), Direction.West : _('West') } - class CardArea(CairoCanvas): """This widget is a graphical display of tricks and hands of cards. @@ -47,7 +46,8 @@ """ # Load card mask. - card_mask_path = env.find_pixmap('bonded.png') + card_mask_file = config['Appearance'].get('CardStyle', 'bonded.png') + card_mask_path = env.find_pixmap(card_mask_file) card_mask = cairo.ImageSurface.create_from_png(card_mask_path) font_description = pango.FontDescription('Sans Bold 10') @@ -205,9 +205,9 @@ layout = pango.Layout(self.create_pango_context()) layout.set_font_description(self.font_description) if name is None: - layout.set_text('%s' % DIRECTION_SYMBOLS[position]) + layout.set_text('%s' % DIRECTION_NAMES[position]) else: - layout.set_text('%s: %s' % (DIRECTION_SYMBOLS[position], name)) + layout.set_text('%s: %s' % (DIRECTION_NAMES[position], name)) # Create an ImageSurface respective to dimensions of text. width, height = layout.get_pixel_size() @@ -264,7 +264,6 @@ self.set_trick(trick) - def set_trick(self, trick): """Sets the current trick. Draws representation of current trick to context. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-22 15:26:16
|
Revision: 438 http://svn.sourceforge.net/pybridge/?rev=438&view=rev Author: umgangee Date: 2007-06-22 08:26:18 -0700 (Fri, 22 Jun 2007) Log Message: ----------- Relocate translatable elements to vocabulary module, a few tweaks to appearance here and there. Modified Paths: -------------- trunk/pybridge/pybridge/ui/window_bridgetable.py Modified: trunk/pybridge/pybridge/ui/window_bridgetable.py =================================================================== --- trunk/pybridge/pybridge/ui/window_bridgetable.py 2007-06-22 15:23:33 UTC (rev 437) +++ trunk/pybridge/pybridge/ui/window_bridgetable.py 2007-06-22 15:26:18 UTC (rev 438) @@ -19,46 +19,18 @@ import gtk from wrapper import GladeWrapper -from cardarea import CardArea from pybridge.network.client import client +from pybridge.network.error import GameError + +from cardarea import CardArea from config import config from eventhandler import SimpleEventHandler from manager import WindowManager +from vocabulary import * from window_bidbox import WindowBidbox -from pybridge.network.error import GameError -from pybridge.bridge.call import Bid, Pass, Double, Redouble -from pybridge.bridge.symbols import Direction, Level, Strain, Rank, Vulnerable - -# Translatable symbols for elements of bridge. - -CALLTYPE_SYMBOLS = {Pass : _('pass'), Double : _('dbl'), Redouble : _('rdbl') } - -DIRECTION_SYMBOLS = {Direction.North : _('North'), Direction.East : _('East'), - Direction.South : _('South'), Direction.West : _('West') } - -LEVEL_SYMBOLS = {Level.One : _('1'), Level.Two : _('2'), Level.Three : _('3'), - Level.Four : _('4'), Level.Five : _('5'), Level.Six : _('6'), - Level.Seven : _('7') } - -RANK_SYMBOLS = {Rank.Two : _('2'), Rank.Three : _('3'), Rank.Four : _('4'), - Rank.Five : _('5'), Rank.Six : _('6'), Rank.Seven : _('7'), - Rank.Eight : _('8'), Rank.Nine : _('9'), Rank.Ten : _('10'), - Rank.Jack : _('J'), Rank.Queen : _('Q'), Rank.King : _('K'), - Rank.Ace : _('A') } - -STRAIN_SYMBOLS = {Strain.Club : u'\N{BLACK CLUB SUIT}', - Strain.Diamond : u'\N{BLACK DIAMOND SUIT}', - Strain.Heart : u'\N{BLACK HEART SUIT}', - Strain.Spade : u'\N{BLACK SPADE SUIT}', - Strain.NoTrump : u'NT' } - -VULN_SYMBOLS = {Vulnerable.All : _('All'), Vulnerable.NorthSouth : _('N/S'), - Vulnerable.EastWest : _('E/W'), Vulnerable.None : _('None') } - - class WindowBridgetable(GladeWrapper): glade_name = 'window_bridgetable' @@ -75,7 +47,7 @@ self.takeseat_items = {} menu = gtk.Menu() for position in Direction: - item = gtk.MenuItem(DIRECTION_SYMBOLS[position], True) + item = gtk.MenuItem(DIRECTION_NAMES[position], True) item.connect('activate', self.on_seat_activated, position) item.show() menu.append(item) @@ -91,13 +63,15 @@ self.cardarea.show() renderer = gtk.CellRendererText() + renderer.set_property('size-points', 12) + renderer.set_property('xalign', 0.5) # Set up bidding history and column display. self.call_store = gtk.ListStore(str, str, str, str) self.biddingview.set_model(self.call_store) for index, position in enumerate(Direction): - title = DIRECTION_SYMBOLS[position] - column = gtk.TreeViewColumn(str(title), renderer, text=index) + title = DIRECTION_NAMES[position] + column = gtk.TreeViewColumn(title, renderer, markup=index) column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) column.set_fixed_width(50) self.biddingview.append_column(column) @@ -106,8 +80,8 @@ self.trick_store = gtk.ListStore(str, str, str, str) self.trickview.set_model(self.trick_store) for index, position in enumerate(Direction): - title = DIRECTION_SYMBOLS[position] - column = gtk.TreeViewColumn(str(title), renderer, text=index) + title = DIRECTION_NAMES[position] + column = gtk.TreeViewColumn(str(title), renderer, markup=index) column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) column.set_fixed_width(50) self.trickview.append_column(column) @@ -222,11 +196,7 @@ while self.call_store.iter_next(iter) != None: iter = self.call_store.iter_next(iter) - if isinstance(call, Bid): - format = '%s%s' % (LEVEL_SYMBOLS[call.level], - STRAIN_SYMBOLS[call.strain]) - else: - format = CALLTYPE_SYMBOLS[call.__class__] + format = render_call(call) self.call_store.set(iter, column, format) @@ -244,13 +214,12 @@ if iter is None: iter = self.trick_store.append() - strain_equivalent = getattr(Strain, card.suit.key) # TODO: clean up. - format = '%s%s' % (RANK_SYMBOLS[card.rank], STRAIN_SYMBOLS[strain_equivalent]) + format = render_card(card) self.trick_store.set(iter, column, format) def addScore(self, contract, made, score): - textContract = self.formatContract(contract) + textContract = render_contract(contract) textMade = '%s' % made if contract['declarer'] in (Direction.North, Direction.South) and score > 0 \ or contract['declarer'] in (Direction.East, Direction.West) and score < 0: @@ -278,10 +247,8 @@ score = self.table.game.getScore() self.addScore(self.table.game.contract, declarerWon, score) - contractText = self.formatContract(self.table.game.contract) - fields = {'contract': self.formatContract(self.table.game.contract), + fields = {'contract': render_contract(self.table.game.contract), 'offset': abs(offset) } - if offset > 0: if offset == 1: resultText = _('Contract %(contract)s made by 1 trick.') % fields @@ -309,6 +276,9 @@ dialog.format_secondary_text(_('Click OK to start next game.')) dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) dialog.set_default_response(gtk.RESPONSE_OK) + # If user leaves table (ie. closes window), close dialog as well. + dialog.set_transient_for(self.window) + dialog.set_destroy_with_parent(True) def dialog_response_cb(dialog, response_id): dialog.destroy() @@ -371,7 +341,7 @@ format = "<span size=\"x-large\">%s</span>" if self.table.game.contract: - text = self.formatContract(self.table.game.contract) + text = render_contract(self.table.game.contract) self.label_contract.set_markup(format % text) self.label_contract.set_property('sensitive', True) else: @@ -384,7 +354,7 @@ dealer = '' if self.table.game.inProgress(): - dealer = DIRECTION_SYMBOLS[self.table.game.board['dealer']] + dealer = DIRECTION_NAMES[self.table.game.board['dealer']] self.label_dealer.set_markup(format % dealer) @@ -426,13 +396,13 @@ elif self.position and self.position == declarer and turn == dummy: text = _("Play a card from dummy's hand.") else: - text = _("It is %s's turn to play a card.") % DIRECTION_SYMBOLS[turn] + text = _("It is %s's turn to play a card.") % DIRECTION_NAMES[turn] else: # Bidding. if self.position and self.position == turn: text = _("Make a call from the bidding box.") else: - text = _("It is %s's turn to make a call.") % DIRECTION_SYMBOLS[turn] + text = _("It is %s's turn to make a call.") % DIRECTION_NAMES[turn] except GameError: # Game not in progress. text = _("Waiting for next game to start.") @@ -553,27 +523,6 @@ self.chat_messagehistory.scroll_to_iter(iter, 0) -# Utility methods. - - - def formatContract(self, contract): - """Produce a format string representing the contract. - - @param contract: a contract object. - @type contract: dict - @return: a format string representing the contract. - @rtype: str - """ - doubled = contract['redoubleBy'] and ' (%s)' % CALLTYPE_SYMBOLS[Redouble] \ - or contract['doubleBy'] and ' (%s)' % CALLTYPE_SYMBOLS[Double] or '' - - return _('%(bidlevel)s%(bidstrain)s%(doubled)s by %(declarer)s') \ - % {'bidlevel' : LEVEL_SYMBOLS[contract['bid'].level], - 'bidstrain' : STRAIN_SYMBOLS[contract['bid'].strain], - 'doubled' : doubled, - 'declarer' : DIRECTION_SYMBOLS[contract['declarer']] } - - # Signal handlers. @@ -630,7 +579,7 @@ def on_leaveseat_clicked(self, widget, *args): - + def success(r): self.player = None self.position = None @@ -638,7 +587,7 @@ self.leaveseat.set_property('sensitive', False) if self.children.get(WindowBidbox): self.children.close(self.children[WindowBidbox]) - + d = self.table.leaveGame(self.position) d.addCallbacks(success, self.errback) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-22 15:23:46
|
Revision: 437 http://svn.sourceforge.net/pybridge/?rev=437&view=rev Author: umgangee Date: 2007-06-22 08:23:33 -0700 (Fri, 22 Jun 2007) Log Message: ----------- Move translatable bridge terms and symbols into "vocabulary" module. Added Paths: ----------- trunk/pybridge/pybridge/ui/vocabulary.py Added: trunk/pybridge/pybridge/ui/vocabulary.py =================================================================== --- trunk/pybridge/pybridge/ui/vocabulary.py (rev 0) +++ trunk/pybridge/pybridge/ui/vocabulary.py 2007-06-22 15:23:33 UTC (rev 437) @@ -0,0 +1,187 @@ +# PyBridge -- online contract bridge made easy. +# Copyright (C) 2004-2007 PyBridge Project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +""" +A repository for translatable symbols and names. +""" + +import gtk + +from pybridge.bridge.symbols import * +import pybridge.bridge.call as Call + +from config import config + + +CALLTYPE_NAMES = { + Call.Pass: _('Pass'), + Call.Double: _('Double'), + Call.Redouble: _('Redouble'), +} + +CALLTYPE_SYMBOLS = { + Call.Pass: '-', + Call.Double: 'X', + Call.Redouble: 'XX', +} + +DIRECTION_NAMES = { + Direction.North: _('North'), + Direction.East: _('East'), + Direction.South: _('South'), + Direction.West: _('West'), +} + +DIRECTION_SYMBOLS = { + Direction.North: _('N'), + Direction.East: _('E'), + Direction.South: _('S'), + Direction.West: _('W'), +} + +LEVEL_SYMBOLS = { + Level.One: '1', + Level.Two: '2', + Level.Three: '3', + Level.Four: '4', + Level.Five: '5', + Level.Six: '6', + Level.Seven: '7', +} + +RANK_NAMES = { + Rank.Two: _('Two'), + Rank.Three: _('Three'), + Rank.Four: _('Four'), + Rank.Five: _('Five'), + Rank.Six: _('Six'), + Rank.Seven: _('Seven'), + Rank.Eight: _('Eight'), + Rank.Nine: _('Nine'), + Rank.Ten: _('Ten'), + Rank.Jack: _('Jack'), + Rank.Queen: _('Queen'), + Rank.King: _('King'), + Rank.Ace: _('Ace'), +} + +RANK_SYMBOLS = { + Rank.Two: '2', + Rank.Three: '3', + Rank.Four: '4', + Rank.Five: '5', + Rank.Six: '6', + Rank.Seven: '7', + Rank.Eight: '8', + Rank.Nine: '9', + Rank.Ten: '10', + Rank.Jack: 'J', + Rank.Queen: 'Q', + Rank.King: 'K', + Rank.Ace: 'A', +} + +SUIT_NAMES = { + Suit.Club: _('Clubs'), + Suit.Diamond: _('Diamonds'), + Suit.Heart: _('Hearts'), + Suit.Spade: _('Spades'), +} + +SUIT_SYMBOLS = { + Suit.Club: u'\N{BLACK CLUB SUIT}', + Suit.Diamond: u'\N{BLACK DIAMOND SUIT}', + Suit.Heart: u'\N{BLACK HEART SUIT}', + Suit.Spade: u'\N{BLACK SPADE SUIT}', +} + +STRAIN_NAMES = { + Strain.Club: _('Club'), + Strain.Diamond: _('Diamond'), + Strain.Heart: _('Heart'), + Strain.Spade: _('Spade'), + Strain.NoTrump: _('No Trump'), +} + +STRAIN_SYMBOLS = { + Strain.Club: u'\N{BLACK CLUB SUIT}', + Strain.Diamond: u'\N{BLACK DIAMOND SUIT}', + Strain.Heart: u'\N{BLACK HEART SUIT}', + Strain.Spade: u'\N{BLACK SPADE SUIT}', + Strain.NoTrump: u'NT', +} + +VULN_SYMBOLS = { + Vulnerable.All: _('All'), + Vulnerable.NorthSouth : _('N/S'), + Vulnerable.EastWest : _('E/W'), + Vulnerable.None : _('None'), +} + + +def render_call(call): + if isinstance(call, Call.Bid): + if call.strain == Strain.NoTrump: # No associated colour. + return LEVEL_SYMBOLS[call.level] + STRAIN_SYMBOLS[Strain.NoTrump] + else: + rgb = config['Appearance']['Colours'].get(call.strain.key, (0, 0, 0)) + hexrep = gtk.color_selection_palette_to_string([gtk.gdk.Color(*rgb)]) + return "%s<span color=\'%s\'>%s</span>" % \ + (LEVEL_SYMBOLS[call.level], hexrep, STRAIN_SYMBOLS[call.strain]) + else: + return CALLTYPE_SYMBOLS[call.__class__] + + +def render_call_name(call): + if isinstance(call, Call.Bid): + return _('%(level)s %(strain)s') % {'level': LEVEL_NAMES[call.level], + 'strain': STRAIN_NAMES[call.strain]} + else: + return CALLTYPE_NAMES[call.__class__] + + +def render_card(card): + rgb = config['Appearance']['Colours'].get(card.suit.key, (0, 0, 0)) + hexrep = gtk.color_selection_palette_to_string([gtk.gdk.Color(*rgb)]) + return "%s<span color=\'%s\'>%s</span>" % \ + (RANK_SYMBOLS[card.rank], hexrep, SUIT_SYMBOLS[card.suit]) + + +def render_card_name(card): + return _('%(rank)s of %(suit)s') % {'rank': card.rank, 'suit': card.suit} + + +def render_contract(contract): + """Produce a format string representing the contract. + + @param contract: a contract object. + @type contract: dict + @return: a format string representing the contract. + @rtype: str + """ + doubled = contract['redoubleBy'] and CALLTYPE_SYMBOLS[Call.Redouble] \ + or contract['doubleBy'] and CALLTYPE_SYMBOLS[Call.Double] or '' + + fields = {'bid': render_call(contract['bid']), 'doubled': doubled, + 'declarer': DIRECTION_NAMES[contract['declarer']]} + + if doubled: + return _('%(bid)s %(doubled)s by %(declarer)s') % fields + else: + return _('%(bid)s by %(declarer)s') % fields + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-22 11:27:03
|
Revision: 436 http://svn.sourceforge.net/pybridge/?rev=436&view=rev Author: umgangee Date: 2007-06-22 04:27:04 -0700 (Fri, 22 Jun 2007) Log Message: ----------- Replace getopt with OptionParser to make life easier. Modified Paths: -------------- trunk/pybridge/bin/pybridge trunk/pybridge/bin/pybridge-server Modified: trunk/pybridge/bin/pybridge =================================================================== --- trunk/pybridge/bin/pybridge 2007-06-21 15:57:33 UTC (rev 435) +++ trunk/pybridge/bin/pybridge 2007-06-22 11:27:04 UTC (rev 436) @@ -1,7 +1,7 @@ #!/usr/bin/env python # PyBridge -- online contract bridge made easy. -# Copyright (C) 2004-2006 PyBridge Project. +# Copyright (C) 2004-2007 PyBridge Project. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -12,7 +12,7 @@ # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. - +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -20,45 +20,59 @@ import os import sys +from optparse import OptionParser -PYTHON_VERSION = sys.version_info[:2] +def main(): + PYTHON_VERSION = sys.version_info[:2] -# Some version dependencies. -PYTHON_REQUIRED = (2, 3) -PYGTK_REQUIRED = '2.0' -TWISTED_REQUIRED = '1.3.0' + # Some version dependencies. + PYTHON_REQUIRED = (2, 3) + PYGTK_REQUIRED = '2.0' + TWISTED_REQUIRED = '2.0.0' -# Check version requirements. + # Check version requirements. -if PYTHON_VERSION < PYTHON_REQUIRED: - raise SystemExit("Error: Python %d.%d or higher required" % PYTHON_REQUIRED) + if PYTHON_VERSION < PYTHON_REQUIRED: + raise SystemExit, "Error: Python %d.%d+ required" % PYTHON_REQUIRED -if hasattr(sys, 'frozen'): # For py2exe distribution. - os.environ['PATH'] += ";lib;" -else: - import pygtk - pygtk.require(PYGTK_REQUIRED) + if hasattr(sys, 'frozen'): # For py2exe distribution. + os.environ['PATH'] += ";lib;" + else: + import pygtk + try: + pygtk.require(PYGTK_REQUIRED) + except AssertionError: + raise SystemExit, "Error: PyGTK %s+ required" % PYGTK_REQUIRED -import twisted.copyright -if twisted.copyright.version < TWISTED_REQUIRED: - raise SystemExit("Error: Twisted Core %s or higher required" % TWISTED_REQUIRED) + import twisted.copyright + if twisted.copyright.version < TWISTED_REQUIRED: + raise SystemExit, "Error: Twisted Core %s+ required" % TWISTED_REQUIRED + try: # If PyBridge is installed system-wide, this finds it automatically. + import pybridge + except ImportError: # Locate the PyBridge package. + currentdir = os.path.dirname(os.path.abspath(sys.argv[0])) + basedir = os.path.abspath(os.path.join(currentdir, '..')) + # The package path should be relative to the base directory. + if os.path.exists(os.path.join(basedir, 'lib', 'python')): + pythonpath = os.path.join(basedir, 'lib', 'python') + else: + pythonpath = basedir -try: # If PyBridge is installed system-wide, this finds it automatically. - import pybridge -except ImportError: # Locate the PyBridge package. - currentdir = os.path.dirname(os.path.abspath(sys.argv[0])) - basedir = os.path.abspath(os.path.join(currentdir, '..')) - # The package path should be relative to the base directory. - if os.path.exists(os.path.join(basedir, 'lib', 'python')): - pythonpath = os.path.join(basedir, 'lib', 'python') - else: - pythonpath = basedir - sys.path.insert(0, pythonpath) # Place PyBridge package in PYTHONPATH. - import pybridge + sys.path.insert(0, pythonpath) # Place PyBridge package in PYTHONPATH. + try: + import pybridge + except ImportError: + raise SystemExit, "Fatal error: could not locate PyBridge installation." + parser = OptionParser(version="PyBridge %s" % pybridge.__version__) + options, args = parser.parse_args() -import pybridge.ui -pybridge.ui.run() + import pybridge.ui + pybridge.ui.run() + +if __name__ == '__main__': + main() + Modified: trunk/pybridge/bin/pybridge-server =================================================================== --- trunk/pybridge/bin/pybridge-server 2007-06-21 15:57:33 UTC (rev 435) +++ trunk/pybridge/bin/pybridge-server 2007-06-22 11:27:04 UTC (rev 436) @@ -20,27 +20,12 @@ import os import sys -import getopt +from optparse import OptionParser -def usage(): - print "Usage: pybridge-server [options]" - print "-h : Print this help message and exit." - print "-p PORT : Listen for connections on specified port." - print "-v : Print version number and exit." - - def main(): PORT = 5040 - - try: - opts, args = getopt.getopt(sys.argv[1:], 'hp:v', - ['help', 'port=', 'version']) - except getopt.GetoptError, error: - usage() - print "\nError: %s" % error - sys.exit(2) - + try: # If PyBridge is installed system-wide, this finds it automatically. import pybridge except ImportError: # Locate the PyBridge package. @@ -51,31 +36,27 @@ pythonpath = os.path.join(basedir, 'lib', 'python') else: pythonpath = basedir + sys.path.insert(0, pythonpath) # Place PyBridge package in PYTHONPATH. - import pybridge - - for opt, arg in opts: - if opt in ('-h', '--help'): - usage() - sys.exit(0) - elif opt in ('-p', '--port'): - try: - PORT = int(arg) - except ValueError: - usage() - print "\nError: invalid value %s specified for %s" % (arg, opt) - sys.exit(2) - elif opt in ('-v', '--version'): - print "PyBridge Server version %s" % pybridge.__version__ - sys.exit(0) - + try: + import pybridge + except ImportError: + raise SystemExit, "Fatal error: could not locate PyBridge installation." + + parser = OptionParser(version="PyBridge Server %s" % pybridge.__version__) + + parser.add_option('-p', '--port', type=int, dest='port', default=PORT, + help="listen for connections on specified port") + + options, args = parser.parse_args() + from twisted.internet import reactor from twisted.python import log log.startLogging(sys.stdout) # Log to stdout. - + # TODO: replace with a service. from pybridge.server import factory - reactor.listenTCP(PORT, factory) + reactor.listenTCP(options.port, factory) reactor.run() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-21 15:57:43
|
Revision: 435 http://svn.sourceforge.net/pybridge/?rev=435&view=rev Author: umgangee Date: 2007-06-21 08:57:33 -0700 (Thu, 21 Jun 2007) Log Message: ----------- Make translation strings verbose, so xgettext doesn't complain when parsing. Modified Paths: -------------- trunk/pybridge/pybridge/ui/window_bridgetable.py Modified: trunk/pybridge/pybridge/ui/window_bridgetable.py =================================================================== --- trunk/pybridge/pybridge/ui/window_bridgetable.py 2007-06-20 18:04:19 UTC (rev 434) +++ trunk/pybridge/pybridge/ui/window_bridgetable.py 2007-06-21 15:57:33 UTC (rev 435) @@ -279,14 +279,25 @@ self.addScore(self.table.game.contract, declarerWon, score) contractText = self.formatContract(self.table.game.contract) + fields = {'contract': self.formatContract(self.table.game.contract), + 'offset': abs(offset) } + if offset > 0: - resultText = _('Contract %s made by %s tricks.') % (contractText, offset) + if offset == 1: + resultText = _('Contract %(contract)s made by 1 trick.') % fields + else: + resultText = _('Contract %(contract)s made by %(offset)s tricks.') % fields elif offset < 0: - resultText = _('Contract %s failed by %s tricks.') % (contractText, abs(offset)) + if offset == -1: + resultText = _('Contract %(contract)s failed by 1 trick.') % fields + else: + resultText = _('Contract %(contract)s failed by %(offset)s tricks.') % fields else: - resultText = _('Contract %s made exactly.') % contractText - scorer = (score >= 0 and _('declarer')) or _('defence') - scoreText = _('Score %s points for %s.' % (abs(score), scorer)) + resultText = _('Contract %(contract)s made exactly.') % fields + + pair = (score >= 0 and _('declarer')) or _('defence') + scoreText = _('Score %(points)s points for %(pair)s.') % {'points': abs(score), 'pair': pair} + dialog.set_markup(resultText + '\n' + scoreText) else: @@ -297,6 +308,7 @@ dialog.add_button(_('Leave Seat'), gtk.RESPONSE_CANCEL) dialog.format_secondary_text(_('Click OK to start next game.')) dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) + dialog.set_default_response(gtk.RESPONSE_OK) def dialog_response_cb(dialog, response_id): dialog.destroy() @@ -537,7 +549,7 @@ def event_sendMessage(self, message, sender, recipients): buffer = self.chat_messagehistory.get_buffer() iter = buffer.get_end_iter() - buffer.insert(iter, '%s: %s\n' % (sender, message)) + buffer.insert(iter, '\n' + _('%(sender)s: %(message)s' % {'sender': sender, 'message': message})) self.chat_messagehistory.scroll_to_iter(iter, 0) @@ -552,16 +564,14 @@ @return: a format string representing the contract. @rtype: str """ - bidlevel = LEVEL_SYMBOLS[contract['bid'].level] - bidstrain = STRAIN_SYMBOLS[contract['bid'].strain] - doubled = '' - if contract['redoubleBy']: - doubled = ' (%s)' % CALLTYPE_SYMBOLS[Redouble] - elif contract['doubleBy']: - doubled = ' (%s)' % CALLTYPE_SYMBOLS[Double] - declarer = contract['declarer'] + doubled = contract['redoubleBy'] and ' (%s)' % CALLTYPE_SYMBOLS[Redouble] \ + or contract['doubleBy'] and ' (%s)' % CALLTYPE_SYMBOLS[Double] or '' - return _('%s%s%s by %s') % (bidlevel, bidstrain, doubled, declarer) + return _('%(bidlevel)s%(bidstrain)s%(doubled)s by %(declarer)s') \ + % {'bidlevel' : LEVEL_SYMBOLS[contract['bid'].level], + 'bidstrain' : STRAIN_SYMBOLS[contract['bid'].strain], + 'doubled' : doubled, + 'declarer' : DIRECTION_SYMBOLS[contract['declarer']] } # Signal handlers. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-20 18:04:17
|
Revision: 434 http://svn.sourceforge.net/pybridge/?rev=434&view=rev Author: umgangee Date: 2007-06-20 11:04:19 -0700 (Wed, 20 Jun 2007) Log Message: ----------- When connection fails unexpectedly, provide a Reconnect option to user. Modified Paths: -------------- trunk/pybridge/pybridge/ui/window_main.py Modified: trunk/pybridge/pybridge/ui/window_main.py =================================================================== --- trunk/pybridge/pybridge/ui/window_main.py 2007-06-20 15:15:27 UTC (rev 433) +++ trunk/pybridge/pybridge/ui/window_main.py 2007-06-20 18:04:19 UTC (rev 434) @@ -120,17 +120,20 @@ def event_connectionLost(self, host, port): dialog = gtk.MessageDialog(parent=self.window, flags=gtk.DIALOG_MODAL, - type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK) + type=gtk.MESSAGE_ERROR) dialog.set_title(_('Connection to server lost')) dialog.set_markup(_('The connection to %s was lost unexpectedly.' % host)) - dialog.format_secondary_text(_('Please check your computer\'s network connection status. If you cannot reconnect, the server may be offline.')) + dialog.format_secondary_text(_('Please check your computer\'s network connection status before reconnecting. If you cannot reconnect, the server may be offline.')) # If this problem persists... - #dialog.add_button() - def dialog_response_cb(dialog, response_id): dialog.destroy() + if response_id == gtk.RESPONSE_OK: + wm.open(DialogConnection, parent=self) + dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL) + dialog.add_button(gtk.STOCK_CONNECT, gtk.RESPONSE_OK) + dialog.connect('response', dialog_response_cb) dialog.show() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <umg...@us...> - 2007-06-20 15:15:25
|
Revision: 433 http://svn.sourceforge.net/pybridge/?rev=433&view=rev Author: umgangee Date: 2007-06-20 08:15:27 -0700 (Wed, 20 Jun 2007) Log Message: ----------- Enable card style and background selection. Modified Paths: -------------- trunk/pybridge/pybridge/ui/dialog_preferences.py Modified: trunk/pybridge/pybridge/ui/dialog_preferences.py =================================================================== --- trunk/pybridge/pybridge/ui/dialog_preferences.py 2007-06-20 15:14:28 UTC (rev 432) +++ trunk/pybridge/pybridge/ui/dialog_preferences.py 2007-06-20 15:15:27 UTC (rev 433) @@ -26,8 +26,8 @@ from pybridge.bridge.symbols import Suit -SUIT_NAMES = {Suit.Club: _("Club"), Suit.Diamond: _("Diamond"), - Suit.Heart: _("Heart"), Suit.Spade: _("Spade") } +SUIT_NAMES = {Suit.Club: _('Club'), Suit.Diamond: _('Diamond'), + Suit.Heart: _('Heart'), Suit.Spade: _('Spade') } SUIT_SYMBOLS = {Suit.Club: u'\N{BLACK CLUB SUIT}', Suit.Diamond: u'\N{BLACK DIAMOND SUIT}', @@ -46,18 +46,17 @@ # Allow user to select only image files for background. filter_pixbufs = gtk.FileFilter() filter_pixbufs.add_pixbuf_formats() - filter_pixbufs.set_name(_("Image files")) + filter_pixbufs.set_name(_('Images')) self.background.add_filter(filter_pixbufs) # Build a list of card decks from which the user may choose. # (The user is prevented from selecting an arbitary image.) + activedeck = config['Appearance'].get('CardStyle', 'bonded.png') model = gtk.ListStore(str) self.cardstyle.set_model(model) cell = gtk.CellRendererText() self.cardstyle.pack_start(cell, True) self.cardstyle.add_attribute(cell, 'text', 0) - - activedeck = config['Appearance'].get('CardStyle', 'bonded.png') # Populate list of card decks. path = env.find_pixmap('') for filename in os.listdir(path): @@ -66,6 +65,13 @@ if filename == activedeck: self.cardstyle.set_active_iter(iter) + # Retrieve selected background. + background_file = config['Appearance'].get('Background') + if background_file is None or not os.path.exists(background_file): + background_file = env.find_pixmap('baize.png') + self.background.set_filename(background_file) + + # Retrieve suit colours. self.suit_colours = {} for suit in Suit: rgb = config['Appearance']['Colours'].get(suit.key, (0, 0, 0)) @@ -81,11 +87,11 @@ def on_cardstyle_changed(self, widget, *args): - print "cardstyle changed" + pass def on_background_changed(self, widget, *args): - print "background changed" + pass def on_suitcolour_clicked(self, widget, *args): @@ -117,9 +123,16 @@ def on_okbutton_clicked(self, widget, *args): # Save preferences to config file. + for suit, colour in self.suit_colours.items(): rgb = (colour.red, colour.green, colour.blue) config['Appearance']['Colours'][suit.key] = rgb - print "TODO: background and card style" + + config['Appearance']['Background'] = self.background.get_filename() + + model = self.cardstyle.get_model() + iter = self.cardstyle.get_active_iter() + config['Appearance']['CardStyle'] = model.get_value(iter, 0) + wm.close(self) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |