geometry: Move keycode to costomizations
This commit is contained in:
@ -37,7 +37,7 @@
|
||||
<key name="BKSP" />
|
||||
</section>
|
||||
<section angle="0">
|
||||
<key keycode="0" name="ABC123" />
|
||||
<key name="ABC123" />
|
||||
<key name="I149" />
|
||||
<key name="SPCE" />
|
||||
<key name="AB08" />
|
||||
@ -46,7 +46,7 @@
|
||||
<button name="LFSH" oref="altline" />
|
||||
<button name="BKSP" oref="altline" />
|
||||
<button name="I149" oref="altline" />
|
||||
<button name="ABC123" oref="altline" />
|
||||
<button name="ABC123" oref="altline" keycode="0" />
|
||||
<button name="SPCE" oref="spaceline" />
|
||||
<button name="RTRN" oref="outline7" />
|
||||
<outline id="default" corner-radius="1.000000">
|
||||
|
||||
@ -384,8 +384,6 @@ geometry_start_element_callback (GMarkupParseContext *pcontext,
|
||||
}
|
||||
|
||||
if (g_strcmp0 (element_name, "key") == 0) {
|
||||
guint keycode;
|
||||
|
||||
attribute = get_attribute (attribute_names, attribute_values,
|
||||
"name");
|
||||
if (attribute == NULL) {
|
||||
@ -397,12 +395,7 @@ geometry_start_element_callback (GMarkupParseContext *pcontext,
|
||||
}
|
||||
gchar *name = g_strdup (attribute);
|
||||
|
||||
attribute = get_attribute (attribute_names, attribute_values,
|
||||
"keycode");
|
||||
if (attribute != NULL)
|
||||
keycode = strtol (attribute, NULL, 10);
|
||||
else
|
||||
keycode = data->keycode++;
|
||||
guint keycode = data->keycode++;
|
||||
|
||||
data->key = eek_section_create_key (data->section,
|
||||
name,
|
||||
@ -441,6 +434,12 @@ geometry_start_element_callback (GMarkupParseContext *pcontext,
|
||||
key,
|
||||
g_strdup (attribute));
|
||||
|
||||
attribute = get_attribute (attribute_names, attribute_values,
|
||||
"keycode");
|
||||
if (attribute != NULL) {
|
||||
eek_key_set_keycode(key, strtol (attribute, NULL, 10));
|
||||
}
|
||||
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user