gnome-games r7744 - trunk/glchess/src/lib/gtkui



Author: rancell
Date: Sun Jun 29 10:08:17 2008
New Revision: 7744
URL: http://svn.gnome.org/viewvc/gnome-games?rev=7744&view=rev

Log:
Handle empty combo boxes in the preferences dialog (Bug #532908)

Modified:
   trunk/glchess/src/lib/gtkui/dialogs.py

Modified: trunk/glchess/src/lib/gtkui/dialogs.py
==============================================================================
--- trunk/glchess/src/lib/gtkui/dialogs.py	(original)
+++ trunk/glchess/src/lib/gtkui/dialogs.py	Sun Jun 29 10:08:17 2008
@@ -643,6 +643,8 @@
         """Gtk+ callback"""
         model = widget.get_model()
         iter = widget.get_active_iter()
+        if iter is None:
+            return
         data = model.get(iter, 1)
         if data[0] is not None:
             glchess.config.set('move_format', data[0])
@@ -651,6 +653,8 @@
         """Gtk+ callback"""
         model = widget.get_model()
         iter = widget.get_active_iter()
+        if iter is None:
+            return
         data = model.get(iter, 1)
         if data[0] is not None:
             glchess.config.set('board_view', data[0])
@@ -659,6 +663,8 @@
         """Gtk+ callback"""
         model = widget.get_model()
         iter = widget.get_active_iter()
+        if iter is None:
+            return
         data = model.get(iter, 1)
         if data[0] is not None:
             glchess.config.set('promotion_type', data[0])



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