[ease/plugins: 5/7] Allow to launch requests in a row.



commit 39e32ea349ea67a5ee6e4c0c2c0363b7fb8c120a
Author: Stéphane Maniaci <stephane maniaci gmail com>
Date:   Mon Jun 21 15:18:54 2010 +0200

    Allow to launch requests in a row.

 plugins/flickr.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/flickr.vala b/plugins/flickr.vala
index e77864f..66a8b59 100644
--- a/plugins/flickr.vala
+++ b/plugins/flickr.vala
@@ -5,7 +5,6 @@ using Gtk;
 
 /*
   TODO :
-  - launching multiple requests
   - escaping the description tags
   - wrapping the long fields (emo-descriptions)
   - asyncing
@@ -69,6 +68,7 @@ public class FlickrFetcher {
 
 	private string get_flickr_photos_from_tags (string tags) {
 
+		call = proxy.new_call ();
 		call.set_function ("flickr.photos.search");
 		call.add_params ("tags", tags,
 						 "per_page", "10",
@@ -115,6 +115,7 @@ public class FlickrFetcher {
 		var photos = obj.get_object_member ("photos");
 		var photo_array = photos.get_array_member ("photo");
 
+		store.clear ();
 		// TODO : optimization
 		photo_array.foreach_element ( (array, index, element) =>
 			{
@@ -207,7 +208,6 @@ public class FlickrFetcher {
 	public FlickrFetcher() {
 
 		proxy = new Rest.FlickrProxy (api_key, secret);
-		call = proxy.new_call ();
 		parser = new Json.Parser ();
 		builder = new Gtk.Builder ();
 



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