Skip to content

Commit 82464fc

Browse files
committed
Rename Touchstrip in the tablet files to just Strip
Make this a consistent naming, same as Rings and Dials
1 parent 70ddd89 commit 82464fc

File tree

7 files changed

+25
-31
lines changed

7 files changed

+25
-31
lines changed

data/wacom-cintiq-21ux2.tablet

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ IntegratedIn=Display
5757
Stylus=true
5858
NumRings=0
5959
NumStrips=2
60-
StatusLEDs=Touchstrip2;Touchstrip
60+
StatusLEDs=Strip2;Strip
6161

6262
[Buttons]
6363
Left=B;C;D;E;A;F;G;H;I
6464
Right=K;L;M;N;J;O;P;Q;R
6565

66-
Touchstrip=A
67-
Touchstrip2=J
66+
Strip=A
67+
Strip2=J
6868
StripsNumModes=4

data/wacom-cintiq-22hd.tablet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ NumStrips=2
5252
Left=B;C;D;E;A;F;G;H;I
5353
Right=K;L;M;N;J;O;P;Q;R
5454

55-
Touchstrip=A
56-
Touchstrip2=J
55+
Strip=A
56+
Strip2=J
5757
# Note: no physical LEDs to show mode
5858
StripsNumModes=4

data/wacom-cintiq-22hdt.tablet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ NumStrips=2
5454
Left=B;C;D;E;A;F;G;H;I
5555
Right=K;L;M;N;J;O;P;Q;R
5656

57-
Touchstrip=A
58-
Touchstrip2=J
57+
Strip=A
58+
Strip2=J
5959
# Note: no physical LEDs to show mode
6060
StripsNumModes=4

data/wacom.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ Ring2NumModes=3
218218

219219
# If the touchstrips have mode toggling through a button
220220
# like on the Cintiq 21UX2
221-
Touchstrip=A
222-
Touchstrip2=J
221+
Strip=A
222+
Strip2=J
223223
# We assume the same number of modes for each of the touchstrips
224224
# if there is more than one
225225
StripsNumModes=4

libwacom/libwacom-database.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,8 @@ static const struct {
426426
{ "Bottom", WACOM_BUTTON_POSITION_BOTTOM },
427427
{ "Ring", WACOM_BUTTON_RING_MODESWITCH },
428428
{ "Ring2", WACOM_BUTTON_RING2_MODESWITCH },
429-
{ "Touchstrip", WACOM_BUTTON_TOUCHSTRIP_MODESWITCH },
430-
{ "Touchstrip2", WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH },
429+
{ "Strip", WACOM_BUTTON_TOUCHSTRIP_MODESWITCH },
430+
{ "Strip2", WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH },
431431
{ "OLEDs", WACOM_BUTTON_OLED },
432432
{ "Dial", WACOM_BUTTON_DIAL_MODESWITCH },
433433
{ "Dial2", WACOM_BUTTON_DIAL2_MODESWITCH },
@@ -439,8 +439,8 @@ static const struct {
439439
} supported_leds[] = {
440440
{ "Ring", WACOM_STATUS_LED_RING },
441441
{ "Ring2", WACOM_STATUS_LED_RING2 },
442-
{ "Touchstrip", WACOM_STATUS_LED_TOUCHSTRIP },
443-
{ "Touchstrip2", WACOM_STATUS_LED_TOUCHSTRIP2 },
442+
{ "Strip", WACOM_STATUS_LED_TOUCHSTRIP },
443+
{ "Strip2", WACOM_STATUS_LED_TOUCHSTRIP2 },
444444
{ "Dial", WACOM_STATUS_LED_DIAL },
445445
{ "Dial2", WACOM_STATUS_LED_DIAL2 },
446446
};

libwacom/libwacom.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -909,8 +909,8 @@ static void print_supported_leds (int fd, const WacomDevice *device)
909909
char *leds_name[] = {
910910
"Ring;",
911911
"Ring2;",
912-
"Touchstrip;",
913-
"Touchstrip2;"
912+
"Strip;",
913+
"Strip2;"
914914
};
915915
int num_leds;
916916
const WacomStatusLEDs *status_leds;
@@ -981,8 +981,8 @@ static void print_buttons_for_device (int fd, const WacomDevice *device)
981981
print_button_flag_if(fd, device, "Right", WACOM_BUTTON_POSITION_RIGHT);
982982
print_button_flag_if(fd, device, "Top", WACOM_BUTTON_POSITION_TOP);
983983
print_button_flag_if(fd, device, "Bottom", WACOM_BUTTON_POSITION_BOTTOM);
984-
print_button_flag_if(fd, device, "Touchstrip", WACOM_BUTTON_TOUCHSTRIP_MODESWITCH);
985-
print_button_flag_if(fd, device, "Touchstrip2", WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH);
984+
print_button_flag_if(fd, device, "Strip", WACOM_BUTTON_TOUCHSTRIP_MODESWITCH);
985+
print_button_flag_if(fd, device, "Strip2", WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH);
986986
print_button_flag_if(fd, device, "Dial", WACOM_BUTTON_DIAL_MODESWITCH);
987987
print_button_flag_if(fd, device, "OLEDs", WACOM_BUTTON_OLED);
988988
print_button_flag_if(fd, device, "Ring", WACOM_BUTTON_RING_MODESWITCH);

test/test_libwacom.py

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -604,23 +604,20 @@ def test_new_from_path_unknown_device(db, fallback, bustype):
604604

605605
@pytest.mark.parametrize(
606606
"feature",
607-
("Ring", "Touchstrip", "Dial"),
607+
("Ring", "Strip", "Dial"),
608608
)
609609
@pytest.mark.parametrize("count", (1, 2))
610610
def test_button_modeswitch(custom_datadir, feature, count):
611611
USBID = (0x1234, 0x5678)
612612

613-
# sigh, Touchstrip but StripsNumModes...
614-
num_mode_key = f"{feature}s" if feature != "Touchstrip" else "Strip"
615-
616613
extra = {
617614
"Buttons": {
618615
"Left": "A;B;C;",
619616
"Right": "D;E;F;",
620617
feature: "A",
621618
},
622619
"Features": {
623-
num_mode_key: 4,
620+
f"{feature}s": 4,
624621
},
625622
}
626623
if count > 1:
@@ -639,7 +636,7 @@ def test_button_modeswitch(custom_datadir, feature, count):
639636

640637
expected_flag = {
641638
"Ring": WacomDevice.ButtonFlags.RING_MODESWITCH,
642-
"Touchstrip": WacomDevice.ButtonFlags.TOUCHSTRIP_MODESWITCH,
639+
"Strip": WacomDevice.ButtonFlags.TOUCHSTRIP_MODESWITCH,
643640
"Dial": WacomDevice.ButtonFlags.DIAL_MODESWITCH,
644641
}[feature]
645642

@@ -652,7 +649,7 @@ def test_button_modeswitch(custom_datadir, feature, count):
652649

653650
expected_flag = {
654651
"Ring": WacomDevice.ButtonFlags.RING2_MODESWITCH,
655-
"Touchstrip": WacomDevice.ButtonFlags.TOUCHSTRIP2_MODESWITCH,
652+
"Strip": WacomDevice.ButtonFlags.TOUCHSTRIP2_MODESWITCH,
656653
"Dial": WacomDevice.ButtonFlags.DIAL2_MODESWITCH,
657654
}[feature]
658655

@@ -669,15 +666,12 @@ def test_button_modeswitch(custom_datadir, feature, count):
669666

670667
@pytest.mark.parametrize(
671668
"feature",
672-
("Ring", "Touchstrip", "Dial"),
669+
("Ring", "Strip", "Dial"),
673670
)
674671
@pytest.mark.parametrize("count", (1, 2))
675672
def test_status_leds(custom_datadir, feature, count):
676673
USBID = (0x1234, 0x5678)
677674

678-
# sigh, Touchstrip but StripsNumModes...
679-
num_mode_key = f"{feature}s" if feature != "Touchstrip" else "Strip"
680-
681675
extra = {
682676
"Buttons": {
683677
"Left": "A;B;C;",
@@ -686,7 +680,7 @@ def test_status_leds(custom_datadir, feature, count):
686680
},
687681
"Features": {
688682
"StatusLEDs": f"{feature};{feature}2" if count > 1 else f"{feature}",
689-
num_mode_key: 4,
683+
f"{feature}s": 4,
690684
},
691685
}
692686
if count > 1:
@@ -706,7 +700,7 @@ def test_status_leds(custom_datadir, feature, count):
706700
expected = [
707701
{
708702
"Ring": WacomStatusLed.RING,
709-
"Touchstrip": WacomStatusLed.TOUCHSTRIP,
703+
"Strip": WacomStatusLed.TOUCHSTRIP,
710704
"Dial": WacomStatusLed.DIAL,
711705
}[feature]
712706
]
@@ -715,7 +709,7 @@ def test_status_leds(custom_datadir, feature, count):
715709
expected.append(
716710
{
717711
"Ring": WacomStatusLed.RING2,
718-
"Touchstrip": WacomStatusLed.TOUCHSTRIP2,
712+
"Strip": WacomStatusLed.TOUCHSTRIP2,
719713
"Dial": WacomStatusLed.DIAL2,
720714
}[feature]
721715
)

0 commit comments

Comments
 (0)