silence warnings about shadowed variables with GCC -Wshadow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f821bc3617
commit
7d1214cd72
@ -91,13 +91,13 @@ void name::Insert(const T& item, size_t uiIndex, size_t nInsert) \
|
|||||||
base_array::operator[](uiIndex + i) = new T(item); \
|
base_array::operator[](uiIndex + i) = new T(item); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
int name::Index(const T& Item, bool bFromEnd) const \
|
int name::Index(const T& item, bool bFromEnd) const \
|
||||||
{ \
|
{ \
|
||||||
if ( bFromEnd ) { \
|
if ( bFromEnd ) { \
|
||||||
if ( size() > 0 ) { \
|
if ( size() > 0 ) { \
|
||||||
size_t ui = size() - 1; \
|
size_t ui = size() - 1; \
|
||||||
do { \
|
do { \
|
||||||
if ( (T*)base_array::operator[](ui) == &Item ) \
|
if ( (T*)base_array::operator[](ui) == &item ) \
|
||||||
return static_cast<int>(ui); \
|
return static_cast<int>(ui); \
|
||||||
ui--; \
|
ui--; \
|
||||||
} \
|
} \
|
||||||
@ -106,7 +106,7 @@ int name::Index(const T& Item, bool bFromEnd) const \
|
|||||||
} \
|
} \
|
||||||
else { \
|
else { \
|
||||||
for( size_t ui = 0; ui < size(); ui++ ) { \
|
for( size_t ui = 0; ui < size(); ui++ ) { \
|
||||||
if( (T*)base_array::operator[](ui) == &Item ) \
|
if( (T*)base_array::operator[](ui) == &item ) \
|
||||||
return static_cast<int>(ui); \
|
return static_cast<int>(ui); \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
|
@ -2530,9 +2530,9 @@ void wxAuiToolBar::OnLeftDown(wxMouseEvent& evt)
|
|||||||
Refresh(false);
|
Refresh(false);
|
||||||
if (res != -1)
|
if (res != -1)
|
||||||
{
|
{
|
||||||
wxCommandEvent e(wxEVT_COMMAND_MENU_SELECTED, res);
|
wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED, res);
|
||||||
e.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
GetParent()->GetEventHandler()->ProcessEvent(e);
|
GetParent()->GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1093,11 +1093,11 @@ void wxAuiTabCtrl::OnLeftUp(wxMouseEvent& evt)
|
|||||||
{
|
{
|
||||||
m_isDragging = false;
|
m_isDragging = false;
|
||||||
|
|
||||||
wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, m_windowId);
|
wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, m_windowId);
|
||||||
evt.SetSelection(GetIdxFromWindow(m_clickTab));
|
e.SetSelection(GetIdxFromWindow(m_clickTab));
|
||||||
evt.SetOldSelection(evt.GetSelection());
|
e.SetOldSelection(e.GetSelection());
|
||||||
evt.SetEventObject(this);
|
e.SetEventObject(this);
|
||||||
GetEventHandler()->ProcessEvent(evt);
|
GetEventHandler()->ProcessEvent(e);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1121,11 +1121,11 @@ void wxAuiTabCtrl::OnLeftUp(wxMouseEvent& evt)
|
|||||||
|
|
||||||
if (!(m_pressedButton->curState & wxAUI_BUTTON_STATE_DISABLED))
|
if (!(m_pressedButton->curState & wxAUI_BUTTON_STATE_DISABLED))
|
||||||
{
|
{
|
||||||
wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_BUTTON, m_windowId);
|
wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_BUTTON, m_windowId);
|
||||||
evt.SetSelection(GetIdxFromWindow(m_clickTab));
|
e.SetSelection(GetIdxFromWindow(m_clickTab));
|
||||||
evt.SetInt(m_pressedButton->id);
|
e.SetInt(m_pressedButton->id);
|
||||||
evt.SetEventObject(this);
|
e.SetEventObject(this);
|
||||||
GetEventHandler()->ProcessEvent(evt);
|
GetEventHandler()->ProcessEvent(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pressedButton = NULL;
|
m_pressedButton = NULL;
|
||||||
@ -1254,11 +1254,11 @@ void wxAuiTabCtrl::OnMotion(wxMouseEvent& evt)
|
|||||||
|
|
||||||
if (m_isDragging)
|
if (m_isDragging)
|
||||||
{
|
{
|
||||||
wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, m_windowId);
|
wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, m_windowId);
|
||||||
evt.SetSelection(GetIdxFromWindow(m_clickTab));
|
e.SetSelection(GetIdxFromWindow(m_clickTab));
|
||||||
evt.SetOldSelection(evt.GetSelection());
|
e.SetOldSelection(e.GetSelection());
|
||||||
evt.SetEventObject(this);
|
e.SetEventObject(this);
|
||||||
GetEventHandler()->ProcessEvent(evt);
|
GetEventHandler()->ProcessEvent(e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1269,11 +1269,11 @@ void wxAuiTabCtrl::OnMotion(wxMouseEvent& evt)
|
|||||||
if (abs(pos.x - m_clickPt.x) > drag_x_threshold ||
|
if (abs(pos.x - m_clickPt.x) > drag_x_threshold ||
|
||||||
abs(pos.y - m_clickPt.y) > drag_y_threshold)
|
abs(pos.y - m_clickPt.y) > drag_y_threshold)
|
||||||
{
|
{
|
||||||
wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, m_windowId);
|
wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, m_windowId);
|
||||||
evt.SetSelection(GetIdxFromWindow(m_clickTab));
|
e.SetSelection(GetIdxFromWindow(m_clickTab));
|
||||||
evt.SetOldSelection(evt.GetSelection());
|
e.SetOldSelection(e.GetSelection());
|
||||||
evt.SetEventObject(this);
|
e.SetEventObject(this);
|
||||||
GetEventHandler()->ProcessEvent(evt);
|
GetEventHandler()->ProcessEvent(e);
|
||||||
|
|
||||||
m_isDragging = true;
|
m_isDragging = true;
|
||||||
}
|
}
|
||||||
|
@ -3236,16 +3236,16 @@ bool wxAuiManager::DoDrop(wxAuiDockInfoArray& docks,
|
|||||||
// determine the mouse offset and the pane size, both in the
|
// determine the mouse offset and the pane size, both in the
|
||||||
// direction of the dock itself, and perpendicular to the dock
|
// direction of the dock itself, and perpendicular to the dock
|
||||||
|
|
||||||
int offset, size;
|
int mouseOffset, size;
|
||||||
|
|
||||||
if (part->orientation == wxVERTICAL)
|
if (part->orientation == wxVERTICAL)
|
||||||
{
|
{
|
||||||
offset = pt.y - part->rect.y;
|
mouseOffset = pt.y - part->rect.y;
|
||||||
size = part->rect.GetHeight();
|
size = part->rect.GetHeight();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
offset = pt.x - part->rect.x;
|
mouseOffset = pt.x - part->rect.x;
|
||||||
size = part->rect.GetWidth();
|
size = part->rect.GetWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3253,7 +3253,7 @@ bool wxAuiManager::DoDrop(wxAuiDockInfoArray& docks,
|
|||||||
|
|
||||||
// if we are in the top/left part of the pane,
|
// if we are in the top/left part of the pane,
|
||||||
// insert the pane before the pane being hovered over
|
// insert the pane before the pane being hovered over
|
||||||
if (offset <= size/2)
|
if (mouseOffset <= size/2)
|
||||||
{
|
{
|
||||||
drop_position = part->pane->dock_pos;
|
drop_position = part->pane->dock_pos;
|
||||||
DoInsertPane(panes,
|
DoInsertPane(panes,
|
||||||
@ -3265,7 +3265,7 @@ bool wxAuiManager::DoDrop(wxAuiDockInfoArray& docks,
|
|||||||
|
|
||||||
// if we are in the bottom/right part of the pane,
|
// if we are in the bottom/right part of the pane,
|
||||||
// insert the pane before the pane being hovered over
|
// insert the pane before the pane being hovered over
|
||||||
if (offset > size/2)
|
if (mouseOffset > size/2)
|
||||||
{
|
{
|
||||||
drop_position = part->pane->dock_pos+1;
|
drop_position = part->pane->dock_pos+1;
|
||||||
DoInsertPane(panes,
|
DoInsertPane(panes,
|
||||||
@ -3367,15 +3367,15 @@ void wxAuiManager::ShowHint(const wxRect& rect)
|
|||||||
pane.frame &&
|
pane.frame &&
|
||||||
pane.frame->IsShown())
|
pane.frame->IsShown())
|
||||||
{
|
{
|
||||||
wxRect rect = pane.frame->GetRect();
|
wxRect r = pane.frame->GetRect();
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
// wxGTK returns the client size, not the whole frame size
|
// wxGTK returns the client size, not the whole frame size
|
||||||
rect.width += 15;
|
r.width += 15;
|
||||||
rect.height += 35;
|
r.height += 35;
|
||||||
rect.Inflate(5);
|
r.Inflate(5);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
clip.Subtract(rect);
|
clip.Subtract(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4658,8 +4658,8 @@ void wxAuiManager::OnMotion(wxMouseEvent& event)
|
|||||||
|
|
||||||
pane.SetFlag(wxAuiPaneInfo::actionPane, true);
|
pane.SetFlag(wxAuiPaneInfo::actionPane, true);
|
||||||
|
|
||||||
wxPoint pt = event.GetPosition();
|
wxPoint point = event.GetPosition();
|
||||||
DoDrop(m_docks, m_panes, pane, pt, m_actionOffset);
|
DoDrop(m_docks, m_panes, pane, point, m_actionOffset);
|
||||||
|
|
||||||
// if DoDrop() decided to float the pane, set up
|
// if DoDrop() decided to float the pane, set up
|
||||||
// the floating pane's initial position
|
// the floating pane's initial position
|
||||||
|
@ -158,13 +158,13 @@ void name::Grow(size_t nIncrement) \
|
|||||||
if( (m_nCount == m_nSize) || ((m_nSize - m_nCount) < nIncrement) ) { \
|
if( (m_nCount == m_nSize) || ((m_nSize - m_nCount) < nIncrement) ) { \
|
||||||
if( m_nSize == 0 ) { \
|
if( m_nSize == 0 ) { \
|
||||||
/* was empty, determine initial size */ \
|
/* was empty, determine initial size */ \
|
||||||
size_t size = WX_ARRAY_DEFAULT_INITIAL_SIZE; \
|
size_t sz = WX_ARRAY_DEFAULT_INITIAL_SIZE; \
|
||||||
if (size < nIncrement) size = nIncrement; \
|
if (sz < nIncrement) sz = nIncrement; \
|
||||||
/* allocate some memory */ \
|
/* allocate some memory */ \
|
||||||
m_pItems = new T[size]; \
|
m_pItems = new T[sz]; \
|
||||||
/* only grow if allocation succeeded */ \
|
/* only grow if allocation succeeded */ \
|
||||||
if ( m_pItems ) { \
|
if ( m_pItems ) { \
|
||||||
m_nSize = size; \
|
m_nSize = sz; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
|
@ -204,17 +204,17 @@ bool wxFile::Create(const wxString& fileName, bool bOverwrite, int accessMode)
|
|||||||
{
|
{
|
||||||
// if bOverwrite we create a new file or truncate the existing one,
|
// if bOverwrite we create a new file or truncate the existing one,
|
||||||
// otherwise we only create the new file and fail if it already exists
|
// otherwise we only create the new file and fail if it already exists
|
||||||
int fd = wxOpen( fileName,
|
int fildes = wxOpen( fileName,
|
||||||
O_BINARY | O_WRONLY | O_CREAT |
|
O_BINARY | O_WRONLY | O_CREAT |
|
||||||
(bOverwrite ? O_TRUNC : O_EXCL),
|
(bOverwrite ? O_TRUNC : O_EXCL),
|
||||||
accessMode );
|
accessMode );
|
||||||
if ( CheckForError(fd) )
|
if ( CheckForError(fildes) )
|
||||||
{
|
{
|
||||||
wxLogSysError(_("can't create file '%s'"), fileName);
|
wxLogSysError(_("can't create file '%s'"), fileName);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Attach(fd);
|
Attach(fildes);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,15 +258,15 @@ bool wxFile::Open(const wxString& fileName, OpenMode mode, int accessMode)
|
|||||||
accessMode &= wxS_IRUSR | wxS_IWUSR;
|
accessMode &= wxS_IRUSR | wxS_IWUSR;
|
||||||
#endif // __WINDOWS__
|
#endif // __WINDOWS__
|
||||||
|
|
||||||
int fd = wxOpen( fileName, flags, accessMode);
|
int fildes = wxOpen( fileName, flags, accessMode);
|
||||||
|
|
||||||
if ( CheckForError(fd) )
|
if ( CheckForError(fildes) )
|
||||||
{
|
{
|
||||||
wxLogSysError(_("can't open file '%s'"), fileName);
|
wxLogSysError(_("can't open file '%s'"), fileName);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Attach(fd);
|
Attach(fildes);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -304,11 +304,11 @@ bool wxFile::ReadAll(wxString *str, const wxMBConv& conv)
|
|||||||
{
|
{
|
||||||
static const unsigned READSIZE = 4096;
|
static const unsigned READSIZE = 4096;
|
||||||
|
|
||||||
ssize_t read = Read(p, length > READSIZE ? READSIZE : length);
|
ssize_t nread = Read(p, length > READSIZE ? READSIZE : length);
|
||||||
if ( read == wxInvalidOffset )
|
if ( nread == wxInvalidOffset )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
p += read;
|
p += nread;
|
||||||
}
|
}
|
||||||
|
|
||||||
*p = 0;
|
*p = 0;
|
||||||
|
@ -172,7 +172,6 @@ wxMarkupParser::ParseAttrs(wxString attrs, TagAndAttrs& tagAndAttrs)
|
|||||||
else // Must be a CSS-like size specification
|
else // Must be a CSS-like size specification
|
||||||
{
|
{
|
||||||
int cssSize = 1;
|
int cssSize = 1;
|
||||||
wxString rest;
|
|
||||||
if ( value.StartsWith("xx-", &rest) )
|
if ( value.StartsWith("xx-", &rest) )
|
||||||
cssSize = 3;
|
cssSize = 3;
|
||||||
else if ( value.StartsWith("x-", &rest) )
|
else if ( value.StartsWith("x-", &rest) )
|
||||||
|
@ -289,7 +289,7 @@ public:
|
|||||||
T_LEFT_BRACKET, T_RIGHT_BRACKET
|
T_LEFT_BRACKET, T_RIGHT_BRACKET
|
||||||
};
|
};
|
||||||
Type type() const { return m_type; }
|
Type type() const { return m_type; }
|
||||||
void setType(Type type) { m_type = type; }
|
void setType(Type t) { m_type = t; }
|
||||||
// for T_NUMBER only
|
// for T_NUMBER only
|
||||||
typedef int Number;
|
typedef int Number;
|
||||||
Number number() const { return m_number; }
|
Number number() const { return m_number; }
|
||||||
@ -466,7 +466,7 @@ private:
|
|||||||
class wxPluralFormsNode
|
class wxPluralFormsNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxPluralFormsNode(const wxPluralFormsToken& token) : m_token(token) {}
|
wxPluralFormsNode(const wxPluralFormsToken& t) : m_token(t) {}
|
||||||
const wxPluralFormsToken& token() const { return m_token; }
|
const wxPluralFormsToken& token() const { return m_token; }
|
||||||
const wxPluralFormsNode* node(unsigned i) const
|
const wxPluralFormsNode* node(unsigned i) const
|
||||||
{ return m_nodes[i].get(); }
|
{ return m_nodes[i].get(); }
|
||||||
|
@ -2877,7 +2877,6 @@ bool wxGrid::Redimension( wxGridTableMessage& msg )
|
|||||||
if ( !m_colAt.IsEmpty() )
|
if ( !m_colAt.IsEmpty() )
|
||||||
{
|
{
|
||||||
//Shift the column IDs
|
//Shift the column IDs
|
||||||
int i;
|
|
||||||
for ( i = 0; i < m_numCols - numCols; i++ )
|
for ( i = 0; i < m_numCols - numCols; i++ )
|
||||||
{
|
{
|
||||||
if ( m_colAt[i] >= (int)pos )
|
if ( m_colAt[i] >= (int)pos )
|
||||||
@ -2947,7 +2946,6 @@ bool wxGrid::Redimension( wxGridTableMessage& msg )
|
|||||||
m_colAt.Add( 0, numCols );
|
m_colAt.Add( 0, numCols );
|
||||||
|
|
||||||
//Set the new columns' positions
|
//Set the new columns' positions
|
||||||
int i;
|
|
||||||
for ( i = oldNumCols; i < m_numCols; i++ )
|
for ( i = oldNumCols; i < m_numCols; i++ )
|
||||||
{
|
{
|
||||||
m_colAt[i] = i;
|
m_colAt[i] = i;
|
||||||
@ -3531,9 +3529,8 @@ void wxGrid::DoUpdateResizeColWidth(int w)
|
|||||||
|
|
||||||
void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event )
|
void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event )
|
||||||
{
|
{
|
||||||
int x, y;
|
int x;
|
||||||
wxPoint pos( event.GetPosition() );
|
CalcUnscrolledPosition( event.GetPosition().x, 0, &x, NULL );
|
||||||
CalcUnscrolledPosition( pos.x, pos.y, &x, &y );
|
|
||||||
|
|
||||||
int col = XToCol(x);
|
int col = XToCol(x);
|
||||||
if ( event.Dragging() )
|
if ( event.Dragging() )
|
||||||
@ -3649,14 +3646,13 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event )
|
|||||||
//
|
//
|
||||||
else if ( event.LeftDown() )
|
else if ( event.LeftDown() )
|
||||||
{
|
{
|
||||||
int col = XToEdgeOfCol(x);
|
int colEdge = XToEdgeOfCol(x);
|
||||||
if ( col != wxNOT_FOUND && CanDragColSize(col) )
|
if ( colEdge != wxNOT_FOUND && CanDragColSize(colEdge) )
|
||||||
{
|
{
|
||||||
ChangeCursorMode(WXGRID_CURSOR_RESIZE_COL, GetColLabelWindow());
|
ChangeCursorMode(WXGRID_CURSOR_RESIZE_COL, GetColLabelWindow());
|
||||||
}
|
}
|
||||||
else // not a request to start resizing
|
else // not a request to start resizing
|
||||||
{
|
{
|
||||||
col = XToCol(x);
|
|
||||||
if ( col >= 0 &&
|
if ( col >= 0 &&
|
||||||
!SendEvent( wxEVT_GRID_LABEL_LEFT_CLICK, -1, col, event ) )
|
!SendEvent( wxEVT_GRID_LABEL_LEFT_CLICK, -1, col, event ) )
|
||||||
{
|
{
|
||||||
@ -4415,14 +4411,14 @@ bool wxGrid::DoEndDragResizeLine(const wxGridOperations& oper)
|
|||||||
oper.SelectSize(rect) = oper.Select(size);
|
oper.SelectSize(rect) = oper.Select(size);
|
||||||
|
|
||||||
int subtractLines = 0;
|
int subtractLines = 0;
|
||||||
const int lineStart = doper.PosToLine(this, posLineStart);
|
int line = doper.PosToLine(this, posLineStart);
|
||||||
if ( lineStart >= 0 )
|
if ( line >= 0 )
|
||||||
{
|
{
|
||||||
// ensure that if we have a multi-cell block we redraw all of
|
// ensure that if we have a multi-cell block we redraw all of
|
||||||
// it by increasing the refresh area to cover it entirely if a
|
// it by increasing the refresh area to cover it entirely if a
|
||||||
// part of it is affected
|
// part of it is affected
|
||||||
const int lineEnd = doper.PosToLine(this, posLineEnd, true);
|
const int lineEnd = doper.PosToLine(this, posLineEnd, true);
|
||||||
for ( int line = lineStart; line < lineEnd; line++ )
|
for ( ; line < lineEnd; line++ )
|
||||||
{
|
{
|
||||||
int cellLines = oper.Select(
|
int cellLines = oper.Select(
|
||||||
GetCellSize(oper.MakeCoords(m_dragRowOrCol, line)));
|
GetCellSize(oper.MakeCoords(m_dragRowOrCol, line)));
|
||||||
|
@ -423,8 +423,8 @@ BEGIN_EVENT_TABLE(wxTreeTextCtrl,wxTextCtrl)
|
|||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
wxTreeTextCtrl::wxTreeTextCtrl(wxGenericTreeCtrl *owner,
|
wxTreeTextCtrl::wxTreeTextCtrl(wxGenericTreeCtrl *owner,
|
||||||
wxGenericTreeItem *item)
|
wxGenericTreeItem *itm)
|
||||||
: m_itemEdited(item), m_startValue(item->GetText())
|
: m_itemEdited(itm), m_startValue(itm->GetText())
|
||||||
{
|
{
|
||||||
m_owner = owner;
|
m_owner = owner;
|
||||||
m_aboutToFinish = false;
|
m_aboutToFinish = false;
|
||||||
|
@ -102,9 +102,9 @@ bool wxBitmapComboBox::Create(wxWindow *parent,
|
|||||||
// Select 'value' in entry-less mode
|
// Select 'value' in entry-less mode
|
||||||
if ( !GetEntry() )
|
if ( !GetEntry() )
|
||||||
{
|
{
|
||||||
int n = FindString(value);
|
int i = FindString(value);
|
||||||
if ( n != wxNOT_FOUND )
|
if (i != wxNOT_FOUND)
|
||||||
SetSelection(n);
|
SetSelection(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -131,13 +131,13 @@ void wxColourDialog::ColourDataToDialog()
|
|||||||
gtk_color_selection_dialog_get_color_selection(
|
gtk_color_selection_dialog_get_color_selection(
|
||||||
GTK_COLOR_SELECTION_DIALOG(m_widget)));
|
GTK_COLOR_SELECTION_DIALOG(m_widget)));
|
||||||
|
|
||||||
const wxColour& c = m_data.GetColour();
|
const wxColour& color = m_data.GetColour();
|
||||||
if (c.IsOk())
|
if (color.IsOk())
|
||||||
{
|
{
|
||||||
#ifdef __WXGTK3__
|
#ifdef __WXGTK3__
|
||||||
gtk_color_selection_set_current_rgba(sel, c);
|
gtk_color_selection_set_current_rgba(sel, color);
|
||||||
#else
|
#else
|
||||||
gtk_color_selection_set_current_color(sel, c.GetColor());
|
gtk_color_selection_set_current_color(sel, color.GetColor());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1501,9 +1501,9 @@ void wxGtkPrinterDCImpl::DoDrawPolygon(int n, wxPoint points[],
|
|||||||
int i;
|
int i;
|
||||||
for (i = 1; i < n; i++)
|
for (i = 1; i < n; i++)
|
||||||
{
|
{
|
||||||
int x = points[i].x + xoffset;
|
int xx = points[i].x + xoffset;
|
||||||
int y = points[i].y + yoffset;
|
int yy = points[i].y + yoffset;
|
||||||
cairo_line_to( m_cairo, XLOG2DEV(x), YLOG2DEV(y) );
|
cairo_line_to( m_cairo, XLOG2DEV(xx), YLOG2DEV(yy) );
|
||||||
}
|
}
|
||||||
cairo_close_path(m_cairo);
|
cairo_close_path(m_cairo);
|
||||||
|
|
||||||
|
@ -377,9 +377,9 @@ gtk_frame_window_state_callback( GtkWidget* WXUNUSED(widget),
|
|||||||
// if maximized bit changed and it is now set
|
// if maximized bit changed and it is now set
|
||||||
if (event->changed_mask & event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED)
|
if (event->changed_mask & event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED)
|
||||||
{
|
{
|
||||||
wxMaximizeEvent event(win->GetId());
|
wxMaximizeEvent evt(win->GetId());
|
||||||
event.SetEventObject(win);
|
evt.SetEventObject(win);
|
||||||
win->HandleWindowEvent(event);
|
win->HandleWindowEvent(evt);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -882,7 +882,7 @@ void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb,
|
|||||||
if ( comValIndex >= 0 )
|
if ( comValIndex >= 0 )
|
||||||
{
|
{
|
||||||
const wxPGCommonValue* cv = GetCommonValue(comValIndex);
|
const wxPGCommonValue* cv = GetCommonValue(comValIndex);
|
||||||
wxPGCellRenderer* renderer = cv->GetRenderer();
|
renderer = cv->GetRenderer();
|
||||||
r.width = rect.width;
|
r.width = rect.width;
|
||||||
renderer->Render( dc, r, this, p, m_selColumn, comValIndex, renderFlags );
|
renderer->Render( dc, r, this, p, m_selColumn, comValIndex, renderFlags );
|
||||||
return;
|
return;
|
||||||
@ -1619,8 +1619,8 @@ wxPGWindowList wxPGCheckBoxEditor::CreateControls( wxPropertyGrid* propGrid,
|
|||||||
// If mouse cursor was on the item, toggle the value now.
|
// If mouse cursor was on the item, toggle the value now.
|
||||||
if ( propGrid->GetInternalFlags() & wxPG_FL_ACTIVATION_BY_CLICK )
|
if ( propGrid->GetInternalFlags() & wxPG_FL_ACTIVATION_BY_CLICK )
|
||||||
{
|
{
|
||||||
wxPoint pt = cb->ScreenToClient(::wxGetMousePosition());
|
wxPoint point = cb->ScreenToClient(::wxGetMousePosition());
|
||||||
if ( pt.x <= (wxPG_XBEFORETEXT-2+cb->m_boxHeight) )
|
if ( point.x <= (wxPG_XBEFORETEXT-2+cb->m_boxHeight) )
|
||||||
{
|
{
|
||||||
if ( cb->m_state & wxSCB_STATE_CHECKED )
|
if ( cb->m_state & wxSCB_STATE_CHECKED )
|
||||||
cb->m_state &= ~wxSCB_STATE_CHECKED;
|
cb->m_state &= ~wxSCB_STATE_CHECKED;
|
||||||
|
@ -1035,7 +1035,7 @@ bool wxPGProperty::IntToValue( wxVariant& variant, int number, int WXUNUSED(argF
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Convert semicolon delimited tokens into child values.
|
// Convert semicolon delimited tokens into child values.
|
||||||
bool wxPGProperty::StringToValue( wxVariant& variant, const wxString& text, int argFlags ) const
|
bool wxPGProperty::StringToValue( wxVariant& v, const wxString& text, int argFlags ) const
|
||||||
{
|
{
|
||||||
if ( !GetChildCount() )
|
if ( !GetChildCount() )
|
||||||
return false;
|
return false;
|
||||||
@ -1240,7 +1240,7 @@ bool wxPGProperty::StringToValue( wxVariant& variant, const wxString& text, int
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( changed )
|
if ( changed )
|
||||||
variant = list;
|
v = list;
|
||||||
|
|
||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
@ -1428,7 +1428,7 @@ void wxRibbonMSWArtProvider::ReallyDrawTabSeparator(wxWindow* wnd, const wxRect&
|
|||||||
}
|
}
|
||||||
|
|
||||||
void wxRibbonMSWArtProvider::DrawPartialPageBackground(wxDC& dc,
|
void wxRibbonMSWArtProvider::DrawPartialPageBackground(wxDC& dc,
|
||||||
wxWindow* wnd, const wxRect& rect, wxRibbonPage* page,
|
wxWindow* wnd, const wxRect& r, wxRibbonPage* page,
|
||||||
wxPoint offset, bool hovered)
|
wxPoint offset, bool hovered)
|
||||||
{
|
{
|
||||||
wxRect background;
|
wxRect background;
|
||||||
@ -1465,7 +1465,7 @@ void wxRibbonMSWArtProvider::DrawPartialPageBackground(wxDC& dc,
|
|||||||
lower_rect.y += upper_rect.height;
|
lower_rect.y += upper_rect.height;
|
||||||
lower_rect.height -= upper_rect.height;
|
lower_rect.height -= upper_rect.height;
|
||||||
|
|
||||||
wxRect paint_rect(rect);
|
wxRect paint_rect(r);
|
||||||
paint_rect.x += offset.x;
|
paint_rect.x += offset.x;
|
||||||
paint_rect.y += offset.y;
|
paint_rect.y += offset.y;
|
||||||
|
|
||||||
|
@ -268,8 +268,8 @@ protected:
|
|||||||
// renames
|
// renames
|
||||||
else if (nativeFlags & IN_MOVE)
|
else if (nativeFlags & IN_MOVE)
|
||||||
{
|
{
|
||||||
wxInotifyCookies::iterator it = m_cookies.find(inevt.cookie);
|
wxInotifyCookies::iterator it2 = m_cookies.find(inevt.cookie);
|
||||||
if ( it == m_cookies.end() )
|
if ( it2 == m_cookies.end() )
|
||||||
{
|
{
|
||||||
int size = sizeof(inevt) + inevt.len;
|
int size = sizeof(inevt) + inevt.len;
|
||||||
inotify_event* e = (inotify_event*) operator new (size);
|
inotify_event* e = (inotify_event*) operator new (size);
|
||||||
@ -280,7 +280,7 @@ protected:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
inotify_event& oldinevt = *(it->second);
|
inotify_event& oldinevt = *(it2->second);
|
||||||
|
|
||||||
wxFileSystemWatcherEvent event(flags);
|
wxFileSystemWatcherEvent event(flags);
|
||||||
if ( inevt.mask & IN_MOVED_FROM )
|
if ( inevt.mask & IN_MOVED_FROM )
|
||||||
@ -295,7 +295,7 @@ protected:
|
|||||||
}
|
}
|
||||||
SendEvent(event);
|
SendEvent(event);
|
||||||
|
|
||||||
m_cookies.erase(it);
|
m_cookies.erase(it2);
|
||||||
delete &oldinevt;
|
delete &oldinevt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user