[gnome-chess/telepathy_merge: 385/387] Merge branch 'master' into wip_telepathy



commit f52fbe91ea2109d885bd61647c91364cf31c913b
Merge: 44173ab 086379c
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sat Nov 23 13:00:45 2013 -0600

    Merge branch 'master' into wip_telepathy
    
    This is an awful merge; we lost all the changes in src/gnome-chess.vala.
    
    Conflicts:
        configure.ac
        data/Makefile.am
        data/gnome-chess-game-window.ui
        data/icons/Makefile.am
        data/org.gnome.gnome-chess.gschema.xml.in
        data/preferences.ui
        src/Makefile.am
        src/config.vapi
        src/gnome-chess.vala

 COPYING                                            |   41 +-
 Makefile.am                                        |    6 +
 NEWS                                               |  241 +-
 autogen.sh                                         |    1 -
 configure.ac                                       |   26 +-
 data/Makefile.am                                   |   48 +-
 data/chess-engines.conf                            |  145 +
 data/engines.conf                                  |  132 -
 data/glchess.desktop.in                            |   13 +
 data/gnome-chess-game-window.ui                    |  353 +-
 data/gnome-chess.appdata.xml.in                    |   23 +
 data/gnome-chess.desktop.in.in                     |   16 -
 data/icons/256x256/gnome-chess.png                 |  Bin 0 -> 17323 bytes
 data/icons/Makefile.am                             |    4 +
 data/menu.ui                                       |   28 +
 ...ma.xml.in => org.gnome.gnome-chess.gschema.xml} |   13 +-
 data/pieces/fancy/blackBishop.svg                  |    2 +-
 data/pieces/fancy/blackKing.svg                    |    2 +-
 data/pieces/fancy/blackKnight.svg                  |    2 +-
 data/pieces/fancy/blackPawn.svg                    |    2 +-
 data/pieces/fancy/blackQueen.svg                   |    2 +-
 data/pieces/fancy/blackRook.svg                    |    2 +-
 data/pieces/fancy/whiteBishop.svg                  |    2 +-
 data/pieces/fancy/whiteKing.svg                    |    2 +-
 data/pieces/fancy/whiteKnight.svg                  |    2 +-
 data/pieces/fancy/whitePawn.svg                    |    2 +-
 data/pieces/fancy/whiteQueen.svg                   |    2 +-
 data/pieces/fancy/whiteRook.svg                    |    2 +-
 data/preferences.ui                                |  177 +-
 data/promotion-type-selector.ui                    |   32 +-
 git.mk                                             |  303 +
 gnome-chess.doap                                   |    7 +
 help/C/bug-filing.page                             |    2 +-
 help/C/index.docbook                               |   18 -
 help/cs/cs.po                                      |  869 +-
 help/da/da.po                                      | 1461 ++-
 help/de/de.po                                      |  928 +-
 help/el/el.po                                      |  123 +-
 help/fr/fr.po                                      |  528 +-
 help/ja/ja.po                                      |    2 +-
 help/pt_BR/figures/game.png                        |  Bin 0 -> 50936 bytes
 help/pt_BR/figures/new_game.png                    |  Bin 0 -> 45555 bytes
 help/pt_BR/figures/preferences_game.png            |  Bin 0 -> 26730 bytes
 help/pt_BR/figures/preferences_view.png            |  Bin 0 -> 29269 bytes
 help/pt_BR/pt_BR.po                                | 1459 +--
 po/LINGUAS                                         |    1 +
 po/POTFILES.in                                     |    7 +-
 po/POTFILES.skip                                   |    3 +-
 po/be.po                                           | 4508 +--------
 po/bg.po                                           | 4117 +-------
 po/ca.po                                           | 4625 +--------
 po/ca valencia po                                  | 4656 +--------
 po/cs.po                                           | 4521 +--------
 po/da.po                                           | 6401 +++++-------
 po/de.po                                           | 5411 +++--------
 po/el.po                                           | 6486 +++++-------
 po/en_GB.po                                        | 6374 +++++-------
 po/es.po                                           | 6519 +++++-------
 po/et.po                                           | 6200 +-----------
 po/eu.po                                           | 6230 +++++-------
 po/fa.po                                           | 6073 +++++-------
 po/fi.po                                           | 6296 +++++-------
 po/fr.po                                           | 4616 +--------
 po/gl.po                                           | 6397 +++++-------
 po/he.po                                           | 6972 +++++--------
 po/hi.po                                           |10835 ++++++++------------
 po/hu.po                                           | 6361 +++++-------
 po/id.po                                           | 4505 +--------
 po/it.po                                           | 4561 +--------
 po/ja.po                                           | 6296 +-----------
 po/ko.po                                           | 4602 +--------
 po/lt.po                                           | 4579 +--------
 po/lv.po                                           | 6371 +++++-------
 po/ml.po                                           | 5270 ++++------
 po/nb.po                                           | 4526 +--------
 po/pl.po                                           | 4548 +--------
 po/pt.po                                           | 6251 +++++-------
 po/pt_BR.po                                        | 9771 ++++--------------
 po/ru.po                                           |  988 +-
 po/sk.po                                           | 5008 +--------
 po/sl.po                                           | 4962 ++--------
 po/sr.po                                           | 4605 +--------
 po/sr latin po                                     | 4605 +--------
 po/ta.po                                           | 6262 +++++-------
 po/tg.po                                           | 1042 ++
 po/ug.po                                           | 6217 +++++-------
 po/zh_HK.po                                        | 4796 ++-------
 po/zh_TW.po                                        | 4816 ++-------
 src/3ds.vala                                       |   10 +
 src/Makefile.am                                    |   21 +-
 src/ai-profile.vala                                |  135 +-
 src/chess-bitboard.vala                            |   10 +
 src/chess-clock.vala                               |  169 +-
 src/chess-engine-cecp.vala                         |   50 +-
 src/chess-engine-uci.vala                          |   27 +-
 src/chess-engine.vala                              |   64 +-
 src/chess-game.vala                                |  180 +-
 src/chess-pgn.vala                                 |   40 +
 src/chess-scene.vala                               |   35 +-
 src/chess-view-2d.vala                             |   49 +-
 src/chess-view-3d.vala                             |   76 +-
 src/chess-view.vala                                |   33 +-
 src/config.vapi                                    |    1 +
 src/gnome-chess.vala                               |    3 +
 src/history.vala                                   |  190 -
 src/test-chess-game.vala                           |   70 +-
 src/test-chess-pgn.vala                            |   10 +
 107 files changed, 64019 insertions(+), 162367 deletions(-)
