GNOME Bugzilla – Bug 764000
Can't change submenu item label at runtime
Last modified: 2016-03-21 21:26:15 UTC
After creating a submenu: label = get_submenu_label_for_index (NORMAL_RATE_IDX); priv->submenu_item = g_menu_item_new_submenu (label, G_MENU_MODEL (submenu)); g_free (label); g_menu_insert_item (menu, -1, priv->submenu_item); Calling: g_menu_item_set_label (G_MENU_ITEM (priv->submenu_item), label); doesn't do anything Calling: menu = totem_object_get_menu_section (priv->totem, "variable-rate-placeholder"); g_menu_remove (menu, 0); g_menu_item_set_label (G_MENU_ITEM (priv->submenu_item), label); g_menu_insert_item (menu, -1, priv->submenu_item); doesn't update the label of the submenu heading, and throws warnings like: (totem:2431): Gtk-WARNING **: Duplicate child name in GtkStack: Speed: 1.5 Totem-Message: new label: Speed: 1.5 (totem:2431): GLib-GIO-CRITICAL **: g_menu_item_get_attribute: assertion 'G_IS_MENU_ITEM (menu_item)' failed As also seen in bug 749405. The goal is to create a menu that looks like: https://github.com/gnome-design-team/gnome-mockups/blob/aa99f912123fdf079d1aeaa9243935bb7fc3f9fa/videos/wireframes/png/playback-speed.png though I accept that the submenu item label should be the same as the submenu heading label (the second part of the mockup would say "Speed: Normal" instead of "Speed").
*** This bug has been marked as a duplicate of bug 667779 ***