]> git.saurik.com Git - wxWidgets.git/commitdiff
cleanup for 10.5
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 14 Oct 2006 15:48:32 +0000 (15:48 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 14 Oct 2006 15:48:32 +0000 (15:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/dirdlg.cpp
src/mac/carbon/filedlg.cpp
src/mac/carbon/toolbar.cpp

index fedf03ccaeb4f0421b7744d984c16f0b547c8217..49ae77655e9c4356930757b1925a31db8d61628c 100644 (file)
@@ -52,11 +52,11 @@ static pascal void NavEventProc(
         {
             // Set default location for the modern Navigation APIs
             // Apple Technical Q&A 1151
-            FSSpec theFSSpec;
-            wxMacFilename2FSSpec(data->GetPath(), &theFSSpec);
+            FSRef theFile;
+            wxMacPathToFSRef(data->GetPath(), &theFile);
             AEDesc theLocation = { typeNull, NULL };
-            if (noErr == ::AECreateDesc(typeFSS, &theFSSpec, sizeof(FSSpec), &theLocation))
-                ::NavCustomControl(ioParams->context, kNavCtlSetLocation, (void *) &theLocation);
+            if (noErr == ::AECreateDesc(typeFSRef, &theFile, sizeof(FSRef), &theLocation))
+                 ::NavCustomControl(ioParams->context, kNavCtlSetLocation, (void *) &theLocation);
         }
     }
 }
index 9e73bcf2d3510e495b91e066ea01624126342504..cd3767ac7df7b3fd14e0b0da9e3e7ec89e1e24b4 100644 (file)
@@ -74,10 +74,10 @@ static pascal void NavEventProc(
         {
             // Set default location for the modern Navigation APIs
             // Apple Technical Q&A 1151
-            FSSpec theFSSpec;
-            wxMacFilename2FSSpec(data->defaultLocation, &theFSSpec);
+            FSRef theFile;
+            wxMacPathToFSRef(data->defaultLocation, &theFile);
             AEDesc theLocation = { typeNull, NULL };
-            if (noErr == ::AECreateDesc(typeFSS, &theFSSpec, sizeof(FSSpec), &theLocation))
+            if (noErr == ::AECreateDesc(typeFSRef, &theFile, sizeof(FSRef), &theLocation))
                 ::NavCustomControl(ioParams->context, kNavCtlSetLocation, (void *) &theLocation);
         }
 
@@ -275,16 +275,11 @@ pascal Boolean CrossPlatformFilterCallback(
         NavFileOrFolderInfo* theInfo = (NavFileOrFolderInfo*) info ;
         if ( !theInfo->isFolder )
         {
-            if (theItem->descriptorType == typeFSS)
+            AECoerceDesc (theItem, typeFSRef, theItem); 
+            
+            FSRef fsref ;
+            if ( AEGetDescData (theItem, &fsref, sizeof (FSRef)) == noErr )
             {
-                FSSpec    spec;
-                memcpy( &spec , *theItem->dataHandle , sizeof(FSSpec) ) ;
-                wxString file = wxMacMakeStringFromPascal( spec.name ) ;
-                display = CheckFile( file , theInfo->fileAndFolder.fileInfo.finderInfo.fdType , data ) ;
-            }
-            else if ( theItem->descriptorType == typeFSRef )
-            {
-                FSRef fsref ;
                 memcpy( &fsref , *theItem->dataHandle , sizeof(FSRef) ) ;
                 wxString file = wxMacFSRefToPath( &fsref ) ;
                 display = CheckFile( file , theInfo->fileAndFolder.fileInfo.finderInfo.fdType , data ) ;
index d1f29edb1a191514dc08dbebe5036a2ba30db419..d4382cc13772f9bd594b7a9f0b77b702e57d1bb1 100644 (file)
@@ -1648,7 +1648,9 @@ void wxToolBar::OnPaint(wxPaintEvent& event)
             drawInfo.kind = kThemeBackgroundMetal;
             HIThemeApplyBackground( &hiToolbarrect, &drawInfo, cgContext, kHIThemeOrientationNormal );
 
+#ifndef __LP64__
             QDEndCGContext( (CGrafPtr) dc.m_macPort, &cgContext );
+#endif
 #endif
         }
     }