forked from AuroraMiddleware/gtk
cups: Use allow/ignore list
Don't use loaded terms like "whitelist" and "blacklist".
This commit is contained in:
parent
a7f5b2e8fc
commit
979bf5c6fb
@ -4552,7 +4552,7 @@ static const struct {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* keep sorted when changing */
|
/* keep sorted when changing */
|
||||||
static const char *color_option_whitelist[] = {
|
static const char *color_option_allow_list[] = {
|
||||||
"BRColorEnhancement",
|
"BRColorEnhancement",
|
||||||
"BRColorMatching",
|
"BRColorMatching",
|
||||||
"BRColorMatching",
|
"BRColorMatching",
|
||||||
@ -4572,7 +4572,7 @@ static const char *color_option_whitelist[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* keep sorted when changing */
|
/* keep sorted when changing */
|
||||||
static const char *color_group_whitelist[] = {
|
static const char *color_group_allow_list[] = {
|
||||||
"ColorPage",
|
"ColorPage",
|
||||||
"FPColorWise1",
|
"FPColorWise1",
|
||||||
"FPColorWise2",
|
"FPColorWise2",
|
||||||
@ -4583,7 +4583,7 @@ static const char *color_group_whitelist[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* keep sorted when changing */
|
/* keep sorted when changing */
|
||||||
static const char *image_quality_option_whitelist[] = {
|
static const char *image_quality_option_allow_list[] = {
|
||||||
"BRDocument",
|
"BRDocument",
|
||||||
"BRHalfTonePattern",
|
"BRHalfTonePattern",
|
||||||
"BRNormalPrt",
|
"BRNormalPrt",
|
||||||
@ -4611,7 +4611,7 @@ static const char *image_quality_option_whitelist[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* keep sorted when changing */
|
/* keep sorted when changing */
|
||||||
static const char *image_quality_group_whitelist[] = {
|
static const char *image_quality_group_allow_list[] = {
|
||||||
"FPImageQuality1",
|
"FPImageQuality1",
|
||||||
"FPImageQuality2",
|
"FPImageQuality2",
|
||||||
"FPImageQuality3",
|
"FPImageQuality3",
|
||||||
@ -4619,7 +4619,7 @@ static const char *image_quality_group_whitelist[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* keep sorted when changing */
|
/* keep sorted when changing */
|
||||||
static const char * finishing_option_whitelist[] = {
|
static const char * finishing_option_allow_list[] = {
|
||||||
"BindColor",
|
"BindColor",
|
||||||
"BindEdge",
|
"BindEdge",
|
||||||
"BindType",
|
"BindType",
|
||||||
@ -4639,7 +4639,7 @@ static const char * finishing_option_whitelist[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* keep sorted when changing */
|
/* keep sorted when changing */
|
||||||
static const char *finishing_group_whitelist[] = {
|
static const char *finishing_group_allow_list[] = {
|
||||||
"FPFinishing1",
|
"FPFinishing1",
|
||||||
"FPFinishing2",
|
"FPFinishing2",
|
||||||
"FPFinishing3",
|
"FPFinishing3",
|
||||||
@ -4649,7 +4649,7 @@ static const char *finishing_group_whitelist[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* keep sorted when changing */
|
/* keep sorted when changing */
|
||||||
static const char *cups_option_blacklist[] = {
|
static const char *cups_option_ignore_list[] = {
|
||||||
"Collate",
|
"Collate",
|
||||||
"Copies",
|
"Copies",
|
||||||
"OutputOrder",
|
"OutputOrder",
|
||||||
@ -5139,7 +5139,7 @@ handle_option (GtkPrinterOptionSet *set,
|
|||||||
char *option_name;
|
char *option_name;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (STRING_IN_TABLE (ppd_option->keyword, cups_option_blacklist))
|
if (STRING_IN_TABLE (ppd_option->keyword, cups_option_ignore_list))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
option_name = get_ppd_option_name (ppd_option->keyword);
|
option_name = get_ppd_option_name (ppd_option->keyword);
|
||||||
@ -5159,18 +5159,18 @@ handle_option (GtkPrinterOptionSet *set,
|
|||||||
const char *name;
|
const char *name;
|
||||||
|
|
||||||
name = ppd_group_name (toplevel_group);
|
name = ppd_group_name (toplevel_group);
|
||||||
if (STRING_IN_TABLE (name, color_group_whitelist) ||
|
if (STRING_IN_TABLE (name, color_group_allow_list) ||
|
||||||
STRING_IN_TABLE (ppd_option->keyword, color_option_whitelist))
|
STRING_IN_TABLE (ppd_option->keyword, color_option_allow_list))
|
||||||
{
|
{
|
||||||
option->group = g_strdup ("ColorPage");
|
option->group = g_strdup ("ColorPage");
|
||||||
}
|
}
|
||||||
else if (STRING_IN_TABLE (name, image_quality_group_whitelist) ||
|
else if (STRING_IN_TABLE (name, image_quality_group_allow_list) ||
|
||||||
STRING_IN_TABLE (ppd_option->keyword, image_quality_option_whitelist))
|
STRING_IN_TABLE (ppd_option->keyword, image_quality_option_allow_list))
|
||||||
{
|
{
|
||||||
option->group = g_strdup ("ImageQualityPage");
|
option->group = g_strdup ("ImageQualityPage");
|
||||||
}
|
}
|
||||||
else if (STRING_IN_TABLE (name, finishing_group_whitelist) ||
|
else if (STRING_IN_TABLE (name, finishing_group_allow_list) ||
|
||||||
STRING_IN_TABLE (ppd_option->keyword, finishing_option_whitelist))
|
STRING_IN_TABLE (ppd_option->keyword, finishing_option_allow_list))
|
||||||
{
|
{
|
||||||
option->group = g_strdup ("FinishingPage");
|
option->group = g_strdup ("FinishingPage");
|
||||||
}
|
}
|
||||||
@ -5724,7 +5724,7 @@ cups_printer_get_options (GtkPrinter *printer,
|
|||||||
|
|
||||||
for (i = 0; i < num_opts; i++)
|
for (i = 0; i < num_opts; i++)
|
||||||
{
|
{
|
||||||
if (STRING_IN_TABLE (opts[i].name, cups_option_blacklist))
|
if (STRING_IN_TABLE (opts[i].name, cups_option_ignore_list))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
name = get_lpoption_name (opts[i].name);
|
name = get_lpoption_name (opts[i].name);
|
||||||
|
Loading…
Reference in New Issue
Block a user