WPushbutton skin is parsed twice

Bug #1280417 reported by Daniel Schürmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Wishlist
Daniel Schürmann

Bug Description

While doing https://github.com/mixxxdj/mixxx/pull/162 we have noticed that the way the skin is parsed in WPushbutton is had to understand, not maintainable and parsed at to places for the same results.
This should be fixed once we have a agreement how.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Currently the only use of re-processing the <Connection> block in WPushButton is to pick out the right button-modes for left and right clicks.

I think WPushButton should just examine its connections directly via WBaseWidget instead of re-touching the DOM. The issue is that setupConnections() comes after setup() in LegacySkinParser::parseStandardWidget. We could switch that around.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

That sounds good, I will give it a try.

Changed in mixxx:
assignee: nobody → Daniel Schürmann (daschuer)
status: New → Confirmed
importance: Undecided → Wishlist
milestone: none → 1.12.0
Revision history for this message
Daniel Schürmann (daschuer) wrote :

While trying to implement that, I was able to remember the underlying issue that has puzzled me doing it the fist time.

According to the event <-> Widget <-> CO scenario:

EMIT_ON_PRESS/RELEASE is a event <-> Widget parameter currently it is only used in WPushbutton and makes no sense to use other widgets.

The DIR_FROM/TO_WIDGET thing is mainly to control the display connection.

Proposal:
* Parse EMIT_ON_PRESS/RELEASE inside the widget code and only for the widgets that support that (currently only WPushbutton)
** This will give us the freedom to configure gestures as we like
* Move EMIT_ON_PRESS/RELEASE runtime evaluation to the widget code
* Use Left / Right / Display Connection as supported by the widget. currently Left/Right is only supported by the widgets.
* Remove DIR_FROM/TO_WIDGET from the connection itself and use it to setup the desired connection.
(e.g A display connection is allays to widget)

Revision history for this message
Daniel Schürmann (daschuer) wrote :

While coding my plan I have just noticed, that we cannot move the EMIT_ON_PRESS/RELEASE to the widget, because it can be set different in case we have multiple connections from one type. So I will leave it at connection level even it is only used for pushbuttons.

Revision history for this message
Daniel Schürmann (daschuer) wrote :
Changed in mixxx:
status: Confirmed → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/7310

lock status: Metadata changes locked and limited to project staff
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.