On Fri, 2004-09-17 at 00:20 +0000, alex wrote:
> Hi,
> 
> I've added more features to the core code (generates a description text
> string) and added a new column to the search result tabs that displays
> the meta-data in text form. Its cleaner than the colour hack I did
> earlier.
> 
> The patch is on Sf:
> 
> http://sourceforge.net/tracker/index.php?
> func=detail&aid=1029558&group_id=4467&atid=304467

Hmm, slight bug in src/ui/gtk/gtk2/bitzi.c, the table was missing some
comas :-(

RCS file: /cvsroot/gtk-gnutella/gtk-gnutella-
current/src/ui/gtk/gtk2/bitzi.c,v
retrieving revision 1.1
diff -u -b -r1.1 bitzi.c
--- src/ui/gtk/gtk2/bitzi.c     25 Aug 2004 05:40:40 -0000      1.1
+++ src/ui/gtk/gtk2/bitzi.c     17 Sep 2004 00:12:24 -0000
@@ -1,4 +1,4 @@
-/*
+/* -*- mode: cc-mode; tab-width:4; -*-
  * $Id: bitzi.c,v 1.1 2004/08/25 05:40:40 rmanfredi Exp $
  *
  * Copyright (c) 2004, Alex Bennee <[EMAIL PROTECTED]>
@@ -34,42 +34,52 @@
 #include "gtk/gtk-missing.h"

 #include "if/bridge/ui2c.h"
+#include "if/core/bitzi.h"     /* bitzi_data_t */
 #include "lib/override.h"      /* Must be the last header included */

+
+
 /*
- ** GUI Actions
+ * This table should match the encoding one in core/bitzi.c
+ *
+ * It assumes the enum's are in order
  */

-void
-on_search_meta_data_activate(GtkMenuItem *menuitem, gpointer user_data)
+static char * bitzi_fj_table[] =
 {
-#ifdef HAS_LIBXML2
-       search_t *search;
-       GtkTreeSelection *selection;
-       GSList *sl;
-
-       g_message("on_search_meta_data_active: called");
+       "Unknown",      /*      UNKNOWN */
+       "Dangerous/Misleading", /* DANGEROUS_MISLEADING */
+       "Incomplete/Damaged",   /*      INCOMPLETE_DAMAGED */
+       "Substandard",  /*                      SUBSTANDARD */
+       "Overrated",    /*                              OVERRATED */
+       "Normal",       /*                              NORMAL */
+       "Underrated",   /*                      UNDERRATED */
+       "Complete",     /*                      COMPLETE */
+       "Recommended",  /*                      RECOMMENDED */
+       "Best Version"  /*              BEST_VERSION*/
+};

-       /* collect the list of files selected */
+#define BITZI_MAX_FJ   (sizeof(bitzi_fj_table)/sizeof(char *))

-       search = search_gui_get_current_search();
-       g_assert(search != NULL);
+gchar *        bitzi_fjtostring(bitzi_fj_t fj)
+{
+       g_assert(fj<BITZI_MAX_FJ);
+       return  bitzi_fj_table[fj];
+}

-       selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(search-
>tree_view));

-       sl = tree_selection_collect_data(selection, gui_record_sha1_eq);
+void bitzi_gui_update(bitzi_data_t *bitzi_data)
+{
+    g_message("bitzi_gui_update: data %p, size %d\n"
+                         "goodness %d, judgement %f, desc %s,",
+                       bitzi_data, bitzi_data->size,
+                       bitzi_data->goodness, bitzi_data->judgement,
bitzi_data->description);

-       /* Queue up our requests */
-       g_message("on_search_meta_data: %d items",
-               g_slist_position(sl, g_slist_last(sl)) + 1);
+       /* Update the various GUI elements */

-       g_slist_foreach(sl, (GFunc) guc_bitzi_queue_metadata_search,
NULL);
-       g_slist_free(sl);
+       search_gui_metadata_update(bitzi_data);

-       /* Kick off requests if nothing happening */
-       if (!guc_bitzi_has_pending())
-               guc_bitzi_metadata_query(NULL);
-#endif /* HAS_LIBXML2 */
 }

+
 /* vi: set ts=4 sw=4 cindent: */


> 
> Did anyone try the last patch? I would welcome any feedback, and yes I
> may even get around to a gtk1 version at some point ;-)
> 
> 
> --  Alex, homepage: http://www.bennee.com/~alex/ 
> 
> All I kin say is when you finds yo'self wanderin' in a peach orchard, ya
> don't go lookin' for rutabagas.               -- Kingfish 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your judgement on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> _______________________________________________
> Gtk-gnutella-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel
> 
--  Alex, homepage: http://www.bennee.com/~alex/ According to all the
latest reports, there was no truth in any of the earlier reports. 



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Gtk-gnutella-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel

Reply via email to