[gthumb] fixed crashes when closing dialogs with the window x button
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] fixed crashes when closing dialogs with the window x button
- Date: Mon, 13 Sep 2010 13:40:05 +0000 (UTC)
commit 7bd1225e65fe44b86a8e017370194f0d14c4f146
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Sep 13 12:33:47 2010 +0200
fixed crashes when closing dialogs with the window x button
remove the default ::delete-event handler when the
DELETE_EVENT response is handled in the ::response
callback
extensions/catalogs/gth-organize-task.c | 4 +++
extensions/edit_metadata/actions.c | 4 +++
extensions/facebook/dlg-export-to-facebook.c | 10 +++++++-
extensions/facebook/facebook-authentication.c | 20 +++++++++++++++
extensions/flicker/dlg-export-to-flickr.c | 6 ++++-
extensions/flicker/dlg-import-from-flickr.c | 6 ++++-
extensions/flicker/flickr-authentication.c | 20 +++++++++++++++
extensions/oauth/oauth-authentication.c | 20 +++++++++++++++
extensions/photobucket/dlg-export-to-photobucket.c | 12 +++++++++
extensions/picasaweb/dlg-export-to-picasaweb.c | 26 +++++++++++++++++++-
extensions/picasaweb/dlg-import-from-picasaweb.c | 20 +++++++++++++++
extensions/slideshow/gth-slideshow-preferences.c | 4 +++
12 files changed, 148 insertions(+), 4 deletions(-)
---
diff --git a/extensions/catalogs/gth-organize-task.c b/extensions/catalogs/gth-organize-task.c
index eda5b3c..465985a 100644
--- a/extensions/catalogs/gth-organize-task.c
+++ b/extensions/catalogs/gth-organize-task.c
@@ -768,6 +768,10 @@ gth_organize_task_init (GthOrganizeTask *self)
G_CALLBACK (create_cellrenderertoggle_toggled_cb),
self);
g_signal_connect (GET_WIDGET ("organize_files_dialog"),
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (GET_WIDGET ("organize_files_dialog"),
"response",
G_CALLBACK (organize_files_dialog_response_cb),
self);
diff --git a/extensions/edit_metadata/actions.c b/extensions/edit_metadata/actions.c
index ff9e1a6..fc2be9c 100644
--- a/extensions/edit_metadata/actions.c
+++ b/extensions/edit_metadata/actions.c
@@ -98,6 +98,10 @@ gth_browser_activate_action_edit_tag_files (GtkAction *action,
dialog = gth_tag_chooser_dialog_new ();
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (tag_chooser_dialog_response_cb),
browser);
diff --git a/extensions/facebook/dlg-export-to-facebook.c b/extensions/facebook/dlg-export-to-facebook.c
index 8491b8d..a50cee9 100644
--- a/extensions/facebook/dlg-export-to-facebook.c
+++ b/extensions/facebook/dlg-export-to-facebook.c
@@ -145,6 +145,10 @@ export_completed_with_success (DialogData *data)
dialog = _gtk_builder_get_widget (builder, "completed_messagedialog");
g_object_set_data_full (G_OBJECT (dialog), "builder", builder, g_object_unref);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (completed_messagedialog_response_cb),
data);
@@ -441,6 +445,10 @@ add_album_button_clicked_cb (GtkButton *button,
NULL,
FACEBOOK_VISIBILITY_SELF);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (new_album_dialog_response_cb),
data);
@@ -562,7 +570,7 @@ dlg_export_to_facebook (GthBrowser *browser,
g_signal_connect (data->dialog,
"delete-event",
- G_CALLBACK (gtk_widget_hide_on_delete),
+ G_CALLBACK (gtk_true),
NULL);
g_signal_connect (data->dialog,
"response",
diff --git a/extensions/facebook/facebook-authentication.c b/extensions/facebook/facebook-authentication.c
index be003bb..72ec7e1 100644
--- a/extensions/facebook/facebook-authentication.c
+++ b/extensions/facebook/facebook-authentication.c
@@ -225,6 +225,10 @@ show_authentication_error_dialog (FacebookAuthentication *self,
gth_task_dialog (GTH_TASK (self->priv->conn), TRUE, dialog);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (authentication_error_dialog_response_cb),
self);
@@ -496,6 +500,10 @@ complete_authorization (FacebookAuthentication *self)
g_object_set (dialog, "text", text, "secondary-text", secondary_text, NULL);
g_object_set_data_full (G_OBJECT (dialog), "builder", builder, g_object_unref);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (complete_authorization_messagedialog_response_cb),
self);
@@ -577,6 +585,10 @@ ask_authorization (FacebookAuthentication *self)
g_object_set (dialog, "text", text, "secondary-text", secondary_text, NULL);
g_object_set_data_full (G_OBJECT (dialog), "builder", builder, g_object_unref);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (ask_authorization_messagedialog_response_cb),
self);
@@ -656,6 +668,10 @@ show_choose_account_dialog (FacebookAuthentication *self)
gth_task_dialog (GTH_TASK (self->priv->conn), TRUE, NULL);
dialog = facebook_account_chooser_dialog_new (self->priv->accounts, self->priv->account);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (account_chooser_dialog_response_cb),
self);
@@ -761,6 +777,10 @@ facebook_authentication_edit_accounts (FacebookAuthentication *self,
dialog = facebook_account_manager_dialog_new (self->priv->accounts);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (account_manager_dialog_response_cb),
self);
diff --git a/extensions/flicker/dlg-export-to-flickr.c b/extensions/flicker/dlg-export-to-flickr.c
index acc1ac3..5771617 100644
--- a/extensions/flicker/dlg-export-to-flickr.c
+++ b/extensions/flicker/dlg-export-to-flickr.c
@@ -160,6 +160,10 @@ export_completed_with_success (DialogData *data)
dialog = _gtk_builder_get_widget (builder, "completed_messagedialog");
g_object_set_data_full (G_OBJECT (dialog), "builder", builder, g_object_unref);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (completed_messagedialog_response_cb),
data);
@@ -553,7 +557,7 @@ dlg_export_to_flickr (FlickrServer *server,
g_signal_connect (data->dialog,
"delete-event",
- G_CALLBACK (gtk_widget_hide_on_delete),
+ G_CALLBACK (gtk_true),
NULL);
g_signal_connect (data->dialog,
"response",
diff --git a/extensions/flicker/dlg-import-from-flickr.c b/extensions/flicker/dlg-import-from-flickr.c
index eebcd5a..2ff353c 100644
--- a/extensions/flicker/dlg-import-from-flickr.c
+++ b/extensions/flicker/dlg-import-from-flickr.c
@@ -594,11 +594,15 @@ dlg_import_from_flickr (FlickrServer *server,
/* Set the signals handlers. */
- g_signal_connect (G_OBJECT (data->dialog),
+ g_signal_connect (data->dialog,
"destroy",
G_CALLBACK (import_dialog_destroy_cb),
data);
g_signal_connect (data->dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (data->dialog,
"response",
G_CALLBACK (import_dialog_response_cb),
data);
diff --git a/extensions/flicker/flickr-authentication.c b/extensions/flicker/flickr-authentication.c
index 1527b68..84d57f5 100644
--- a/extensions/flicker/flickr-authentication.c
+++ b/extensions/flicker/flickr-authentication.c
@@ -224,6 +224,10 @@ show_authentication_error_dialog (FlickrAuthentication *self,
gth_task_dialog (GTH_TASK (self->priv->conn), TRUE, dialog);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (authentication_error_dialog_response_cb),
self);
@@ -435,6 +439,10 @@ complete_authorization (FlickrAuthentication *self)
g_object_set (dialog, "text", text, "secondary-text", secondary_text, NULL);
g_object_set_data_full (G_OBJECT (dialog), "builder", builder, g_object_unref);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (complete_authorization_messagedialog_response_cb),
self);
@@ -511,6 +519,10 @@ ask_authorization (FlickrAuthentication *self)
g_object_set (dialog, "text", text, "secondary-text", secondary_text, NULL);
g_object_set_data_full (G_OBJECT (dialog), "builder", builder, g_object_unref);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (ask_authorization_messagedialog_response_cb),
self);
@@ -595,6 +607,10 @@ show_choose_account_dialog (FlickrAuthentication *self)
gth_task_dialog (GTH_TASK (self->priv->conn), TRUE, NULL);
dialog = flickr_account_chooser_dialog_new (self->priv->accounts, self->priv->account);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (account_chooser_dialog_response_cb),
self);
@@ -700,6 +716,10 @@ flickr_authentication_edit_accounts (FlickrAuthentication *self,
dialog = flickr_account_manager_dialog_new (self->priv->accounts);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (account_manager_dialog_response_cb),
self);
diff --git a/extensions/oauth/oauth-authentication.c b/extensions/oauth/oauth-authentication.c
index 1a38e45..a232ac4 100644
--- a/extensions/oauth/oauth-authentication.c
+++ b/extensions/oauth/oauth-authentication.c
@@ -221,6 +221,10 @@ show_authentication_error_dialog (OAuthAuthentication *self,
gth_task_dialog (GTH_TASK (self->priv->conn), TRUE, dialog);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (authentication_error_dialog_response_cb),
self);
@@ -447,6 +451,10 @@ complete_authorization (OAuthAuthentication *self)
g_object_set (dialog, "text", text, "secondary-text", secondary_text, NULL);
g_object_set_data_full (G_OBJECT (dialog), "builder", builder, g_object_unref);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (complete_authorization_messagedialog_response_cb),
self);
@@ -523,6 +531,10 @@ ask_authorization (OAuthAuthentication *self)
g_object_set (dialog, "text", text, "secondary-text", secondary_text, NULL);
g_object_set_data_full (G_OBJECT (dialog), "builder", builder, g_object_unref);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (ask_authorization_messagedialog_response_cb),
self);
@@ -609,6 +621,10 @@ show_choose_account_dialog (OAuthAuthentication *self)
gth_task_dialog (GTH_TASK (self->priv->conn), TRUE, NULL);
dialog = oauth_account_chooser_dialog_new (self->priv->accounts, self->priv->account);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (account_chooser_dialog_response_cb),
self);
@@ -714,6 +730,10 @@ oauth_authentication_edit_accounts (OAuthAuthentication *self,
dialog = oauth_account_manager_dialog_new (self->priv->accounts);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (account_manager_dialog_response_cb),
self);
diff --git a/extensions/photobucket/dlg-export-to-photobucket.c b/extensions/photobucket/dlg-export-to-photobucket.c
index cff4765..cead58f 100644
--- a/extensions/photobucket/dlg-export-to-photobucket.c
+++ b/extensions/photobucket/dlg-export-to-photobucket.c
@@ -155,6 +155,10 @@ export_completed_with_success (DialogData *data)
dialog = _gtk_builder_get_widget (builder, "completed_messagedialog");
g_object_set_data_full (G_OBJECT (dialog), "builder", builder, g_object_unref);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (completed_messagedialog_response_cb),
data);
@@ -515,6 +519,10 @@ add_album_button_clicked_cb (GtkButton *button,
dialog = photobucket_album_properties_dialog_new (g_file_info_get_edit_name (data->location->info),
data->albums);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (new_album_dialog_response_cb),
data);
@@ -638,6 +646,10 @@ dlg_export_to_photobucket (GthBrowser *browser,
G_CALLBACK (export_dialog_destroy_cb),
data);
g_signal_connect (data->dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (data->dialog,
"response",
G_CALLBACK (export_dialog_response_cb),
data);
diff --git a/extensions/picasaweb/dlg-export-to-picasaweb.c b/extensions/picasaweb/dlg-export-to-picasaweb.c
index 04f9d65..1079b2c 100644
--- a/extensions/picasaweb/dlg-export-to-picasaweb.c
+++ b/extensions/picasaweb/dlg-export-to-picasaweb.c
@@ -162,6 +162,10 @@ export_completed_with_success (DialogData *data)
dialog = _gtk_builder_get_widget (builder, "completed_messagedialog");
g_object_set_data_full (G_OBJECT (dialog), "builder", builder, g_object_unref);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (completed_messagedialog_response_cb),
data);
@@ -506,6 +510,10 @@ account_properties_dialog (DialogData *data,
picasa_account_properties_dialog_can_choose (PICASA_ACCOUNT_PROPERTIES_DIALOG (dialog), TRUE);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (account_properties_dialog_response_cb),
data);
@@ -635,6 +643,10 @@ challange_account_dialog (DialogData *data,
picasa_account_properties_dialog_can_choose (PICASA_ACCOUNT_PROPERTIES_DIALOG (dialog), TRUE);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (challange_account_dialog_response_cb),
data);
@@ -755,6 +767,10 @@ add_album_button_clicked_cb (GtkButton *button,
NULL,
PICASA_WEB_ACCESS_PUBLIC);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (new_album_dialog_response_cb),
data);
@@ -788,6 +804,10 @@ auto_select_account (DialogData *data)
gth_task_dialog (GTH_TASK (data->conn), TRUE, NULL);
dialog = picasa_account_chooser_dialog_new (data->accounts, data->email);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (account_chooser_dialog_response_cb),
data);
@@ -845,6 +865,10 @@ edit_accounts_button_clicked_cb (GtkButton *button,
dialog = picasa_account_manager_dialog_new (data->accounts);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (account_manager_dialog_response_cb),
data);
@@ -1003,7 +1027,7 @@ dlg_export_to_picasaweb (GthBrowser *browser,
g_signal_connect (data->dialog,
"delete-event",
- G_CALLBACK (gtk_widget_hide_on_delete),
+ G_CALLBACK (gtk_true),
NULL);
g_signal_connect (data->dialog,
"response",
diff --git a/extensions/picasaweb/dlg-import-from-picasaweb.c b/extensions/picasaweb/dlg-import-from-picasaweb.c
index ca6e305..89cfe66 100644
--- a/extensions/picasaweb/dlg-import-from-picasaweb.c
+++ b/extensions/picasaweb/dlg-import-from-picasaweb.c
@@ -452,6 +452,10 @@ account_properties_dialog (DialogData *data,
picasa_account_properties_dialog_can_choose (PICASA_ACCOUNT_PROPERTIES_DIALOG (dialog), TRUE);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (account_properties_dialog_response_cb),
data);
@@ -578,6 +582,10 @@ challange_account_dialog (DialogData *data,
picasa_account_properties_dialog_can_choose (PICASA_ACCOUNT_PROPERTIES_DIALOG (dialog), TRUE);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (challange_account_dialog_response_cb),
data);
@@ -647,6 +655,10 @@ auto_select_account (DialogData *data)
gth_task_dialog (GTH_TASK (data->conn), TRUE, NULL);
dialog = picasa_account_chooser_dialog_new (data->accounts, data->email);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (account_chooser_dialog_response_cb),
data);
@@ -704,6 +716,10 @@ edit_accounts_button_clicked_cb (GtkButton *button,
dialog = picasa_account_manager_dialog_new (data->accounts);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (account_manager_dialog_response_cb),
data);
@@ -1014,6 +1030,10 @@ dlg_import_from_picasaweb (GthBrowser *browser)
G_CALLBACK (import_dialog_destroy_cb),
data);
g_signal_connect (data->dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (data->dialog,
"response",
G_CALLBACK (import_dialog_response_cb),
data);
diff --git a/extensions/slideshow/gth-slideshow-preferences.c b/extensions/slideshow/gth-slideshow-preferences.c
index 2114f29..4caba3c 100644
--- a/extensions/slideshow/gth-slideshow-preferences.c
+++ b/extensions/slideshow/gth-slideshow-preferences.c
@@ -224,6 +224,10 @@ add_file_button_clicked_cb (GtkButton *button,
gtk_file_filter_add_mime_type (filter, "audio/*");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
g_signal_connect (dialog,
+ "delete-event",
+ G_CALLBACK (gtk_true),
+ NULL);
+ g_signal_connect (dialog,
"response",
G_CALLBACK (file_chooser_dialog_response_cb),
self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]