Commit e224e517 authored by Ian Douglas Scott's avatar Ian Douglas Scott Committed by Robert Ancell
Browse files

keyboard: Rename `XkbOption` and `XkbModifier` with `Cc` prefix

parent 5a9fa905
......@@ -66,11 +66,11 @@ enum {
PROP_PARAMETERS
};
static const XkbModifier LV3_MODIFIER = {
static const CcXkbModifier LV3_MODIFIER = {
"lv3:",
N_("Alternate Characters Key"),
N_("The alternate characters key can be used to enter additional characters. These are sometimes printed as a third-option on your keyboard."),
(XkbOption[]){
(CcXkbOption[]){
{ NC_("keyboard key", "Left Alt"), "lv3:lalt_switch" },
{ NC_("keyboard key", "Right Alt"), "lv3:ralt_switch" },
{ NC_("keyboard key", "Left Super"), "lv3:lwin_switch" },
......@@ -82,13 +82,13 @@ static const XkbModifier LV3_MODIFIER = {
"lv3:ralt_switch",
};
static const XkbModifier COMPOSE_MODIFIER = {
static const CcXkbModifier COMPOSE_MODIFIER = {
"compose:",
N_("Compose Key"),
N_("The compose key allows a wide variety of characters to be entered. To use it, press compose then a sequence of characters. "
" For example, compose key followed by <b>C</b> and <b>o</b> will enter <b>©</b>, "
"<b>a</b> followed by <b>'</b> will enter <b>á</b>."),
(XkbOption[]){
(CcXkbOption[]){
{ NC_("keyboard key", "Left Alt"), "compose:lalt" },
{ NC_("keyboard key", "Right Alt"), "compose:ralt" },
{ NC_("keyboard key", "Left Super"), "compose:lwin" },
......
......@@ -36,7 +36,7 @@ struct _CcXkbModifierDialog
HdyActionRow *switch_row;
GSettings *input_source_settings;
const XkbModifier *modifier;
const CcXkbModifier *modifier;
GSList *radio_group;
};
......@@ -47,10 +47,10 @@ static const gchar *custom_css =
" padding: 12px"
"}";
static const XkbOption*
get_xkb_option_from_name (const XkbModifier *modifier, const gchar* name)
static const CcXkbOption*
get_xkb_option_from_name (const CcXkbModifier *modifier, const gchar* name)
{
const XkbOption *options = modifier->options;
const CcXkbOption *options = modifier->options;
int i;
for (i = 0; options[i].label && options[i].xkb_option; i++)
......@@ -84,7 +84,7 @@ update_active_radio (CcXkbModifierDialog *self)
{
g_auto(GStrv) options = NULL;
GtkRadioButton *rightalt_radio;
const XkbOption *default_option;
const CcXkbOption *default_option;
guint i;
options = g_settings_get_strv (self->input_source_settings, "xkb-options");
......@@ -246,7 +246,7 @@ static void
add_radio_buttons (CcXkbModifierDialog *self)
{
GtkWidget *row, *radio_button, *label, *last_button = NULL;
XkbOption *options = self->modifier->options;
CcXkbOption *options = self->modifier->options;
int i;
for (i = 0; options[i].label && options[i].xkb_option; i++)
......@@ -310,7 +310,7 @@ cc_xkb_modifier_dialog_init (CcXkbModifierDialog *self)
CcXkbModifierDialog *
cc_xkb_modifier_dialog_new (GSettings *input_settings,
const XkbModifier *modifier)
const CcXkbModifier *modifier)
{
CcXkbModifierDialog *self;
......@@ -336,8 +336,8 @@ xcb_modifier_transform_binding_to_label (GValue *value,
GVariant *variant,
gpointer user_data)
{
const XkbModifier *modifier = user_data;
const XkbOption *entry = NULL;
const CcXkbModifier *modifier = user_data;
const CcXkbOption *entry = NULL;
const char **items;
guint i;
......
......@@ -28,21 +28,21 @@ typedef struct
{
gchar *label;
gchar *xkb_option;
} XkbOption;
} CcXkbOption;
typedef struct
{
gchar *prefix;
gchar *title;
gchar *description;
XkbOption *options;
CcXkbOption *options;
gchar *default_option;
} XkbModifier;
} CcXkbModifier;
#define CC_TYPE_XKB_MODIFIER_DIALOG (cc_xkb_modifier_dialog_get_type())
G_DECLARE_FINAL_TYPE (CcXkbModifierDialog, cc_xkb_modifier_dialog, CC, XKB_MODIFIER_DIALOG, GtkDialog)
CcXkbModifierDialog *cc_xkb_modifier_dialog_new (GSettings *input_settings, const XkbModifier*);
CcXkbModifierDialog *cc_xkb_modifier_dialog_new (GSettings *input_settings, const CcXkbModifier*);
gboolean xcb_modifier_transform_binding_to_label (GValue*, GVariant*, gpointer);
......
Supports Markdown
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