no changes, just resolved conflicts (due to the fact that I had forgotten to commit this file before)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// check that the page index is valid
|
// check that the page index is valid
|
||||||
#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount()))
|
#define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount())
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -296,7 +296,7 @@ int wxNotebook::GetPageImage(size_t nPage) const
|
|||||||
return m_images[nPage];
|
return m_images[nPage];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxNotebook::SetPageImage(size_t nPage , int nImage)
|
bool wxNotebook::SetPageImage(size_t nPage, int nImage)
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, _T("invalid notebook page") );
|
wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, _T("invalid notebook page") );
|
||||||
|
|
||||||
@@ -329,7 +329,7 @@ wxNotebookPage* wxNotebook::DoRemovePage(size_t nPage)
|
|||||||
|
|
||||||
MacSetupTabs();
|
MacSetupTabs();
|
||||||
|
|
||||||
if(m_nSelection >= GetPageCount()) {
|
if(m_nSelection >= (int)GetPageCount()) {
|
||||||
m_nSelection = GetPageCount() - 1;
|
m_nSelection = GetPageCount() - 1;
|
||||||
}
|
}
|
||||||
if(m_nSelection >= 0) {
|
if(m_nSelection >= 0) {
|
||||||
@@ -357,14 +357,11 @@ bool wxNotebook::InsertPage(size_t nPage,
|
|||||||
bool bSelect,
|
bool bSelect,
|
||||||
int imageId)
|
int imageId)
|
||||||
{
|
{
|
||||||
wxASSERT( pPage != NULL );
|
if ( !wxNotebookBase::InsertPage(nPage, pPage, strText, bSelect, imageId) )
|
||||||
wxCHECK( IS_VALID_PAGE(nPage) || nPage == GetPageCount(), FALSE );
|
return false;
|
||||||
|
|
||||||
pPage->SetLabel(strText);
|
pPage->SetLabel(strText);
|
||||||
|
|
||||||
// save the pointer to the page
|
|
||||||
m_pages.Insert(pPage, nPage);
|
|
||||||
|
|
||||||
m_images.Insert(imageId, nPage);
|
m_images.Insert(imageId, nPage);
|
||||||
|
|
||||||
MacSetupTabs();
|
MacSetupTabs();
|
||||||
@@ -375,7 +372,7 @@ bool wxNotebook::InsertPage(size_t nPage,
|
|||||||
else if ( m_nSelection == -1 ) {
|
else if ( m_nSelection == -1 ) {
|
||||||
m_nSelection = 0;
|
m_nSelection = 0;
|
||||||
}
|
}
|
||||||
else if (m_nSelection >= nPage) {
|
else if ((size_t)m_nSelection >= nPage) {
|
||||||
m_nSelection++;
|
m_nSelection++;
|
||||||
}
|
}
|
||||||
// don't show pages by default (we'll need to adjust their size first)
|
// don't show pages by default (we'll need to adjust their size first)
|
||||||
@@ -406,7 +403,8 @@ void wxNotebook::MacSetupTabs()
|
|||||||
wxNotebookPage *page;
|
wxNotebookPage *page;
|
||||||
ControlTabInfoRec info;
|
ControlTabInfoRec info;
|
||||||
|
|
||||||
for(int ii = 0; ii < GetPageCount(); ii++)
|
const size_t countPages = GetPageCount();
|
||||||
|
for(size_t ii = 0; ii < countPages; ii++)
|
||||||
{
|
{
|
||||||
page = m_pages[ii];
|
page = m_pages[ii];
|
||||||
info.version = 0;
|
info.version = 0;
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// check that the page index is valid
|
// check that the page index is valid
|
||||||
#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount()))
|
#define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount())
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -296,7 +296,7 @@ int wxNotebook::GetPageImage(size_t nPage) const
|
|||||||
return m_images[nPage];
|
return m_images[nPage];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxNotebook::SetPageImage(size_t nPage , int nImage)
|
bool wxNotebook::SetPageImage(size_t nPage, int nImage)
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, _T("invalid notebook page") );
|
wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, _T("invalid notebook page") );
|
||||||
|
|
||||||
@@ -329,7 +329,7 @@ wxNotebookPage* wxNotebook::DoRemovePage(size_t nPage)
|
|||||||
|
|
||||||
MacSetupTabs();
|
MacSetupTabs();
|
||||||
|
|
||||||
if(m_nSelection >= GetPageCount()) {
|
if(m_nSelection >= (int)GetPageCount()) {
|
||||||
m_nSelection = GetPageCount() - 1;
|
m_nSelection = GetPageCount() - 1;
|
||||||
}
|
}
|
||||||
if(m_nSelection >= 0) {
|
if(m_nSelection >= 0) {
|
||||||
@@ -357,14 +357,11 @@ bool wxNotebook::InsertPage(size_t nPage,
|
|||||||
bool bSelect,
|
bool bSelect,
|
||||||
int imageId)
|
int imageId)
|
||||||
{
|
{
|
||||||
wxASSERT( pPage != NULL );
|
if ( !wxNotebookBase::InsertPage(nPage, pPage, strText, bSelect, imageId) )
|
||||||
wxCHECK( IS_VALID_PAGE(nPage) || nPage == GetPageCount(), FALSE );
|
return false;
|
||||||
|
|
||||||
pPage->SetLabel(strText);
|
pPage->SetLabel(strText);
|
||||||
|
|
||||||
// save the pointer to the page
|
|
||||||
m_pages.Insert(pPage, nPage);
|
|
||||||
|
|
||||||
m_images.Insert(imageId, nPage);
|
m_images.Insert(imageId, nPage);
|
||||||
|
|
||||||
MacSetupTabs();
|
MacSetupTabs();
|
||||||
@@ -375,7 +372,7 @@ bool wxNotebook::InsertPage(size_t nPage,
|
|||||||
else if ( m_nSelection == -1 ) {
|
else if ( m_nSelection == -1 ) {
|
||||||
m_nSelection = 0;
|
m_nSelection = 0;
|
||||||
}
|
}
|
||||||
else if (m_nSelection >= nPage) {
|
else if ((size_t)m_nSelection >= nPage) {
|
||||||
m_nSelection++;
|
m_nSelection++;
|
||||||
}
|
}
|
||||||
// don't show pages by default (we'll need to adjust their size first)
|
// don't show pages by default (we'll need to adjust their size first)
|
||||||
@@ -406,7 +403,8 @@ void wxNotebook::MacSetupTabs()
|
|||||||
wxNotebookPage *page;
|
wxNotebookPage *page;
|
||||||
ControlTabInfoRec info;
|
ControlTabInfoRec info;
|
||||||
|
|
||||||
for(int ii = 0; ii < GetPageCount(); ii++)
|
const size_t countPages = GetPageCount();
|
||||||
|
for(size_t ii = 0; ii < countPages; ii++)
|
||||||
{
|
{
|
||||||
page = m_pages[ii];
|
page = m_pages[ii];
|
||||||
info.version = 0;
|
info.version = 0;
|
||||||
|
Reference in New Issue
Block a user