diff options
| author | Gerd Moellmann | 1999-09-06 15:57:51 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 1999-09-06 15:57:51 +0000 |
| commit | 2af98732e64f995dbce268d0788ccaf47d9b0b59 (patch) | |
| tree | 26dc6ce25359053277fc8440b59e740bfa5b3829 | |
| parent | da2c7b8cd5a2ed62228663f2b57339f748fb7e7d (diff) | |
| download | emacs-2af98732e64f995dbce268d0788ccaf47d9b0b59.tar.gz emacs-2af98732e64f995dbce268d0788ccaf47d9b0b59.zip | |
(lw_separator_p): Add alternative separator type names.
| -rw-r--r-- | lwlib/lwlib.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/lwlib/lwlib.c b/lwlib/lwlib.c index f17d231a677..9e99847f8e3 100644 --- a/lwlib/lwlib.c +++ b/lwlib/lwlib.c | |||
| @@ -1452,6 +1452,50 @@ lw_separator_p (label, type, motif_p) | |||
| 1452 | break; | 1452 | break; |
| 1453 | } | 1453 | } |
| 1454 | } | 1454 | } |
| 1455 | else if (strlen (label) > 3 | ||
| 1456 | && bcmp (label, "--", 2) == 0) | ||
| 1457 | { | ||
| 1458 | /* Alternative, more Emacs-style names. */ | ||
| 1459 | static struct separator_table | ||
| 1460 | { | ||
| 1461 | char *name; | ||
| 1462 | enum menu_separator type; | ||
| 1463 | } | ||
| 1464 | separator_names[] = | ||
| 1465 | { | ||
| 1466 | "space", SEPARATOR_NO_LINE, | ||
| 1467 | "no-line", SEPARATOR_NO_LINE, | ||
| 1468 | "single-line", SEPARATOR_SINGLE_LINE, | ||
| 1469 | "double-line", SEPARATOR_DOUBLE_LINE, | ||
| 1470 | "single-dashed-line", SEPARATOR_SINGLE_DASHED_LINE, | ||
| 1471 | "double-dashed-line", SEPARATOR_DOUBLE_DASHED_LINE, | ||
| 1472 | "shadow-etched-in", SEPARATOR_SHADOW_ETCHED_IN, | ||
| 1473 | "shadow-etched-out", SEPARATOR_SHADOW_ETCHED_OUT, | ||
| 1474 | "shadow-etched-in-dash", SEPARATOR_SHADOW_ETCHED_IN_DASH, | ||
| 1475 | "shadow-etched-out-dash", SEPARATOR_SHADOW_ETCHED_OUT_DASH, | ||
| 1476 | "shadow-double-etched-in", SEPARATOR_SHADOW_DOUBLE_ETCHED_IN, | ||
| 1477 | "shadow-double-etched-out", SEPARATOR_SHADOW_DOUBLE_ETCHED_OUT, | ||
| 1478 | "shadow-double-etched-in-dash", SEPARATOR_SHADOW_DOUBLE_ETCHED_IN_DASH, | ||
| 1479 | "shadow-double-etched-out-dash",SEPARATOR_SHADOW_DOUBLE_ETCHED_OUT_DASH, | ||
| 1480 | 0 | ||
| 1481 | }; | ||
| 1482 | |||
| 1483 | int i; | ||
| 1484 | |||
| 1485 | label += 2; | ||
| 1486 | for (i = 0; separator_names[i].name; ++i) | ||
| 1487 | if (strcmp (label, separator_names[i].name) == 0) | ||
| 1488 | { | ||
| 1489 | separator_p = 1; | ||
| 1490 | *type = separator_names[i].type; | ||
| 1491 | |||
| 1492 | /* If separator type is not supported under Motif, | ||
| 1493 | use a similar one. */ | ||
| 1494 | if (motif_p && *type >= SEPARATOR_SHADOW_DOUBLE_ETCHED_IN) | ||
| 1495 | *type -= 4; | ||
| 1496 | break; | ||
| 1497 | } | ||
| 1498 | } | ||
| 1455 | else | 1499 | else |
| 1456 | { | 1500 | { |
| 1457 | /* Old-style separator, maybe. It's a separator if it contains | 1501 | /* Old-style separator, maybe. It's a separator if it contains |