[gnome-chess/No-need-of-promotion-type-combo-box-and-related-settings] [chess] No need of promotion-type combo box and related settings



commit fc9d176db0013d4fffae29dfe6a17b3f601a6dc2
Author: Chandni Verma <chandniverma2112 gmail com>
Date:   Sat May 5 20:33:58 2012 +0530

    [chess] No need of promotion-type combo box and related settings

 data/org.gnome.gnome-chess.gschema.xml.in |    7 +-
 data/preferences.ui                       |  369 ++++++++++++++---------------
 src/gnome-chess.vala                      |    9 -
 3 files changed, 181 insertions(+), 204 deletions(-)
---
diff --git a/data/org.gnome.gnome-chess.gschema.xml.in b/data/org.gnome.gnome-chess.gschema.xml.in
index 32a5856..42bafb9 100644
--- a/data/org.gnome.gnome-chess.gschema.xml.in
+++ b/data/org.gnome.gnome-chess.gschema.xml.in
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+ï<?xml version="1.0" encoding="UTF-8"?>
 <schemalist>
   <enum id="org.gnome.gnome-chess.PieceType">
     <value value="0" nick="pawn"/>
@@ -51,11 +51,6 @@
       <_summary>A flag to enable fullscreen mode</_summary>
       <_description>A flag to enable fullscreen mode</_description>
     </key>
-    <key name="promotion-type" enum="org.gnome.gnome-chess.PieceType">
-      <default>'queen'</default>
-      <_summary>The piece to promote pawns to</_summary>
-      <_description>The piece to promote to when a human player moves a pawn to the far rank</_description>
-    </key>
     <key name="show-3d" type="b">
       <default>false</default>
       <_summary>A flag to enable 3D mode</_summary>
diff --git a/data/preferences.ui b/data/preferences.ui
index 81416ec..830bc5c 100644
--- a/data/preferences.ui
+++ b/data/preferences.ui
@@ -1,17 +1,47 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk+" version="2.16"/>
-  <!-- interface-naming-policy toplevel-contextual -->
   <object class="GtkDialog" id="preferences">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes" comments="Title for preferences dialog">Preferences</property>
     <property name="resizable">False</property>
     <property name="destroy_with_parent">True</property>
     <property name="type_hint">dialog</property>
-    <signal name="response" handler="preferences_response_cb"/>
-    <signal name="delete_event" handler="preferences_delete_event_cb"/>
+    <signal name="delete-event" handler="preferences_delete_event_cb" swapped="no"/>
+    <signal name="response" handler="preferences_response_cb" swapped="no"/>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="closebutton1">
+                <property name="label">gtk-close</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -20,14 +50,16 @@
             <child>
               <object class="GtkTable" id="game_table1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">10</property>
-                <property name="n_rows">7</property>
+                <property name="n_rows">6</property>
                 <property name="n_columns">2</property>
                 <property name="column_spacing">5</property>
                 <property name="row_spacing">5</property>
                 <child>
                   <object class="GtkLabel" id="side_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 player side (white/black) combo box">Play as:</property>
                   </object>
@@ -39,12 +71,13 @@
                 <child>
                   <object class="GtkLabel" id="opposing_player_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 opposing player combo box">Opposing Player:</property>
                   </object>
                   <packing>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</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>
@@ -52,12 +85,13 @@
                 <child>
                   <object class="GtkLabel" id="label2">
                     <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 promotion type combo box">Difficulty:</property>
                   </object>
                   <packing>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_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>
@@ -65,8 +99,9 @@
                 <child>
                   <object class="GtkComboBox" id="side_combo">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="model">side_model</property>
-                    <signal name="changed" handler="side_combo_changed_cb"/>
+                    <signal name="changed" handler="side_combo_changed_cb" swapped="no"/>
                     <child>
                       <object class="GtkCellRendererText" id="side_cellrenderer"/>
                       <attributes>
@@ -83,8 +118,9 @@
                 <child>
                   <object class="GtkComboBox" id="opponent_combo">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="model">opponent_model</property>
-                    <signal name="changed" handler="opponent_combo_changed_cb"/>
+                    <signal name="changed" handler="opponent_combo_changed_cb" swapped="no"/>
                     <child>
                       <object class="GtkCellRendererText" id="opponent_cellrenderer"/>
                       <attributes>