---
diff --cc configure.ac
index 6cccd48,1319d60..73bd27c
--- a/configure.ac
+++ b/configure.ac
@@@ -1,14 -1,12 +1,17 @@@
- AC_INIT(gnome-chess, 3.7.2)
- LT_INIT
- 
+ AC_PREREQ([2.63])
+ AC_INIT([gnome-chess],[3.11.2])
 -AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz foreign])
+ AC_CONFIG_SRCDIR([src/gnome-chess.vala])
 +AC_CONFIG_HEADERS([config.h])
 +
 +AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz foreign])
  AM_SILENT_RULES([yes])
- AM_MAINTAINER_MODE
+ AM_MAINTAINER_MODE([enable])
++
++LT_INIT
++
  GNOME_MAINTAINER_MODE_DEFINES
-  
- AM_PROG_VALAC([0.16.0])
+ 
+ AM_PROG_VALAC([0.22])
  AM_PROG_CC_C_O
  
  GLIB_GSETTINGS
@@@ -36,49 -33,10 +38,52 @@@ PKG_CHECK_MODULES(TEST, 
    gio-2.0
  ])
  
+ AC_PATH_PROG([APPDATA_VALIDATE], [appdata-validate], [/bin/true])
+ AC_PATH_PROG([DESKTOP_FILE_VALIDATE], [desktop-file-validate], [/bin/true])
+ 
  dnl ###########################################################################
 +dnl Enable Networking
 +dnl ###########################################################################
 +
 +AC_ARG_ENABLE([networking],
 +    AS_HELP_STRING([--enable-networking=@<:@no/yes@:>@],
 +        [build with Contacts and Telepathy networking support (default: yes)]),
 +    [case "${enableval}" in
 +        yes) networking=yes ;;
 +         no) networking=no ;;
 +          *) AC_MSG_ERROR([bad value ${enableval} for --enable-networking]) ;;
 +     esac],
 +    [networking=yes])
 +
 +if test "x$networking" = "xyes"; then
 +    # Check for folks
 +    FOLKS_REQUIRED=0.6.6
 +
 +    PKG_CHECK_MODULES([FOLKS],
 +        [folks >= $FOLKS_REQUIRED
 +         folks-telepathy >= $FOLKS_REQUIRED])
 +    AC_SUBST([FOLKS_CFLAGS])
 +    AC_SUBST([FOLKS_LIBS])
 +
 +    PKG_CHECK_MODULES([GEE], [gee-1.0])
 +    AC_SUBST([GEE_CFLAGS])
 +    AC_SUBST([GEE_LIBS])
 +
 +    PKG_CHECK_MODULES([TELEPATHY], [telepathy-glib])
 +    AC_SUBST([TELEPATHY_CFLAGS])
 +    AC_SUBST([TELEPATHY_LIBS])
 +
 +    PKG_CHECK_MODULES([XML], [libxml-2.0])
 +
 +    AC_DEFINE([ENABLE_NETWORKING],[1],[Defines whether Telepathy networking is enabled])
 +else
 +    AC_DEFINE([ENABLE_NETWORKING],[0],
 +        [Defines whether Telepathy networking is enabled])
 +fi
 +AM_CONDITIONAL([ENABLE_NETWORKING], [test "x$networking" = "xyes"])
 +
 +
 +dnl ###########################################################################
  dnl Internationalization
  dnl ###########################################################################
  
@@@ -107,18 -65,5 +112,17 @@@ data/textures/Makefil
  help/Makefile
  po/Makefile.in
  src/Makefile
 +libgames-contacts/Makefile
 +tests/Makefile
  ])
+ AC_OUTPUT
 +
 +echo "
 +Configuration:
 +
 +    Source code location:  ${srcdir}
 +    Compiler:              ${CC}"
 +
 +echo "
 +    Networking enabled:    ${networking}
 +"
- 
diff --cc data/Makefile.am
index 79f7b1b,3d3e18a..acd9abb
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@@ -1,48 -1,40 +1,56 @@@
  SUBDIRS = icons pieces textures
  
  desktopdir = $(datadir)/applications
- desktop_in_files = gnome-chess.desktop.in.in
- desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
+ desktop_in_files = glchess.desktop.in
+ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
  @INTLTOOL_DESKTOP_RULE@
  
- uidir = $(datadir)/gnome-chess
- ui_DATA = \
-       new-game-launcher.ui \
+ appdatadir = $(datadir)/appdata
+ appdata_in_files = gnome-chess.appdata.xml.in
+ appdata_DATA = $(appdata_in_files:.appdata.xml.in=.appdata.xml)
+ @INTLTOOL_XML_RULE@
+ 
+ uidir = $(pkgdatadir)
+ dist_ui_DATA = \
 -      gnome-chess.ui \
 +      gnome-chess-game-window.ui \
 +      gnome-chess-network-window.ui \
++      new-game-launcher.ui \
        preferences.ui \
-       promotion-type-selector.ui
+       promotion-type-selector.ui \
+       menu.ui
  
  gsettings_SCHEMAS = org.gnome.gnome-chess.gschema.xml
- @INTLTOOL_XML_NOMERGE_RULE@
  @GSETTINGS_RULES@
  
- aidir = $(datadir)/gnome-chess/
- ai_DATA = engines.conf
+ dist_sysconf_DATA = chess-engines.conf
+ 
+ dist_man_MANS = gnome-chess.6
  
 +servicefiledir = $(datadir)/dbus-1/services
 +servicefile_in_files = \
 +      org.freedesktop.Telepathy.Client.Gnome.Chess.service.in
 +servicefile_DATA = $(servicefile_in_files:.service.in=.service)
 +
 +org.freedesktop.Telepathy.Client.Gnome.Chess.service: 
org.freedesktop.Telepathy.Client.Gnome.Chess.service.in
 +      $(AM_V_GEN)sed -e "s|[ ]libexecdir[@]|$(libexecdir)|" $< > $@
 +
 +clientfiledir = $(datarootdir)/telepathy/clients
- clientfile_DATA = \
++dist_clientfile_DATA = \
 +      Gnome.Chess.client
 +
+ check-local: $(appdata_DATA) $(desktop_DATA)
+       $(APPDATA_VALIDATE) $(appdata_DATA)
+       $(DESKTOP_FILE_VALIDATE) $(desktop_DATA)
  
- man_MANS = gnome-chess.6
- 
- EXTRA_DIST = engines.conf \
-            org.gnome.gnome-chess.gschema.xml.in \
-        $(clientfile_DATA) \
-        $(servicefile_in_files) \
-            $(man_MANS) \
-            $(ui_DATA)
+ EXTRA_DIST = \
+       $(appdata_in_files) \
+       $(desktop_in_files) \
 -      $(gsettings_SCHEMAS)
++      $(gsettings_SCHEMAS) \
++      $(servicefile_in_files)
  
- CLEANFILES = $(desktop_DATA) $(gsettings_SCHEMAS)
- DISTCLEANFILES = $(desktop_DATA) $(gsettings_SCHEMAS) $(servicefile_DATA)
+ CLEANFILES = \
+       $(appdata_DATA) \
 -      $(desktop_DATA)
++      $(desktop_DATA) \
++      $(servicefile_DATA)
  
  -include $(top_srcdir)/git.mk
diff --cc data/gnome-chess-game-window.ui
index f4271f6,1f5995f..73288d5
--- a/data/gnome-chess-game-window.ui
+++ b/data/gnome-chess-game-window.ui
@@@ -1,31 -1,23 +1,23 @@@
  <?xml version="1.0" encoding="UTF-8"?>
  <interface>
    <!-- interface-requires gtk+ 3.0 -->
-   <object class="GtkImage" id="help_image">
-     <property name="visible">True</property>
-     <property name="can_focus">False</property>
-     <property name="stock">gtk-help</property>
-     <property name="icon-size">1</property>
-   </object>
-   <object class="GtkImage" id="undo_move_image">
-     <property name="visible">True</property>
-     <property name="can_focus">False</property>
-     <property name="stock">gtk-undo</property>
-     <property name="icon-size">1</property>
+   <object class="GtkListStore" id="history_model">
+     <columns>
+       <!-- column-name label -->
+       <column type="gchararray"/>
+       <!-- column-name move-number -->
+       <column type="gint"/>
+     </columns>
    </object>
-   <object class="GtkImage" id="warning_image">
-     <property name="visible">True</property>
+   <object class="GtkApplicationWindow" id="gnome_chess_app">
      <property name="can_focus">False</property>
-     <property name="stock">gtk-dialog-warning</property>
-     <property name="icon-size">1</property>
-   </object>
-   <object class="GtkWindow" id="window_game_screen">
-     <property name="can_focus">False</property>
-     <signal name="window-state-event" handler="game_window_window_state_event_cb" swapped="no"/>
-     <signal name="configure-event" handler="game_window_configure_event_cb" swapped="no"/>
-     <signal name="delete-event" handler="game_window_delete_event_cb" swapped="no"/>
+     <property name="title">Chess</property>
+     <property name="default_width">700</property>
+     <signal name="window-state-event" handler="gnome_chess_app_window_state_event_cb" swapped="no"/>
+     <signal name="configure-event" handler="gnome_chess_app_configure_event_cb" swapped="no"/>
+     <signal name="delete-event" handler="gnome_chess_app_delete_event_cb" swapped="no"/>
      <child>
 -      <object class="GtkVBox" id="main_vbox">
 +      <object class="GtkVBox" id="game_vbox">
          <property name="visible">True</property>
          <property name="can_focus">False</property>
          <child>
@@@ -274,8 -104,33 +105,34 @@@
                </packing>
              </child>
              <child>
+               <object class="GtkSeparatorToolItem" id="sep2">
+                 <property name="visible">True</property>
+                 <property name="can_focus">False</property>
+               </object>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+             <child>
+               <object class="GtkToolButton" id="claim_draw_button">
+                 <property name="visible">True</property>
+                 <property name="can_focus">False</property>
+                 <property name="tooltip_text" translatable="yes">Claim a draw by threefold repetition or 
the fifty move rule</property>
+                 <property name="is_important">True</property>
+                 <property name="label" translatable="yes">Claim Draw</property>
+                 <property name="use_underline">True</property>
+                 <property name="icon_name">face-plain</property>
+                 <signal name="clicked" handler="claim_draw_cb" swapped="no"/>
+               </object>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
+             </child>
+             <child>
                <object class="GtkToolButton" id="resign_button">
 +                <property name="use_action_appearance">False</property>
                  <property name="visible">True</property>
                  <property name="sensitive">False</property>
                  <property name="can_focus">False</property>
diff --cc data/icons/Makefile.am
index a1bab7b,1d7aa04..892aafa
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@@ -3,36 -3,17 +3,40 @@@ icon22dir=$(datadir)/icons/hicolor/22x2
  icon24dir=$(datadir)/icons/hicolor/24x24/apps
  icon32dir=$(datadir)/icons/hicolor/32x32/apps
  icon48dir=$(datadir)/icons/hicolor/48x48/apps
+ icon256dir=$(datadir)/icons/hicolor/256x256/apps
  iconscalabledir=$(datadir)/icons/hicolor/scalable/apps
 +iconscalablestatusdir=$(pkgdatadir)/icons/hicolor/scalable/status
  
  icon16_DATA = 16x16/gnome-chess.png
  icon22_DATA = 22x22/gnome-chess.png
  icon24_DATA = 24x24/gnome-chess.png
  icon32_DATA = 32x32/gnome-chess.png
  icon48_DATA = 48x48/gnome-chess.png
+ icon256_DATA = 256x256/gnome-chess.png
  iconscalable_DATA = scalable/gnome-chess.svg
 +iconscalablestatus_DATA = \
 +      scalable/user-available.svg \
 +      scalable/user-away.svg \
 +      scalable/user-busy.svg \
 +      scalable/user-idle.svg \
 +      scalable/user-offline.svg \
 +      scalable/goa.svg \
 +      scalable/user.svg
  
 -EXTRA_DIST = $(icon16_DATA) $(icon22_DATA) $(icon24_DATA) $(icon32_DATA) $(icon48_DATA) $(icon256_DATA) 
$(iconscalable_DATA)
 +gtk_update_icon_cache = gtk-update-icon-cache -f -t $(pkgdatadir)/icons/hicolor
 +
 +install-data-hook: update-icon-cache
 +uninstall-hook: update-icon-cache
 +
 +update-icon-cache:
 +      @-if test -z "$(DESTDIR)"; then \
 +                      echo "Updating Gtk icon cache."; \
 +                      $(gtk_update_icon_cache); \
 +      else \
 +                      echo "*** Icon cache not updated.  After (un)install, run this:"; \
 +                      echo "***   $(gtk_update_icon_cache)"; \
 +      fi
 +
 +EXTRA_DIST = $(icon16_DATA) $(icon22_DATA) $(icon24_DATA) $(icon32_DATA) $(icon48_DATA) $(icon256_DATA) 
$(iconscalable_DATA) $(iconscalablestatus_DATA)
+ 
+ -include $(top_srcdir)/git.mk
diff --cc data/org.gnome.gnome-chess.gschema.xml
index a480111,8bdf75a..b256f8f
--- a/data/org.gnome.gnome-chess.gschema.xml
+++ b/data/org.gnome.gnome-chess.gschema.xml
@@@ -30,49 -20,13 +29,49 @@@
      <value value="2" nick="hard"/>
    </enum>
  
 -  <schema id="org.gnome.gnome-chess" path="/org/gnome/gnome-chess/" gettext-domain="gnome-games">
 -    <key name="width" type="i">
 +  <schema path="/org/gnome/gnome-chess/" id="org.gnome.gnome-chess" gettext-domain="gnome-chess">
 +    <key type="b" name="advertise-capability">
 +    <default>false</default>
 +    <summary>Advertise chess playing capability to online contacts</summary>
 +    <description>Advertise chess playing capability to your online contacts.
 +                 You'll be able to accept incoming gaming requests whenever you get online.</description>
 +    </key>
 +    <key type="i" name="welcome-screen-width">
 +      <default>600</default>
 +      <summary>The width of welcome screen</summary>
 +      <description>The width of welcome screen in pixels.</description>
 +    </key>
 +    <key type="i" name="welcome-screen-height">
 +      <default>300</default>
 +      <summary>The height of the welcome screen</summary>
 +      <description>The height of the welcome screen in pixels.</description>
 +    </key>
 +    <key type="i" name="remote-player-selector-width">
 +      <default>600</default>
 +      <summary>The width of the welcome screen</summary>
 +      <description>The width of the welcome screen in pixels.</description>
 +    </key>
 +    <key type="i" name="remote-player-selector-height">
 +      <default>400</default>
 +      <summary>The height of remote player selector screen</summary>
 +      <description>The height of remote player selector screen in pixels.</description>
 +    </key>
 +    <key type="i" name="preferences-screen-width">
 +      <default>600</default>
 +      <summary>The width of preferences screen</summary>
 +      <description>The width of preferences screen in pixels.</description>
 +    </key>
 +    <key type="i" name="preferences-screen-height">
 +      <default>300</default>
 +      <summary>The height of preferences screen</summary>
 +      <description>The height of preferences screen in pixels.</description>
 +    </key>
 +    <key type="i" name="game-screen-width">
-       <default>500</default>
+       <default>700</default>
 -      <summary>The width of the window</summary>
 -      <description>The width of the main window in pixels.</description>
 +      <summary>The width of window for gaming with a local player or a robot</summary>
 +      <description>The width of window for gaming with a local player or a robot.</description>
      </key>
 -    <key name="height" type="i">
 +    <key type="i" name="game-screen-height">
        <default>550</default>
        <summary>The height of the window</summary>
        <description>The height of the main window in pixels.</description>
@@@ -166,17 -66,7 +165,7 @@@
        <summary>A flag to enable board numbering</summary>
        <description>A flag to enable board numbering</description>
      </key>
-     <key type="b" name="show-history">
-       <default>true</default>
-       <summary>A flag to enable the move history browser</summary>
-       <description>A flag to enable the move history browser</description>
-     </key>
-     <key type="b" name="show-toolbar">
-       <default>false</default>
-       <summary>A flag to enable the toolbar</summary>
-       <description>A flag to enable the toolbar</description>
-     </key>
 -    <key name="save-directory" type="s">
 +    <key type="s" name="save-directory">
        <default>''</default>
        <summary>The directory to open the save game dialog in</summary>
        <description>The directory to open the save game dialog in</description>
diff --cc data/preferences.ui
index 34277f5,94818d6..9ee6ca7
--- a/data/preferences.ui
+++ b/data/preferences.ui
@@@ -77,14 -559,12 +143,13 @@@
                      <property name="can_focus">False</property>
                      <child>
                        <object class="GtkCheckButton" id="show_3d_check">
-                         <property name="label" translatable="yes" comments="Preferences Dialog: Check box 
for selecting if 3D view is available">3_D Chess View</property>
 +                        <property name="use_action_appearance">False</property>
+                         <property name="label" translatable="yes" comments="Preferences Dialog: Check box 
for selecting if 3D view is available">3_D chess view</property>
                          <property name="visible">True</property>
                          <property name="can_focus">True</property>
                          <property name="receives_default">False</property>
-                         <property name="use_action_appearance">False</property>
                          <property name="use_underline">True</property>
 -                        <property name="xalign">0.5</property>
 +                        <property name="xalign">0</property>
                          <property name="draw_indicator">True</property>
                          <signal name="toggled" handler="show_3d_toggle_cb" swapped="no"/>
                        </object>
@@@ -112,15 -592,13 +177,14 @@@
                          </child>
                          <child>
                            <object class="GtkCheckButton" id="show_3d_smooth_check">
-                             <property name="label" translatable="yes" comments="Preferences Dialog: Check 
box for selecting if the 3D view is smoothed (anti-aliased)">_Smooth Display</property>
 +                            <property name="use_action_appearance">False</property>
+                             <property name="label" translatable="yes" comments="Preferences Dialog: Check 
box for selecting if the 3D view is smoothed (anti-aliased)">_Smooth display</property>
                              <property name="visible">True</property>
                              <property name="sensitive">False</property>
                              <property name="can_focus">True</property>
                              <property name="receives_default">False</property>
-                             <property name="use_action_appearance">False</property>
                              <property name="use_underline">True</property>
 -                            <property name="xalign">0.5</property>
 +                            <property name="xalign">0</property>
                              <property name="draw_indicator">True</property>
                            </object>
                            <packing>
@@@ -137,59 -615,13 +201,57 @@@
                        </packing>
                      </child>
                      <child>
 +                      <object class="GtkTable" id="theme_table">
 +                        <property name="visible">True</property>
 +                        <property name="can_focus">False</property>
 +                        <property name="n_columns">2</property>
 +                        <property name="column_spacing">5</property>
 +                        <property name="row_spacing">5</property>
 +                        <child>
 +                          <object class="GtkLabel" id="piece_style_label">
 +                            <property name="visible">True</property>
 +                            <property name="can_focus">False</property>
 +                            <property name="xalign">0</property>
-                             <property name="label" translatable="yes" comments="Preferences Dialog: Label 
before piece style combo box">Piece Style:</property>
++                            <property name="label" translatable="yes" comments="Preferences Dialog: Label 
before piece style combo box">Piece style:</property>
 +                          </object>
 +                          <packing>
 +                            <property name="x_options">GTK_FILL</property>
 +                          </packing>
 +                        </child>
 +                        <child>
 +                          <object class="GtkComboBox" id="piece_style_combo">
 +                            <property name="visible">True</property>
 +                            <property name="can_focus">False</property>
 +                            <property name="model">piece_style_model</property>
 +                            <signal name="changed" handler="piece_style_combo_changed_cb" swapped="no"/>
 +                            <child>
 +                              <object class="GtkCellRendererText" id="piece_style_cellrenderer"/>
 +                              <attributes>
 +                                <attribute name="text">0</attribute>
 +                              </attributes>
 +                            </child>
 +                          </object>
 +                          <packing>
 +                            <property name="left_attach">1</property>
 +                            <property name="right_attach">2</property>
 +                            <property name="x_options">GTK_FILL</property>
 +                          </packing>
 +                        </child>
 +                      </object>
 +                      <packing>
 +                        <property name="expand">True</property>
 +                        <property name="fill">True</property>
 +                        <property name="position">2</property>
 +                      </packing>
 +                    </child>
 +                    <child>
-                       <object class="GtkCheckButton" id="show_toolbar_check">
-                         <property name="label" translatable="yes" comments="Preferences Dialog: Check box 
for selecting if toolbar is visible">Show _Toolbar</property>
-                         <property name="use_action_appearance">False</property>
+                       <object class="GtkCheckButton" id="show_numbering_check">
+                         <property name="label" translatable="yes" comments="Preferences Dialog: Check box 
for selecting if board numbering is visible">_Board numbering</property>
                          <property name="visible">True</property>
                          <property name="can_focus">True</property>
                          <property name="receives_default">False</property>
-                         <property name="use_action_appearance">False</property>
                          <property name="use_underline">True</property>
 -                        <property name="xalign">0.5</property>
 +                        <property name="xalign">0</property>
                          <property name="draw_indicator">True</property>
                        </object>
                        <packing>
@@@ -223,33 -636,14 +266,32 @@@
                          <property name="visible">True</property>
                          <property name="can_focus">True</property>
                          <property name="receives_default">False</property>
