[gthumb] show the error dialog correctly, after a connection failure
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] show the error dialog correctly, after a connection failure
- Date: Wed, 31 Mar 2010 13:58:37 +0000 (UTC)
commit f22608bb6e53c4a20862b07cc226107bbd6c9bc9
Author: Paolo Bacchilega <paobac src gnome org>
Date: Wed Mar 31 15:57:45 2010 +0200
show the error dialog correctly, after a connection failure
[bug #614450]
extensions/flicker/dlg-export-to-flickr.c | 15 ++++++++++++++-
extensions/picasaweb/dlg-export-to-picasaweb.c | 9 +++++++++
2 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/extensions/flicker/dlg-export-to-flickr.c b/extensions/flicker/dlg-export-to-flickr.c
index 1c6bc08..b625e4a 100644
--- a/extensions/flicker/dlg-export-to-flickr.c
+++ b/extensions/flicker/dlg-export-to-flickr.c
@@ -130,8 +130,11 @@ completed_messagedialog_response_cb (GtkDialog *dialog,
else if (data->photoset->id != NULL)
url = g_strconcat ("http://www.flickr.com/photos/", data->user->id, "/sets/", data->photoset->id, NULL);
- if ((url != NULL) && ! gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)), url, 0, &error))
+ if ((url != NULL) && ! gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)), url, 0, &error)) {
+ if (data->conn != NULL)
+ gth_task_dialog (GTH_TASK (data->conn), TRUE);
_gtk_error_dialog_from_gerror_run (GTK_WINDOW (data->browser), _("Could not connect to the server"), &error);
+ }
gtk_widget_destroy (data->dialog);
g_free (url);
@@ -372,6 +375,8 @@ photoset_list_ready_cb (GObject *source_object,
_g_object_list_unref (data->photosets);
data->photosets = flickr_service_list_photosets_finish (FLICKR_SERVICE (source_object), res, &error);
if (error != NULL) {
+ if (data->conn != NULL)
+ gth_task_dialog (GTH_TASK (data->conn), TRUE);
_gtk_error_dialog_from_gerror_run (GTK_WINDOW (data->browser), _("Could not connect to the server"), &error);
gtk_widget_destroy (data->dialog);
return;
@@ -427,6 +432,8 @@ upload_status_ready_cb (GObject *source_object,
data->user = flickr_service_get_upload_status_finish (FLICKR_SERVICE (source_object), res, &error);
if (error != NULL) {
+ if (data->conn != NULL)
+ gth_task_dialog (GTH_TASK (data->conn), TRUE);
_gtk_error_dialog_from_gerror_run (GTK_WINDOW (data->browser), _("Could not connect to the server"), &error);
gtk_widget_destroy (data->dialog);
return;
@@ -462,6 +469,8 @@ connection_token_ready_cb (GObject *source_object,
GList *link;
if (! flickr_connection_get_token_finish (FLICKR_CONNECTION (source_object), res, &error)) {
+ if (data->conn != NULL)
+ gth_task_dialog (GTH_TASK (data->conn), TRUE);
_gtk_error_dialog_from_gerror_run (GTK_WINDOW (data->browser), _("Could not connect to the server"), &error);
gtk_widget_destroy (data->dialog);
return;
@@ -568,6 +577,8 @@ ask_authorization_messagedialog_response_cb (GtkDialog *dialog,
complete_authorization (data);
}
else {
+ if (data->conn != NULL)
+ gth_task_dialog (GTH_TASK (data->conn), TRUE);
_gtk_error_dialog_from_gerror_run (GTK_WINDOW (data->browser), _("Could not connect to the server"), &error);
gtk_widget_destroy (data->dialog);
}
@@ -613,6 +624,8 @@ connection_frob_ready_cb (GObject *source_object,
GError *error = NULL;
if (! flickr_connection_get_frob_finish (FLICKR_CONNECTION (source_object), res, &error)) {
+ if (data->conn != NULL)
+ gth_task_dialog (GTH_TASK (data->conn), TRUE);
_gtk_error_dialog_from_gerror_run (GTK_WINDOW (data->browser), _("Could not connect to the server"), &error);
gtk_widget_destroy (data->dialog);
return;
diff --git a/extensions/picasaweb/dlg-export-to-picasaweb.c b/extensions/picasaweb/dlg-export-to-picasaweb.c
index 94d2881..3941c8d 100644
--- a/extensions/picasaweb/dlg-export-to-picasaweb.c
+++ b/extensions/picasaweb/dlg-export-to-picasaweb.c
@@ -271,6 +271,8 @@ list_albums_ready_cb (GObject *source_object,
_g_object_list_unref (data->albums);
data->albums = picasa_web_service_list_albums_finish (picasaweb, result, &error);
if (error != NULL) {
+ if (data->conn != NULL)
+ gth_task_dialog (GTH_TASK (data->conn), TRUE);
_gtk_error_dialog_from_gerror_show (GTK_WINDOW (data->browser), _("Could not get the album list"), &error);
gtk_widget_destroy (data->dialog);
return;
@@ -327,6 +329,8 @@ connection_ready_cb (GObject *source_object,
account_properties_dialog (data, data->email);
}
else {
+ if (data->conn != NULL)
+ gth_task_dialog (GTH_TASK (data->conn), TRUE);
_gtk_error_dialog_from_gerror_show (GTK_WINDOW (data->browser), _("Could not connect to the server"), &error);
gtk_widget_destroy (data->dialog);
}
@@ -581,6 +585,8 @@ create_album_ready_cb (GObject *source_object,
album = picasa_web_service_create_album_finish (picasaweb, result, &error);
if (error != NULL) {
+ if (data->conn != NULL)
+ gth_task_dialog (GTH_TASK (data->conn), TRUE);
_gtk_error_dialog_from_gerror_show (GTK_WINDOW (data->browser), _("Could not create the album"), &error);
return;
}
@@ -843,6 +849,9 @@ dlg_export_to_picasaweb (GthBrowser *browser,
if (data->file_list == NULL) {
GError *error;
+ if (data->conn != NULL)
+ gth_task_dialog (GTH_TASK (data->conn), TRUE);
+
error = g_error_new_literal (GTH_ERROR, GTH_ERROR_GENERIC, _("No valid file selected."));
_gtk_error_dialog_from_gerror_show (GTK_WINDOW (browser), _("Could not export the files"), &error);
export_dialog_destroy_cb (NULL, data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]