From cfcb8cf1322710fac5a0cdfeb0fa32d44135fb20 Mon Sep 17 00:00:00 2001 From: das Date: Sun, 3 Jun 2007 13:44:39 +0000 Subject: * macosx/tkMacOSXDraw.c: comment formatting fix for Xcode 3.0. * macosx/tkMacOSXEmbed.c: * macosx/tkMacOSXEntry.c: * macosx/tkMacOSXFont.c: * macosx/tkMacOSXKeyEvent.c: * macosx/tkMacOSXKeyboard.c: * macosx/tkMacOSXMenus.c: * macosx/tkMacOSXSend.c: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWindowEvent.c: * macosx/tkMacOSXWm.c: * macosx/tkMacOSXXStubs.c: --- ChangeLog | 21 +++++++++++++++++++++ macosx/Wish.xcodeproj/default.pbxuser | 2 ++ macosx/tkMacOSXDraw.c | 13 ++++++++----- macosx/tkMacOSXEmbed.c | 4 ++-- macosx/tkMacOSXEntry.c | 7 +++++-- macosx/tkMacOSXFont.c | 7 +++++-- macosx/tkMacOSXKeyEvent.c | 9 +++++++-- macosx/tkMacOSXKeyboard.c | 7 ++++--- macosx/tkMacOSXMenu.c | 12 ++++++------ macosx/tkMacOSXMenus.c | 7 +++++-- macosx/tkMacOSXSend.c | 12 ++++++++---- macosx/tkMacOSXSubwindows.c | 31 ++++++++++++++++++------------- macosx/tkMacOSXWindowEvent.c | 5 ++--- macosx/tkMacOSXWm.c | 12 +++++------- macosx/tkMacOSXXStubs.c | 7 +++++-- 15 files changed, 103 insertions(+), 53 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad30c97..2474206 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2007-06-03 Daniel Steffen + + * unix/Makefile.in: add datarootdir to silence autoconf-2.6x warning. + + * macosx/Wish.xcodeproj/default.pbxuser: add ttk tests. + + * macosx/tkMacOSXMenu.c: add error checking; whitespace cleanup. + + * macosx/tkMacOSXDraw.c: comment formatting fix for Xcode 3.0. + * macosx/tkMacOSXEmbed.c: + * macosx/tkMacOSXEntry.c: + * macosx/tkMacOSXFont.c: + * macosx/tkMacOSXKeyEvent.c: + * macosx/tkMacOSXKeyboard.c: + * macosx/tkMacOSXMenus.c: + * macosx/tkMacOSXSend.c: + * macosx/tkMacOSXSubwindows.c: + * macosx/tkMacOSXWindowEvent.c: + * macosx/tkMacOSXWm.c: + * macosx/tkMacOSXXStubs.c: + 2007-06-02 Daniel Steffen * macosx/tkMacOSXMenu.c (TkpPostMenu): ensure cascade menus display in diff --git a/macosx/Wish.xcodeproj/default.pbxuser b/macosx/Wish.xcodeproj/default.pbxuser index f8ee8dd..1ab49ec 100644 --- a/macosx/Wish.xcodeproj/default.pbxuser +++ b/macosx/Wish.xcodeproj/default.pbxuser @@ -34,10 +34,12 @@ NO, NO, NO, + NO, ); argumentStrings = ( "${SRCROOT}/../../tk/library/demos/widget", "${SRCROOT}/../../tk/tests/all.tcl", + "${SRCROOT}/../../tk/tests/ttk/all.tcl", "-geometry +0+0", "-singleproc 1", "-verbose \"bet\"", diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index c9dbdfb..42792b1 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.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: tkMacOSXDraw.c,v 1.23 2007/05/31 13:38:13 das Exp $ + * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.24 2007/06/03 13:44:39 das Exp $ */ #include "tkMacOSXInt.h" @@ -601,7 +601,11 @@ XDrawLines( int i, lw = gc->line_width; if (npoints < 2) { - return; /* TODO: generate BadValue error. */ + /* + * TODO: generate BadValue error. + */ + + return; } display->request++; @@ -1560,9 +1564,8 @@ TkMacOSXSetUpGraphicsPort( } if (gc->line_style != LineSolid) { /* - * FIXME: - * Here the dash pattern should be set in the drawing environment. - * This is not possible with QuickDraw line drawing. + * FIXME: Here the dash pattern should be set in the drawing + * environment. This is not possible with QuickDraw line drawing. */ } } diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c index 04d0e4d..5a0e786 100644 --- a/macosx/tkMacOSXEmbed.c +++ b/macosx/tkMacOSXEmbed.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXEmbed.c,v 1.12 2007/05/09 12:55:15 das Exp $ + * RCS: @(#) $Id: tkMacOSXEmbed.c,v 1.13 2007/06/03 13:44:39 das Exp $ */ #include "tkMacOSXInt.h" @@ -509,7 +509,7 @@ TkMacOSXGetHostToplevel( contWinPtr = TkpGetOtherWindow(topWinPtr); /* - * NOTE: Here we should handle out of process embedding. + * TODO: Here we should handle out of process embedding. */ if (contWinPtr != NULL) { diff --git a/macosx/tkMacOSXEntry.c b/macosx/tkMacOSXEntry.c index f12f624..5d19ca3 100644 --- a/macosx/tkMacOSXEntry.c +++ b/macosx/tkMacOSXEntry.c @@ -53,7 +53,7 @@ * software in accordance with the terms specified in this * license. * - * RCS: @(#) $Id: tkMacOSXEntry.c,v 1.8 2007/04/23 21:24:33 das Exp $ + * RCS: @(#) $Id: tkMacOSXEntry.c,v 1.9 2007/06/03 13:44:40 das Exp $ */ #include "tkMacOSXInt.h" @@ -257,7 +257,10 @@ TkpDrawSpinboxButtons(Spinbox *sbPtr, Drawable d) GC bgGC; MacDrawable *macDraw = (MacDrawable *) d; - /* FIXME RAISED really makes more sense */ + /* + * FIXME: RAISED really makes more sense + */ + if (sbPtr->buRelief != TK_RELIEF_FLAT) { return 0; } diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c index d745c87..5db83da 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -35,7 +35,7 @@ * that such fonts can not be used for controls, because controls * definitely require a family id (this assertion needs testing). * - * RCS: @(#) $Id: tkMacOSXFont.c,v 1.26 2007/05/30 06:35:54 das Exp $ + * RCS: @(#) $Id: tkMacOSXFont.c,v 1.27 2007/06/03 13:44:40 das Exp $ */ #include "tkMacOSXInt.h" @@ -1057,7 +1057,10 @@ TkpDrawCharsInContext( TkMacOSXSetupDrawingContext(drawable, gc, 1, &drawingContext); #if 0 - /* TODO: implement stippled text drawing */ + /* + * TODO: implement stippled text drawing + */ + if ((gc->fill_style == FillStippled || gc->fill_style == FillOpaqueStippled) && gc->stipple != None) { diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c index 14bf641..9344288 100644 --- a/macosx/tkMacOSXKeyEvent.c +++ b/macosx/tkMacOSXKeyEvent.c @@ -54,7 +54,7 @@ * software in accordance with the terms specified in this * license. * - * RCS: @(#) $Id: tkMacOSXKeyEvent.c,v 1.21 2007/04/23 21:24:33 das Exp $ + * RCS: @(#) $Id: tkMacOSXKeyEvent.c,v 1.22 2007/06/03 13:44:40 das Exp $ */ #include "tkMacOSXInt.h" @@ -178,7 +178,12 @@ TkMacOSXProcessKeyboardEvent( case kHICommandPreferences: case kHICommandQuit: statusPtr->stopProcessing = 0; - return 0; /* TODO: may not be on event on queue. */ + + /* + * TODO: may not be on event on queue. + */ + + return 0; break; default: break; diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c index ce16324..f992cc2 100644 --- a/macosx/tkMacOSXKeyboard.c +++ b/macosx/tkMacOSXKeyboard.c @@ -10,12 +10,13 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXKeyboard.c,v 1.21 2007/04/23 21:24:33 das Exp $ + * RCS: @(#) $Id: tkMacOSXKeyboard.c,v 1.22 2007/06/03 13:44:40 das Exp $ */ #include "tkMacOSXInt.h" -#include "tkMacOSXEvent.h" /* TkMacOSXKeycodeToUnicode() FIXME: That - * function should probably move here. */ +#include "tkMacOSXEvent.h" /* for TkMacOSXKeycodeToUnicode() + * FIXME: That function should probably move + * here. */ /* * A couple of simple definitions to make code a bit more self-explaining. diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 05fa7b4..c551d5a 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -10,7 +10,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.39 2007/06/02 06:44:44 das Exp $ + * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.40 2007/06/03 13:44:40 das Exp $ */ #include "tkMacOSXInt.h" @@ -1288,8 +1288,8 @@ ReconfigureIndividualMenu( ->menuPtr->platformData)->menuHdl; if (childMenuHdl != NULL) { - SetMenuItemHierarchicalID(macMenuHdl, base + index, - GetMenuID(childMenuHdl)); + ChkErr(SetMenuItemHierarchicalID, macMenuHdl, + base + index, GetMenuID(childMenuHdl)); } /* * If we changed the highligthing of this menu, its @@ -4204,7 +4204,7 @@ HandleMenuHiliteMsg( hidPtr->newItem); #endif GetPort(&macMDEFDrawable.grafPtr); - macMDEFDrawable.context = (CGContextRef)hidPtr->context; + macMDEFDrawable.context = (CGContextRef) hidPtr->context; err = ChkErr(GetMenuTrackingData, menu, mtdPtr); if (err != noErr) { @@ -4258,7 +4258,7 @@ HandleMenuDrawMsg( GetPort(&macMDEFDrawable.grafPtr); GetPortBounds(macMDEFDrawable.grafPtr, &bounds); - macMDEFDrawable.context = (CGContextRef)ddPtr->context; + macMDEFDrawable.context = (CGContextRef) ddPtr->context; #ifdef TK_MAC_DEBUG_MENUS TkMacOSXDbgMsg("MDEF: DrawMsg %d - %d; %d - %d", menuRectPtr->top, menuRectPtr->bottom, bounds.top, bounds.bottom); @@ -4402,7 +4402,7 @@ HandleMenuFindItemMsg( GetPort(&macMDEFDrawable.grafPtr); GetPortBounds(macMDEFDrawable.grafPtr, &bounds); - macMDEFDrawable.context = (CGContextRef)fiPtr->context; + macMDEFDrawable.context = (CGContextRef) fiPtr->context; /* * Now we need to take care of scrolling the menu. diff --git a/macosx/tkMacOSXMenus.c b/macosx/tkMacOSXMenus.c index 4bf138d..c915b34 100644 --- a/macosx/tkMacOSXMenus.c +++ b/macosx/tkMacOSXMenus.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: tkMacOSXMenus.c,v 1.16 2007/04/23 21:24:33 das Exp $ + * RCS: @(#) $Id: tkMacOSXMenus.c,v 1.17 2007/06/03 13:44:40 das Exp $ */ #include "tkMacOSXInt.h" @@ -91,7 +91,10 @@ TkMacOSXHandleMenuSelect( case kFileMenu: switch (theItem) { case kSourceItem: - /* TODO: source script */ + /* + * TODO: source script + */ + SourceDialog(); break; case kCloseItem: diff --git a/macosx/tkMacOSXSend.c b/macosx/tkMacOSXSend.c index 179beb6..8e4a701 100644 --- a/macosx/tkMacOSXSend.c +++ b/macosx/tkMacOSXSend.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXSend.c,v 1.6 2007/04/23 21:24:34 das Exp $ + * RCS: @(#) $Id: tkMacOSXSend.c,v 1.7 2007/06/03 13:44:40 das Exp $ */ #include "tkMacOSXInt.h" @@ -297,8 +297,12 @@ Tk_SetAppName( interpListPtr = riPtr; strcpy(riPtr->name, actualName); + /* + * TODO: DeleteProc + */ + Tcl_CreateObjCommand(interp, "send", Tk_SendObjCmd, - (ClientData) riPtr, NULL /* TODO: DeleteProc */); + (ClientData) riPtr, NULL); if (Tcl_IsSafe(interp)) { Tcl_HideCommand(interp, "send", "send"); } @@ -439,8 +443,8 @@ Tk_SendObjCmd( Tcl_Release((ClientData) localInterp); } else { /* - * This is a non-local request. Send the script to the server and poll - * it for a result. TODO!!! + * TODO: This is a non-local request. Send the script to the server and + * poll it for a result. */ } diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c index 273c0dd..8691aa0 100644 --- a/macosx/tkMacOSXSubwindows.c +++ b/macosx/tkMacOSXSubwindows.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXSubwindows.c,v 1.20 2007/05/31 13:38:14 das Exp $ + * RCS: @(#) $Id: tkMacOSXSubwindows.c,v 1.21 2007/06/03 13:44:40 das Exp $ */ #include "tkMacOSXInt.h" @@ -472,7 +472,10 @@ MoveResizeWindow( */ } } else { - /* TODO: update all xOff & yOffs */ + /* + * TODO: update all xOff & yOffs + */ + macParent = macWin->winPtr->parentPtr->privatePtr; parentBorderwidth = macWin->winPtr->parentPtr->changes.border_width; } @@ -558,7 +561,9 @@ XRaiseWindow( if (Tk_IsTopLevel(macWin->winPtr) && !Tk_IsEmbedded(macWin->winPtr)) { TkWmRestackToplevel(macWin->winPtr, Above, NULL); } else { - /* TODO: this should generate damage */ + /* + * TODO: this should generate damage + */ } } @@ -590,7 +595,9 @@ XLowerWindow( if (Tk_IsTopLevel(macWin->winPtr) && !Tk_IsEmbedded(macWin->winPtr)) { TkWmRestackToplevel(macWin->winPtr, Below, NULL); } else { - /* TODO: this should generate damage */ + /* + * TODO: this should generate damage + */ } } #endif @@ -748,7 +755,7 @@ TkMacOSXUpdateClipRgn( } /* - * NOTE: Here we should handle out of process embedding. + * TODO: Here we should handle out of process embedding. */ } @@ -790,7 +797,7 @@ TkMacOSXUpdateClipRgn( } /* - * NOTE: Here we should handle out of process embedding. + * TODO: Here we should handle out of process embedding. */ } SetEmptyRgn(tkMacOSXtmpRgn1); @@ -956,10 +963,8 @@ TkMacOSXGetDrawablePort( if (resultPort == NULL) { /* - * FIXME: - * - * So far as I can tell, the only time that this happens is when - * we are tearing down an embedded child interpreter, and most + * FIXME: So far as I can tell, the only time that this happens is + * when we are tearing down an embedded child interpreter, and most * of the time, this is harmless... However, we really need to * find why the embedding loses. */ @@ -968,7 +973,7 @@ TkMacOSXGetDrawablePort( } /* - * NOTE: Here we should handle out of process embedding. + * TODO: Here we should handle out of process embedding. */ } return resultPort; @@ -1083,7 +1088,7 @@ TkMacOSXInvalClipRgns( } /* - * NOTE: Here we should handle out of process embedding. + * TODO: Here we should handle out of process embedding. */ } } @@ -1174,7 +1179,7 @@ UpdateOffsets( } /* - * NOTE: Here we should handle out of process embedding. + * TODO: Here we should handle out of process embedding. */ } } diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index 70cad46..407688a 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -54,7 +54,7 @@ * software in accordance with the terms specified in this * license. * - * RCS: @(#) $Id: tkMacOSXWindowEvent.c,v 1.24 2007/05/31 13:38:17 das Exp $ + * RCS: @(#) $Id: tkMacOSXWindowEvent.c,v 1.25 2007/06/03 13:44:40 das Exp $ */ #include "tkMacOSXInt.h" @@ -573,9 +573,8 @@ GenerateUpdates( } /* - * NOTE: Here we should handle out of process embedding. + * TODO: Here we should handle out of process embedding. */ - } return 1; diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 9b05ad6..f4bba1f 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXWm.c,v 1.51 2007/05/31 13:38:17 das Exp $ + * RCS: @(#) $Id: tkMacOSXWm.c,v 1.52 2007/06/03 13:44:40 das Exp $ */ #include "tkMacOSXInt.h" @@ -3340,7 +3340,7 @@ UpdateGeometryInfo( TkWindow *contWinPtr = TkpGetOtherWindow(winPtr); /* - * NOTE: Here we should handle out of process embedding. + * TODO: Here we should handle out of process embedding. */ if (contWinPtr != NULL) { @@ -3743,11 +3743,9 @@ Tk_CoordsToWindow( } } - /* - * NOTE: Here we should handle out of process embedding. + * TODO: Here we should handle out of process embedding. */ - } else { for (childPtr = winPtr->childList; childPtr != NULL; childPtr = childPtr->nextPtr) { @@ -3836,7 +3834,7 @@ Tk_TopCoordsToWindow( } /* - * NOTE: Here we should handle out of process embedding. + * TODO: Here we should handle out of process embedding. */ } else { for (childPtr = winPtr->childList; childPtr != NULL; @@ -5181,7 +5179,7 @@ TkMacOSXMakeRealWindowExist( return; /* - * NOTE: Here we should handle out of process embedding. + * TODO: Here we should handle out of process embedding. */ } diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c index 3b5e50a..e7de22a 100644 --- a/macosx/tkMacOSXXStubs.c +++ b/macosx/tkMacOSXXStubs.c @@ -13,7 +13,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.18 2007/05/30 06:35:55 das Exp $ + * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.19 2007/06/03 13:44:40 das Exp $ */ #include "tkMacOSXInt.h" @@ -605,7 +605,10 @@ GContext XGContextFromGC( GC gc) { - /* TODO - currently a no-op */ + /* + * TODO: currently a no-op + */ + return 0; } -- cgit v0.12