+ //This is necessary because add_accel_label is protected,
+ //and even if you subclass Gtk::MenuItem then add_accel_label
+ //doesn't do what you'd expect.
+ Gtk::MenuItem * item = Gtk::manage(new Gtk::MenuItem);
+ Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox);
+ Gtk::Label * label1 = Gtk::manage(new Gtk::Label(
+ labelTrans(i->label(), i->shortcut()), true));
+ Gtk::Label * label2 = Gtk::manage(new Gtk::Label(
+ " " + i->binding(), false));
+ hbox->pack_start(*label1, false, false, 0);
+ hbox->pack_end(*label2, false, false, 0);
+ item->add(*hbox);
+
+ gmenu->append(*item);
+ item->show_all();