[glom] Intial Dialog: Do not crash sometimes if cancelling the file chooser.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Intial Dialog: Do not crash sometimes if cancelling the file chooser.
- Date: Tue, 9 Mar 2010 16:30:41 +0000 (UTC)
commit c822e07c5e95c95a7c419c02b1236b7a10469b49
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Mar 9 17:30:35 2010 +0100
Intial Dialog: Do not crash sometimes if cancelling the file chooser.
* glom/application.cc: offer_new_or_existing(): Show the dialog again if
we get a 0 response, because we cannot (yet) prevent the dialog from
doing this when the child file chooser dialog is cancelled. Fixes a crash
if pressing the Select button instead of double-clicking on an item.
Bug #612303 (David King)
ChangeLog | 14 ++++++++++++--
glom/application.cc | 7 +++++++
2 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e8a620e..0da7395 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,11 +1,21 @@
+2010-03-09 Murray Cumming <murrayc murrayc com>
+
+ Intial Dialog: Do not crash sometimes if cancelling the file chooser.
+
+ * glom/application.cc: offer_new_or_existing(): Show the dialog again if
+ we get a 0 response, because we cannot (yet) prevent the dialog from
+ doing this when the child file chooser dialog is cancelled. Fixes a crash
+ if pressing the Select button instead of double-clicking on an item.
+ Bug #612303 (David King)
+
1.13.8:
2010-03-08 Murray Cumming <murrayc murrayc com>
Slight update of Small Business example.
- * examples/example_smallbusiness.glom: Resave, with a new record with
- a picture of a polar bear for use on the www.glom.org website.
+ * examples/example_smallbusiness.glom: Resave, with a new record with
+ a picture of a polar bear for use on the www.glom.org website.
The picture is from http://www.flickr.com/photos/mape_s/350700095/
(Creative-Commons licensed, by Marieke IJsendoorn-Kuijpers)
diff --git a/glom/application.cc b/glom/application.cc
index 56b5370..df75cda 100644
--- a/glom/application.cc
+++ b/glom/application.cc
@@ -1390,6 +1390,13 @@ bool Application::offer_new_or_existing()
{
return false; //close the window to close the application, because they need to choose a new or existing document.
}
+ else if((response_id == Gtk::RESPONSE_NONE)
+ || (response_id == 0))
+ {
+ //For instance, the file-open dialog was cancelled after Dialog_ExistingOrNew opened it,
+ //so just ask again.
+ //TODO: Stop Dialog_ExistingOrNew from emitting a response in this case.
+ }
else
{
// This would mean that we got a unhandled response from the dialog
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]