Remove a gtk warning.

This commit is contained in:
Andreas Røsdal 2006-10-30 18:42:25 +00:00
parent b7aca03b4d
commit 0a4a8d4c93
2 changed files with 12 additions and 7 deletions

View file

@ -1,6 +1,10 @@
------------------------------------------------------------------------------
CHANGELOG
------------------------------------------------------------------------------
2006-10-30 Andreas Røsdal <andrearo@pvv.ntnu.no>
* src/lib/gtkui/gtkui.py: Silence a GtkWarning.
2006-10-30 Andreas Røsdal <andrearo@pvv.ntnu.no>
* src/lib/gtkui/gtkui.py: Fix closing of the about-dialog.

View file

@ -857,8 +857,9 @@ class GtkUI(glchess.ui.UI):
self.__getWidget('menu_end_game_item').set_sensitive(enableWidgets)
combo = self.__getWidget('history_combo')
if view is None:
combo.set_model(None)
if view is None:
if combo.get_model() != None:
combo.set_model(None)
else:
(model, selected) = view._getModel()
combo.set_model(model)
@ -911,11 +912,11 @@ class GtkUI(glchess.ui.UI):
self.__aboutDialog = loadGladeFile('about.glade', domain = 'glchess')
self.__aboutDialog.signal_autoconnect(self)
def _on_glchess_about_dialog_close(self, widget, data = None):
"""Gtk+ callback"""
self.__aboutDialog.get_widget('glchess_about_dialog').destroy()
self.__aboutDialog = None
return False
def _on_glchess_about_dialog_close(self, widget, data = None):
"""Gtk+ callback"""
self.__aboutDialog.get_widget('glchess_about_dialog').destroy()
self.__aboutDialog = None
return False
def _on_ai_window_delete_event(self, widget, data = None):
"""Gtk+ callback"""