Merge lp:~evfool/midori/findbar into lp:~vcs-imports/midori/master

Proposed by Robert Roth
Status: Merged
Merge reported by: Cris Dywan
Merged at revision: not available
Proposed branch: lp:~evfool/midori/findbar
Merge into: lp:~vcs-imports/midori/master
Diff against target: 50 lines (+20/-4)
1 file modified
toolbars/midori-findbar.c (+20/-4)
To merge this branch: bzr merge lp:~evfool/midori/findbar
Reviewer Review Type Date Requested Status
VCS imports Pending
Review via email: mp+68801@code.launchpad.net

Description of the change

Improved findbar to only show the clear icon if there is something to clear (text longer than 1 char) (bug #772841), otherwise hide it, and also reset the primary icon to the find icon after clearing the entry, because if the stop icon was there and the entry was cleared it did not reset, thus we had an empty text entry with a red stop button.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Hi Robert,

On 22/07/11 10:19, Robert Roth wrote:
> Robert Roth has proposed merging lp:~evfool/midori/findbar into lp:midori.
>
> Requested reviews:
> VCS imports (vcs-imports)
> Related bugs:
> Bug #772841 in Midori: "inline find - don't show the clear button if there is nothing to clear"
> https://bugs.launchpad.net/midori/+bug/772841
>
> For more details, see:
> https://code.launchpad.net/~evfool/midori/findbar/+merge/68801
>
> Improved findbar to only show the clear icon if there is something to clear (text longer than 1 char) (bug #772841), otherwise hide it, and also reset the primary icon to the find icon after clearing the entry, because if the stop icon was there and the entry was cleared it did not reset, thus we had an empty text entry with a red stop button.
lp:midori is an import from the upstream version control system. They
don't use launchpad for development as far as I know. You probably want
to propose the merge in whatever upstream uses.

Cheers,

Jelmer

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'toolbars/midori-findbar.c'
2--- toolbars/midori-findbar.c 2011-05-27 21:06:23 +0000
3+++ toolbars/midori-findbar.c 2011-07-22 08:18:34 +0000
4@@ -86,7 +86,13 @@
5 gpointer user_data)
6 {
7 if (icon_pos == GTK_ICON_ENTRY_SECONDARY)
8+ {
9 gtk_entry_set_text (GTK_ENTRY (entry), "");
10+ #if !HAVE_HILDON
11+ gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (entry),
12+ GTK_ICON_ENTRY_PRIMARY, GTK_STOCK_FIND);
13+ #endif
14+ }
15 }
16
17 static gboolean
18@@ -180,8 +186,21 @@
19 MidoriBrowser* browser = midori_browser_get_for_widget (entry);
20 GtkWidget* view = midori_browser_get_current_tab (browser);
21 midori_view_unmark_text_matches (MIDORI_VIEW (view));
22- if (g_utf8_strlen (preedit, -1) > 1)
23+ if (g_utf8_strlen (preedit, -1) >= 1)
24+ {
25+ #if !HAVE_HILDON
26+ gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (findbar->find_text),
27+ GTK_ICON_ENTRY_SECONDARY,
28+ GTK_STOCK_CLEAR);
29+ #endif
30 midori_findbar_find_text (findbar, preedit, TRUE);
31+ }
32+ else
33+ #if !HAVE_HILDON
34+ gtk_icon_entry_set_icon_from_icon_name (GTK_ICON_ENTRY (findbar->find_text),
35+ GTK_ICON_ENTRY_SECONDARY,
36+ NULL);
37+ #endif
38 }
39
40 static void
41@@ -234,9 +253,6 @@
42 gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (findbar->find_text),
43 GTK_ICON_ENTRY_PRIMARY,
44 GTK_STOCK_FIND);
45- gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (findbar->find_text),
46- GTK_ICON_ENTRY_SECONDARY,
47- GTK_STOCK_CLEAR);
48 gtk_icon_entry_set_icon_highlight (GTK_ICON_ENTRY (findbar->find_text),
49 GTK_ICON_ENTRY_SECONDARY, TRUE);
50 #endif

Subscribers

People subscribed via source and target branches

to all changes: