]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
fixes after wx-config changes (patch 1076155)
[wxWidgets.git] / src / generic / listctrl.cpp
index f87c9d6b20b9130a08a03ad8737bc3d84e6e246d..25d1f61b83d15858c47370b288e6129aaa47b074 100644 (file)
@@ -3000,10 +3000,10 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
     else
     {
         // This is neccessary , because after a DnD operation in
-        // from and to ourself, the up event is swallowed by the 
+        // from and to ourself, the up event is swallowed by the
         // DnD code. So on next non-up event (which means here and
         // now) m_lineSelectSingleOnUp should be reset.
-        m_lineSelectSingleOnUp = (size_t) -1;  
+        m_lineSelectSingleOnUp = (size_t) -1;
     }
     if (event.RightDown())
     {
@@ -3019,6 +3019,8 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
         }
         SendNotify( current, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK,
                     event.GetPosition() );
+        // Allow generation of context menu event
+        event.Skip();
     }
     else if (event.MiddleDown())
     {
@@ -3034,16 +3036,16 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
         if ( !(cmdModifierDown || event.ShiftDown()) )
         {
             if( IsSingleSel() || !IsHighlighted(current) )
-        {
-            HighlightAll( false );
+            {
+                HighlightAll( false );
 
-            ChangeCurrent(current);
+                ChangeCurrent(current);
 
-            ReverseHighlight(m_current);
-        }
-            else // multi sel & current is highlighted & no mod keys
+                ReverseHighlight(m_current);
+            }
+            else // multi sel & current is highlighted & no mod keys
             {
-                m_lineSelectSingleOnUp = current;      
+                m_lineSelectSingleOnUp = current;
                 ChangeCurrent(current); // change focus
             }
         }
@@ -4620,11 +4622,15 @@ void wxGenericListCtrl::CalculateAndSetHeaderHeight()
 {
     if ( m_headerWin )
     {
+#ifdef __WXMAC__
+        SInt32 h ;
+        GetThemeMetric( kThemeMetricListHeaderHeight, &h );    
+#else
         // we use 'g' to get the descent, too
         int w, h, d;
         m_headerWin->GetTextExtent(wxT("Hg"), &w, &h, &d);
         h += d + 2 * HEADER_OFFSET_Y + EXTRA_HEIGHT;
-
+#endif
         // only update if changed
         if ( h != m_headerHeight )
         {
@@ -4643,7 +4649,7 @@ void wxGenericListCtrl::CreateHeaderWindow()
     m_headerWin = new wxListHeaderWindow
                       (
                         this, wxID_ANY, m_mainWin,
-                        wxPoint(0, 0),
+                        wxPoint(0,0),
                         wxSize(GetClientSize().x, m_headerHeight),
                         wxTAB_TRAVERSAL
                       );