Skip to content

Commit

Permalink
test-input-helper.c: Fix printf formatting so codespell doesn't trip.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtwebster committed Feb 12, 2024
1 parent 48da3c4 commit 6fdaa48
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions plugins/common/test-input-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ print_disabled_devices (void)
manager = gdk_display_get_device_manager (gdk_display_get_default ());

devices = get_disabled_devices (manager);
g_print ("Disabled devices:\t\t\t");
g_print ("Disabled devices:\t\t\t ");
if (devices == NULL) {
g_print ("no\n");
return;
Expand All @@ -62,24 +62,24 @@ int main (int argc, char **argv)

supports_xinput = supports_xinput_devices ();
if (supports_xinput) {
g_print ("Supports XInput:\t\t\tyes\n");
g_print ("Supports XInput:\t\t\t yes\n");
} else {
g_print ("Supports XInput:\t\t\tno\n");
g_print ("Supports XInput:\t\t\t no\n");
return 0;
}
supports_xinput = supports_xinput2_devices (&opcode);
if (supports_xinput) {
g_print ("Supports XInput2:\t\t\tyes (opcode: %d)\n", opcode);
g_print ("Supports XInput2:\t\t\t yes (opcode: %d)\n", opcode);
} else {
g_print ("Supports XInput2:\t\t\tno\n");
g_print ("Supports XInput2:\t\t\t no\n");
return 0;
}

has_touchpad = touchpad_is_present ();
g_print ("Has touchpad:\t\t\t\t%s\n", has_touchpad ? "yes" : "no");
g_print ("Has touchpad:\t\t\t\t %s\n", has_touchpad ? "yes" : "no");

has_touchscreen = touchscreen_is_present ();
g_print ("Has touchscreen:\t\t\t%s\n", has_touchscreen ? "yes" : "no");
g_print ("Has touchscreen:\t\t\t %s\n", has_touchscreen ? "yes" : "no");

device_info = XListInputDevices (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &n_devices);
if (device_info == NULL) {
Expand All @@ -93,7 +93,7 @@ int main (int argc, char **argv)
XDevice *device;

if (device_info_is_touchscreen (&device_info[i])) {
g_print ("Device %d is touchscreen:\t\t%s\n", (int) device_info[i].id, "yes");
g_print ("Device %d is touchscreen:\t\t %s\n", (int) device_info[i].id, "yes");
continue;
}

Expand All @@ -103,15 +103,15 @@ int main (int argc, char **argv)
continue;

if (device_is_touchpad (device))
g_print ("Device %d is touchpad:\t\t%s\n", (int) device_info[i].id, "yes");
g_print ("Device %d is touchpad:\t\t %s\n", (int) device_info[i].id, "yes");
else {
int tool_id;

tool_id = xdevice_get_last_tool_id (device_info[i].id);
if (tool_id >= 0x0)
g_print ("Device %d is touchpad/touchscreen:\t%s (tool ID: 0x%x)\n", (int) device_info[i].id, "no", tool_id);
g_print ("Device %d is touchpad/touchscreen:\t %s (tool ID: 0x%x)\n", (int) device_info[i].id, "no", tool_id);
else
g_print ("Device %d is touchpad/touchscreen:\t%s\n", (int) device_info[i].id, "no");
g_print ("Device %d is touchpad/touchscreen:\t %s\n", (int) device_info[i].id, "no");
}

xdevice_close (device);
Expand Down

0 comments on commit 6fdaa48

Please sign in to comment.