Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

highgui: Trackbar Improvements #3449

Merged
merged 1 commit into from Dec 15, 2014

Conversation

Ashod
Copy link
Contributor

@Ashod Ashod commented Nov 25, 2014

I've made 3 (small) improvements/fixes to the Trackbar in Highgui:

  1. Added new API function for changing the trackbar's max count after creation. Useful for dynamically changing the range.
  2. Using the correct, Windows TBBUTTONINFO, instead of the custom one. This fixes incorrect trackbar width due to incorrect struct "version."
  3. Replaced the deprecated CreateToolbarEx, which avoids a warning (on newer VS) and a library dependency.

@StevenPuttemans
Copy link

Actually the 2.4 branch gets regular merges into the master branch.
What I should do is

Subsequently with the follow version release, master will receive fix automatically.

@ilya-lavrenov
Copy link
Contributor

Actually the 2.4 branch gets regular merges into the master branch.

When did you see the last one? This rule doesn't work now.

@ilya-lavrenov
Copy link
Contributor

@Ashod, please, fix compilation issues http://pullrequest.opencv.org/buildbot/builders/precommit_linux64/builds/1865/steps/compile%20release/logs/stdio

p.s.

This seems tricky with default parameter value (to avoid breaking the API).

C language doesn't have default functions parameters.

@StevenPuttemans
Copy link

O so that rule is gone for good? That would be a bummer for future fixes!

@ilya-lavrenov
Copy link
Contributor

unfortunately, looks like yes for now, because we don't have sufficient people resources to do it.

@StevenPuttemans
Copy link

But before a new stable branch can be released, it should be done right? What point there is in fixing stuff if it doesn't stay in ? :)

@StevenPuttemans
Copy link

Also if core devs of opencv decide not to merge anymore, then a public notice should be put for each bugfix that you need to apply it on both branches. Can you pass on the message?

@Ashod
Copy link
Contributor Author

Ashod commented Nov 28, 2014

I already have a PR for the master branch (#3448) which passes builds and is ready for merge.

Regarding the build error in this one, removing the default parameter values will break existing users' code. Do we really want this patch that much to introduce a breaking change? I'm happy to fix and proceed if that's what we should do.

@StevenPuttemans
Copy link

My opinion, if your fix breaks backwards compatibility on 2.4 branch, then it cannot be merged. But that is just my opinion :)

@Ashod
Copy link
Contributor Author

Ashod commented Nov 28, 2014

@StevenPuttemans Agreed. I didn't know 2.4 was built with strict C rules (the same code builds without issue in the master branch).

Let's wait for a second opinion on this. Meanwhile, can we move ahead with #3448 please?

@StevenPuttemans
Copy link

I am voluntary checking PRs on my own initiative. I do not have the power to let PRs being merged. For that you need a core developer with rights to do so. It is normal that it takes some time, many of them are doing this next to their full time job.

@Ashod
Copy link
Contributor Author

Ashod commented Nov 28, 2014

@StevenPuttemans Understood. Just was asking for an update, no rush. I can see it assigned to Ilya, but he only commented on this one. I'm sure he'll get to it eventually. Thanks!

@StevenPuttemans
Copy link

Actually Ilya just assigns devs to PRs I think, your assignee is @asmorkalov. He will check this suggestion out from the moment he has some spare time for it :)

@Ashod
Copy link
Contributor Author

Ashod commented Nov 28, 2014

@StevenPuttemans Good to know. Thanks.

@asmorkalov
Copy link
Contributor

@Ashod We cannot merge you request into 2.4, because it breaks binary compatibility (new parameter in public API). You can prepare request with bug fixes only without API change.

@Ashod
Copy link
Contributor Author

Ashod commented Nov 29, 2014

@asmorkalov Thanks. What I suspected myself. That's fine.

I can submit a PR with the non-breaking changes. What about #3448?

@vpisarev
Copy link
Contributor

vpisarev commented Dec 2, 2014

@Ashod, indeed, this breaks binary compatibility with the previous 2.4.x, so this PR cannot be merged. May be, we should add another function to set maximum (and maybe also minimum) trackbar value, as well as the step between subsequent "ticks"? If you go this route, probably we should also modify PR to the master branch.

@Ashod
Copy link
Contributor Author

Ashod commented Dec 2, 2014

@vpisarev Interesting suggestion. Could be done. Any preference as to the name and interface?

I think a new function is cleaner than default value, but depends how fat we want to make the API. So, either we keep this as default value with same API in 3.x only (and make it unavailable in 2.4) or, as you suggest, add a new function for setting the max count.

Should I wait for confirmation or should I set to work?

@StevenPuttemans
Copy link

I suggest to go to work ;)

@Ashod
Copy link
Contributor Author

Ashod commented Dec 3, 2014

Will get to it after work... Thanks.

@Ashod Ashod force-pushed the 2.4_highgui_trackbar_improvements branch 2 times, most recently from 19a8d93 to b05fb0e Compare December 6, 2014 16:52
@Ashod Ashod force-pushed the 2.4_highgui_trackbar_improvements branch from b05fb0e to 63c49be Compare December 6, 2014 16:56
@Ashod
Copy link
Contributor Author

Ashod commented Dec 6, 2014

Done. Builds clean. Please take a look. (Also updated master.)

@StevenPuttemans
Copy link

Seems nice! 👍

@asmorkalov
Copy link
Contributor

👍

@Ashod
Copy link
Contributor Author

Ashod commented Dec 14, 2014

What's next?

@StevenPuttemans
Copy link

Someone with merge rights will pass by and put your commit in. Be patient, it has been quite calm lately. Probably people taking some holidays or so.

@Ashod
Copy link
Contributor Author

Ashod commented Dec 15, 2014

Thanks Steven. Just wanted to follow up.

@StevenPuttemans
Copy link

👍

@opencv-pushbot opencv-pushbot merged commit 63c49be into opencv:2.4 Dec 15, 2014
@Ashod Ashod deleted the 2.4_highgui_trackbar_improvements branch December 22, 2014 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
port/backport done Label for maintainers. Authors of PR can ignore this
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants