*height = 0;
}
-#if wxUSE_MENUS
+#if wxUSE_MENUS && wxUSE_ACCEL
// Helper for wxCreateAcceleratorTableForMenuBar
static void wxAddAccelerators(wxList& accelEntries, wxMenu* menu)
{
return table;
}
-#endif
+#endif // wxUSE_MENUS && wxUSE_ACCEL
bool wxFrame::ShowFullScreen(bool show, long style)
{
if (!wxFrameBase::ShowFullScreen(show, style))
return false;
-#if wxUSE_MENUS
+#if wxUSE_MENUS && wxUSE_ACCEL
if (show && GetMenuBar())
{
wxAcceleratorTable table(wxCreateAcceleratorTableForMenuBar(GetMenuBar()));
if (table.IsOk())
SetAcceleratorTable(table);
}
-#endif
+#endif // wxUSE_MENUS && wxUSE_ACCEL
wxWindow* const bar[] = {
#if wxUSE_MENUS
oldLabel = wxStripMenuCodes(oldLabel);
oldLabel.Replace(wxT("_"), wxT(""));
wxString label1 = wxStripMenuCodes(str);
+#if wxUSE_ACCEL
wxString oldhotkey = GetHotKey(); // Store the old hotkey in Ctrl-foo format
wxCharBuffer oldbuf = wxGTK_CONV_SYS( GetGtkHotKey(*this) ); // and as <control>foo
+#endif // wxUSE_ACCEL
DoSetText(str);
+#if wxUSE_ACCEL
if (oldLabel == label1 &&
oldhotkey == GetHotKey()) // Make sure we can change a hotkey even if the label is unaltered
return;
accel_key,
accel_mods );
}
+#endif // wxUSE_FILECTRL
}
// NOTE: this function is different from the similar functions GTKProcessMnemonics()
}
+#if wxUSE_ACCEL
guint accel_key;
GdkModifierType accel_mods;
wxCharBuffer buf = wxGTK_CONV_SYS( GetGtkHotKey(*mitem) );
- // wxPrintf( wxT("item: %s hotkey %s\n"), mitem->GetItemLabel().c_str(), GetGtkHotKey(*mitem).c_str() );
if (buf[(size_t)0] != '\0')
{
gtk_accelerator_parse( (const char*) buf, &accel_key, &accel_mods);
accel_mods,
GTK_ACCEL_VISIBLE);
}
+#endif // wxUSE_FILECTRL
if (pos == -1)
gtk_menu_shell_append(GTK_MENU_SHELL(m_menu), menuItem);