summaryrefslogtreecommitdiffstats
path: root/src/interface.cpp
diff options
context:
space:
mode:
authorJean-Ren?? Reinhard <jrreinhard@users.sourceforge.net>2007-07-26 20:25:47 +0000
committerjrreinhard <jrreinhard@users.sourceforge.net>2007-07-26 20:25:47 +0000
commitd8e28e8553f73a2b2fb0b4d8d01eb683bcf7d73b (patch)
treec33d207a4176fb7dc102da30312f07426ad19191 /src/interface.cpp
parentImproved svg input and output for lighting effects and lights (diff)
downloadinkscape-d8e28e8553f73a2b2fb0b4d8d01eb683bcf7d73b.tar.gz
inkscape-d8e28e8553f73a2b2fb0b4d8d01eb683bcf7d73b.zip
Fix Bug 1653629 : we can know start inkscape without key file
(bzr r3310)
Diffstat (limited to 'src/interface.cpp')
-rw-r--r--src/interface.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/interface.cpp b/src/interface.cpp
index ea08f170c..f43c31d30 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -1402,9 +1402,19 @@ sp_ui_menu_item_set_sensitive(SPAction *action, unsigned int sensitive, void *da
static void
sp_ui_menu_item_set_name(SPAction *action, Glib::ustring name, void *data)
{
- gtk_label_set_markup_with_mnemonic(
- GTK_LABEL (gtk_container_get_children(GTK_CONTAINER (GTK_BIN (data)->child))->data),
+ void *child = GTK_BIN (data)->child;
+ //child is either
+ //- a GtkHBox, whose first child is a label displaying name if the menu
+ //item has an accel key
+ //- a GtkLabel if the menu has no accel key
+ if (GTK_IS_LABEL(child)) {
+ gtk_label_set_markup_with_mnemonic(GTK_LABEL (child), name.c_str());
+ } else if (GTK_IS_HBOX(child)) {
+ gtk_label_set_markup_with_mnemonic(
+ GTK_LABEL (gtk_container_get_children(GTK_CONTAINER (child))->data),
name.c_str());
+ }//else sp_ui_menu_append_item_from_verb has been modified and can set
+ //a menu item in yet another way...
}