[gthumb] [photobucket] fixed album url



commit c45a73d9d05f60bf1b96c7f40d72eccdb583a0d6
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed May 19 20:40:59 2010 +0200

    [photobucket] fixed album url

 extensions/photobucket/dlg-export-to-photobucket.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/extensions/photobucket/dlg-export-to-photobucket.c b/extensions/photobucket/dlg-export-to-photobucket.c
index 45c963c..f2139e1 100644
--- a/extensions/photobucket/dlg-export-to-photobucket.c
+++ b/extensions/photobucket/dlg-export-to-photobucket.c
@@ -112,8 +112,17 @@ completed_messagedialog_response_cb (GtkDialog *dialog,
 
 			gtk_widget_destroy (GTK_WIDGET (dialog));
 
-			if (data->account->album_url)
-				url = g_strconcat (data->account->album_url, data->album->name + strlen (OAUTH_ACCOUNT (data->account)->username), NULL);
+			if (data->account->album_url != NULL) {
+				char *username;
+
+				username = OAUTH_ACCOUNT (data->account)->username;
+				if (g_str_equal (data->album->name, username))
+					url = g_strdup (data->account->album_url);
+				else
+					url = g_strconcat (data->account->album_url,
+							   data->album->name + strlen (username) + 1,
+							   NULL);
+			}
 
 			if ((url != NULL) && ! gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)), url, 0, &error)) {
 				if (data->conn != NULL)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]