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

cups/ppd.c: Fix custom renaming bug #48

Closed
wants to merge 1 commit into from

Conversation

tsite
Copy link
Contributor

@tsite tsite commented Nov 22, 2020

Choices starting with "custom." such as "custom.25" are automatically
renamed to "_custom." to differentiate them from actual custom
parameters that can take on any value in a range, eg 0-100.

The commit that implemented this behavior
(2a06655)
forgot to also rename the default choice from "custom." to "_custom.";
this commit fixes that.

Choices starting with "custom." such as "custom.25" are automatically
renamed to "_custom." to differentiate them from actual custom
parameters that can take on any value in a range, eg 0-100.

The commit that implemented this behavior
(OpenPrinting/cups@2a06655)
forgot to also rename the default choice from "custom." to "_custom.";
this commit fixes that.
@michaelrsweet michaelrsweet self-assigned this Nov 22, 2020
@michaelrsweet michaelrsweet added bug Something isn't working priority-low labels Nov 22, 2020
@michaelrsweet michaelrsweet added this to the v2.3.3op1 milestone Nov 22, 2020
@michaelrsweet
Copy link
Member

@tsite OK, so a couple issues with this fix. First, it gets applied to any main keyword with the Default prefix, and second it doesn't allow for setting a default custom value, i.e. for options that don't have a "custom" choice but do define support for custom parameters. Also third I'm not keen on using strcpy or reallocating the string for this - better to just snprintf into the defchoice member.

michaelrsweet added a commit that referenced this pull request Nov 22, 2020
@michaelrsweet
Copy link
Member

[master c74aa1e] Fix default option values that start with "custom" that aren't custom values (Issue #48)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-low
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants