-// // Otherwise make a class that can virtualize CreatePopupMenu
-// class wxPyTaskBarIcon : public wxTaskBarIcon
-// {
-// DECLARE_ABSTRACT_CLASS(wxPyTaskBarIcon);
-// public:
-// wxPyTaskBarIcon() : wxTaskBarIcon()
-// {}
-
-// wxMenu* CreatePopupMenu() {
-// wxMenu *rval = NULL;
-// bool found;
-// bool blocked = wxPyBeginBlockThreads();
-// if ((found = wxPyCBH_findCallback(m_myInst, "CreatePopupMenu"))) {
-// PyObject* ro;
-// wxMenu* ptr;
-// ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()"));
-// if (ro) {
-// if (wxPyConvertSwigPtr(ro, (void **)&ptr, wxT("wxMenu")))
-// rval = ptr;
-// Py_DECREF(ro);
-// }
-// }
-// wxPyEndBlockThreads(blocked);
-// if (! found)
-// rval = wxTaskBarIcon::CreatePopupMenu();
-// return rval;
-// }
-
-// PYPRIVATE;
-// };
-
-// IMPLEMENT_ABSTRACT_CLASS(wxPyTaskBarIcon, wxTaskBarIcon);
+// Otherwise make a class that can virtualize CreatePopupMenu
+class wxPyTaskBarIcon : public wxTaskBarIcon
+{
+ DECLARE_ABSTRACT_CLASS(wxPyTaskBarIcon)
+public:
+ wxPyTaskBarIcon() : wxTaskBarIcon()
+ {}
+
+ wxMenu* CreatePopupMenu() {
+ wxMenu *rval = NULL;
+ bool found;
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
+ if ((found = wxPyCBH_findCallback(m_myInst, "CreatePopupMenu"))) {
+ PyObject* ro;
+ wxMenu* ptr;
+ ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()"));
+ if (ro) {
+ if (wxPyConvertSwigPtr(ro, (void **)&ptr, wxT("wxMenu")))
+ rval = ptr;
+ Py_DECREF(ro);
+ }
+ }
+ wxPyEndBlockThreads(blocked);
+ if (! found)
+ rval = wxTaskBarIcon::CreatePopupMenu();
+ return rval;
+ }
+
+ PYPRIVATE;
+};
+
+IMPLEMENT_ABSTRACT_CLASS(wxPyTaskBarIcon, wxTaskBarIcon);