+ wxString hotkey;
+
+ wxAcceleratorEntry *accel = item.GetAccel();
+ if ( accel )
+ {
+ int flags = accel->GetFlags();
+ if ( flags & wxACCEL_ALT )
+ hotkey += wxT("<alt>");
+ if ( flags & wxACCEL_CTRL )
+ hotkey += wxT("<control>");
+ if ( flags & wxACCEL_SHIFT )
+ hotkey += wxT("<shift>");
+
+ int code = accel->GetKeyCode();
+ switch ( code )
+ {
+ case WXK_F1:
+ case WXK_F2:
+ case WXK_F3:
+ case WXK_F4:
+ case WXK_F5:
+ case WXK_F6:
+ case WXK_F7:
+ case WXK_F8:
+ case WXK_F9:
+ case WXK_F10:
+ case WXK_F11:
+ case WXK_F12:
+ hotkey << wxT('F') << code - WXK_F1 + 1;
+ break;
+
+ // TODO: we should use gdk_keyval_name() (a.k.a.
+ // XKeysymToString) here as well as hardcoding the keysym
+ // names this might be not portable
+ case WXK_NUMPAD_INSERT:
+ hotkey << wxT("KP_Insert" );
+ break;
+ case WXK_NUMPAD_DELETE:
+ hotkey << wxT("KP_Delete" );
+ break;
+ case WXK_INSERT:
+ hotkey << wxT("Insert" );
+ break;
+ case WXK_DELETE:
+ hotkey << wxT("Delete" );
+ break;
+
+ // if there are any other keys wxGetAccelFromString() may
+ // return, we should process them here
+
+ default:
+ if ( code < 127 )
+ {
+ gchar *name = gdk_keyval_name((guint)code);
+ if ( name )
+ {
+ hotkey << name;
+ break;
+ }
+ }
+
+ wxFAIL_MSG( wxT("unknown keyboard accel") );
+ }
+
+ delete accel;
+ }
+
+ return hotkey;
+}
+
+#endif // wxUSE_ACCEL
+
+
+//-----------------------------------------------------------------------------
+// substitute for missing GtkPixmapMenuItem
+//-----------------------------------------------------------------------------
+
+#ifdef USE_MENU_BITMAPS
+
+/*
+ * Copyright (C) 1998, 1999, 2000 Free Software Foundation
+ * All rights reserved.
+ *
+ * This file is part of the Gnome Library.
+ *
+ * The Gnome Library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * The Gnome Library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with the Gnome Library; see the file COPYING.LIB. If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+/*
+ @NOTATION@
+ */
+
+/* Author: Dietmar Maurer <dm@vlsivie.tuwien.ac.at> */
+
+#include <gtk/gtkaccellabel.h>
+#include <gtk/gtksignal.h>
+#include <gtk/gtkmenuitem.h>
+#include <gtk/gtkmenu.h>
+#include <gtk/gtkcontainer.h>
+
+extern "C"
+{
+
+static void gtk_pixmap_menu_item_class_init (GtkPixmapMenuItemClass *klass);
+static void gtk_pixmap_menu_item_init (GtkPixmapMenuItem *menu_item);
+static void gtk_pixmap_menu_item_draw (GtkWidget *widget,
+ GdkRectangle *area);
+static gint gtk_pixmap_menu_item_expose (GtkWidget *widget,
+ GdkEventExpose *event);