Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ian Douglas Scott
Settings
Commits
e224e517
Commit
e224e517
authored
Dec 09, 2020
by
Ian Douglas Scott
Committed by
Robert Ancell
May 19, 2021
Browse files
keyboard: Rename `XkbOption` and `XkbModifier` with `Cc` prefix
parent
5a9fa905
Changes
3
Hide whitespace changes
Inline
Side-by-side
panels/keyboard/cc-keyboard-panel.c
View file @
e224e517
...
...
@@ -66,11 +66,11 @@ enum {
PROP_PARAMETERS
};
static
const
XkbModifier
LV3_MODIFIER
=
{
static
const
Cc
XkbModifier
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
[]){
(
Cc
XkbOption
[]){
{
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
Cc
XkbModifier
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
[]){
(
Cc
XkbOption
[]){
{
NC_
(
"keyboard key"
,
"Left Alt"
),
"compose:lalt"
},
{
NC_
(
"keyboard key"
,
"Right Alt"
),
"compose:ralt"
},
{
NC_
(
"keyboard key"
,
"Left Super"
),
"compose:lwin"
},
...
...
panels/keyboard/cc-xkb-modifier-dialog.c
View file @
e224e517
...
...
@@ -36,7 +36,7 @@ struct _CcXkbModifierDialog
HdyActionRow
*
switch_row
;
GSettings
*
input_source_settings
;
const
XkbModifier
*
modifier
;
const
Cc
XkbModifier
*
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
Cc
XkbOption
*
get_xkb_option_from_name
(
const
Cc
XkbModifier
*
modifier
,
const
gchar
*
name
)
{
const
XkbOption
*
options
=
modifier
->
options
;
const
Cc
XkbOption
*
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
Cc
XkbOption
*
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
;
Cc
XkbOption
*
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
Cc
XkbModifier
*
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
Cc
XkbModifier
*
modifier
=
user_data
;
const
Cc
XkbOption
*
entry
=
NULL
;
const
char
**
items
;
guint
i
;
...
...
panels/keyboard/cc-xkb-modifier-dialog.h
View file @
e224e517
...
...
@@ -28,21 +28,21 @@ typedef struct
{
gchar
*
label
;
gchar
*
xkb_option
;
}
XkbOption
;
}
Cc
XkbOption
;
typedef
struct
{
gchar
*
prefix
;
gchar
*
title
;
gchar
*
description
;
XkbOption
*
options
;
Cc
XkbOption
*
options
;
gchar
*
default_option
;
}
XkbModifier
;
}
Cc
XkbModifier
;
#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
Cc
XkbModifier
*
);
gboolean
xcb_modifier_transform_binding_to_label
(
GValue
*
,
GVariant
*
,
gpointer
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment