Show clear button if there is text to be cleared

Bug #699954 reported by Danielle Foré
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Midori Web Browser
Fix Released
Wishlist
Peter Hatina

Bug Description

If there exists text in the Searchbar, the clear icon should be shown in order to more easily clear up the field.

Changed in midori:
importance: Undecided → Wishlist
tags: added: bitesize
Revision history for this message
i (iiiiii-deactivatedaccount) wrote :

Hitting ctrl+k will select the whole field. You can then either delete the text or type something else.

Revision history for this message
Danielle Foré (danrabbit) wrote :

random keyboard shortcuts aren't really good for most users.

Revision history for this message
i (iiiiii-deactivatedaccount) wrote :

Ok, you think there should be a 'Clear' button in the searchbar. Someone else might think that is clutter.

ctrl+k is not random. It's the search bar shortcut for mozilla browsers for ages and (thus) is the shortcut for 'search' in Chrome/Chromium too.

Revision history for this message
Danielle Foré (danrabbit) wrote :

I don't *think* there should be a clear icon, it's dictated by elementary HIG (which is currently unavailable since the site is under constrcution).

But once again, keyboard shortcuts aren't really a good solution for most users. And in the case of tablets and the like keyboard shortcuts are impossible.

Cris Dywan (kalikiana)
tags: added: searchbar
summary: - [SearchBar] Show clear button if there is text to be cleared
+ Show clear button if there is text to be cleared
Peter Hatina (phatina)
Changed in midori:
assignee: nobody → Peter Hatina (phatina-redhat)
Revision history for this message
Peter Hatina (phatina) wrote :
Revision history for this message
Cris Dywan (kalikiana) wrote :

The clear button must be handled separately. That code will do nothing if you build with GTK+ 3.2. I would suggest something like sokoke_entry_add_clear_button, it could be used in all other places as well. It could also be something like _set_placeholder_text_with_button if that is generic enough, no strong opinion there.

If you don't mind I would like you to keep the "else" part in midori_search_action_icon_released_cb as it is and rather put a return there. It takes quite a bit more effort to realize that the code was merely re-indented and not changed.

Changed in midori:
status: New → In Progress
Revision history for this message
Peter Hatina (phatina) wrote :
Revision history for this message
Cris Dywan (kalikiana) wrote :

Before committing the code, I moved it to sokoke.c. You can't put code in 'katze' that depends on gtkiconentry which lives in 'midori', only the other way around. There was also a g_emit_signal_by_name which I removed - you can't rely on behavior in the fallback code that is different to upstream. If you observe a bug without that call, please file it separately and we can think of a compatible solution.

Changed in midori:
status: In Progress → Fix Committed
Cris Dywan (kalikiana)
Changed in midori:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.