summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwolfsuit <wolfsuit>2005-05-15 20:57:07 (GMT)
committerwolfsuit <wolfsuit>2005-05-15 20:57:07 (GMT)
commitc8cbd274c4ee973c09bf584947c6e6a164e9414e (patch)
treecf5ca4ddc5b3e3bf86edd41ae71fe2e3fe8b4d9d
parent96723e49a59aebc9468bb4f297062273172cfe34 (diff)
downloadtk-c8cbd274c4ee973c09bf584947c6e6a164e9414e.zip
tk-c8cbd274c4ee973c09bf584947c6e6a164e9414e.tar.gz
tk-c8cbd274c4ee973c09bf584947c6e6a164e9414e.tar.bz2
From Michael Kirkham:
* macosx/tkMacOSXMenu.c (TkpConfigureMenuEntry): Thinko in clearing the ENTRY_ACCEL_MASK before re-parsing it. [Tk Bug 1012852] * macosx/tkMacOSXScrlbr.c (UpdateControlValues): Don't set the control value BEFORE setting the min and max or the control manager will reset it for you. [Tk Bug 1202181] * macosx/tkMacOSXXStubs.c (TkMacOSXXGetPixel, TkMacOSXXPutPixel): Restore the port to what it was before putting we were called. [Tk Bug 1202223]
-rw-r--r--ChangeLog15
-rw-r--r--macosx/tkMacOSXMenu.c4
-rw-r--r--macosx/tkMacOSXScrlbr.c4
-rw-r--r--macosx/tkMacOSXXStubs.c10
4 files changed, 26 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 4091051..b06e744 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2005-05-15 Jim Ingham <jingham@apple.com>
+
+ Fixes from Michael Kirkham:
+
+ * macosx/tkMacOSXMenu.c (TkpConfigureMenuEntry): Thinko in clearing
+ the ENTRY_ACCEL_MASK before re-parsing it. [Tk Bug 1012852]
+
+ * macosx/tkMacOSXScrlbr.c (UpdateControlValues): Don't set the
+ control value BEFORE setting the min and max or the control manager
+ will reset it for you. [Tk Bug 1202181]
+
+ * macosx/tkMacOSXXStubs.c (TkMacOSXXGetPixel, TkMacOSXXPutPixel):
+ Restore the port to what it was before putting we were called.
+ [Tk Bug 1202223]
+
2005-05-14 Daniel Steffen <das@users.sourceforge.net>
* macosx/tkMacOSXInit.c:
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index f9d1e23..9f69c28 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.6.2.7 2005/05/14 20:53:31 das Exp $
+ * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.6.2.8 2005/05/15 20:57:08 wolfsuit Exp $
*/
#include "tkMacOSXInt.h"
#include "tkMenubutton.h"
@@ -991,7 +991,7 @@ TkpConfigureMenuEntry(
char *accelString = (mePtr->accelPtr == NULL) ? ""
: Tcl_GetStringFromObj(mePtr->accelPtr, NULL);
char *accel = accelString;
- mePtr->entryFlags |= ~ENTRY_ACCEL_MASK;
+ mePtr->entryFlags &= ~ENTRY_ACCEL_MASK;
mePtr->entryFlags |= ParseAccelerators(&accelString);
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index 778b447..0d68e4c 100644
--- a/macosx/tkMacOSXScrlbr.c
+++ b/macosx/tkMacOSXScrlbr.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.5.2.2 2004/02/16 00:42:34 wolfsuit Exp $
+ * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.5.2.3 2005/05/15 20:57:08 wolfsuit Exp $
*/
#include "tkScrollbar.h"
@@ -1095,7 +1095,6 @@ UpdateControlValues(
controlValue = (SInt32) (SCROLLBAR_SCALING_DVALUE * scrollPtr->firstFraction);
SetControlViewSize(macScrollPtr->sbHandle,viewSize);
- SetControl32BitValue(macScrollPtr->sbHandle, controlValue);
SetControl32BitMaximum(macScrollPtr->sbHandle, controlMax);
#if 0
@@ -1121,6 +1120,7 @@ UpdateControlValues(
HiliteControl(macScrollPtr->sbHandle, 0);
}
}
+ SetControl32BitValue(macScrollPtr->sbHandle, controlValue);
if ( !IsControlVisible (macScrollPtr -> sbHandle) ) {
SetControlVisibility(macScrollPtr->sbHandle,TRUE,FALSE);
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c
index aca8651..033e917 100644
--- a/macosx/tkMacOSXXStubs.c
+++ b/macosx/tkMacOSXXStubs.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.2.2.5 2005/05/14 20:53:31 das Exp $
+ * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.2.2.6 2005/05/15 20:57:08 wolfsuit Exp $
*/
#include "tkInt.h"
@@ -761,10 +761,11 @@ TkMacOSXXGetPixel(
int x,
int y)
{
- CGrafPtr grafPtr;
+ CGrafPtr grafPtr, oldPort;
RGBColor cPix;
unsigned long r, g, b, c;
grafPtr = (CGrafPtr)image->data;
+ GetPort(&oldPort);
SetPort(grafPtr);
GetCPixel(x,y,&cPix);
if (image->obdata) {
@@ -778,6 +779,7 @@ TkMacOSXXGetPixel(
b = cPix . blue;
}
c = (r<<16)|(g<<8)|(b);
+ SetPort(oldPort);
return c;
}
@@ -788,10 +790,11 @@ TkMacOSXXPutPixel(
int y,
unsigned long pixel)
{
- CGrafPtr grafPtr;
+ CGrafPtr grafPtr, oldPort;
RGBColor cPix;
unsigned long r, g, b;
grafPtr = (CGrafPtr)image->data;
+ GetPort(&oldPort);
SetPort(grafPtr);
r = (pixel & image->red_mask)>>16;
g = (pixel & image->green_mask)>>8;
@@ -807,6 +810,7 @@ TkMacOSXXPutPixel(
cPix . blue = b;
}
SetCPixel(x,y,&cPix);
+ SetPort(oldPort);
return 0;
}