From 5cca131c49f39cce7cabd10ea39473d103e5d505 Mon Sep 17 00:00:00 2001 From: das Date: Mon, 4 Jun 2007 09:28:44 +0000 Subject: * macosx/tkMacOSXMenu.c: add error checking; whitespace cleanup. * macosx/tkMacOSXDraw.c: sync comment formatting with HEAD. * macosx/tkMacOSXEmbed.c: * macosx/tkMacOSXEntry.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 | 16 ++++++++++++++++ macosx/tkMacOSXDraw.c | 13 ++++++++----- macosx/tkMacOSXEmbed.c | 4 ++-- macosx/tkMacOSXEntry.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 +++++-- 13 files changed, 91 insertions(+), 51 deletions(-) diff --git a/ChangeLog b/ChangeLog index 610677a..6f2d89e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2007-06-04 Daniel Steffen + + * macosx/tkMacOSXMenu.c: add error checking; whitespace cleanup. + + * macosx/tkMacOSXDraw.c: sync comment formatting with HEAD. + * macosx/tkMacOSXEmbed.c: + * macosx/tkMacOSXEntry.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/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index f6781d5..fb3d0c1 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.2.2.23 2007/05/31 13:42:12 das Exp $ + * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.2.2.24 2007/06/04 09:28:44 das Exp $ */ #include "tkMacOSXInt.h" @@ -603,7 +603,11 @@ XDrawLines( int i, lw = gc->line_width; if (npoints < 2) { - return; /* TODO: generate BadValue error. */ + /* + * TODO: generate BadValue error. + */ + + return; } display->request++; @@ -1562,9 +1566,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 aaa38bc..0620dca 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.2.2.6 2007/05/09 12:57:46 das Exp $ + * RCS: @(#) $Id: tkMacOSXEmbed.c,v 1.2.2.7 2007/06/04 09:28:44 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 1f12cf5..c412f31 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.2.2.8 2007/04/29 02:26:49 das Exp $ + * RCS: @(#) $Id: tkMacOSXEntry.c,v 1.2.2.9 2007/06/04 09:28:44 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/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c index 945256b4..79b762c 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.6.2.13 2007/04/29 02:26:49 das Exp $ + * RCS: @(#) $Id: tkMacOSXKeyEvent.c,v 1.6.2.14 2007/06/04 09:28:45 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 6206116..538c9fd 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.5.2.7 2007/04/29 02:26:49 das Exp $ + * RCS: @(#) $Id: tkMacOSXKeyboard.c,v 1.5.2.8 2007/06/04 09:28:45 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 0d51ad3..a412e1d 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.6.2.26 2007/06/02 06:46:49 das Exp $ + * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.6.2.27 2007/06/04 09:28:45 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 d12bdb3..f8f3ffa 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.2.2.13 2007/04/29 02:26:49 das Exp $ + * RCS: @(#) $Id: tkMacOSXMenus.c,v 1.2.2.14 2007/06/04 09:28:45 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 22afde4..f3a5785 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.2.2.3 2007/04/29 02:26:50 das Exp $ + * RCS: @(#) $Id: tkMacOSXSend.c,v 1.2.2.4 2007/06/04 09:28:45 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 ed4ebcc..3f47ec5 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.2.2.17 2007/05/31 13:42:12 das Exp $ + * RCS: @(#) $Id: tkMacOSXSubwindows.c,v 1.2.2.18 2007/06/04 09:28:45 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 41966da..aa49306 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.3.2.21 2007/05/31 13:42:12 das Exp $ + * RCS: @(#) $Id: tkMacOSXWindowEvent.c,v 1.3.2.22 2007/06/04 09:28:45 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 41b79ca..17aab68 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.7.2.38 2007/05/31 13:42:13 das Exp $ + * RCS: @(#) $Id: tkMacOSXWm.c,v 1.7.2.39 2007/06/04 09:28:45 das Exp $ */ #include "tkMacOSXInt.h" @@ -3346,7 +3346,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) { @@ -3749,11 +3749,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) { @@ -3842,7 +3840,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; @@ -5187,7 +5185,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 a217593..77abfeb 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.2.2.15 2007/05/30 06:39:39 das Exp $ + * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.2.2.16 2007/06/04 09:28:45 das Exp $ */ #include "tkMacOSXInt.h" @@ -603,7 +603,10 @@ GContext XGContextFromGC( GC gc) { - /* TODO - currently a no-op */ + /* + * TODO: currently a no-op + */ + return 0; } -- cgit v0.12