diff --git a/wxPython/src/gdi.i b/wxPython/src/gdi.i index 5b562a6853..5f131b73bf 100644 --- a/wxPython/src/gdi.i +++ b/wxPython/src/gdi.i @@ -34,6 +34,7 @@ %import misc.i %import fonts.i +%pragma(python) code = "import wx" //--------------------------------------------------------------------------- %{ @@ -368,9 +369,9 @@ public: bool __ne__(const wxColour& o) { return *self != o; } } %pragma(python) addtoclass = "asTuple = Get - def __str__(self): return str(self.asTuple()) - def __repr__(self): return str(self.asTuple()) - def __nonzero__(self): return self.asTuple() != (0,0,0) + def __str__(self): return str(self.asTuple()) + def __repr__(self): return str(self.asTuple()) + def __nonzero__(self): return self.Ok() " }; diff --git a/wxPython/src/gtk/gdi.py b/wxPython/src/gtk/gdi.py index c17e2462c8..a32fe1015c 100644 --- a/wxPython/src/gtk/gdi.py +++ b/wxPython/src/gtk/gdi.py @@ -4,6 +4,7 @@ import gdic from misc import * from fonts import * +import wx class wxGDIObjectPtr(wxObjectPtr): def __init__(self,this): self.this = this @@ -259,9 +260,9 @@ class wxColourPtr(wxObjectPtr): def __repr__(self): return "" % (self.this,) asTuple = Get - def __str__(self): return str(self.asTuple()) - def __repr__(self): return str(self.asTuple()) - def __nonzero__(self): return self.asTuple() != (0,0,0) + def __str__(self): return str(self.asTuple()) + def __repr__(self): return str(self.asTuple()) + def __nonzero__(self): return self.Ok() class wxColour(wxColourPtr): def __init__(self,*_args,**_kwargs):