[gnome-control-center] Replace whitelist/blacklist terms



commit 6db24acc49b9c4edd1c063e53a12f7dfd9ac0db8
Author: Robert Ancell <robert ancell canonical com>
Date:   Tue Jul 21 10:41:52 2020 +1200

    Replace whitelist/blacklist terms
    
    For rationale see here:
    https://chromium.googlesource.com/chromium/src/+/master/styleguide/inclusive_code.md#racially-neutral

 panels/keyboard/cc-keyboard-option.c | 18 +++++++--------
 panels/printers/pp-options-dialog.c  | 44 ++++++++++++++++++------------------
 2 files changed, 31 insertions(+), 31 deletions(-)
---
diff --git a/panels/keyboard/cc-keyboard-option.c b/panels/keyboard/cc-keyboard-option.c
index 4c42830d8f..f9ed6e923c 100644
--- a/panels/keyboard/cc-keyboard-option.c
+++ b/panels/keyboard/cc-keyboard-option.c
@@ -54,7 +54,7 @@ struct _CcKeyboardOption
   gchar *current_value;
   GtkListStore *store;
 
-  const gchar * const *whitelist;
+  const gchar * const *allowed_xkb_options;
 };
 
 G_DEFINE_TYPE (CcKeyboardOption, cc_keyboard_option, G_TYPE_OBJECT);
@@ -65,7 +65,7 @@ static GnomeXkbInfo *xkb_info = NULL;
 static GSettings *input_sources_settings = NULL;
 static gchar **current_xkb_options = NULL;
 
-static const gchar *xkb_option_lvl3_whitelist[] = {
+static const gchar *allowed_xkb_lvl3_options[] = {
   "lv3:switch",
   "lv3:menu_switch",
   "lv3:rwin_switch",
@@ -78,7 +78,7 @@ static const gchar *xkb_option_lvl3_whitelist[] = {
   NULL
 };
 
-static const gchar *xkb_option_comp_whitelist[] = {
+static const gchar *allowedd_xkb_compose_options[] = {
   "compose:ralt",
   "compose:rwin",
   "compose:menu",
@@ -92,7 +92,7 @@ static const gchar *xkb_option_comp_whitelist[] = {
 
 /* This list must be kept in sync with what mutter is able to
  * handle. */
-static const gchar *xkb_option_grp_whitelist[] = {
+static const gchar *allowdd_xkb_grp_options[] = {
   "grp:toggle",
   "grp:lalt_toggle",
   "grp:lwin_toggle",
@@ -136,7 +136,7 @@ reload_setting (CcKeyboardOption *self)
   gchar **iter;
 
   for (iter = current_xkb_options; *iter; ++iter)
-    if (strv_contains (self->whitelist, *iter))
+    if (strv_contains (self->allowed_xkb_options, *iter))
       {
         if (g_strcmp0 (self->current_value, *iter) != 0)
           {
@@ -245,11 +245,11 @@ cc_keyboard_option_constructed (GObject *object)
   G_OBJECT_CLASS (cc_keyboard_option_parent_class)->constructed (object);
 
   if (g_str_equal (self->group, XKB_OPTION_GROUP_LVL3))
-    self->whitelist = xkb_option_lvl3_whitelist;
+    self->allowed_xkb_options = allowed_xkb_lvl3_options;
   else if (g_str_equal (self->group, XKB_OPTION_GROUP_COMP))
-    self->whitelist = xkb_option_comp_whitelist;
+    self->allowed_xkb_options = allowedd_xkb_compose_options;
   else if (g_str_equal (self->group, XKB_OPTION_GROUP_GRP))
-    self->whitelist = xkb_option_grp_whitelist;
+    self->allowed_xkb_options = allowdd_xkb_grp_options;
   else
     g_assert_not_reached ();
 
@@ -263,7 +263,7 @@ cc_keyboard_option_constructed (GObject *object)
   for (l = options; l; l = l->next)
     {
       option_id = l->data;
-      if (strv_contains (self->whitelist, option_id))
+      if (strv_contains (self->allowed_xkb_options, option_id))
         {
           gtk_list_store_append (self->store, &iter);
           gtk_list_store_set (self->store, &iter,
diff --git a/panels/printers/pp-options-dialog.c b/panels/printers/pp-options-dialog.c
index 37de75307b..05f8e72df9 100644
--- a/panels/printers/pp-options-dialog.c
+++ b/panels/printers/pp-options-dialog.c
@@ -93,7 +93,7 @@ static const struct {
 };
 
 /* keep sorted when changing */
-static const char *page_setup_option_whitelist[] = {
+static const char *allowed_page_setup_options[] = {
   "InputSlot",
   "MediaType",
   "OutputBin",
@@ -101,7 +101,7 @@ static const char *page_setup_option_whitelist[] = {
 };
 
 /* keep sorted when changing */
-static const char *color_option_whitelist[] = {
+static const char *allowed_color_options[] = {
   "BRColorEnhancement",
   "BRColorMatching",
   "BRColorMatching",
@@ -121,7 +121,7 @@ static const char *color_option_whitelist[] = {
 };
 
 /* keep sorted when changing */
-static const char *color_group_whitelist[] = {
+static const char *allowed_color_groups[] = {
   "Color",
   "Color1",
   "Color2",
@@ -145,7 +145,7 @@ static const char *color_group_whitelist[] = {
 };
 
 /* keep sorted when changing */
-static const char *image_quality_option_whitelist[] = {
+static const char *allowed_image_quality_options[] = {
   "BRDocument",
   "BRHalfTonePattern",
   "BRNormalPrt",
@@ -176,7 +176,7 @@ static const char *image_quality_option_whitelist[] = {
 };
 
 /* keep sorted when changing */
-static const char *image_quality_group_whitelist[] = {
+static const char *allowed_image_quality_groups[] = {
   "EPQualitySettings",
   "FPImageQuality1",
   "FPImageQuality2",
@@ -186,7 +186,7 @@ static const char *image_quality_group_whitelist[] = {
 };
 
 /* keep sorted when changing */
-static const char * finishing_option_whitelist[] = {
+static const char * allowed_finishing_options[] = {
   "BindColor",
   "BindEdge",
   "BindType",
@@ -206,13 +206,13 @@ static const char * finishing_option_whitelist[] = {
 };
 
 /* keep sorted when changing */
-static const char *job_group_whitelist[] = {
+static const char *allowed_job_groups[] = {
   "JobHandling",
   "JobLog",
 };
 
 /* keep sorted when changing */
-static const char *finishing_group_whitelist[] = {
+static const char *allowed_finishing_groups[] = {
   "Booklet",
   "BookletCover",
   "BookletModeOptions",
@@ -230,12 +230,12 @@ static const char *finishing_group_whitelist[] = {
 };
 
 /* keep sorted when changing */
-static const char *installable_options_group_whitelist[] = {
+static const char *allowed_installable_options_groups[] = {
   "InstallableOptions",
 };
 
 /* keep sorted when changing */
-static const char *page_setup_group_whitelist[] = {
+static const char *allowed_page_setup_groups[] = {
   "HPMarginAndLayout",
   "OutputControl",
   "PaperHandling",
@@ -244,7 +244,7 @@ static const char *page_setup_group_whitelist[] = {
 };
 
 /* keep sorted when changing */
-static const char *ppd_option_blacklist[] = {
+static const char *disallowed_ppd_options[] = {
   "Collate",
   "Copies",
   "Duplex",
@@ -576,38 +576,38 @@ populate_options_real (PpOptionsDialog *self)
                   grid = NULL;
 
                   if (STRING_IN_TABLE (ppd_file->groups[i].name,
-                                       color_group_whitelist))
+                                       allowed_color_groups))
                     grid = color_tab_grid;
                   else if (STRING_IN_TABLE (ppd_file->groups[i].name,
-                                            image_quality_group_whitelist))
+                                            allowed_image_quality_groups))
                     grid = image_quality_tab_grid;
                   else if (STRING_IN_TABLE (ppd_file->groups[i].name,
-                                            job_group_whitelist))
+                                            allowed_job_groups))
                     grid = job_tab_grid;
                   else if (STRING_IN_TABLE (ppd_file->groups[i].name,
-                                            finishing_group_whitelist))
+                                            allowed_finishing_groups))
                     grid = finishing_tab_grid;
                   else if (STRING_IN_TABLE (ppd_file->groups[i].name,
-                                            installable_options_group_whitelist))
+                                            allowed_installable_options_groups))
                     grid = installable_options_tab_grid;
                   else if (STRING_IN_TABLE (ppd_file->groups[i].name,
-                                            page_setup_group_whitelist))
+                                            allowed_page_setup_groups))
                     grid = page_setup_tab_grid;
 
                   if (!STRING_IN_TABLE (ppd_file->groups[i].options[j].keyword,
-                                        ppd_option_blacklist))
+                                        disallowed_ppd_options))
                     {
                       if (!grid && STRING_IN_TABLE (ppd_file->groups[i].options[j].keyword,
-                                                    color_option_whitelist))
+                                                    allowed_color_options))
                         grid = color_tab_grid;
                       else if (!grid && STRING_IN_TABLE (ppd_file->groups[i].options[j].keyword,
-                                                         image_quality_option_whitelist))
+                                                         allowed_image_quality_options))
                         grid = image_quality_tab_grid;
                       else if (!grid && STRING_IN_TABLE (ppd_file->groups[i].options[j].keyword,
-                                                         finishing_option_whitelist))
+                                                         allowed_finishing_options))
                         grid = finishing_tab_grid;
                       else if (!grid && STRING_IN_TABLE (ppd_file->groups[i].options[j].keyword,
-                                                         page_setup_option_whitelist))
+                                                         allowed_page_setup_options))
                         grid = page_setup_tab_grid;
 
                       if (!grid)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]