summaryrefslogtreecommitdiffstats
path: root/macosx/ttkMacOSXTheme.c
diff options
context:
space:
mode:
authordas <das>2008-12-08 00:10:36 (GMT)
committerdas <das>2008-12-08 00:10:36 (GMT)
commit9d585802147a2634f25b95e7b75438b0262737e8 (patch)
treee3cef534c65880cc42d961f4220a77e421e251bf /macosx/ttkMacOSXTheme.c
parent597daf2f923e59de1a284ad76b26b59e66ac0df9 (diff)
downloadtk-9d585802147a2634f25b95e7b75438b0262737e8.zip
tk-9d585802147a2634f25b95e7b75438b0262737e8.tar.gz
tk-9d585802147a2634f25b95e7b75438b0262737e8.tar.bz2
add error checking
Diffstat (limited to 'macosx/ttkMacOSXTheme.c')
-rw-r--r--macosx/ttkMacOSXTheme.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c
index c78d463..d848df9 100644
--- a/macosx/ttkMacOSXTheme.c
+++ b/macosx/ttkMacOSXTheme.c
@@ -27,7 +27,7 @@
* top-level window, not to the Tk_Window. BoxToRect()
* accounts for this.
*
- * RCS: @(#) $Id: ttkMacOSXTheme.c,v 1.25 2008/12/07 21:56:37 das Exp $
+ * RCS: @(#) $Id: ttkMacOSXTheme.c,v 1.26 2008/12/08 00:10:36 das Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -486,10 +486,11 @@ static void SpinButtonElementSize(
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
SInt32 s;
- GetThemeMetric(kThemeMetricLittleArrowsWidth, &s); *widthPtr = s;
- GetThemeMetric(kThemeMetricLittleArrowsHeight, &s); *heightPtr = s;
- *widthPtr += Ttk_PaddingWidth(SpinbuttonMargins);
- *heightPtr += Ttk_PaddingHeight(SpinbuttonMargins);
+
+ ChkErr(GetThemeMetric, kThemeMetricLittleArrowsWidth, &s);
+ *widthPtr = s + Ttk_PaddingWidth(SpinbuttonMargins);
+ ChkErr(GetThemeMetric, kThemeMetricLittleArrowsHeight, &s);
+ *heightPtr = s + Ttk_PaddingHeight(SpinbuttonMargins);
}
static void SpinButtonElementDraw(
@@ -508,8 +509,8 @@ static void SpinButtonElementDraw(
info.adornment = kThemeAdornmentNone;
BEGIN_DRAWING(d)
- DrawThemeButton(
- &bounds, kThemeIncDecButton, &info, NULL, NULL/*DontErase*/, NULL, 0);
+ ChkErr(DrawThemeButton,
+ &bounds, kThemeIncDecButton, &info, NULL, NULL, NULL, 0);
END_DRAWING
}
@@ -953,8 +954,11 @@ static void DisclosureElementSize(
int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
{
SInt32 s;
- GetThemeMetric(kThemeMetricDisclosureTriangleWidth, &s); *widthPtr = s;
- GetThemeMetric(kThemeMetricDisclosureTriangleHeight, &s); *heightPtr = s;
+
+ ChkErr(GetThemeMetric, kThemeMetricDisclosureTriangleWidth, &s);
+ *widthPtr = s;
+ ChkErr(GetThemeMetric, kThemeMetricDisclosureTriangleHeight, &s);
+ *heightPtr = s;
}
static void DisclosureElementDraw(