GNOME Bugzilla – Bug 516550
when entering part of url already in the history, put a relief on it
Last modified: 2009-01-14 01:00:43 UTC
When I enter some text in the address bar, the history displays the urls which match part of the text. To ease the finding it would be nice to have the text enter easily viewable on each url by displaying it with more relief, like bold.
Agreed, let's try to do this for 2.24.
the same could be done for the history
Created attachment 105714 [details] [review] 20080221_bgo_516550_match-bold.diff: boldifies ocurrences of the search string I don't know why this only works on bookmarks and not in history items, no matter the markup property is set correctly with markup: ** (epiphany:32618): DEBUG: final: http://www.<b>goo</b>gle.co.uk/webhp?ie=UTF-8&oe=UTF-8 It's still show as plain text.
Created attachment 105717 [details] [review] 20080221_bgo_516550_match-bold.diff: boldifies ocurrences of the search string Updated to work with history items, the problem was unescaped strings. Following chpe's comment I tried storing the regex, but I have to give the new pattern to the regex each time (the current text in the entry) and seems like there's no way to do that. So I stick to creating a new regex each time.
Created attachment 105719 [details] [review] 20080221_bgo_516550_match-bold.diff: boldifies ocurrences of the search string Another one, this time I'm caching the gregex thanks to chpe's clever advice of doing the creation/update in the changed signal handler for the entry!. Also I'm only setting the markup property, the text one was set thinking that maybe a11y might need it. Hopefully gtk+ does the right thing in the back.
Caching the regex makes the bolding a bit messy when navigating the options in the completion, since the text is changed constantly, the bolding changes too. The ideal case is to have the matches always bold, but since the location entry gets overwritten by entries hovered or browsed by keyboard, it doesn't work like that now. Something like an "entered_text" char would be useful (or ideas on how to do it).
Created attachment 105779 [details] [review] 20080222_bgo_516550_match-bold.diff Updated patch to keep the highlight no matter the cursor browsing.
Forgot to mention that these includes a change to search for a re: prefix. This to be consistent with: Bug 517960 – Port the url bar completion func to GRegex That way true regexp are used only when re: is typed in front.
Did someone test this patch, or do you need further testing? it is okay to commit?
Making this depend on the regexp bug.
Created attachment 116619 [details] [review] [PATCH] Add bolding to the matching substring of the title col. Using pango attrs. This should start exhibiting the blank completion popup bug. --- lib/widgets/ephy-location-entry.c | 58 +++++++++++++++++++++++++++++++++++++ 1 files changed, 58 insertions(+), 0 deletions(-)
Created attachment 116620 [details] [review] [PATCH] Add bolding to the substring match of the extra col. This is independent of the previous patch. --- lib/widgets/ephy-location-entry.c | 33 ++++++++++++++++++++++++++++++++- 1 files changed, 32 insertions(+), 1 deletions(-)
+ g_regex_match (priv->regex, text, G_REGEX_MATCH_NOTEMPTY, &match); Should check the return value here (if FALSE, match will be NULL). Shouldn't really happen here, but better be safe. > This should start exhibiting the blank completion popup bug. Are there any warnings on console when this happens?
GtkWarning: gtk_tree_view_set_cursor_on_cell: assertion `tree_view->priv->tree != NULL' failed
Obsoleting patches.
Created attachment 125758 [details] [review] [PATCH] Add bolding to the substring match of the extra col. This is independent of the previous patch. --- lib/widgets/ephy-location-entry.c | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-)
Created attachment 125759 [details] [review] [PATCH] Boldify the matching substring in the extra column Bug #516550 - when entering part of url already in the history, put a relief on it. --- lib/widgets/ephy-location-entry.c | 36 ++++++++++++++++-------------------- 1 files changed, 16 insertions(+), 20 deletions(-)
#@!#@!#!@#!@#!@#!@ wrong patches
Created attachment 125760 [details] [review] [PATCH] Boldify the matching substring in the title column Bug #516550 - when entering part of url already in the history, put a relief on it. --- lib/widgets/ephy-location-entry.c | 64 +++++++++++++++++++++++++++++++++++- 1 files changed, 62 insertions(+), 2 deletions(-)
Created attachment 125761 [details] [review] [PATCH] Boldify the matching substring in the extra column Bug #516550 - when entering part of url already in the history, put a relief on it. --- lib/widgets/ephy-location-entry.c | 39 +++++++++++++++++++++++++++++++----- 1 files changed, 33 insertions(+), 6 deletions(-)
Great patches! I can't try them ATM, but it seems to me that in the second one |g_match_info_free()| should be outside of the previous if, otherwise you're leaking it when the regexp doesn't match.
I figured out how to make the woohoo bar actually work, so I'm marking this as obsolete, since woohoo bar includes bolding. See bug #541782.