summaryrefslogtreecommitdiffstats
path: root/generic/tkTreeDisplay.c
diff options
context:
space:
mode:
authortreectrl <treectrl>2006-10-28 01:20:33 (GMT)
committertreectrl <treectrl>2006-10-28 01:20:33 (GMT)
commitbab5d282bc445d4872e17a430a75c78254fff02b (patch)
tree06428bc91af2e1c3323b362026ffcbbed3113472 /generic/tkTreeDisplay.c
parentf92154d570a77f79d2ab1570879799f41062bd35 (diff)
downloadtktreectrl-bab5d282bc445d4872e17a430a75c78254fff02b.zip
tktreectrl-bab5d282bc445d4872e17a430a75c78254fff02b.tar.gz
tktreectrl-bab5d282bc445d4872e17a430a75c78254fff02b.tar.bz2
Deprecated commands and options are wrapped inside #ifdef DEPRECATED.
Diffstat (limited to 'generic/tkTreeDisplay.c')
-rw-r--r--generic/tkTreeDisplay.c43
1 files changed, 26 insertions, 17 deletions
diff --git a/generic/tkTreeDisplay.c b/generic/tkTreeDisplay.c
index f258a2c..942e1e2 100644
--- a/generic/tkTreeDisplay.c
+++ b/generic/tkTreeDisplay.c
@@ -5,7 +5,7 @@
*
* Copyright (c) 2002-2006 Tim Baker
*
- * RCS: @(#) $Id: tkTreeDisplay.c,v 1.47 2006/10/26 02:57:54 treectrl Exp $
+ * RCS: @(#) $Id: tkTreeDisplay.c,v 1.48 2006/10/28 01:20:33 treectrl Exp $
*/
#include "tkTreeCtrl.h"
@@ -232,18 +232,20 @@ Range_Redo(
fixedWidth = TreeColumn_FixedWidth(tree->columns);
/* Single item column, want all items same width */
- else if (tree->itemWidthEqual ||
- /* This option is deprecated */
- TreeColumn_WidthHack(tree->columnVis)) {
-
+ else if (tree->itemWidthEqual
+#ifdef DEPRECATED
+ || TreeColumn_WidthHack(tree->columnVis)
+#endif /* DEPRECATED */
+ ) {
fixedWidth = TreeColumn_WidthOfItems(tree->columnVis);
/* Each item is a multiple of this width */
if (tree->itemWidMult > 0)
stepWidth = tree->itemWidMult;
+#ifdef DEPRECATED
else
- /* This option is deprecated */
stepWidth = TreeColumn_StepWidth(tree->columnVis);
+#endif /* DEPRECATED */
if ((stepWidth != -1) && (fixedWidth % stepWidth))
fixedWidth += stepWidth - fixedWidth % stepWidth;
@@ -254,9 +256,10 @@ Range_Redo(
/* Each item is a multiple of this width */
if (tree->itemWidMult > 0)
stepWidth = tree->itemWidMult;
+#ifdef DEPRECATED
else
- /* This option is deprecated */
stepWidth = TreeColumn_StepWidth(tree->columnVis);
+#endif /* DEPRECATED */
}
}
@@ -478,14 +481,17 @@ Range_TotalWidth(
/* Single item column, each item is a multiple of this width */
if (tree->itemWidMult > 0)
stepWidth = tree->itemWidMult;
+#ifdef DEPRECATED
else
- /* This option is deprecated */
stepWidth = TreeColumn_StepWidth(tree->columnVis);
+#endif /* DEPRECATED */
/* Single item column, want all items same width */
- if (tree->itemWidthEqual ||
- /* This option is deprecated */
- TreeColumn_WidthHack(tree->columnVis)) {
+ if (tree->itemWidthEqual
+#ifdef DEPRECATED
+ || TreeColumn_WidthHack(tree->columnVis)
+#endif /* DEPRECATED */
+ ) {
range->totalWidth = TreeColumn_WidthOfItems(tree->columnVis);
if ((stepWidth != -1) && (range->totalWidth % stepWidth))
range->totalWidth += stepWidth - range->totalWidth % stepWidth;
@@ -531,18 +537,20 @@ Range_TotalWidth(
fixedWidth = TreeColumn_FixedWidth(tree->columnVis);
/* Single item column, want all items same width */
- else if (tree->itemWidthEqual ||
- /* This option is deprecated */
- TreeColumn_WidthHack(tree->columnVis)) {
-
+ else if (tree->itemWidthEqual
+#ifdef DEPRECATED
+ || TreeColumn_WidthHack(tree->columnVis)
+#endif /* DEPRECATED */
+ ) {
fixedWidth = TreeColumn_WidthOfItems(tree->columnVis);
/* Each item is a multiple of this width */
if (tree->itemWidMult > 0)
stepWidth = tree->itemWidMult;
+#ifdef DEPRECATED
else
- /* This option is deprecated */
stepWidth = TreeColumn_StepWidth(tree->columnVis);
+#endif /* DEPRECATED */
if ((stepWidth != -1) && (fixedWidth % stepWidth))
fixedWidth += stepWidth - fixedWidth % stepWidth;
@@ -553,9 +561,10 @@ Range_TotalWidth(
/* Each item is a multiple of this width */
if (tree->itemWidMult > 0)
stepWidth = tree->itemWidMult;
+#ifdef DEPRECATED
else
- /* This option is deprecated */
stepWidth = TreeColumn_StepWidth(tree->columnVis);
+#endif /* DEPRECATED */
}
/* Sum of widths of items in this range */