Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#3968 closed defect (fixed)

Clear URL entry icon should disappear when there is no text

Reported by: humitos Owned by: humitos
Priority: Normal Milestone:
Component: Browse Version: Unspecified
Severity: Unspecified Keywords: gtk3, 13.1.0, patch, r+, olpc-test-pending
Cc: manuq Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

The text clear button should dissapear when there is no text in the entry. After you click on it, for example.

See #3499 for reference

Attachments (2)

0001-Do-not-show-clear-url-icon-when-there-is-not-text-SL.patch (2.0 KB) - added by humitos 9 years ago.
0001-Do-not-show-clear-url-icon-when-there-is-not-text-SL.2.patch (2.4 KB) - added by humitos 8 years ago.
v2 - uses 'changed' signal and 'has_focus'

Download all attachments as: .zip

Change History (8)

comment:1 Changed 9 years ago by humitos

  • Keywords patch added

comment:2 Changed 9 years ago by manuq

Icon should be displayed instantly when user start to type. Please make it exactly like the search entries we have in Sugar, see that code.

Changed 8 years ago by humitos

v2 - uses 'changed' signal and 'has_focus'

comment:3 Changed 8 years ago by humitos

  • Keywords r? added
  • Milestone changed from Unspecified by Release Team to 1.0

comment:4 Changed 8 years ago by manuq

  • Keywords r+ added; r? removed
  • Resolution set to fixed
  • Status changed from new to closed

I found this with case the patch didn't solve:

  • focus the entry, remove all text --> X icon disappears
  • focus the page
  • focus the entry again --> X icon appears again

Repatch:

--- a/webtoolbar.py
+++ b/webtoolbar.py
@@ -432,7 +432,10 @@ class PrimaryToolbar(ToolbarBase):
 
     def __focus_in_event_cb(self, entry, event):
         if not self._tabbed_view.is_current_page_pdf():
-            self._show_clear_icon()
+            if not self.entry.props.text:
+                self._show_no_icon()
+            else:
+                self._show_clear_icon()

Repatched and pushed as 58f06e27

comment:5 Changed 8 years ago by humitos

  • Keywords olpc-test-pending added

comment:6 Changed 8 years ago by dnarvaez

  • Milestone 1.0 deleted

Milestone 1.0 deleted

Note: See TracTickets for help on using tickets.