]> git.saurik.com Git - wxWidgets.git/commitdiff
compilation fix for a patch which didn't compile...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 25 Jul 2004 15:52:40 +0000 (15:52 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 25 Jul 2004 15:52:40 +0000 (15:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/intl.cpp
src/generic/listctrl.cpp

index 66107d6fa75a88630450cabb14c1f9a6cd6ee0e0..ac1b779ea411572368b772a16507a3b8623ba5b0 100644 (file)
@@ -2505,7 +2505,7 @@ const wxChar *wxLocale::GetString(const wxChar *szOrigString,
 wxString wxLocale::GetHeaderValue( const wxChar* szHeader,
                                    const wxChar* szDomain ) const
 {
-    if ( wxIsEmpty(Header) )
+    if ( wxIsEmpty(szHeader) )
         return wxEmptyString;
 
     wxChar const * pszTrans = NULL;
@@ -2535,11 +2535,11 @@ wxString wxLocale::GetHeaderValue( const wxChar* szHeader,
     if ( wxIsEmpty(pszTrans) )
       return wxEmptyString;
 
-    wxChar const * pszFound = wxStrstr(pszTrans, Header);
+    wxChar const * pszFound = wxStrstr(pszTrans, szHeader);
     if ( pszFound == NULL )
       return wxEmptyString;
     
-    pszFound += wxStrlen(Header) + 2 /* ': ' */;
+    pszFound += wxStrlen(szHeader) + 2 /* ': ' */;
 
     // Every header is separated by \n
     
index 32f5bd7060a3ed120cd45c8ef0414ff191abfc8e..7b1bffec796c4faae4ad1f991874f6af693d686d 100644 (file)
@@ -4290,17 +4290,18 @@ long wxListMainWindow::FindItem(long start, long data)
 
 long wxListMainWindow::FindItem( const wxPoint& pt )
 {
-  wxPoint p;
-  long topItem = GetTopItem();
+    size_t topItem;
+    GetVisibleLinesRange(&topItem, NULL);
 
-  GetItemPosition( GetItemCount()-1, p );
-  if( p.y == 0 )
-    return topItem;
-  long id = (long) floor( pt.y*(GetItemCount()-topItem-1)/p.y+topItem );
-  if( id >= 0 && id < (long)GetItemCount() )
-    return id;
+    wxPoint p;
+    GetItemPosition( GetItemCount()-1, p );
+    if( p.y == 0 )
+        return topItem;
+    long id = (long) floor( pt.y*(GetItemCount()-topItem-1)/p.y+topItem );
+    if( id >= 0 && id < (long)GetItemCount() )
+        return id;
 
-  return wxNOT_FOUND;
+    return wxNOT_FOUND;
 }
 
 long wxListMainWindow::HitTest( int x, int y, int &flags )