diff options
author | Don Scorgie <dscorgie@src.gnome.org> | 2007-08-07 17:40:45 +0000 |
---|---|---|
committer | Don Scorgie <dscorgie@src.gnome.org> | 2007-08-07 17:40:45 +0000 |
commit | 0c160d0194877fa2b2d4218c7c7015518f134dcb (patch) | |
tree | 46a8cf2ed5c7847891820d57a465820085f36b49 | |
parent | 75e7badada1990e4c355fcd54dbcbee743f1ec89 (diff) | |
download | yelp-0c160d0194877fa2b2d4218c7c7015518f134dcb.tar.gz |
Redefine langs to allow compilation with Beagle (bug #462056) Make results
* src/yelp-search-parser.c:
* src/yelp-window.c:
Redefine langs to allow compilation with
Beagle (bug #462056)
Make results page show again (where did it go, I wonder?)
svn path=/trunk/; revision=2868
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | src/yelp-search-parser.c | 10 | ||||
-rw-r--r-- | src/yelp-window.c | 2 |
3 files changed, 17 insertions, 3 deletions
@@ -1,3 +1,11 @@ +2007-08-07 Don Scorgie <dscorgie@svn.gnome.org> + + * src/yelp-search-parser.c: + * src/yelp-window.c: + Redefine langs to allow compilation with + Beagle (bug #462056) + Make results page show again (where did it go, I wonder?) + 2007-07-30 Shaun McCance <shaunm@gnome.org> * src/yelp-transform.c: diff --git a/src/yelp-search-parser.c b/src/yelp-search-parser.c index 646f5d41..338707a7 100644 --- a/src/yelp-search-parser.c +++ b/src/yelp-search-parser.c @@ -173,6 +173,7 @@ static void search_free_container (SearchContainer *c); #ifdef ENABLE_BEAGLE static BeagleClient *beagle_client; #endif /* ENABLE_BEAGLE */ +static char const * const * langs; YelpSearchParser * yelp_search_parser_new (void) @@ -233,6 +234,8 @@ yelp_search_parser_process (YelpSearchParser *parser, gchar *search_terms) { debug_print (DB_FUNCTION, "entering\n"); + langs = g_get_language_names (); + parser->search_terms = decode_uri (search_terms); parser->search_process_id = @@ -396,7 +399,8 @@ hits_added_cb (BeagleQuery *query, BeagleHitsAddedResponse *response, YelpSearch } static gboolean -check_lang (const char *lang) { +check_lang (const char *lang) +{ int i; for (i = 0; langs[i]; i++) { if (!strncmp (lang, langs[i], 2)) { @@ -1051,8 +1055,8 @@ slow_search_process (RrnReg *reg, SearchDocData *data) ptr - container->base_filename); /* BEGIN HTML special block */ - if (g_str_equal (reg->type, "text/html") || - g_str_has_suffix (fname, "html")) { + if (reg->type && (g_str_equal (reg->type, "text/html") || + g_str_has_suffix (fname, "html"))) { GDir *dir; gchar *filename; container->html = TRUE; diff --git a/src/yelp-window.c b/src/yelp-window.c index 05f64ca2..f28e39f8 100644 --- a/src/yelp-window.c +++ b/src/yelp-window.c @@ -1034,6 +1034,8 @@ yelp_window_load (YelpWindow *window, const gchar *uri) break; case YELP_RRN_TYPE_SEARCH: doc = yelp_search_new (&real_uri[14]); /* to remove x-yelp-search:*/ + priv->base_uri = g_strdup ("file:///fakefile"); + break; case YELP_RRN_TYPE_HTML: case YELP_RRN_TYPE_XHTML: |