X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9cca52ba2be26a227b45271e96209b96658478b3..3cebfef17b54f9dacc386f090827b8badb2773d2:/wxPython/src/_font.i?ds=sidebyside diff --git a/wxPython/src/_font.i b/wxPython/src/_font.i index fc4d975bbf..c342e425e4 100644 --- a/wxPython/src/_font.i +++ b/wxPython/src/_font.i @@ -452,8 +452,10 @@ public: %pythoncode { def __nonzero__(self): return self.Ok() } // comparison - bool operator == (const wxFont& font) const; - bool operator != (const wxFont& font) const; + %extend { + bool __eq__(const wxFont* other) { return other ? (*self == *other) : False; } + bool __ne__(const wxFont* other) { return other ? (*self != *other) : True; } + } // accessors: get the font characteristics virtual int GetPointSize() const; @@ -523,7 +525,7 @@ IMP_PYCALLBACK_BOOL_STRINGSTRING(wxPyFontEnumerator, wxFontEnumerator, OnFontEnc %name(FontEnumerator) class wxPyFontEnumerator { public: - %addtofunc wxPyFontEnumerator "self._setCallbackInfo(self, FontEnumerator, 0)" + %pythonAppend wxPyFontEnumerator "self._setCallbackInfo(self, FontEnumerator, 0)" wxPyFontEnumerator(); ~wxPyFontEnumerator();