]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/menu.cpp
readded wxEditableListBox as part of adv library
[wxWidgets.git] / src / gtk / menu.cpp
index a0ef660c1ba9a112e5ed3aeb5c7298b92e675f48..65006103ee5ef64565f7b0a18bc5cf98b4027fe4 100644 (file)
@@ -97,9 +97,6 @@ static wxString wxReplaceUnderscore( const wxString& title )
 
 static void DoCommonMenuCallbackCode(wxMenu *menu, wxMenuEvent& event)
 {
-    if (g_isIdle)
-        wxapp_install_idle_handler();
-
     event.SetEventObject( menu );
 
     wxEvtHandler* handler = menu->GetEventHandler();
@@ -160,12 +157,12 @@ void wxMenuBar::Init(size_t n, wxMenu *menus[], const wxString titles[], long st
     if (style & wxMB_DOCKABLE)
     {
         m_widget = gtk_handle_box_new();
-        gtk_container_add( GTK_CONTAINER(m_widget), GTK_WIDGET(m_menubar) );
-        gtk_widget_show( GTK_WIDGET(m_menubar) );
+        gtk_container_add(GTK_CONTAINER(m_widget), m_menubar);
+        gtk_widget_show(m_menubar);
     }
     else
     {
-        m_widget = GTK_WIDGET(m_menubar);
+        m_widget = m_menubar;
     }
 
     PostCreation();
@@ -560,9 +557,6 @@ void wxMenuBar::SetLabelTop( size_t pos, const wxString& label )
 extern "C" {
 static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
 {
-    if (g_isIdle)
-        wxapp_install_idle_handler();
-
     int id = menu->FindMenuIdByMenuItem(widget);
 
     /* should find it for normal (not popup) menu */
@@ -637,8 +631,6 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
 extern "C" {
 static void gtk_menu_hilight_callback( GtkWidget *widget, wxMenu *menu )
 {
-    if (g_isIdle) wxapp_install_idle_handler();
-
     int id = menu->FindMenuIdByMenuItem(widget);
 
     wxASSERT( id != -1 ); // should find it!
@@ -665,8 +657,6 @@ static void gtk_menu_hilight_callback( GtkWidget *widget, wxMenu *menu )
 extern "C" {
 static void gtk_menu_nolight_callback( GtkWidget *widget, wxMenu *menu )
 {
-    if (g_isIdle) wxapp_install_idle_handler();
-
     int id = menu->FindMenuIdByMenuItem(widget);
 
     wxASSERT( id != -1 ); // should find it!
@@ -833,7 +823,7 @@ void wxMenuItem::SetText( const wxString& str )
         gtk_accelerator_parse( (const char*) oldbuf, &accel_key, &accel_mods);
         if (accel_key != 0)
         {
-            gtk_widget_remove_accelerator( GTK_WIDGET(m_menuItem),
+            gtk_widget_remove_accelerator(m_menuItem,
                                         m_parentMenu->m_accel,
                                         accel_key,
                                         accel_mods );
@@ -843,7 +833,7 @@ void wxMenuItem::SetText( const wxString& str )
     {
         // if the accelerator was taken from a stock ID, just get it back from GTK+ stock
         if (wxGetStockGtkAccelerator(stockid, &accel_mods, &accel_key))
-            gtk_widget_remove_accelerator( GTK_WIDGET(m_menuItem),
+            gtk_widget_remove_accelerator( m_menuItem,
                                            m_parentMenu->m_accel,
                                            accel_key,
                                            accel_mods );
@@ -856,7 +846,7 @@ void wxMenuItem::SetText( const wxString& str )
         gtk_accelerator_parse( (const char*) buf, &accel_key, &accel_mods);
         if (accel_key != 0)
         {
-            gtk_widget_add_accelerator( GTK_WIDGET(m_menuItem),
+            gtk_widget_add_accelerator( m_menuItem,
                                         "activate",
                                         m_parentMenu->m_accel,
                                         accel_key,
@@ -868,7 +858,7 @@ void wxMenuItem::SetText( const wxString& str )
     {
         // if the accelerator was taken from a stock ID, just get it back from GTK+ stock
         if (wxGetStockGtkAccelerator(stockid, &accel_mods, &accel_key))
-            gtk_widget_remove_accelerator( GTK_WIDGET(m_menuItem),
+            gtk_widget_remove_accelerator( m_menuItem,
                                            m_parentMenu->m_accel,
                                            accel_key,
                                            accel_mods );
@@ -1174,7 +1164,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem, int pos)
         gtk_accelerator_parse( (const char*) buf, &accel_key, &accel_mods);
         if (accel_key != 0)
         {
-            gtk_widget_add_accelerator (GTK_WIDGET(menuItem),
+            gtk_widget_add_accelerator (menuItem,
                                         "activate",
                                         m_accel,
                                         accel_key,
@@ -1186,7 +1176,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem, int pos)
     {
         // if the accelerator was taken from a stock ID, just get it back from GTK+ stock
         if (wxGetStockGtkAccelerator(stockid, &accel_mods, &accel_key))
-            gtk_widget_add_accelerator( GTK_WIDGET(menuItem),
+            gtk_widget_add_accelerator( menuItem,
                                         "activate",
                                         m_accel,
                                         accel_key,