From 6edc7511beadd8787cc15b044849174a897fcd70 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Wed, 21 Jun 2006 19:18:54 +0000 Subject: [PATCH] 2006-06-21 Alex Roitman * src/DateEdit.py (DateEditorDialog.__init__): Take care of deleting the dialog. svn: r6937 --- ChangeLog | 4 ++++ src/DateEdit.py | 30 +++++++++++++++--------------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a611f7a7..d7f0753b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-06-21 Alex Roitman + * src/DateEdit.py (DateEditorDialog.__init__): Take care of + deleting the dialog. + 2006-06-21 Don Allingham * src/Filters/__init__.py: include new build_filter_model * src/Filters/_FilterMenu.py: build_filter_model diff --git a/src/DateEdit.py b/src/DateEdit.py index 39a9a7a21..039ce1cac 100644 --- a/src/DateEdit.py +++ b/src/DateEdit.py @@ -267,26 +267,26 @@ class DateEditorDialog(ManagedWindow.ManagedWindow): self.return_date = None self.show() - + while True: response = self.window.run() if response == gtk.RESPONSE_HELP: GrampsDisplay.help('adv-dates') - - elif response == gtk.RESPONSE_OK: - (the_quality,the_modifier,the_calendar,the_value,the_text) = \ - self.build_date_from_ui() - self.return_date = Date(self.date) - self.return_date.set( - quality=the_quality, - modifier=the_modifier, - calendar=the_calendar, - value=the_value, - text=the_text) - break + elif response == gtk.RESPONSE_DELETE_EVENT: + return else: - break - self.close() + if response == gtk.RESPONSE_OK: + (the_quality,the_modifier,the_calendar, + the_value,the_text) = self.build_date_from_ui() + self.return_date = Date(self.date) + self.return_date.set( + quality=the_quality, + modifier=the_modifier, + calendar=the_calendar, + value=the_value, + text=the_text) + self.close() + return def build_menu_names(self, obj): return (_("Date selection"), None)