Hi, The attached patch adds user feedback when a Bitzi query is kicked off.
-- Alex, homepage: http://www.bennee.com/~alex/ Life is difficult because it is non-linear.
Index: src/ui/gtk/gtk1/search.c =================================================================== RCS file: /cvsroot/gtk-gnutella/gtk-gnutella-current/src/ui/gtk/gtk1/search.c,v retrieving revision 1.7 diff -u -b -r1.7 search.c --- src/ui/gtk/gtk1/search.c 4 Oct 2004 11:00:09 -0000 1.7 +++ src/ui/gtk/gtk1/search.c 4 Oct 2004 22:32:44 -0000 @@ -1,4 +1,4 @@ -/* +/* -*- mode: cc-mode; tab-width:4; -*- * $Id: search.c,v 1.7 2004/10/04 11:00:09 rmanfredi Exp $ * * Copyright (c) 2001-2003, Raphael Manfredi, Richard Eckart @@ -2566,4 +2566,39 @@ } +/* + * seatch_gui_queue_bitzi_by_sha1 + * + * Update the search displays with the correct meta-data + * (called from seach_cb.c) + */ + +void search_gui_queue_bitzi_by_sha1(record_t *rec, void *nothing) +{ + GList *sr; + search_t *search; + GtkCTreeNode *parent; + + + g_assert(rec!=NULL); + guc_query_bitzi_by_urn(rec->sha1); + + /* + * Add some feedback that a search has been kicked off + */ + + for (sr=searches; sr; sr = g_list_next(sr) ) + { + search = sr->data; + GtkCTree *ctree = GTK_CTREE(search->ctree); + + parent = find_parent_with_sha1(search->parents, rec->sha1); + if (parent) + gtk_ctree_node_set_text(ctree, parent, c_sr_meta, "Query queued"); + + } /* for each search */ + +} + + /* vi: set ts=4 sw=4 cindent: */ Index: src/ui/gtk/gtk1/search_cb.c =================================================================== RCS file: /cvsroot/gtk-gnutella/gtk-gnutella-current/src/ui/gtk/gtk1/search_cb.c,v retrieving revision 1.2 diff -u -b -r1.2 search_cb.c --- src/ui/gtk/gtk1/search_cb.c 4 Oct 2004 11:00:09 -0000 1.2 +++ src/ui/gtk/gtk1/search_cb.c 4 Oct 2004 22:32:45 -0000 @@ -1169,16 +1169,9 @@ * on_popup_search_metadata * * Queue a bitzi queries from the search context menu + * and update the display. */ -static void queue_bitzi_by_sha1(record_t *rec, void *nothing) -{ - g_assert(rec!=NULL); - guc_query_bitzi_by_urn(rec->sha1); -} - - - void on_popup_search_metadata_activate(GtkMenuItem *menuitem, gpointer user_data) { @@ -1198,7 +1191,7 @@ g_list_position(data_list, g_list_last(data_list)) + 1, data_list); - g_list_foreach(data_list, (GFunc) queue_bitzi_by_sha1, NULL); + g_list_foreach(data_list, (GFunc) search_gui_queue_bitzi_by_sha1, NULL); gtk_clist_thaw(GTK_CLIST(search->ctree)); g_list_free(data_list); Index: src/ui/gtk/search.h =================================================================== RCS file: /cvsroot/gtk-gnutella/gtk-gnutella-current/src/ui/gtk/search.h,v retrieving revision 1.3 diff -u -b -r1.3 search.h --- src/ui/gtk/search.h 4 Oct 2004 11:00:06 -0000 1.3 +++ src/ui/gtk/search.h 4 Oct 2004 22:39:20 -0000 @@ -161,1 +161,1 @@ */ void search_gui_metadata_update(bitzi_data_t *data); +void search_gui_queue_bitzi_by_sha1(record_t *rec, void *nothing); /* * Callbacks