]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/dnd.cpp
unicode fixes, enabling notebook images again
[wxWidgets.git] / src / mac / carbon / dnd.cpp
index a96d6270da8aab4685ede7a91457c28d2cd881c5..8372417d08874b4fea0ec448293d3636b9afbd4f 100644 (file)
@@ -379,7 +379,7 @@ wxDragResult wxDropSource::DoDragDrop(int WXUNUSED(flags))
     gTrackingGlobals.m_currentSource = NULL ;
     
     KeyMap keymap;
     gTrackingGlobals.m_currentSource = NULL ;
     
     KeyMap keymap;
-    GetKeys((BigEndianLong*)&keymap);
+    GetKeys(keymap);
     bool optionDown = keymap[1] & 4;
     wxDragResult dndresult = optionDown ? wxDragCopy : wxDragMove;
     return dndresult;
     bool optionDown = keymap[1] & 4;
     wxDragResult dndresult = optionDown ? wxDragCopy : wxDragMove;
     return dndresult;
@@ -435,7 +435,7 @@ pascal OSErr wxMacWindowDragTrackingHandler(DragTrackingMessage theMessage, Wind
     wxTopLevelWindowMac* toplevel = wxFindWinFromMacWindow( theWindow ) ; 
 
     KeyMap keymap;
     wxTopLevelWindowMac* toplevel = wxFindWinFromMacWindow( theWindow ) ; 
 
     KeyMap keymap;
-    GetKeys((BigEndianLong*)&keymap);
+    GetKeys(keymap);
     bool optionDown = keymap[1] & 4;
     wxDragResult result = optionDown ? wxDragCopy : wxDragMove;
 
     bool optionDown = keymap[1] & 4;
     wxDragResult result = optionDown ? wxDragCopy : wxDragMove;
 
@@ -527,27 +527,33 @@ pascal OSErr wxMacWindowDragTrackingHandler(DragTrackingMessage theMessage, Wind
                 {
                   if ( trackingGlobals->m_currentSource->MacInstallDefaultCursor( result ) == FALSE )
                   {
                 {
                   if ( trackingGlobals->m_currentSource->MacInstallDefaultCursor( result ) == FALSE )
                   {
-                    switch( result )
-                    {
-                      case wxDragCopy :
-                      {
-                        wxCursor cursor(wxCURSOR_COPY_ARROW) ;
-                        cursor.MacInstall() ;
-                      }
-                      break ;
-                      case wxDragMove :
+                      switch( result )
                       {
                       {
-                        wxCursor cursor(wxCURSOR_ARROW) ;
-                        cursor.MacInstall() ;
-                        }
-                      break ;
-                      case wxDragNone :
-                      {
-                        wxCursor cursor(wxCURSOR_NO_ENTRY) ;
-                        cursor.MacInstall() ;
+                          case wxDragCopy :
+                              {
+                                  wxCursor cursor(wxCURSOR_COPY_ARROW) ;
+                                  cursor.MacInstall() ;
+                              }
+                              break ;
+                          case wxDragMove :
+                              {
+                                  wxCursor cursor(wxCURSOR_ARROW) ;
+                                  cursor.MacInstall() ;
+                              }
+                              break ;
+                          case wxDragNone :
+                              {
+                                  wxCursor cursor(wxCURSOR_NO_ENTRY) ;
+                                  cursor.MacInstall() ;
+                              }
+                              break ;
+
+                          case wxDragError:
+                          case wxDragLink:
+                          case wxDragCancel:
+                              // put these here to make gcc happy
+                              ;
                       }
                       }
-                      break ;
-                    }
                   }
                 }
                 
                   }
                 }
                 
@@ -590,7 +596,7 @@ pascal OSErr wxMacWindowDragReceiveHandler(WindowPtr theWindow,
         if ( trackingGlobals->m_currentTarget->OnDrop( localx , localy ) )
         {
             KeyMap keymap;
         if ( trackingGlobals->m_currentTarget->OnDrop( localx , localy ) )
         {
             KeyMap keymap;
-            GetKeys((BigEndianLong*)&keymap);
+            GetKeys(keymap);
             bool optionDown = keymap[1] & 4;
             wxDragResult result = optionDown ? wxDragCopy : wxDragMove;
             trackingGlobals->m_currentTarget->OnData( localx , localy , result ) ;
             bool optionDown = keymap[1] & 4;
             wxDragResult result = optionDown ? wxDragCopy : wxDragMove;
             trackingGlobals->m_currentTarget->OnData( localx , localy , result ) ;