From ea031bfd782151a584ee2af07db201b693d97d2f Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 29 Jul 2008 18:02:36 +0000 Subject: fixes --- TODO | 3 +++ gnunet-gtk.glade | 2 ++ src/plugins/fs/fs.c | 23 ++++++++++++++++------- src/plugins/fs/namespace_create.c | 3 ++- src/plugins/fs/namespace_search.c | 2 ++ src/plugins/fs/search.c | 20 ++++++++++++++++++-- 6 files changed, 43 insertions(+), 10 deletions(-) diff --git a/TODO b/TODO index 1ec89305..a99e1c1b 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,9 @@ This is just the current plan, plans change. 0.8.1 [8'08] (aka "growth"): +- bugs: + * manual entry of namespace name in search tab does not + work (results in global search) - improve collection handling * show content of current collection somewhere * add 'publish now' button / menu entry diff --git a/gnunet-gtk.glade b/gnunet-gtk.glade index ffd04bf3..f4807526 100644 --- a/gnunet-gtk.glade +++ b/gnunet-gtk.glade @@ -1005,6 +1005,7 @@ This release adds context-menus (right-click) which allow copying the URI of sea 1 0 999999 1 10 10 1 True + False @@ -1602,6 +1603,7 @@ This release adds context-menus (right-click) which allow copying the URI of sea 1 0 10000 1 10 10 1 True + diff --git a/src/plugins/fs/fs.c b/src/plugins/fs/fs.c index c3aa10ed..b9506106 100644 --- a/src/plugins/fs/fs.c +++ b/src/plugins/fs/fs.c @@ -82,7 +82,8 @@ void on_anonymity_spin_changed_fs (GtkWidget * w, gpointer dummy) { gint val; - GdkColor color; + GdkColor bcolor; + GdkColor fcolor; GtkSpinButton *spin; spin = GTK_SPIN_BUTTON (w); @@ -95,15 +96,23 @@ on_anonymity_spin_changed_fs (GtkWidget * w, gpointer dummy) if (val == 0) { if ((TRUE == gdk_color_parse ("red", - &color)) && + &bcolor)) && (TRUE == gdk_colormap_alloc_color (gdk_colormap_get_system (), - &color, FALSE, TRUE))) - gtk_widget_modify_base (w, GTK_STATE_NORMAL, &color); + &bcolor, FALSE, TRUE)) && + (TRUE == gdk_color_parse ("black", + &fcolor)) && + (TRUE == gdk_colormap_alloc_color (gdk_colormap_get_system (), + &fcolor, FALSE, TRUE))) + { + gtk_widget_modify_base (w, GTK_STATE_NORMAL, &bcolor); + gtk_widget_modify_text (w, GTK_STATE_NORMAL, &fcolor); + } } else - gtk_widget_modify_base (w, GTK_STATE_NORMAL, NULL); - - + { + gtk_widget_modify_base (w, GTK_STATE_NORMAL, NULL); + gtk_widget_modify_text (w, GTK_STATE_NORMAL, NULL); + } } static void * diff --git a/src/plugins/fs/namespace_create.c b/src/plugins/fs/namespace_create.c index 5df9b5b2..9738c7ea 100644 --- a/src/plugins/fs/namespace_create.c +++ b/src/plugins/fs/namespace_create.c @@ -270,7 +270,8 @@ create_namespace_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2) gtk_widget_destroy (dialog); } GNUNET_meta_data_destroy (meta); - GNUNET_ECRS_uri_destroy (keywordURI); + if (keywordURI != NULL) + GNUNET_ECRS_uri_destroy (keywordURI); } gtk_widget_destroy (dialog); UNREF (metaXML); diff --git a/src/plugins/fs/namespace_search.c b/src/plugins/fs/namespace_search.c index 3dbf7862..0385a68b 100644 --- a/src/plugins/fs/namespace_search.c +++ b/src/plugins/fs/namespace_search.c @@ -184,6 +184,8 @@ on_searchNamespaceComboBoxEntry_changed_fs (GtkWidget * dummy, } else { + /* FIXME: may still be namespace selected -- + where user manually entered NS name! */ gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), 0); gtk_widget_set_sensitive (spin, FALSE); } diff --git a/src/plugins/fs/search.c b/src/plugins/fs/search.c index 73c5052f..deff31da 100644 --- a/src/plugins/fs/search.c +++ b/src/plugins/fs/search.c @@ -76,10 +76,21 @@ updateResultsCount (SearchList * searchContext) searchContext->searchString, strlen (searchContext->searchString) > 20 ? "..." : "", searchContext->resultsReceived); + if (new_title == NULL) + new_title = + g_strdup_printf (_("invalid characters (%u)"), + searchContext->resultsReceived); label = GTK_LABEL (glade_xml_get_widget (searchContext->labelXML, "searchTabLabel")); - gtk_label_set (label, new_title); - GNUNET_free (new_title); + if (new_title != NULL) + { + gtk_label_set (label, new_title); + GNUNET_free (new_title); + } + else + { + gtk_label_set (label, _("Internal error")); + } } static GdkPixbuf * @@ -1154,6 +1165,11 @@ on_fssearchbutton_clicked_fs (gpointer dummy2, GtkWidget * searchButton) if (nsName != NULL) free (nsName); } + else + { + /* FIXME: may still be namespace-search + -- where user manually entered NS name*/ + } if (fsss.uri == NULL) fsss.uri = GNUNET_ECRS_keyword_string_to_uri (ectx, searchString); if (fsss.uri == NULL) -- cgit v1.2.3