]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/window.cpp
return radio box own help text when origin is Origin_Unknown to make sure GetHelpText...
[wxWidgets.git] / src / gtk / window.cpp
index 1864418244e0aad6c499ae34b0630ea4750ee01d..b89ba436cb00ecd98187887b6af7f82490f9d871 100644 (file)
@@ -3564,7 +3564,7 @@ void wxWindowGTK::Refresh(bool WXUNUSED(eraseBackground),
         r.y = rect->y;
         r.width = rect->width;
         r.height = rect->height;
-        gdk_window_invalidate_rect( m_wxwindow->window, NULL, TRUE );
+        gdk_window_invalidate_rect( m_wxwindow->window, &r, TRUE );
 #endif
     }
 }
@@ -3962,11 +3962,6 @@ void wxPopupMenuPositionCallback( GtkMenu *menu,
 }
 }
 
-void wxWindowGTK::DoPopupMenuUpdateUI(wxMenu* menu)
-{
-    menu->UpdateUI();
-}
-
 bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y )
 {
     wxCHECK_MSG( m_widget != NULL, false, wxT("invalid window") );
@@ -3975,7 +3970,7 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y )
 
     SetInvokingWindow( menu, this );
 
-    DoPopupMenuUpdateUI(menu);
+    menu->UpdateUI();
 
     wxPoint pos;
     gpointer userdata;
@@ -4195,7 +4190,7 @@ int wxWindowGTK::GetScrollThumb(int orient) const
     GtkRange * const sb = m_scrollBar[ScrollDirFromOrient(orient)];
     wxCHECK_MSG( sb, 0, _T("this window is not scrollable") );
 
-    return int(sb->adjustment->page_size);
+    return wxRound(sb->adjustment->page_size);
 }
 
 int wxWindowGTK::GetScrollPos( int orient ) const
@@ -4203,7 +4198,7 @@ int wxWindowGTK::GetScrollPos( int orient ) const
     GtkRange * const sb = m_scrollBar[ScrollDirFromOrient(orient)];
     wxCHECK_MSG( sb, 0, _T("this window is not scrollable") );
 
-    return int(sb->adjustment->value + 0.5);
+    return wxRound(sb->adjustment->value);
 }
 
 int wxWindowGTK::GetScrollRange( int orient ) const
@@ -4211,7 +4206,7 @@ int wxWindowGTK::GetScrollRange( int orient ) const
     GtkRange * const sb = m_scrollBar[ScrollDirFromOrient(orient)];
     wxCHECK_MSG( sb, 0, _T("this window is not scrollable") );
 
-    return int(sb->adjustment->upper);
+    return wxRound(sb->adjustment->upper);
 }
 
 // Determine if increment is the same as +/-x, allowing for some small
@@ -4230,14 +4225,14 @@ wxEventType wxWindowGTK::GetScrollEventType(GtkRange* range)
     const int barIndex = range == m_scrollBar[1];
     GtkAdjustment* adj = range->adjustment;
 
-    const int value = int(adj->value + 0.5);
+    const int value = wxRound(adj->value);
 
     // save previous position
     const double oldPos = m_scrollPos[barIndex];
     // update current position
     m_scrollPos[barIndex] = adj->value;
     // If event should be ignored, or integral position has not changed
-    if (!m_hasVMT || g_blockEventsOnDrag || value == int(oldPos + 0.5))
+    if (!m_hasVMT || g_blockEventsOnDrag || value == wxRound(oldPos))
     {
         return wxEVT_NULL;
     }