-
- GtkLabel* label = GTK_LABEL(GTK_BIN(m_menuItem)->child);
- gtk_label_set_text_with_mnemonic(label, wxGTK_CONV_SYS(text));
- }
-
- // remove old accelerator from our parent's accelerator group, if present
- guint accel_key;
- GdkModifierType accel_mods;
- if (oldbuf[(size_t)0] != '\0')
- {
- gtk_accelerator_parse( (const char*) oldbuf, &accel_key, &accel_mods);
- if (accel_key != 0)
- {
- gtk_widget_remove_accelerator(m_menuItem,
- m_parentMenu->m_accel,
- accel_key,
- accel_mods );
- }
- }
- else if (isstock)
- {
- // if the accelerator was taken from a stock ID, just get it back from GTK+ stock
- if (wxGetStockGtkAccelerator(stockid, &accel_mods, &accel_key))
- gtk_widget_remove_accelerator( m_menuItem,
- m_parentMenu->m_accel,
- accel_key,
- accel_mods );
- }
-
- // add new accelerator to our parent's accelerator group
- wxCharBuffer buf = wxGTK_CONV_SYS( GetGtkHotKey(*this) );
- if (buf[(size_t)0] != '\0')
- {
- gtk_accelerator_parse( (const char*) buf, &accel_key, &accel_mods);
- if (accel_key != 0)
- {
- gtk_widget_add_accelerator( m_menuItem,
- "activate",
- m_parentMenu->m_accel,
- accel_key,
- accel_mods,
- GTK_ACCEL_VISIBLE);
- }
- }
- else if (isstock)
- {
- // if the accelerator was taken from a stock ID, just get it back from GTK+ stock
- if (wxGetStockGtkAccelerator(stockid, &accel_mods, &accel_key))
- gtk_widget_remove_accelerator( m_menuItem,
- m_parentMenu->m_accel,
- accel_key,
- accel_mods );