[goobox] fixed parsing of the google search results



commit 6ca4f507ed7c10c890c0f3ff3d394904c75347fc
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Thu Jun 2 17:42:35 2011 +0200

    fixed parsing of the google search results

 src/dlg-cover-chooser.c |   16 ++++++++--------
 src/glib-utils.c        |    2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/dlg-cover-chooser.c b/src/dlg-cover-chooser.c
index cebbb2c..45412f7 100644
--- a/src/dlg-cover-chooser.c
+++ b/src/dlg-cover-chooser.c
@@ -98,7 +98,7 @@ make_file_list_from_search_result (void  *buffer,
 		while (url_start != NULL) {
 			char *url_end;
 
-			url_end = strstr (url_start, " ");
+			url_end = strstr (url_start, "\"");
 
 			if (url_end == NULL) {
 				if (partial_url == NULL)
@@ -181,7 +181,7 @@ get_query (const char *album,
 
 
 static void
-destroy_cb (GtkWidget  *widget, 
+destroy_cb (GtkWidget  *widget,
 	    DialogData *data)
 {
 	if (data->searching) {
@@ -189,7 +189,7 @@ destroy_cb (GtkWidget  *widget,
 		g_cancellable_cancel (data->cancellable);
 		return;
 	}
-	
+
 	g_object_unref (data->cancellable);
 	_g_string_list_free (data->file_list);
 	_g_object_unref (data->cover_backup);
@@ -204,7 +204,7 @@ static void
 search_completed (DialogData *data)
 {
 	char *text;
-	
+
 	data->searching = FALSE;
 	gtk_widget_set_sensitive (GET_WIDGET ("cancel_search_button"), FALSE);
 	text = g_strdup_printf ("%u", data->total_files);
@@ -512,7 +512,7 @@ dlg_cover_chooser (GooWindow  *window,
 
 	/* Set the signals handlers. */
 
-	g_signal_connect (G_OBJECT (data->dialog), 
+	g_signal_connect (G_OBJECT (data->dialog),
 			  "destroy",
 			  G_CALLBACK (destroy_cb),
 			  data);
@@ -548,7 +548,7 @@ dlg_cover_chooser (GooWindow  *window,
 	/* run dialog. */
 
 	gtk_window_set_transient_for (GTK_WINDOW (data->dialog), GTK_WINDOW (window));
-	gtk_window_set_modal (GTK_WINDOW (data->dialog), TRUE);
+	gtk_window_set_modal (GTK_WINDOW (data->dialog), FALSE);
 	gtk_widget_show (data->dialog);
 
 	start_searching (data);
@@ -626,7 +626,7 @@ fetch_cover_image_from_name (GooWindow  *window,
 	FetchData *data;
 	char      *url;
 	GFile     *file;
-	
+
 	data = g_new0 (FetchData, 1);
 	data->window = window;
 
@@ -650,7 +650,7 @@ fetch_cover_image_from_asin (GooWindow  *window,
 	FetchData *data;
 	char      *url;
 	GFile     *file;
-	
+
 	data = g_new0 (FetchData, 1);
 	data->window = window;
 	url = g_strdup_printf ("http://images.amazon.com/images/P/%s.01._SCLZZZZZZZ_.jpg";, asin);
diff --git a/src/glib-utils.c b/src/glib-utils.c
index 095e957..eec0ba0 100644
--- a/src/glib-utils.c
+++ b/src/glib-utils.c
@@ -282,7 +282,7 @@ debug (const char *file,
 
 	if (! first_time) {
 		first_time = 1;
-		if (g_getenv ("GTHUMB_DEBUG"))
+		if (g_getenv ("GOOBOX_DEBUG"))
 			print_debug_info = 1;
 	}
 



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