#if (GTK_MINOR_VERSION > 0)
wxWindow *top_frame = win;
- while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
+ while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
top_frame = top_frame->GetParent();
/* support for native hot keys */
#if (GTK_MINOR_VERSION > 0)
wxWindow *top_frame = win;
- while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
+ while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
top_frame = top_frame->GetParent();
/* support for native hot keys */
m_invokingWindow = win;
#if (GTK_MINOR_VERSION > 0) && (GTK_MICRO_VERSION > 0)
wxWindow *top_frame = win;
- while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
+ while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
top_frame = top_frame->GetParent();
/* support for native key accelerators indicated by underscroes */
m_invokingWindow = (wxWindow*) NULL;
#if (GTK_MINOR_VERSION > 0) && (GTK_MICRO_VERSION > 0)
wxWindow *top_frame = win;
- while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
+ while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
top_frame = top_frame->GetParent();
/* support for native key accelerators indicated by underscroes */
event.SetEventObject( menu );
event.SetInt(id );
-#if WXWIN_COMPATIBILITY
+#if wxUSE_MENU_CALLBACK
if (menu->GetCallback())
{
(void) (*(menu->GetCallback())) (*menu, event);
return;
}
-#endif // WXWIN_COMPATIBILITY
+#endif // wxUSE_MENU_CALLBACK
if (menu->GetEventHandler()->ProcessEvent(event))
return;
wxMenu::~wxMenu()
{
+ m_items.Clear();
+
gtk_widget_destroy( m_menu );
gtk_object_unref( GTK_OBJECT(m_factory) );
-
- // the menu items are deleted by the base class dtor
}
bool wxMenu::DoAppend(wxMenuItem *mitem)
entry.callback = (GtkItemFactoryCallback) 0;
entry.callback_action = 0;
entry.item_type = "<Branch>";
+ entry.accelerator = (gchar*) NULL;
gtk_item_factory_create_item( m_factory, &entry, (gpointer) this, 2 ); /* what is 2 ? */
entry.item_type = "<CheckItem>";
else
entry.item_type = "<Item>";
+ entry.accelerator = (gchar*) NULL;
#if wxUSE_ACCEL
// due to an apparent bug in GTK+, we have to use a static buffer here -