-                         <property name="use_action_appearance">False</property>
                          <property name="use_underline">True</property>
 -                        <property name="xalign">0.5</property>
 +                        <property name="xalign">0</property>
                          <property name="draw_indicator">True</property>
                        </object>
                        <packing>
                          <property name="expand">False</property>
                          <property name="fill">False</property>
 -                        <property name="position">4</property>
 +                        <property name="position">5</property>
 +                      </packing>
 +                    </child>
 +                    <child>
 +                      <object class="GtkCheckButton" id="show_numbering_check">
-                         <property name="label" translatable="yes" comments="Preferences Dialog: Check box 
for selecting if board numbering is visible">_Board Numbering</property>
++                        <property name="label" translatable="yes" comments="Preferences Dialog: Check box 
for selecting if board numbering is visible">_Board numbering</property>
 +                        <property name="use_action_appearance">False</property>
 +                        <property name="visible">True</property>
 +                        <property name="can_focus">True</property>
 +                        <property name="receives_default">False</property>
 +                        <property name="use_action_appearance">False</property>
 +                        <property name="use_underline">True</property>
 +                        <property name="xalign">0</property>
 +                        <property name="draw_indicator">True</property>
 +                      </object>
 +                      <packing>
 +                        <property name="expand">False</property>
 +                        <property name="fill">False</property>
 +                        <property name="position">6</property>
                        </packing>
                      </child>
                    </object>
@@@ -381,42 -726,12 +390,38 @@@
      </columns>
      <data>
        <row>
 -        <col id="0" translatable="yes" context="chess-player" comments="Preferences Dialog: Combo box entry 
for playing as white">White</col>
 -        <col id="1">True</col>
 +        <col id="0" translatable="yes" context="chess-side" comments="Preferences Dialog: Combo box entry 
for setting the board orientation to the white side">White Side</col>
 +        <col id="1">white</col>
        </row>
        <row>
 -        <col id="0" translatable="yes" context="chess-player" comments="Preferences Dialog: Combo box entry 
for playing as black">Black</col>
 -        <col id="1">False</col>
 +        <col id="0" translatable="yes" context="chess-side" comments="Preferences Dialog: Combo box entry 
for setting the board orientation to the black side">Black Side</col>
 +        <col id="1">black</col>
 +      </row>
 +      <row>
 +        <col id="0" translatable="yes" context="chess-side" comments="Preferences Dialog: Combo box entry 
for setting the board orientation to the side the human player is on">Human Side</col>
 +        <col id="1">human</col>
 +      </row>
 +      <row>
 +        <col id="0" translatable="yes" context="chess-side" comments="Preferences Dialog: Combo box entry 
for setting the board orientation to the side the current active player is on">Current Player</col>
 +        <col id="1">current</col>
 +      </row>
-       <row>
-         <col id="0" translatable="yes" context="chess-side" comments="Preferences Dialog: Combo box entry 
for setting the board orientation face to face mode where opponents are looking at the same screen from 
opposite sides (e.g. with a tablet)">Face to Face</col>
-         <col id="1">facetoface</col>
-       </row>
 +    </data>
 +  </object>
 +  <object class="GtkListStore" id="piece_style_model">
 +    <columns>
 +      <!-- column-name label -->
 +      <column type="gchararray"/>
 +      <!-- column-name piece-style -->
 +      <column type="gchararray"/>
 +    </columns>
 +    <data>
 +      <row>
 +        <col id="0" translatable="yes" comments="Preferences Dialog: Combo box entry for simple 
theme">Simple</col>
 +        <col id="1">simple</col>
 +      </row>
 +      <row>
 +        <col id="0" translatable="yes" comments="Preferences Dialog: Combo box entry for fancy 
theme">Fancy</col>
 +        <col id="1">fancy</col>
        </row>
      </data>
    </object>
diff --cc src/Makefile.am
index ce6bd3a,36d8dec..4690f2b
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@@ -12,33 -11,6 +12,32 @@@ gnome_chess_SOURCES = 
        glx.vapi \
        3ds.vala \
        gnome-chess.vala \
 +      gnome-chess-application.vala \
 +      chess-launcher.vala \
 +      gnome-chess-handler-application.vala \
 +      ai-profile.vala \
 +      chess-bitboard.vala \
 +      chess-clock.vala \
 +      chess-engine.vala \
 +      chess-engine-cecp.vala \
 +      chess-engine-uci.vala \
 +      chess-game.vala \
 +      chess-pgn.vala \
 +      chess-scene.vala \
 +      chess-view.vala \
 +      chess-view-2d.vala \
-       chess-view-3d.vala \
-       history.vala
++      chess-view-3d.vala
 +
 +gnome_chess_channel_handler_SOURCES = \
 +      config.vapi \
 +      gl.vapi \
 +      glu.vapi \
 +      glx.vapi \
 +      3ds.vala \
 +      gnome-chess-application.vala \
 +      chess-launcher.vala \
 +      gnome-chess-channel-handler.vala \
 +      gnome-chess-handler-application.vala \
        ai-profile.vala \
        chess-bitboard.vala \
        chess-clock.vala \
@@@ -80,9 -52,10 +80,11 @@@ test_chess_pgn_VALAFLAGS = 
  gnome_chess_CFLAGS = \
        -DVERSION=\"$(VERSION)\" \
        -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \
-       -DPKGDATADIR=\"@datadir@/gnome-chess\" \
+       -DPKGDATADIR=\"$(pkgdatadir)/\" \
+       -DLOCALEDIR=\"$(localedir)\" \
+       -DSYSCONFDIR=\"$(sysconfdir)\" \
 +      -I$(top_srcdir)/libgames-contacts \
-       -DLOCALEDIR=\"@localedir \" \
+       -w \
        $(GNOME_CHESS_CFLAGS)
  
  gnome_chess_LDADD = \
diff --cc src/chess-game.vala
index 146054a,21c41af..28266b1
--- a/src/chess-game.vala
+++ b/src/chess-game.vala
@@@ -22,9 -23,19 +32,19 @@@ public class ChessPlayer : Objec
      public signal bool do_resign ();
      public signal bool do_claim_draw ();
  
+     private bool _local_human = false;
+     public bool local_human
+     {
+         get { return _local_human; }
+         set
+         {
+             _local_human = value;
+         }
+     }
+ 
      public ChessPlayer (Color color)
      {
 -        this.color = color;
 +        Object (color : color);
      }
  
      public bool move (string move, bool apply = true)
@@@ -1222,10 -1260,11 +1289,11 @@@ public enum ChessRul
      INSUFFICIENT_MATERIAL,
      RESIGN,
      ABANDONMENT,
-     DEATH
+     DEATH,
+     BUG
  }
  
 -public class ChessGame
 +public class ChessGame : Object
  {
      public bool is_started;
      public ChessResult result;
@@@ -1312,14 -1343,14 +1386,20 @@@
          black.do_undo.connect (undo_cb);
          black.do_resign.connect (resign_cb);
          black.do_claim_draw.connect (claim_draw_cb);
 +        /* Connect to remote player's moves */
 +        if (white is RemoteChessPlayerIface && black is RemoteChessPlayerIface)
 +        {
 +            (white as RemoteChessPlayerIface).do_move_remote.connect (remote_move_cb);
 +            (black as RemoteChessPlayerIface).do_move_remote.connect (remote_move_cb);
 +        }
      }
  
+     ~ChessGame ()
+     {
+         if (_clock != null)
+             _clock.stop ();
+     }
+ 
      private bool move_cb (ChessPlayer player, string move, bool apply)
      {
          if (!is_started)
diff --cc src/config.vapi
index 2feca8c,ee6dfda..3f2ddb2
--- a/src/config.vapi
+++ b/src/config.vapi
@@@ -1,9 -1,5 +1,10 @@@
 -public const string PKGDATADIR;
 -public const string SYSCONFDIR;
 -public const string LOCALEDIR;
 -public const string GETTEXT_PACKAGE;
 -public const string VERSION;
 +[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
 +namespace Config
 +{
 +  public const string PKGDATADIR;
 +  public const string LOCALEDIR;
++  public const string SYSCONFDIR;
 +  public const string GETTEXT_PACKAGE;
 +  public const string VERSION;
 +  public const bool ENABLE_NETWORKING;
 +}
diff --cc src/gnome-chess.vala
index 61857d1,14fd860..4a3ff46
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@@ -12,10 -2112,13 +12,13 @@@ class GnomeChes
      public static int main (string[] args)
      {
          Intl.setlocale (LocaleCategory.ALL, "");
 -        Intl.bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
 -        Intl.bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 -        Intl.textdomain (GETTEXT_PACKAGE);
 +        Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.LOCALEDIR);
 +        Intl.bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8");
 +        Intl.textdomain (Config.GETTEXT_PACKAGE);
  
+         /* This can probably be removed if the desktop file is renamed to gnome-chess.desktop */
+         Environment.set_prgname ("glchess");
+ 
          Gtk.init (ref args);
  
          var c = new OptionContext (/* Arguments and description for --help text */
diff --cc src/test-chess-game.vala
index 9ae18e1,bd67e13..1638475
--- a/src/test-chess-game.vala
+++ b/src/test-chess-game.vala
@@@ -5,9 -15,10 +15,10 @@@ class GlChes
  
      private static void test_good_move (string fen, string move, string result_fen,
                                          ChessResult result = ChessResult.IN_PROGRESS,
-                                         ChessRule rule = ChessRule.CHECKMATE)
+                                         ChessRule rule = ChessRule.CHECKMATE,
+                                         bool verify_san = false)
      {
 -        ChessState state = new ChessState (fen);
 +        ChessState state = new ChessState (null, null, fen);
          test_count++;
          if (!state.move (move))
          {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]