+ }
+ else
+ str << *pc;
+ }
+
+ /* this doesn't have much effect right now */
+ menu->SetTitle( str );
+
+ /* GTK 1.2.0 doesn't have gtk_item_factory_get_item(), but GTK 1.2.1 has. */
+#if (GTK_MINOR_VERSION > 0) && (GTK_MICRO_VERSION > 0)
+
+ /* local buffer in multibyte form */
+ char buf[200];
+ strcpy( buf, "/" );
+ strcat( buf, str.mb_str() );
+
+ GtkItemFactoryEntry entry;
+ entry.path = buf;
+ entry.accelerator = (gchar*) NULL;
+ entry.callback = (GtkItemFactoryCallback) NULL;
+ entry.callback_action = 0;
+ entry.item_type = "<Branch>";
+
+ gtk_item_factory_create_item( m_factory, &entry, (gpointer) this, 2 ); /* what is 2 ? */
+
+ /* in order to get the pointer to the item we need the item text _without_ underscores */
+ wxString tmp = _T("<main>/");
+ for ( const wxChar *pc = str; *pc != _T('\0'); pc++ )
+ {
+ if (*pc == _T('_')) pc++; /* skip it */
+ tmp << *pc;