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
=== modified file 'toolbars/midori-findbar.c'
--- toolbars/midori-findbar.c 2011-05-27 21:06:23 +0000
+++ toolbars/midori-findbar.c 2011-07-22 08:18:34 +0000
@@ -86,7 +86,13 @@
86 gpointer user_data)86 gpointer user_data)
87{87{
88 if (icon_pos == GTK_ICON_ENTRY_SECONDARY)88 if (icon_pos == GTK_ICON_ENTRY_SECONDARY)
89 {
89 gtk_entry_set_text (GTK_ENTRY (entry), "");90 gtk_entry_set_text (GTK_ENTRY (entry), "");
91 #if !HAVE_HILDON
92 gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (entry),
93 GTK_ICON_ENTRY_PRIMARY, GTK_STOCK_FIND);
94 #endif
95 }
90}96}
9197
92static gboolean98static gboolean
@@ -180,8 +186,21 @@
180 MidoriBrowser* browser = midori_browser_get_for_widget (entry);186 MidoriBrowser* browser = midori_browser_get_for_widget (entry);
181 GtkWidget* view = midori_browser_get_current_tab (browser);187 GtkWidget* view = midori_browser_get_current_tab (browser);
182 midori_view_unmark_text_matches (MIDORI_VIEW (view));188 midori_view_unmark_text_matches (MIDORI_VIEW (view));
183 if (g_utf8_strlen (preedit, -1) > 1)189 if (g_utf8_strlen (preedit, -1) >= 1)
190 {
191 #if !HAVE_HILDON
192 gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (findbar->find_text),
193 GTK_ICON_ENTRY_SECONDARY,
194 GTK_STOCK_CLEAR);
195 #endif
184 midori_findbar_find_text (findbar, preedit, TRUE);196 midori_findbar_find_text (findbar, preedit, TRUE);
197 }
198 else
199 #if !HAVE_HILDON
200 gtk_icon_entry_set_icon_from_icon_name (GTK_ICON_ENTRY (findbar->find_text),
201 GTK_ICON_ENTRY_SECONDARY,
202 NULL);
203 #endif
185}204}
186205
187static void206static void
@@ -234,9 +253,6 @@
234 gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (findbar->find_text),253 gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (findbar->find_text),
235 GTK_ICON_ENTRY_PRIMARY,254 GTK_ICON_ENTRY_PRIMARY,
236 GTK_STOCK_FIND);255 GTK_STOCK_FIND);
237 gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (findbar->find_text),
238 GTK_ICON_ENTRY_SECONDARY,
239 GTK_STOCK_CLEAR);
240 gtk_icon_entry_set_icon_highlight (GTK_ICON_ENTRY (findbar->find_text),256 gtk_icon_entry_set_icon_highlight (GTK_ICON_ENTRY (findbar->find_text),
241 GTK_ICON_ENTRY_SECONDARY, TRUE);257 GTK_ICON_ENTRY_SECONDARY, TRUE);
242 #endif258 #endif

Subscribers

People subscribed via source and target branches

to all changes: