]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/menu.cpp
use CanSetValueAs() instead of CanGetValueAs() in wxGridCellBoolEditor::EndEdit
[wxWidgets.git] / src / gtk / menu.cpp
index bbbd626e99e3d7987206b5f2ea1723fa2f2f51d7..299de20d547afb18c67a87254faa856881d14696 100644 (file)
@@ -695,6 +695,16 @@ static void menu_hide(GtkWidget*, wxMenu* menu)
 }
 }
 
 }
 }
 
+// "can_activate_accel" from menu item
+extern "C" {
+static gboolean can_activate_accel(GtkWidget*, guint, wxMenu* menu)
+{
+    menu->UpdateUI();
+    // always allow our "activate" handler to be called
+    return true;
+}
+}
+
 IMPLEMENT_DYNAMIC_CLASS(wxMenu,wxEvtHandler)
 
 void wxMenu::Init()
 IMPLEMENT_DYNAMIC_CLASS(wxMenu,wxEvtHandler)
 
 void wxMenu::Init()
@@ -832,6 +842,8 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem, int pos)
         }
         else
         {
         }
         else
         {
+            g_signal_connect(menuItem, "can_activate_accel",
+                G_CALLBACK(can_activate_accel), this);
             g_signal_connect (menuItem, "activate",
                               G_CALLBACK(menuitem_activate),
                               mitem);
             g_signal_connect (menuItem, "activate",
                               G_CALLBACK(menuitem_activate),
                               mitem);