From 7972d9a18fba31d3f7da71aab8f10c10b84c3dd4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sun, 27 Dec 2009 08:23:49 +1000 Subject: xsetwacom: special output for write-only options. So far we only have xyDefault as write-only option but having some more user-friendly output is helpful. Signed-off-by: Peter Hutterer --- tools/xsetwacom.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c index 34c8079..17ce1c7 100644 --- a/tools/xsetwacom.c +++ b/tools/xsetwacom.c @@ -48,7 +48,8 @@ enum printformat { enum prop_flags { PROP_FLAG_BOOLEAN = 1, - PROP_FLAG_READONLY = 2 + PROP_FLAG_READONLY = 2, + PROP_FLAG_WRITEONLY = 4 }; typedef struct _param @@ -506,8 +507,8 @@ static param_t parameters[] = .prop_name = WACOM_PROP_TABLET_AREA, .prop_format = 32, .prop_offset = 0, + .prop_flags = PROP_FLAG_WRITEONLY, .set_func = set_xydefault, - .get_func = not_implemented, }, { .name = "mmonitor", @@ -1875,6 +1876,10 @@ static void get(Display *dpy, enum printformat printformat, int argc, char **arg { printf("Unknown parameter name '%s'.\n", argv[1]); return; + } else if (param->prop_flags & PROP_FLAG_WRITEONLY) + { + printf("'%s' is a write-only option.\n", argv[1]); + return; } else { param->printformat = printformat; -- cgit v1.2.1