Commit afd8d0cc authored by Sean Davis's avatar Sean Davis 🕶

Use improved settings terminology

parent 468cfa55
Pipeline #1264 passed with stages
in 4 minutes and 40 seconds
......@@ -47,7 +47,7 @@
#define DEFAULT_ORIENTATION GTK_ORIENTATION_HORIZONTAL
#define DEFAULT_PANEL_ORIENTATION GTK_ORIENTATION_HORIZONTAL
#define DEFAULT_PANEL_SIZE 28
#define DEFAULT_MODE_WHITELIST FALSE
#define DEFAULT_SHOW_NEW_ITEMS FALSE
......@@ -79,7 +79,7 @@ struct _SnConfig
gboolean square_icons;
gboolean symbolic_icons;
gboolean menu_is_primary;
gboolean mode_whitelist;
gboolean show_new_items;
GList *known_items;
GHashTable *hidden_items;
GList *known_legacy_items;
......@@ -105,7 +105,7 @@ enum
PROP_SQUARE_ICONS,
PROP_SYMBOLIC_ICONS,
PROP_MENU_IS_PRIMARY,
PROP_MODE_WHITELIST,
PROP_SHOW_NEW_ITEMS,
PROP_KNOWN_ITEMS,
PROP_HIDDEN_ITEMS,
PROP_KNOWN_LEGACY_ITEMS,
......@@ -198,9 +198,9 @@ sn_config_class_init (SnConfigClass *klass)
G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class,
PROP_MODE_WHITELIST,
g_param_spec_boolean ("mode-whitelist", NULL, NULL,
DEFAULT_MODE_WHITELIST,
PROP_SHOW_NEW_ITEMS,
g_param_spec_boolean ("show-new-items", NULL, NULL,
DEFAULT_SHOW_NEW_ITEMS,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
......@@ -286,7 +286,7 @@ sn_config_init (SnConfig *config)
config->single_row = DEFAULT_SINGLE_ROW;
config->square_icons = DEFAULT_SQUARE_ICONS;
config->symbolic_icons = DEFAULT_SYMBOLIC_ICONS;
config->mode_whitelist = DEFAULT_MODE_WHITELIST;
config->show_new_items = DEFAULT_SHOW_NEW_ITEMS;
config->known_items = NULL;
config->hidden_items = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
config->known_legacy_items = NULL;
......@@ -377,8 +377,8 @@ sn_config_get_property (GObject *object,
g_value_set_boolean (value, config->menu_is_primary);
break;
case PROP_MODE_WHITELIST:
g_value_set_boolean (value, config->mode_whitelist);
case PROP_SHOW_NEW_ITEMS:
g_value_set_boolean (value, config->show_new_items);
break;
case PROP_KNOWN_ITEMS:
......@@ -490,11 +490,11 @@ sn_config_set_property (GObject *object,
}
break;
case PROP_MODE_WHITELIST:
case PROP_SHOW_NEW_ITEMS:
val = g_value_get_boolean (value);
if (config->mode_whitelist != val)
if (config->show_new_items != val)
{
config->mode_whitelist = val;
config->show_new_items = val;
g_signal_emit (G_OBJECT (config), sn_config_signals[ITEM_LIST_CHANGED], 0);
g_signal_emit (G_OBJECT (config), sn_config_signals[LEGACY_ITEM_LIST_CHANGED], 0);
}
......@@ -914,7 +914,7 @@ sn_config_add_known_item (SnConfig *config,
config->known_items = g_list_prepend (config->known_items, g_strdup (name));
if (config->mode_whitelist)
if (config->show_new_items)
{
name_copy = g_strdup (name);
g_hash_table_replace (config->hidden_items, name_copy, name_copy);
......@@ -943,7 +943,7 @@ sn_config_add_known_legacy_item (SnConfig *config,
config->known_legacy_items = g_list_prepend (config->known_legacy_items, g_strdup (name));
if (config->mode_whitelist)
if (config->show_new_items)
{
name_copy = g_strdup (name);
g_hash_table_replace (config->hidden_legacy_items, name_copy, name_copy);
......@@ -953,7 +953,7 @@ sn_config_add_known_legacy_item (SnConfig *config,
g_object_notify (G_OBJECT (config), "known-legacy-items");
g_signal_emit (G_OBJECT (config), sn_config_signals[LEGACY_ITEM_LIST_CHANGED], 0);
return config->mode_whitelist;
return config->show_new_items;
}
......@@ -1141,8 +1141,8 @@ sn_config_new (const gchar *property_base)
xfconf_g_property_bind (channel, property, G_TYPE_BOOLEAN, config, "menu-is-primary");
g_free (property);
property = g_strconcat (property_base, "/mode-whitelist", NULL);
xfconf_g_property_bind (channel, property, G_TYPE_BOOLEAN, config, "mode-whitelist");
property = g_strconcat (property_base, "/show-new-items", NULL);
xfconf_g_property_bind (channel, property, G_TYPE_BOOLEAN, config, "show-new-items");
g_free (property);
property = g_strconcat (property_base, "/known-items", NULL);
......
......@@ -118,7 +118,7 @@ gboolean sn_config_legacy_items_clear (SnConfig
#define DEFAULT_ORIENTATION GTK_ORIENTATION_HORIZONTAL
#define DEFAULT_PANEL_ORIENTATION GTK_ORIENTATION_HORIZONTAL
#define DEFAULT_PANEL_SIZE 28
#define DEFAULT_MODE_WHITELIST FALSE
#define DEFAULT_SHOW_NEW_ITEMS FALSE
......
......@@ -761,9 +761,9 @@ sn_dialog_build (SnDialog *dialog)
G_OBJECT (object), "active",
G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
object = gtk_builder_get_object (dialog->builder, "checkbutton-whitelist");
object = gtk_builder_get_object (dialog->builder, "checkbutton-show-new-items");
g_return_val_if_fail (GTK_IS_WIDGET (object), FALSE);
g_object_bind_property (G_OBJECT (dialog->config), "mode-whitelist",
g_object_bind_property (G_OBJECT (dialog->config), "show-new-items",
G_OBJECT (object), "active",
G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
......
......@@ -257,7 +257,7 @@
</packing>
</child>
<child>
<object class="GtkCheckButton" id="checkbutton-whitelist">
<object class="GtkCheckButton" id="checkbutton-show-new-items">
<property name="label" translatable="yes">_Hide items by default</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
......
......@@ -174,7 +174,7 @@ systray_box_init (SystrayBox *box)
box->n_hidden_children = 0;
box->n_visible_children = 0;
box->horizontal = TRUE;
box->show_hidden = DEFAULT_MODE_WHITELIST;
box->show_hidden = DEFAULT_SHOW_NEW_ITEMS;
box->square_icons = DEFAULT_SQUARE_ICONS;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment