fixed variable shadowing icc warnings

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35713 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-09-26 00:29:42 +00:00
parent 8226a05440
commit 4e115ed2c7
18 changed files with 161 additions and 178 deletions

View File

@@ -445,9 +445,9 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding,
#if wxUSE_CONFIG && wxUSE_FILECONFIG
// remember this in the config
wxFontMapperPathChanger path(this,
wxFontMapperPathChanger path2(this,
FONTMAPPER_FONT_FROM_ENCODING_PATH);
if ( path.IsOk() )
if ( path2.IsOk() )
{
GetConfig()->Write(configEntry, info->ToString());
}
@@ -464,9 +464,9 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding,
//
// remember it to avoid asking the same question again later
#if wxUSE_CONFIG && wxUSE_FILECONFIG
wxFontMapperPathChanger path(this,
wxFontMapperPathChanger path2(this,
FONTMAPPER_FONT_FROM_ENCODING_PATH);
if ( path.IsOk() )
if ( path2.IsOk() )
{
GetConfig()->Write
(

View File

@@ -2175,20 +2175,20 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i
wxRealPoint p3 = rotated_point (GetWidth(), 0, cos_angle, sin_angle, p0);
wxRealPoint p4 = rotated_point (GetWidth(), GetHeight(), cos_angle, sin_angle, p0);
int x1 = (int) floor (wxMin (wxMin(p1.x, p2.x), wxMin(p3.x, p4.x)));
int y1 = (int) floor (wxMin (wxMin(p1.y, p2.y), wxMin(p3.y, p4.y)));
int x2 = (int) ceil (wxMax (wxMax(p1.x, p2.x), wxMax(p3.x, p4.x)));
int y2 = (int) ceil (wxMax (wxMax(p1.y, p2.y), wxMax(p3.y, p4.y)));
int x1a = (int) floor (wxMin (wxMin(p1.x, p2.x), wxMin(p3.x, p4.x)));
int y1a = (int) floor (wxMin (wxMin(p1.y, p2.y), wxMin(p3.y, p4.y)));
int x2a = (int) ceil (wxMax (wxMax(p1.x, p2.x), wxMax(p3.x, p4.x)));
int y2a = (int) ceil (wxMax (wxMax(p1.y, p2.y), wxMax(p3.y, p4.y)));
// Create rotated image
wxImage rotated (x2 - x1 + 1, y2 - y1 + 1, false);
wxImage rotated (x2a - x1a + 1, y2a - y1a + 1, false);
// With alpha channel
if (has_alpha)
rotated.SetAlpha();
if (offset_after_rotation != NULL)
{
*offset_after_rotation = wxPoint (x1, y1);
*offset_after_rotation = wxPoint (x1a, y1a);
}
// GRG: The rotated (destination) image is always accessed
@@ -2230,7 +2230,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i
{
for (x = 0; x < rotated.GetWidth(); x++)
{
wxRealPoint src = rotated_point (x + x1, y + y1, cos_angle, -sin_angle, p0);
wxRealPoint src = rotated_point (x + x1a, y + y1a, cos_angle, -sin_angle, p0);
if (-0.25 < src.x && src.x < GetWidth() - 0.75 &&
-0.25 < src.y && src.y < GetHeight() - 0.75)
@@ -2238,8 +2238,6 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i
// interpolate using the 4 enclosing grid-points. Those
// points can be obtained using floor and ceiling of the
// exact coordinates of the point
// C.M. 2000-02-17: when the point is near the border, special care is required.
int x1, y1, x2, y2;
if (0 < src.x && src.x < GetWidth() - 1)
@@ -2289,10 +2287,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i
*(dst++) = *p;
if (has_alpha)
{
unsigned char *p = alpha[y1] + x1;
*(alpha_dst++) = *p;
}
*(alpha_dst++) = *(alpha[y1] + x1);
}
else if (d2 < gs_Epsilon)
{
@@ -2302,10 +2297,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i
*(dst++) = *p;
if (has_alpha)
{
unsigned char *p = alpha[y1] + x2;
*(alpha_dst++) = *p;
}
*(alpha_dst++) = *(alpha[y1] + x2);
}
else if (d3 < gs_Epsilon)
{
@@ -2315,10 +2307,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i
*(dst++) = *p;
if (has_alpha)
{
unsigned char *p = alpha[y2] + x2;
*(alpha_dst++) = *p;
}
*(alpha_dst++) = *(alpha[y2] + x2);
}
else if (d4 < gs_Epsilon)
{
@@ -2328,10 +2317,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i
*(dst++) = *p;
if (has_alpha)
{
unsigned char *p = alpha[y2] + x1;
*(alpha_dst++) = *p;
}
*(alpha_dst++) = *(alpha[y2] + x1);
}
else
{
@@ -2360,10 +2346,10 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i
if (has_alpha)
{
unsigned char *v1 = alpha[y1] + (x1);
unsigned char *v2 = alpha[y1] + (x2);
unsigned char *v3 = alpha[y2] + (x2);
unsigned char *v4 = alpha[y2] + (x1);
v1 = alpha[y1] + (x1);
v2 = alpha[y1] + (x2);
v3 = alpha[y2] + (x2);
v4 = alpha[y2] + (x1);
*(alpha_dst++) = (unsigned char)
( (w1 * *v1 + w2 * *v2 +
@@ -2390,7 +2376,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i
{
for (x = 0; x < rotated.GetWidth(); x++)
{
wxRealPoint src = rotated_point (x + x1, y + y1, cos_angle, -sin_angle, p0);
wxRealPoint src = rotated_point (x + x1a, y + y1a, cos_angle, -sin_angle, p0);
const int xs = wxCint (src.x); // wxCint rounds to the
const int ys = wxCint (src.y); // closest integer
@@ -2404,10 +2390,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i
*(dst++) = *p;
if (has_alpha)
{
unsigned char *p = alpha[ys] + (xs);
*(alpha_dst++) = *p;
}
*(alpha_dst++) = *(alpha[ys] + (xs));
}
else
{

View File

@@ -401,14 +401,14 @@ void wxToolBarBase::UnToggleRadioGroup(wxToolBarToolBase *tool)
wxToolBarToolsList::compatibility_iterator nodeNext = node->GetNext();
while ( nodeNext )
{
wxToolBarToolBase *tool = nodeNext->GetData();
wxToolBarToolBase *toolNext = nodeNext->GetData();
if ( !tool->IsButton() || tool->GetKind() != wxITEM_RADIO )
if ( !toolNext->IsButton() || toolNext->GetKind() != wxITEM_RADIO )
break;
if ( tool->Toggle(false) )
if ( toolNext->Toggle(false) )
{
DoToggleTool(tool, false);
DoToggleTool(toolNext, false);
}
nodeNext = nodeNext->GetNext();
@@ -417,14 +417,14 @@ void wxToolBarBase::UnToggleRadioGroup(wxToolBarToolBase *tool)
wxToolBarToolsList::compatibility_iterator nodePrev = node->GetPrevious();
while ( nodePrev )
{
wxToolBarToolBase *tool = nodePrev->GetData();
wxToolBarToolBase *toolNext = nodePrev->GetData();
if ( !tool->IsButton() || tool->GetKind() != wxITEM_RADIO )
if ( !toolNext->IsButton() || toolNext->GetKind() != wxITEM_RADIO )
break;
if ( tool->Toggle(false) )
if ( toolNext->Toggle(false) )
{
DoToggleTool(tool, false);
DoToggleTool(toolNext, false);
}
nodePrev = nodePrev->GetPrevious();

View File

@@ -1414,9 +1414,9 @@ void wxCalendarCtrl::OnClick(wxMouseEvent& event)
case wxCAL_HITTEST_HEADER:
{
wxCalendarEvent event(this, wxEVT_CALENDAR_WEEKDAY_CLICKED);
event.m_wday = wday;
(void)GetEventHandler()->ProcessEvent(event);
wxCalendarEvent eventWd(this, wxEVT_CALENDAR_WEEKDAY_CLICKED);
eventWd.m_wday = wday;
(void)GetEventHandler()->ProcessEvent(eventWd);
}
break;

View File

@@ -1075,7 +1075,6 @@ void wxPostScriptDC::SetPen( const wxPen& pen )
double bluePS = (double)(blue) / 255.0;
double greenPS = (double)(green) / 255.0;
char buffer[100];
sprintf( buffer,
"%.8f %.8f %.8f setrgbcolor\n",
redPS, greenPS, bluePS );
@@ -1352,7 +1351,6 @@ void wxPostScriptDC::DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord
{
wxCoord uy = (wxCoord)(y + size - m_underlinePosition);
wxCoord w, h;
char buffer[100];
GetTextExtent(text, &w, &h);
sprintf( buffer,

View File

@@ -830,8 +830,6 @@ void wxGenericDirCtrl::ExpandDir(wxTreeItemId parentId)
// Now do the filenames -- but only if we're allowed to
if ((GetWindowStyle() & wxDIRCTRL_DIR_ONLY) == 0)
{
wxLogNull log;
d.Open(dirName);
if (d.IsOpened())
@@ -865,7 +863,7 @@ void wxGenericDirCtrl::ExpandDir(wxTreeItemId parentId)
size_t i;
for (i = 0; i < dirs.Count(); i++)
{
wxString eachFilename(dirs[i]);
eachFilename = dirs[i];
path = dirName;
if (!wxEndsWithPathSeparator(path))
path += wxString(wxFILE_SEP_PATH);
@@ -894,7 +892,7 @@ void wxGenericDirCtrl::ExpandDir(wxTreeItemId parentId)
{
for (i = 0; i < filenames.Count(); i++)
{
wxString eachFilename(filenames[i]);
eachFilename = filenames[i];
path = dirName;
if (!wxEndsWithPathSeparator(path))
path += wxString(wxFILE_SEP_PATH);
@@ -997,8 +995,9 @@ bool wxGenericDirCtrl::ExpandPath(const wxString& path)
if (id.IsOk())
lastId = id;
}
if (lastId.IsOk())
{
if (!lastId.IsOk())
return false;
wxDirItemData *data = (wxDirItemData *) m_treeCtrl->GetItemData(lastId);
if (data->m_isDir)
{
@@ -1012,7 +1011,7 @@ bool wxGenericDirCtrl::ExpandPath(const wxString& path)
bool selectedChild = false;
while (childId.IsOk())
{
wxDirItemData* data = (wxDirItemData*) m_treeCtrl->GetItemData(childId);
data = (wxDirItemData*) m_treeCtrl->GetItemData(childId);
if (data && data->m_path != wxEmptyString && !data->m_isDir)
{
@@ -1036,9 +1035,6 @@ bool wxGenericDirCtrl::ExpandPath(const wxString& path)
}
return true;
}
else
return false;
}
wxString wxGenericDirCtrl::GetPath() const

View File

@@ -5021,7 +5021,7 @@ void wxGrid::ProcessRowLabelMouseEvent( wxMouseEvent& event )
//
else if (event.LeftDClick() )
{
int row = YToEdgeOfRow(y);
row = YToEdgeOfRow(y);
if ( row < 0 )
{
row = YToRow(y);
@@ -5245,7 +5245,7 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event )
//
if ( event.LeftDClick() )
{
int col = XToEdgeOfCol(x);
col = XToEdgeOfCol(x);
if ( col < 0 )
{
col = XToCol(x);

View File

@@ -87,7 +87,7 @@ bool wxGridSelection::IsInSelection ( int row, int col )
// (unless we are in column selection mode).
if ( m_selectionMode != wxGrid::wxGridSelectColumns )
{
size_t count = m_rowSelection.GetCount();
count = m_rowSelection.GetCount();
for ( size_t n = 0; n < count; n++ )
{
if ( row == m_rowSelection[n] )
@@ -100,7 +100,7 @@ bool wxGridSelection::IsInSelection ( int row, int col )
// (unless we are in row selection mode).
if ( m_selectionMode != wxGrid::wxGridSelectRows )
{
size_t count = m_colSelection.GetCount();
count = m_colSelection.GetCount();
for ( size_t n = 0; n < count; n++ )
{
if ( col == m_colSelection[n] )
@@ -595,8 +595,8 @@ void wxGridSelection::ToggleCellSelection( int row, int col,
count = m_cellSelection.GetCount();
for ( n = 0; n < count; n++ )
{
wxGridCellCoords& coords = m_cellSelection[n];
if ( row == coords.GetRow() && col == coords.GetCol() )
const wxGridCellCoords& sel = m_cellSelection[n];
if ( row == sel.GetRow() && col == sel.GetCol() )
{
wxGridCellCoords coords = m_cellSelection[n];
m_cellSelection.RemoveAt(n);

View File

@@ -276,11 +276,11 @@ void wxSashWindow::OnMouseEvent(wxMouseEvent& event)
dragRect = wxRect(x, y, newWidth, newHeight);
wxSashEvent event(GetId(), edge);
event.SetEventObject(this);
event.SetDragStatus(status);
event.SetDragRect(dragRect);
GetEventHandler()->ProcessEvent(event);
wxSashEvent eventSash(GetId(), edge);
eventSash.SetEventObject(this);
eventSash.SetDragStatus(status);
eventSash.SetDragRect(dragRect);
GetEventHandler()->ProcessEvent(eventSash);
}
else if ( event.LeftUp() )
{

View File

@@ -292,9 +292,9 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
m_windowOne = m_windowTwo;
m_windowTwo = (wxWindow *) NULL;
OnUnsplit(removedWindow);
wxSplitterEvent event(wxEVT_COMMAND_SPLITTER_UNSPLIT, this);
event.m_data.win = removedWindow;
(void)DoSendEvent(event);
wxSplitterEvent eventUnsplit(wxEVT_COMMAND_SPLITTER_UNSPLIT, this);
eventUnsplit.m_data.win = removedWindow;
(void)DoSendEvent(eventUnsplit);
SetSashPositionAndNotify(0);
}
else if ( posSashNew == GetWindowSize() )
@@ -303,9 +303,9 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
wxWindow *removedWindow = m_windowTwo;
m_windowTwo = (wxWindow *) NULL;
OnUnsplit(removedWindow);
wxSplitterEvent event(wxEVT_COMMAND_SPLITTER_UNSPLIT, this);
event.m_data.win = removedWindow;
(void)DoSendEvent(event);
wxSplitterEvent eventUnsplit(wxEVT_COMMAND_SPLITTER_UNSPLIT, this);
eventUnsplit.m_data.win = removedWindow;
(void)DoSendEvent(eventUnsplit);
SetSashPositionAndNotify(0);
}
else

View File

@@ -2696,23 +2696,23 @@ void wxGenericTreeCtrl::OnChar( wxKeyEvent &event )
wxRect ItemRect;
GetBoundingRect(m_current, ItemRect, true);
wxTreeEvent event( wxEVT_COMMAND_TREE_ITEM_MENU, GetId() );
event.m_item = m_current;
wxTreeEvent eventMenu( wxEVT_COMMAND_TREE_ITEM_MENU, GetId() );
eventMenu.m_item = m_current;
// Use the left edge, vertical middle
event.m_pointDrag = wxPoint(ItemRect.GetX(),
eventMenu.m_pointDrag = wxPoint(ItemRect.GetX(),
ItemRect.GetY() + ItemRect.GetHeight() / 2);
event.SetEventObject( this );
GetEventHandler()->ProcessEvent( event );
eventMenu.SetEventObject( this );
GetEventHandler()->ProcessEvent( eventMenu );
break;
}
case ' ':
case WXK_RETURN:
if ( !event.HasModifiers() )
{
wxTreeEvent event( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, GetId() );
event.m_item = m_current;
event.SetEventObject( this );
GetEventHandler()->ProcessEvent( event );
wxTreeEvent eventAct( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, GetId() );
eventAct.m_item = m_current;
eventAct.SetEventObject( this );
GetEventHandler()->ProcessEvent( eventAct );
}
// in any case, also generate the normal key event for this key,
@@ -3179,13 +3179,13 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
}
// generate the drag end event
wxTreeEvent event(wxEVT_COMMAND_TREE_END_DRAG, GetId());
wxTreeEvent eventEndDrag(wxEVT_COMMAND_TREE_END_DRAG, GetId());
event.m_item = item;
event.m_pointDrag = pt;
event.SetEventObject(this);
eventEndDrag.m_item = item;
eventEndDrag.m_pointDrag = pt;
eventEndDrag.SetEventObject(this);
(void)GetEventHandler()->ProcessEvent(event);
(void)GetEventHandler()->ProcessEvent(eventEndDrag);
m_isDragging = false;
m_dropTarget = (wxGenericTreeItem *)NULL;

View File

@@ -599,9 +599,9 @@ void wxVListBox::OnLeftDown(wxMouseEvent& event)
}
}
void wxVListBox::OnLeftDClick(wxMouseEvent& event)
void wxVListBox::OnLeftDClick(wxMouseEvent& eventMouse)
{
int item = HitTest(event.GetPosition());
int item = HitTest(eventMouse.GetPosition());
if ( item != wxNOT_FOUND )
{
wxCommandEvent event(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, GetId());

View File

@@ -1133,15 +1133,15 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
if (is_mono)
{
#ifdef __WXGTK20__
GdkPixmap *bitmap = gdk_pixmap_new( wxGetRootWindow()->window, ww, hh, -1 );
GdkGC *gc = gdk_gc_new( bitmap );
GdkPixmap *bitmap2 = gdk_pixmap_new( wxGetRootWindow()->window, ww, hh, -1 );
GdkGC *gc = gdk_gc_new( bitmap2 );
gdk_gc_set_foreground( gc, m_textForegroundColour.GetColor() );
gdk_gc_set_background( gc, m_textBackgroundColour.GetColor() );
gdk_wx_draw_bitmap( bitmap, gc, use_bitmap.GetBitmap(), 0, 0, 0, 0, -1, -1 );
gdk_wx_draw_bitmap( bitmap2, gc, use_bitmap.GetBitmap(), 0, 0, 0, 0, -1, -1 );
gdk_draw_drawable( m_window, m_textGC, bitmap, 0, 0, xx, yy, -1, -1 );
gdk_draw_drawable( m_window, m_textGC, bitmap2, 0, 0, xx, yy, -1, -1 );
gdk_bitmap_unref( bitmap );
gdk_bitmap_unref( bitmap2 );
gdk_gc_unref( gc );
#else
gdk_wx_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), 0, 0, xx, yy, -1, -1 );

View File

@@ -558,20 +558,20 @@ void wxMenuBar::SetLabelTop( size_t pos, const wxString& label )
wxMenu* menu = node->GetData();
wxString str( wxReplaceUnderscore( label ) );
const wxString str( wxReplaceUnderscore( label ) );
menu->SetTitle( str );
if (menu->m_owner)
{
GtkLabel *label = GTK_LABEL( GTK_BIN(menu->m_owner)->child );
GtkLabel *glabel = GTK_LABEL( GTK_BIN(menu->m_owner)->child );
/* set new text */
gtk_label_set( label, wxGTK_CONV( str ) );
gtk_label_set( glabel, wxGTK_CONV( str ) );
/* reparse key accel */
(void)gtk_label_parse_uline (GTK_LABEL(label), wxGTK_CONV( str ) );
gtk_accel_label_refetch( GTK_ACCEL_LABEL(label) );
(void)gtk_label_parse_uline (GTK_LABEL(glabel), wxGTK_CONV( str ) );
gtk_accel_label_refetch( GTK_ACCEL_LABEL(glabel) );
}
}

View File

@@ -29,6 +29,7 @@
#include "wx/dcclient.h"
#include "wx/panel.h"
#include "wx/sizer.h"
#include "wx/math.h"
#include "wx/gtk/private.h"
#include "wx/gtk/win_gtk.h"
@@ -454,7 +455,8 @@ void wxScrolledWindow::AdjustScrollbars()
// If the scrollbar hits the right side, move the window
// right to keep it from over extending.
if ((m_hAdjust->value != 0.0) && (m_hAdjust->value + m_hAdjust->page_size > m_hAdjust->upper))
if ( !wxIsNullDouble(m_hAdjust->value) &&
(m_hAdjust->value + m_hAdjust->page_size > m_hAdjust->upper) )
{
m_hAdjust->value = m_hAdjust->upper - m_hAdjust->page_size;
if (m_hAdjust->value < 0.0)
@@ -482,7 +484,8 @@ void wxScrolledWindow::AdjustScrollbars()
if ((m_vAdjust->page_size < m_vAdjust->upper) && (h >= vh))
m_vAdjust->page_size += 1.0;
if ((m_vAdjust->value != 0.0) && (m_vAdjust->value + m_vAdjust->page_size > m_vAdjust->upper))
if ( !wxIsNullDouble(m_vAdjust->value) &&
(m_vAdjust->value + m_vAdjust->page_size > m_vAdjust->upper) )
{
m_vAdjust->value = m_vAdjust->upper - m_vAdjust->page_size;
if (m_vAdjust->value < 0.0)

View File

@@ -1133,15 +1133,15 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
if (is_mono)
{
#ifdef __WXGTK20__
GdkPixmap *bitmap = gdk_pixmap_new( wxGetRootWindow()->window, ww, hh, -1 );
GdkGC *gc = gdk_gc_new( bitmap );
GdkPixmap *bitmap2 = gdk_pixmap_new( wxGetRootWindow()->window, ww, hh, -1 );
GdkGC *gc = gdk_gc_new( bitmap2 );
gdk_gc_set_foreground( gc, m_textForegroundColour.GetColor() );
gdk_gc_set_background( gc, m_textBackgroundColour.GetColor() );
gdk_wx_draw_bitmap( bitmap, gc, use_bitmap.GetBitmap(), 0, 0, 0, 0, -1, -1 );
gdk_wx_draw_bitmap( bitmap2, gc, use_bitmap.GetBitmap(), 0, 0, 0, 0, -1, -1 );
gdk_draw_drawable( m_window, m_textGC, bitmap, 0, 0, xx, yy, -1, -1 );
gdk_draw_drawable( m_window, m_textGC, bitmap2, 0, 0, xx, yy, -1, -1 );
gdk_bitmap_unref( bitmap );
gdk_bitmap_unref( bitmap2 );
gdk_gc_unref( gc );
#else
gdk_wx_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), 0, 0, xx, yy, -1, -1 );

View File

@@ -558,20 +558,20 @@ void wxMenuBar::SetLabelTop( size_t pos, const wxString& label )
wxMenu* menu = node->GetData();
wxString str( wxReplaceUnderscore( label ) );
const wxString str( wxReplaceUnderscore( label ) );
menu->SetTitle( str );
if (menu->m_owner)
{
GtkLabel *label = GTK_LABEL( GTK_BIN(menu->m_owner)->child );
GtkLabel *glabel = GTK_LABEL( GTK_BIN(menu->m_owner)->child );
/* set new text */
gtk_label_set( label, wxGTK_CONV( str ) );
gtk_label_set( glabel, wxGTK_CONV( str ) );
/* reparse key accel */
(void)gtk_label_parse_uline (GTK_LABEL(label), wxGTK_CONV( str ) );
gtk_accel_label_refetch( GTK_ACCEL_LABEL(label) );
(void)gtk_label_parse_uline (GTK_LABEL(glabel), wxGTK_CONV( str ) );
gtk_accel_label_refetch( GTK_ACCEL_LABEL(glabel) );
}
}

View File

@@ -29,6 +29,7 @@
#include "wx/dcclient.h"
#include "wx/panel.h"
#include "wx/sizer.h"
#include "wx/math.h"
#include "wx/gtk/private.h"
#include "wx/gtk/win_gtk.h"
@@ -454,7 +455,8 @@ void wxScrolledWindow::AdjustScrollbars()
// If the scrollbar hits the right side, move the window
// right to keep it from over extending.
if ((m_hAdjust->value != 0.0) && (m_hAdjust->value + m_hAdjust->page_size > m_hAdjust->upper))
if ( !wxIsNullDouble(m_hAdjust->value) &&
(m_hAdjust->value + m_hAdjust->page_size > m_hAdjust->upper) )
{
m_hAdjust->value = m_hAdjust->upper - m_hAdjust->page_size;
if (m_hAdjust->value < 0.0)
@@ -482,7 +484,8 @@ void wxScrolledWindow::AdjustScrollbars()
if ((m_vAdjust->page_size < m_vAdjust->upper) && (h >= vh))
m_vAdjust->page_size += 1.0;
if ((m_vAdjust->value != 0.0) && (m_vAdjust->value + m_vAdjust->page_size > m_vAdjust->upper))
if ( !wxIsNullDouble(m_vAdjust->value) &&
(m_vAdjust->value + m_vAdjust->page_size > m_vAdjust->upper) )
{
m_vAdjust->value = m_vAdjust->upper - m_vAdjust->page_size;
if (m_vAdjust->value < 0.0)