diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-09-30 00:25:47 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-09-30 00:25:47 +0000 |
| commit | 4ced018164553d115a24947ec74dace836e99732 (patch) | |
| tree | cb77b1f59c161da5c1dcde9edaaff9e046865696 /src/ui/interface.cpp | |
| parent | remove helper/gnome-utils.* (diff) | |
| download | inkscape-4ced018164553d115a24947ec74dace836e99732.tar.gz inkscape-4ced018164553d115a24947ec74dace836e99732.zip | |
Hunted every GList to the last (except in libnrtype and libcroco)
Diffstat (limited to 'src/ui/interface.cpp')
| -rw-r--r-- | src/ui/interface.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp index 93e91b8f8..7a9b92378 100644 --- a/src/ui/interface.cpp +++ b/src/ui/interface.cpp @@ -1436,14 +1436,12 @@ sp_ui_menu_item_set_name(GtkWidget *data, Glib::ustring const &name) if (GTK_IS_LABEL(child)) { gtk_label_set_markup_with_mnemonic(GTK_LABEL (child), name.c_str()); } else if (GTK_IS_BOX(child)) { - GList *children = gtk_container_get_children(GTK_CONTAINER(child)); + std::vector<Gtk::Widget*> children = Glib::wrap(GTK_CONTAINER(child))->get_children(); // Label is second child in list - GtkWidget *label = GTK_WIDGET(children->next->data); - - gtk_label_set_markup_with_mnemonic( - GTK_LABEL (label), - name.c_str()); + Gtk::Label *label = dynamic_cast<Gtk::Label*>(children[1]); + if(!label) return; + label->set_markup_with_mnemonic(name); }//else sp_ui_menu_append_item_from_verb has been modified and can set //a menu item in yet another way... } |
