Search field clear button doesn't wait till mouse up

Bug #842706 reported by Matthew Paul Thomas on 2011-09-06
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Low
Krittika

Bug Description

software-center trunk r2261, Ubuntu 11.10 beta 1
Software Center version 5.1.14.1, Ubuntu Precise Beta 2

1. Enter some text in the search field.
2. Mouse down on the clear button.
3. Drag onto the "Installed" button, and mouse up.

What happens:
2. The search field is cleared.
3. USC navigates to the "Installed" section.

What should happen:
2. Nothing.
3. Nothing.

Like any other button, the clear button should work only if you both mouse down and mouse up on it.

Related branches

Changed in software-center (Ubuntu):
importance: Undecided → Low
Changed in software-center (Ubuntu):
status: New → Confirmed
Gary Lasker (gary-lasker) wrote :

This bug is still in Software Center version 5.1.14.1, Ubuntu Precise Beta 2. Setting as triaged.

description: updated
Changed in software-center (Ubuntu):
status: Confirmed → Triaged
tags: added: bitesize
Matt Fischer (mfisch) wrote :

I looked into this some tonight, and I found that in softwarecenter/ui/gtk3/widgets/searchentry.py the signal being used is icon-press [1]:

self.connect("icon-press", self._on_icon_pressed)

I tried switching it to icon-release, but it looks like this signal still fires if you do the release with the mouse off of the icon, meaning that it doesn't solve the original problem. (Although it does delay the action until mouse release) I poked around the docs some more, but it seems to me that if Gtk doesn't solve this for you it's going to be a pain to fix. I think you'd have to know where the mouse was relative to the position of the icon when it was clicked.

If someone who knows Gtk more than I do (which isn't much) has a better plan, please comment here and I'll try it.

[1] - http://developer.gnome.org/gtk/unstable/GtkEntry.html#GtkEntry-icon-press

Nicolò Zilio (nicolozilio) wrote :
Changed in software-center (Ubuntu):
assignee: nobody → Nicolò Zilio (nicolozilio)
Changed in software-center (Ubuntu):
assignee: Nicolò Zilio (nicolozilio) → Girish Sanenahalli (girish-cs7036)
Changed in software-center (Ubuntu):
assignee: Girish Sanenahalli (girish-cs7036) → Nicolò Zilio (nicolozilio)
Nicolò Zilio (nicolozilio) wrote :

Updated the branch. See https://code.launchpad.net/~nicolozilio/software-center/lp842706/+merge/142008 for review.
I've deleted the old branch for a mistake.

Adolfo Jayme (fitojb) on 2013-01-05
Changed in software-center (Ubuntu):
status: Triaged → In Progress
Changed in software-center (Ubuntu):
assignee: Nicolò Zilio (nicolozilio) → nobody
Changed in software-center (Ubuntu):
assignee: nobody → Krittika (krittika-kalra)
Krittika (krittika-kalra) wrote :
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments