fixed handlers registration in DoPopupMenu (patch 1009949)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4304,10 +4304,10 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y )
|
|||||||
|
|
||||||
bool is_waiting = true;
|
bool is_waiting = true;
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(menu->m_menu),
|
gulong handler = gtk_signal_connect( GTK_OBJECT(menu->m_menu),
|
||||||
"hide",
|
"hide",
|
||||||
GTK_SIGNAL_FUNC(gtk_pop_hide_callback),
|
GTK_SIGNAL_FUNC(gtk_pop_hide_callback),
|
||||||
(gpointer)&is_waiting );
|
(gpointer)&is_waiting );
|
||||||
|
|
||||||
wxPoint pos;
|
wxPoint pos;
|
||||||
gpointer userdata;
|
gpointer userdata;
|
||||||
@@ -4344,6 +4344,8 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y )
|
|||||||
gtk_main_iteration();
|
gtk_main_iteration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gtk_signal_disconnect(GTK_OBJECT(menu->m_menu), handler);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4304,10 +4304,10 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y )
|
|||||||
|
|
||||||
bool is_waiting = true;
|
bool is_waiting = true;
|
||||||
|
|
||||||
gtk_signal_connect( GTK_OBJECT(menu->m_menu),
|
gulong handler = gtk_signal_connect( GTK_OBJECT(menu->m_menu),
|
||||||
"hide",
|
"hide",
|
||||||
GTK_SIGNAL_FUNC(gtk_pop_hide_callback),
|
GTK_SIGNAL_FUNC(gtk_pop_hide_callback),
|
||||||
(gpointer)&is_waiting );
|
(gpointer)&is_waiting );
|
||||||
|
|
||||||
wxPoint pos;
|
wxPoint pos;
|
||||||
gpointer userdata;
|
gpointer userdata;
|
||||||
@@ -4344,6 +4344,8 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y )
|
|||||||
gtk_main_iteration();
|
gtk_main_iteration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gtk_signal_disconnect(GTK_OBJECT(menu->m_menu), handler);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user