X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/09a1dffa32ae09ea47789eb071a1fdac0d154dda..a83ea9c15a7ac7bbdc6686164cfcbbc21ae5031a:/src/x11/palette.cpp?ds=sidebyside diff --git a/src/x11/palette.cpp b/src/x11/palette.cpp index 7a035ffd18..c81b1fa113 100644 --- a/src/x11/palette.cpp +++ b/src/x11/palette.cpp @@ -20,7 +20,7 @@ /* Wolfram Gloger I have implemented basic colormap support for the X11 versions of -wxWindows, notably wxPalette::Create(). The way I did it is to +wxWidgets, notably wxPalette::Create(). The way I did it is to allocate additional read-only color cells in the default colormap. In general you will get arbitrary pixel values assigned to these new cells and therefore I added a method wxColourMap::TransferBitmap() @@ -34,7 +34,7 @@ recommended; only the window manager should do this... Also, it is not the functionality that wxPalette::Create() aims to provide. */ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "palette.h" #endif @@ -77,7 +77,7 @@ wxPaletteRefData::~wxPaletteRefData() { Display *display = (Display*) NULL; - wxNode *node, *next; + wxList::compatibility_iterator node, next; for (node = m_palettes.GetFirst(); node; node = next) { wxXPalette *c = (wxXPalette *)node->GetData(); @@ -106,7 +106,7 @@ wxPaletteRefData::~wxPaletteRefData() XFreeColormap(display, cmap); next = node->GetNext(); - m_palettes.DeleteNode(node); + m_palettes.Erase(node); delete c; } } @@ -194,7 +194,7 @@ WXColormap wxPalette::GetXColormap(WXDisplay* display) const if (!M_PALETTEDATA || (M_PALETTEDATA->m_palettes.GetCount() == 0)) return wxTheApp->GetMainColormap(display); - wxNode* node = M_PALETTEDATA->m_palettes.GetFirst(); + wxList::compatibility_iterator node = M_PALETTEDATA->m_palettes.GetFirst(); if (!display && node) { wxXPalette* p = (wxXPalette*) node->GetData(); @@ -319,7 +319,7 @@ unsigned long *wxPalette::GetXPixArray(WXDisplay *display, int *n) { if (!M_PALETTEDATA) return (unsigned long*) 0; - wxNode *node; + wxList::compatibility_iterator node; for (node = M_PALETTEDATA->m_palettes.GetFirst(); node; node = node->GetNext()) {