X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d14a1e28567de23c586bc80017073d0c39f8d18f..75e14ed5ee73dfdcee100d4d2aef84a247b5dde6:/wxPython/src/_taskbar.i?ds=sidebyside diff --git a/wxPython/src/_taskbar.i b/wxPython/src/_taskbar.i index 24a1d4abd9..5d4c54bf88 100644 --- a/wxPython/src/_taskbar.i +++ b/wxPython/src/_taskbar.i @@ -29,7 +29,7 @@ class wxTaskBarIcon : public wxEvtHandler { public: - wxTaskBarIcon() { PyErr_SetNone(PyExc_NotImplementedError); } + wxTaskBarIcon() { wxPyRaiseNotImplemented(); } }; @@ -37,7 +37,7 @@ class wxTaskBarIconEvent : public wxEvent { public: wxTaskBarIconEvent(wxEventType, wxTaskBarIcon *) - { PyErr_SetNone(PyExc_NotImplementedError); } + { wxPyRaiseNotImplemented(); } virtual wxEvent* Clone() const { return NULL; } }; @@ -61,10 +61,19 @@ class wxTaskBarIcon : public wxEvtHandler public: wxTaskBarIcon(); ~wxTaskBarIcon(); - + + %extend { + void Destroy() { + #ifndef __WXMAC__ + self->RemoveIcon(); + #endif + } + } #ifndef __WXMAC__ bool IsOk() const; + %pythoncode { def __nonzero__(self): return self.IsOk() } + bool IsIconInstalled() const; bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxPyEmptyString);