aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--generic/Attrs.c10
-rw-r--r--generic/Attrs.h1
2 files changed, 8 insertions, 3 deletions
diff --git a/generic/Attrs.c b/generic/Attrs.c
index 2e58f67..bfd155c 100644
--- a/generic/Attrs.c
+++ b/generic/Attrs.c
@@ -115,6 +115,8 @@ CharToDim(char dim)
return LF_DIM_ICON;
case 'a':
return LF_DIM_AUTO;
+ case 'l':
+ return LF_DIM_LABEL;
case 'x':
default:
return LF_DIM_PIXEL;
@@ -200,7 +202,8 @@ LabelFormatCreate(Tcl_Interp *interp,
if (!*ptr) {
goto lf_error_syn;
}
- if ((*ptr != 'x') && (*ptr != 'f') && (*ptr != 'i') && (*ptr != 'a')) {
+ if ((*ptr != 'x') && (*ptr != 'f') && (*ptr != 'i') &&
+ (*ptr != 'a') && (*ptr != 'l')) {
c_width = (ZnDim) strtod(ptr, &next_ptr);
if ((ptr == next_ptr) || (*next_ptr != 'x')) {
lf_error_syn:
@@ -243,7 +246,8 @@ LabelFormatCreate(Tcl_Interp *interp,
field_struct.x_spec = field_struct.y_spec = 0;
field_struct.x_attach = field_struct.y_attach = LF_ATTACH_PIXEL;
field_struct.x_dim = field_struct.y_dim = LF_DIM_PIXEL;
- if ((*ptr == 'x') || (*ptr == 'f') || (*ptr == 'i') || (*ptr == 'a')) {
+ if ((*ptr == 'x') || (*ptr == 'f') || (*ptr == 'i') ||
+ (*ptr == 'a') || (*ptr == 'l')) {
num_tok = sscanf(ptr, "%c%d%c%d%n", &x_char, &width,
&y_char, &height, &index);
if (num_tok != 4) {
@@ -272,7 +276,7 @@ LabelFormatCreate(Tcl_Interp *interp,
ptr += index;
}
else if (!*ptr || (field_index != 0)) {
- /* An incomplete field spec is an error if there is several fields. */
+ /* An incomplete field spec is an error if there are several fields. */
Tcl_AppendResult(interp, "incomplete field in label format: \"",
ptr-index, "\"", NULL);
goto lf_error;
diff --git a/generic/Attrs.h b/generic/Attrs.h
index 582db9d..cac2244 100644
--- a/generic/Attrs.h
+++ b/generic/Attrs.h
@@ -55,6 +55,7 @@ extern "C" {
#define LF_DIM_FONT 1
#define LF_DIM_ICON 2
#define LF_DIM_AUTO 3
+#define LF_DIM_LABEL 4
typedef struct {
int x_spec;