[gthumb] Get the screen before destroying the dialog
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] Get the screen before destroying the dialog
- Date: Wed, 14 Jul 2010 09:09:04 +0000 (UTC)
commit ac777b6e782c660a07fdcf61807f709132d81759
Author: Paolo Bacchilega <paobac src gnome org>
Date: Wed Jul 14 11:04:25 2010 +0200
Get the screen before destroying the dialog
extensions/facebook/dlg-export-to-facebook.c | 8 +++++---
extensions/facebook/facebook-authentication.c | 9 +++++----
extensions/flicker/dlg-export-to-flickr.c | 8 +++++---
extensions/flicker/flickr-authentication.c | 8 +++++---
extensions/oauth/oauth-authentication.c | 8 +++++---
extensions/photobucket/dlg-export-to-photobucket.c | 8 +++++---
extensions/picasaweb/dlg-export-to-picasaweb.c | 8 +++++---
7 files changed, 35 insertions(+), 22 deletions(-)
---
diff --git a/extensions/facebook/dlg-export-to-facebook.c b/extensions/facebook/dlg-export-to-facebook.c
index 9c34688..96a9bdc 100644
--- a/extensions/facebook/dlg-export-to-facebook.c
+++ b/extensions/facebook/dlg-export-to-facebook.c
@@ -106,15 +106,17 @@ completed_messagedialog_response_cb (GtkDialog *dialog,
case _OPEN_IN_BROWSER_RESPONSE:
{
- char *url = NULL;
- GError *error = NULL;
+ GdkScreen *screen;
+ char *url = NULL;
+ GError *error = NULL;
+ screen = gtk_widget_get_screen (GTK_WIDGET (dialog));
gtk_widget_destroy (GTK_WIDGET (dialog));
if ((data->album != NULL) && (data->album->link != NULL))
url = g_strdup (data->album->link);
- if ((url != NULL) && ! gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)), url, 0, &error)) {
+ if ((url != NULL) && ! gtk_show_uri (screen, url, 0, &error)) {
if (data->conn != NULL)
gth_task_dialog (GTH_TASK (data->conn), TRUE, NULL);
_gtk_error_dialog_from_gerror_run (GTK_WINDOW (data->browser), _("Could not connect to the server"), &error);
diff --git a/extensions/facebook/facebook-authentication.c b/extensions/facebook/facebook-authentication.c
index 1729528..6bf77ce 100644
--- a/extensions/facebook/facebook-authentication.c
+++ b/extensions/facebook/facebook-authentication.c
@@ -533,15 +533,16 @@ ask_authorization_messagedialog_response_cb (GtkDialog *dialog,
case GTK_RESPONSE_OK:
{
- char *url;
- GError *error = NULL;
+ GdkScreen *screen;
+ char *url;
+ GError *error = NULL;
+ screen = gtk_widget_get_screen (GTK_WIDGET (dialog));
gtk_widget_destroy (GTK_WIDGET (dialog));
url = facebook_connection_get_login_link (self->priv->conn, FACEBOOK_ACCESS_WRITE);
- if (gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)), url, 0, &error)) {
+ if (gtk_show_uri (screen, url, 0, &error))
complete_authorization (self);
- }
else
show_authentication_error_dialog (self, &error);
diff --git a/extensions/flicker/dlg-export-to-flickr.c b/extensions/flicker/dlg-export-to-flickr.c
index 9290302..790d9eb 100644
--- a/extensions/flicker/dlg-export-to-flickr.c
+++ b/extensions/flicker/dlg-export-to-flickr.c
@@ -106,9 +106,11 @@ completed_messagedialog_response_cb (GtkDialog *dialog,
case _OPEN_IN_BROWSER_RESPONSE:
{
- char *url = NULL;
- GError *error = NULL;
+ GdkScreen *screen;
+ char *url = NULL;
+ GError *error = NULL;
+ screen = gtk_widget_get_screen (GTK_WIDGET (dialog));
gtk_widget_destroy (GTK_WIDGET (dialog));
if (data->photoset == NULL) {
@@ -130,7 +132,7 @@ completed_messagedialog_response_cb (GtkDialog *dialog,
else if (data->photoset->id != NULL)
url = g_strconcat (data->server->url, "/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 (screen, url, 0, &error)) {
if (data->conn != NULL)
gth_task_dialog (GTH_TASK (data->conn), TRUE, NULL);
_gtk_error_dialog_from_gerror_run (GTK_WINDOW (data->browser), _("Could not connect to the server"), &error);
diff --git a/extensions/flicker/flickr-authentication.c b/extensions/flicker/flickr-authentication.c
index c71d854..ec6f78e 100644
--- a/extensions/flicker/flickr-authentication.c
+++ b/extensions/flicker/flickr-authentication.c
@@ -472,13 +472,15 @@ ask_authorization_messagedialog_response_cb (GtkDialog *dialog,
case GTK_RESPONSE_OK:
{
- char *url;
- GError *error = NULL;
+ GdkScreen *screen;
+ char *url;
+ GError *error = NULL;
+ screen = gtk_widget_get_screen (GTK_WIDGET (dialog));
gtk_widget_destroy (GTK_WIDGET (dialog));
url = flickr_connection_get_login_link (self->priv->conn, FLICKR_ACCESS_WRITE);
- if (gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)), url, 0, &error))
+ if (gtk_show_uri (screen, url, 0, &error))
complete_authorization (self);
else
show_authentication_error_dialog (self, &error);
diff --git a/extensions/oauth/oauth-authentication.c b/extensions/oauth/oauth-authentication.c
index f2eab84..80f8611 100644
--- a/extensions/oauth/oauth-authentication.c
+++ b/extensions/oauth/oauth-authentication.c
@@ -484,13 +484,15 @@ ask_authorization_messagedialog_response_cb (GtkDialog *dialog,
case GTK_RESPONSE_OK:
{
- char *url;
- GError *error = NULL;
+ GdkScreen *screen;
+ char *url;
+ GError *error = NULL;
+ screen = gtk_widget_get_screen (GTK_WIDGET (dialog));
gtk_widget_destroy (GTK_WIDGET (dialog));
url = oauth_connection_get_login_link (self->priv->conn);
- if (gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)), url, 0, &error))
+ if (gtk_show_uri (screen, url, 0, &error))
complete_authorization (self);
else
show_authentication_error_dialog (self, &error);
diff --git a/extensions/photobucket/dlg-export-to-photobucket.c b/extensions/photobucket/dlg-export-to-photobucket.c
index e6afb96..e320609 100644
--- a/extensions/photobucket/dlg-export-to-photobucket.c
+++ b/extensions/photobucket/dlg-export-to-photobucket.c
@@ -107,9 +107,11 @@ completed_messagedialog_response_cb (GtkDialog *dialog,
case _OPEN_IN_BROWSER_RESPONSE:
{
- char *url = NULL;
- GError *error = NULL;
+ GdkScreen *screen;
+ char *url = NULL;
+ GError *error = NULL;
+ screen = gtk_widget_get_screen (GTK_WIDGET (dialog));
gtk_widget_destroy (GTK_WIDGET (dialog));
if (data->account->album_url != NULL) {
@@ -124,7 +126,7 @@ completed_messagedialog_response_cb (GtkDialog *dialog,
NULL);
}
- if ((url != NULL) && ! gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)), url, 0, &error)) {
+ if ((url != NULL) && ! gtk_show_uri (screen, url, 0, &error)) {
if (data->conn != NULL)
gth_task_dialog (GTH_TASK (data->conn), TRUE, NULL);
_gtk_error_dialog_from_gerror_run (GTK_WINDOW (data->browser), _("Could not connect to the server"), &error);
diff --git a/extensions/picasaweb/dlg-export-to-picasaweb.c b/extensions/picasaweb/dlg-export-to-picasaweb.c
index dc5968a..313e613 100644
--- a/extensions/picasaweb/dlg-export-to-picasaweb.c
+++ b/extensions/picasaweb/dlg-export-to-picasaweb.c
@@ -118,9 +118,11 @@ completed_messagedialog_response_cb (GtkDialog *dialog,
case _OPEN_IN_BROWSER_RESPONSE:
{
- char *url = NULL;
- GError *error = NULL;
+ GdkScreen *screen;
+ char *url = NULL;
+ GError *error = NULL;
+ screen = gtk_widget_get_screen (GTK_WIDGET (dialog));
gtk_widget_destroy (GTK_WIDGET (dialog));
if (data->album != NULL) {
@@ -132,7 +134,7 @@ completed_messagedialog_response_cb (GtkDialog *dialog,
else
url = g_strconcat ("http://picasaweb.google.com/", data->user->id, NULL);
- if ((url != NULL) && ! gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)), url, 0, &error)) {
+ if ((url != NULL) && ! gtk_show_uri (screen, url, 0, &error)) {
if (data->conn != NULL)
gth_task_dialog (GTH_TASK (data->conn), TRUE, NULL);
_gtk_error_dialog_from_gerror_run (GTK_WINDOW (data->browser), _("Could not connect to the server"), &error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]