Merge lp:~evfool/software-center/lp875043 into lp:software-center
Proposed by
Robert Roth
Status: | Merged |
---|---|
Merged at revision: | 2522 |
Proposed branch: | lp:~evfool/software-center/lp875043 |
Merge into: | lp:software-center |
Diff against target: |
46 lines (+13/-1) 1 file modified
softwarecenter/ui/gtk3/widgets/exhibits.py (+13/-1) |
To merge this branch: | bzr merge lp:~evfool/software-center/lp875043 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Vogt | Pending | ||
Review via email: mp+79477@code.launchpad.net |
Description of the change
The branch contains a fix to only count a button release from exhibit as a click and activate the exhibit if both the button press and the release happened inside the exhibit. (bug #875043 happens as a result of this, as when double-clicking, the second clicks release event has been registered as a click on the exhibit)
To post a comment you must log in.
On Sat, Oct 15, 2011 at 04:16:27PM -0000, Robert Roth wrote:
> Robert Roth has proposed merging lp:~evfool/software-center/lp875043 into lp:software-center.
Thanks a lot Robert! Looks great.
> Requested reviews: /bugs.launchpad .net/ubuntu/ +source/ software- center/ +bug/875043 /code.launchpad .net/~evfool/ software- center/ lp875043/ +merge/ 79477 /code.launchpad .net/~evfool/ software- center/ lp875043/ +merge/ 79477
> Michael Vogt (mvo)
> Related bugs:
> Bug #875043 in software-center (Ubuntu): "Double clicking to maximise causes advert click through"
> https:/
>
> For more details, see:
> https:/
>
> The branch contains a fix to only count a button release from exhibit as a click and activate the exhibit if both the button press and the release happened inside the exhibit. (bug #875043 happens as a result of this, as when double-clicking, the second clicks release event has been registered as a click on the exhibit)
> --
> https:/
> You are requested to review the proposed merge of lp:~evfool/software-center/lp875043 into lp:software-center.
> === modified file 'softwarecenter /ui/gtk3/ widgets/ exhibits. py' ui/gtk3/ widgets/ exhibits. py 2011-10-12 15:34:18 +0000 ui/gtk3/ widgets/ exhibits. py 2011-10-15 16:15:28 +0000 handling( self): can_focus( True) events( Gdk.EventMask. BUTTON_ RELEASE_ MASK| BUTTON_ PRESS_MASK| ENTER_NOTIFY_ MASK| LEAVE_NOTIFY_ MASK) "enter- notify- event", self.on_ enter_notify) "leave- notify- event", self.on_ leave_notify) "button- press-event" , self.on_ button_ press) "button- release- event", self.on_ button_ release) "key-press- event", self.on_key_press) release( self, widget, event): self.get_ allocation( ), self.cursor] package_ names: package_ names and self.pressed: "show-exhibits- clicked" , exhibit) press(self, widget, event): self.get_ allocation( ),
> --- softwarecenter/
> +++ softwarecenter/
> @@ -263,6 +263,7 @@
>
> self.cursor = 0
> self._timeout = 0
> + self.pressed = False
>
> self.alpha = 1.0
> self.image = None
> @@ -287,10 +288,12 @@
> def _init_event_
> self.set_
> self.set_
> + Gdk.EventMask.
> Gdk.EventMask.
> Gdk.EventMask.
> self.connect(
> self.connect(
> + self.connect(
> self.connect(
> self.connect(
>
> @@ -315,11 +318,20 @@
> def on_button_
> if not point_in(
> int(event.x), int(event.y)):
> + self.pressed = False
> return
>
> exhibit = self.exhibits[
> - if exhibit.
> + if exhibit.
> self.emit(
> + self.pressed = False
> + return
> +
> + def on_button_
> + if not point_in(
> + int(event.x), int(event.y)):
> + return
> + self.pressed = True
> return
>
> def on_key_press(self, widget, event):
>