@@ -95,8 +131,8 @@
                   <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="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
                     <property name="x_options">GTK_FILL</property>
                     <property name="y_options">GTK_FILL</property>
                   </packing>
@@ -104,8 +140,9 @@
                 <child>
                   <object class="GtkComboBox" id="difficulty_combo">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="model">difficulty_model</property>
-                    <signal name="changed" handler="difficulty_combo_changed_cb"/>
+                    <signal name="changed" handler="difficulty_combo_changed_cb" swapped="no"/>
                     <child>
                       <object class="GtkCellRendererText" id="difficulty_cellrenderer"/>
                       <attributes>
@@ -116,18 +153,20 @@
                   <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="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
                     <property name="x_options">GTK_FILL</property>
                     <property name="y_options">GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkAlignment" id="custom_duration_box">
+                    <property name="can_focus">False</property>
                     <property name="left_padding">18</property>
                     <child>
                       <object class="GtkHBox" id="hbox22">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">6</property>
                         <child>
                           <object class="GtkSpinButton" id="custom_duration_spin">
@@ -139,14 +178,17 @@
                             <property name="numeric">True</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
                         <child>
                           <object class="GtkComboBox" id="custom_duration_units_combo">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="model">custom_duration_units_model</property>
-                            <signal name="changed" handler="duration_units_changed_cb"/>
+                            <signal name="changed" handler="duration_units_changed_cb" swapped="no"/>
                             <child>
                               <object class="GtkCellRendererText" id="custom_duration_units_cellrenderer"/>
                               <attributes>
@@ -155,6 +197,8 @@
                             </child>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
@@ -164,8 +208,8 @@
                   <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">4</property>
+                    <property name="bottom_attach">5</property>
                     <property name="x_options">GTK_FILL</property>
                     <property name="y_options">GTK_FILL</property>
                   </packing>
@@ -173,14 +217,15 @@
                 <child>
                   <object class="GtkLabel" id="label3">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes" comments="New Game Dialog: Label before game timer settings">Game Duration:</property>
                     <property name="use_underline">True</property>
                     <property name="mnemonic_widget">duration_combo</property>
                   </object>
                   <packing>
-                    <property name="top_attach">4</property>
-                    <property name="bottom_attach">5</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
                     <property name="x_options">GTK_FILL</property>
                     <property name="y_options"></property>
                   </packing>
@@ -188,8 +233,9 @@
                 <child>
                   <object class="GtkComboBox" id="duration_combo">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="model">duration_model</property>
-                    <signal name="changed" handler="duration_combo_changed_cb"/>
+                    <signal name="changed" handler="duration_combo_changed_cb" swapped="no"/>
                     <child>
                       <object class="GtkCellRendererText" id="duration_cellrenderer"/>
                       <attributes>
@@ -200,75 +246,47 @@
                   <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">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label5">
-                    <property name="visible">True</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes" comments="Preferences Dialog: Label before promotion type combo box">Promotion Type:</property>
-                  </object>
-                  <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>
-                  <object class="GtkComboBox" id="promotion_type_combo">
-                    <property name="visible">True</property>
-                    <property name="model">promotion_type_model</property>
-                    <signal name="changed" handler="promotion_type_combo_changed_cb"/>
-                    <child>
-                      <object class="GtkCellRendererText" id="promotion_type_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="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options">GTK_FILL</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
                     <property name="y_options">GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkHBox" id="hbox2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="spacing">5</property>
                     <child>
                       <object class="GtkImage" id="image1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="stock">gtk-dialog-info</property>
                         <property name="icon-size">6</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkLabel" id="label4">
                         <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 to notify user that the settings are applied for the next game">Changes will take effect for the next game.</property>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
                   </object>
                   <packing>
                     <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">GTK_FILL</property>
                   </packing>
                 </child>
@@ -280,6 +298,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes" comments="Preferences Dialog: Tab title for game preferences">Game</property>
               </object>
               <packing>
@@ -289,6 +308,7 @@
             <child>
               <object class="GtkTable" id="table1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="border_width">10</property>
                 <property name="n_rows">3</property>
                 <property name="n_columns">2</property>
@@ -297,15 +317,17 @@
                 <child>
                   <object class="GtkVBox" id="view_box">
                     <property name="visible">True</property>
+                    <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="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="draw_indicator">True</property>
-                        <signal name="toggled" handler="show_3d_toggle_cb"/>
+                        <signal name="toggled" handler="show_3d_toggle_cb" swapped="no"/>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -316,9 +338,11 @@
                     <child>
                       <object class="GtkHBox" id="hbox1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkLabel" id="label6">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label">    </property>
                           </object>
                           <packing>
@@ -334,6 +358,7 @@
                             <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="draw_indicator">True</property>
                           </object>
@@ -345,18 +370,22 @@
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </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>
                           </object>
@@ -367,8 +396,9 @@
                         <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"/>
+                            <signal name="changed" handler="piece_style_combo_changed_cb" swapped="no"/>
                             <child>
                               <object class="GtkCellRendererText" id="piece_style_cellrenderer"/>
                               <attributes>
@@ -384,6 +414,8 @@
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">2</property>
                       </packing>
                     </child>
@@ -393,6 +425,7 @@
                         <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="draw_indicator">True</property>
                       </object>
@@ -408,6 +441,7 @@
                         <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="draw_indicator">True</property>
                       </object>
@@ -423,6 +457,7 @@
                         <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="draw_indicator">True</property>
                       </object>
@@ -438,6 +473,7 @@
                         <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="draw_indicator">True</property>
                       </object>
@@ -457,6 +493,7 @@
                 <child>
                   <object class="GtkLabel" id="board_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 board orientation combo box">Board Orientation:</property>
                   </object>
@@ -468,6 +505,7 @@
                 <child>
                   <object class="GtkLabel" id="format_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 move format combo box">Move Format:</property>
                   </object>
@@ -481,8 +519,9 @@
                 <child>
                   <object class="GtkComboBox" id="orientation_combo">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="model">orientation_model</property>
-                    <signal name="changed" handler="orientation_combo_changed_cb"/>
+                    <signal name="changed" handler="orientation_combo_changed_cb" swapped="no"/>
                     <child>
                       <object class="GtkCellRendererText" id="orientation_cellrenderer"/>
                       <attributes>
@@ -499,8 +538,9 @@
                 <child>
                   <object class="GtkComboBox" id="move_format_combo">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="model">move_format_model</property>
-                    <signal name="changed" handler="move_format_combo_changed_cb"/>
+                    <signal name="changed" handler="move_format_combo_changed_cb" swapped="no"/>
                     <child>
                       <object class="GtkCellRendererText" id="move_format_cellrenderer"/>
                       <attributes>
@@ -525,6 +565,7 @@
             <child type="tab">
               <object class="GtkLabel" id="view_label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes" comments="Preferences Dialog: Title of appearance options tab">_Appearance</property>
                 <property name="use_underline">True</property>
               </object>
@@ -535,33 +576,9 @@
             </child>
           </object>
           <packing>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="closebutton1">
-                <property name="label">gtk-close</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
             <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
           </packing>
         </child>
       </object>
@@ -570,60 +587,75 @@
       <action-widget response="-7">closebutton1</action-widget>
     </action-widgets>
   </object>
-  <object class="GtkListStore" id="difficulty_model">
+  <object class="GtkListStore" id="side_model">
     <columns>
       <!-- column-name label -->
       <column type="gchararray"/>
-      <!-- column-name difficulty -->
-      <column type="gchararray"/>
+      <!-- column-name play-as-white -->
+      <column type="gboolean"/>
     </columns>
     <data>
       <row>
-        <col id="0" translatable="yes" context="difficulty" comments="Preferences Dialog: Combo box entry for easy game difficulty">Easy</col>
-        <col id="1">easy</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" context="difficulty" comments="Preferences Dialog: Combo box entry for normal game difficulty">Normal</col>
-        <col id="1">normal</col>
+        <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>
       </row>
       <row>
-        <col id="0" translatable="yes" context="difficulty" comments="Preferences Dialog: Combo box entry for hard game difficulty">Hard</col>
-        <col id="1">hard</col>
+        <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>
       </row>
     </data>
   </object>
-  <object class="GtkListStore" id="opponent_model">
+  <object class="GtkListStore" id="custom_duration_units_model">
     <columns>
       <!-- column-name label -->
       <column type="gchararray"/>
-      <!-- column-name opposing-player -->
-      <column type="gchararray"/>
+      <!-- column-name multiplier -->
+      <column type="gint"/>
     </columns>
     <data>
       <row>
-        <col id="0" translatable="yes" context="chess-opponent" comments="Preferences Dialog: Combo box entry for human opponent">Human</col>
-        <col id="1">human</col>
+        <col id="0">seconds</col>
+        <col id="1">1</col>
+      </row>
+      <row>
+        <col id="0">minutes</col>
+        <col id="1">60</col>
+      </row>
+      <row>
+        <col id="0">hours</col>
+        <col id="1">3600</col>
       </row>
     </data>
   </object>
-  <object class="GtkListStore" id="side_model">
+  <object class="GtkListStore" id="difficulty_model">
     <columns>
       <!-- column-name label -->
       <column type="gchararray"/>
-      <!-- column-name play-as-white -->
-      <column type="gboolean"/>
+      <!-- column-name difficulty -->
+      <column type="gchararray"/>
     </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="difficulty" comments="Preferences Dialog: Combo box entry for easy game difficulty">Easy</col>
+        <col id="1">easy</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="difficulty" comments="Preferences Dialog: Combo box entry for normal game difficulty">Normal</col>
+        <col id="1">normal</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" context="difficulty" comments="Preferences Dialog: Combo box entry for hard game difficulty">Hard</col>
+        <col id="1">hard</col>
       </row>
     </data>
   </object>
+  <object class="GtkAdjustment" id="duration_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">86400</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+    <signal name="value-changed" handler="duration_changed_cb" swapped="no"/>
+  </object>
   <object class="GtkListStore" id="duration_model">
     <columns>
       <!-- column-name label -->
@@ -645,7 +677,7 @@
         <col id="1">300</col>
       </row>
       <row>
-        <col id="0" translatable="yes"  comments="Preferences Dialog: Combo box entry for game timer of thirty minutes">30 minutes</col>
+        <col id="0" translatable="yes" comments="Preferences Dialog: Combo box entry for game timer of thirty minutes">30 minutes</col>
         <col id="1">1800</col>
       </row>
       <row>
@@ -658,133 +690,92 @@
       </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>
-  <object class="GtkListStore" id="orientation_model">
+  <object class="GtkListStore" id="move_format_model">
     <columns>
       <!-- column-name label -->
       <column type="gchararray"/>
-      <!-- column-name board-orientation -->
+      <!-- column-name move-format -->
       <column type="gchararray"/>
     </columns>
     <data>
       <row>
-        <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-side" comments="Preferences Dialog: Combo box entry for setting the board orientation to the black side">Black Side</col>
-        <col id="1">black</col>
+        <col id="0" translatable="yes" context="chess-move-format" comments="Preferences Dialog: Combo box entry for setting the notation type to human readable descriptions">Human</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 human player is on">Human Side</col>
-        <col id="1">human</col>
+        <col id="0" translatable="yes" context="chess-move-format" comments="Preferences Dialog: Combo box entry for setting the notation type to standard algebraic (SAN)">Standard Algebraic</col>
+        <col id="1">san</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>
+        <col id="0" translatable="yes" context="chess-move-format" comments="Preferences Dialog: Combo box entry for setting the notation type to long figurine notation (FAN)">Figurine</col>
+        <col id="1">fan</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>
+        <col id="0" translatable="yes" context="chess-move-format" comments="Preferences Dialog: Combo box entry for setting the notation type to long algebraic (LAN)">Long Algebraic</col>
+        <col id="1">lan</col>
       </row>
     </data>
   </object>
-  <object class="GtkListStore" id="move_format_model">
+  <object class="GtkListStore" id="opponent_model">
     <columns>
       <!-- column-name label -->
       <column type="gchararray"/>
-      <!-- column-name move-format -->
+      <!-- column-name opposing-player -->
       <column type="gchararray"/>
     </columns>
     <data>
       <row>
-        <col id="0" translatable="yes" context="chess-move-format" comments="Preferences Dialog: Combo box entry for setting the notation type to human readable descriptions">Human</col>
+        <col id="0" translatable="yes" context="chess-opponent" comments="Preferences Dialog: Combo box entry for human opponent">Human</col>
         <col id="1">human</col>
       </row>
-      <row>
-        <col id="0" translatable="yes" context="chess-move-format" comments="Preferences Dialog: Combo box entry for setting the notation type to standard algebraic (SAN)">Standard Algebraic</col>
-        <col id="1">san</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" context="chess-move-format" comments="Preferences Dialog: Combo box entry for setting the notation type to long figurine notation (FAN)">Figurine</col>
-        <col id="1">fan</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" context="chess-move-format"  comments="Preferences Dialog: Combo box entry for setting the notation type to long algebraic (LAN)">Long Algebraic</col>
-        <col id="1">lan</col>
-      </row>
     </data>
   </object>
-  <object class="GtkListStore" id="promotion_type_model">
+  <object class="GtkListStore" id="orientation_model">
     <columns>
       <!-- column-name label -->
       <column type="gchararray"/>
-      <!-- column-name piece-type -->
+      <!-- column-name board-orientation -->
       <column type="gchararray"/>
     </columns>
     <data>
       <row>
-        <col id="0" translatable="yes" context="chess-piece" comments="Preferences Dialog: Combo box entry for setting the promition type to a queen">Queen</col>
-        <col id="1">queen</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-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-piece" comments="Preferences Dialog: Combo box entry for setting the promition type to a knight">Knight</col>
-        <col id="1">knight</col>
+        <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-piece" comments="Preferences Dialog: Combo box entry for setting the promition type to a rook">Rook</col>
-        <col id="1">rook</col>
+        <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-piece" comments="Preferences Dialog: Combo box entry for setting the promition type to a bishop">Bishop</col>
-        <col id="1">bishop</col>
+        <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="custom_duration_units_model">
+  <object class="GtkListStore" id="piece_style_model">
     <columns>
       <!-- column-name label -->
       <column type="gchararray"/>
-      <!-- column-name multiplier -->
-      <column type="gint"/>
+      <!-- column-name piece-style -->
+      <column type="gchararray"/>
     </columns>
     <data>
       <row>
-        <col id="0">seconds</col>
-        <col id="1">1</col>
-      </row>
-      <row>
-        <col id="0">minutes</col>
-        <col id="1">60</col>
+        <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">hours</col>
-        <col id="1">3600</col>
+        <col id="0" translatable="yes" comments="Preferences Dialog: Combo box entry for fancy theme">Fancy</col>
+        <col id="1">fancy</col>
       </row>
     </data>
   </object>
-  <object class="GtkAdjustment" id="duration_adjustment">
-    <property name="lower">1</property>
-    <property name="upper">86400</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-    <signal name="value_changed" handler="duration_changed_cb"/>
-  </object>
 </interface>
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index 2b74ca3..1e6f5ee 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -1200,9 +1200,6 @@ public class Application : Gtk.Application
         var move_combo = (Gtk.ComboBox) preferences_builder.get_object ("move_format_combo");
         set_combo (move_combo, 1, settings.get_string ("move-format"));
 
-        var promotion_combo = (Gtk.ComboBox) preferences_builder.get_object ("promotion_type_combo");
-        set_combo (promotion_combo, 1, settings.get_string ("promotion-type"));
-
         var theme_combo = (Gtk.ComboBox) preferences_builder.get_object ("piece_style_combo");
         set_combo (theme_combo, 1, settings.get_string ("piece-theme"));
 
@@ -1442,12 +1439,6 @@ public class Application : Gtk.Application
         w.sensitive = !widget.active;
     }
 
-    [CCode (cname = "G_MODULE_EXPORT promotion_type_combo_changed_cb", instance_pos = -1)]
-    public void promotion_type_combo_changed_cb (Gtk.ComboBox combo)
-    {
-        settings.set_string ("promotion-type", get_combo (combo, 1));
-    }
-
     [CCode (cname = "G_MODULE_EXPORT move_format_combo_changed_cb", instance_pos = -1)]
     public void move_format_combo_changed_cb (Gtk.ComboBox combo)
     {



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