Remove some dead code.
This commit is contained in:
committed by
Kristian Høgsberg
parent
5b90d8f374
commit
011a1ce350
+1
-3
@@ -232,10 +232,8 @@ text_model_commit_string(void *data,
|
|||||||
{
|
{
|
||||||
struct text_entry *entry = data;
|
struct text_entry *entry = data;
|
||||||
|
|
||||||
if (index > strlen(text)) {
|
if (index > strlen(text))
|
||||||
fprintf(stderr, "Invalid cursor index %d\n", index);
|
fprintf(stderr, "Invalid cursor index %d\n", index);
|
||||||
index = strlen(text);
|
|
||||||
}
|
|
||||||
|
|
||||||
text_entry_delete_selected_text(entry);
|
text_entry_delete_selected_text(entry);
|
||||||
text_entry_insert_at_cursor(entry, text);
|
text_entry_insert_at_cursor(entry, text);
|
||||||
|
|||||||
+3
-10
@@ -140,12 +140,11 @@ int
|
|||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int blight, connector_id;
|
int blight, connector_id;
|
||||||
const char *default_seat = "seat0";
|
const char *path;
|
||||||
const char *path, *device_seat;
|
|
||||||
struct udev *udev;
|
struct udev *udev;
|
||||||
struct udev_enumerate *e;
|
struct udev_enumerate *e;
|
||||||
struct udev_list_entry *entry;
|
struct udev_list_entry *entry;
|
||||||
struct udev_device *device, *drm_device;
|
struct udev_device *drm_device;
|
||||||
|
|
||||||
if (argc < 3) {
|
if (argc < 3) {
|
||||||
printf("Please add connector_id and brightness values from 0-255\n");
|
printf("Please add connector_id and brightness values from 0-255\n");
|
||||||
@@ -169,13 +168,7 @@ main(int argc, char **argv)
|
|||||||
drm_device = NULL;
|
drm_device = NULL;
|
||||||
udev_list_entry_foreach(entry, udev_enumerate_get_list_entry(e)) {
|
udev_list_entry_foreach(entry, udev_enumerate_get_list_entry(e)) {
|
||||||
path = udev_list_entry_get_name(entry);
|
path = udev_list_entry_get_name(entry);
|
||||||
device = udev_device_new_from_syspath(udev, path);
|
drm_device = udev_device_new_from_syspath(udev, path);
|
||||||
device_seat =
|
|
||||||
udev_device_get_property_value(device, "ID_SEAT");
|
|
||||||
if (!device_seat)
|
|
||||||
device_seat = default_seat;
|
|
||||||
|
|
||||||
drm_device = device;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user