diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2007-12-04 08:02:08 +0000 |
|---|---|---|
| committer | joncruz <joncruz@users.sourceforge.net> | 2007-12-04 08:02:08 +0000 |
| commit | d6d4a198ae9d4177329ad093ae6ff4a5e93347fc (patch) | |
| tree | 44c109c8c33d296b36355590b46a3c940a39e3b6 /src/ink-action.cpp | |
| parent | new patterns, readme update (diff) | |
| download | inkscape-d6d4a198ae9d4177329ad093ae6ff4a5e93347fc.tar.gz inkscape-d6d4a198ae9d4177329ad093ae6ff4a5e93347fc.zip | |
Implemented use of "short_label" for toolbar items.
Fixes bug #168826.
(bzr r4167)
Diffstat (limited to 'src/ink-action.cpp')
| -rw-r--r-- | src/ink-action.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/ink-action.cpp b/src/ink-action.cpp index f1dcaf04b..418a9ce4f 100644 --- a/src/ink-action.cpp +++ b/src/ink-action.cpp @@ -426,27 +426,27 @@ static GtkWidget* ink_toggle_action_create_menu_item( GtkAction* action ) static GtkWidget* ink_toggle_action_create_tool_item( GtkAction* action ) { - InkToggleAction* act = INK_TOGGLE_ACTION( action ); + InkToggleAction* act = INK_TOGGLE_ACTION( action ); - GtkWidget* item = gInkToggleActionParentClass->parent_class.create_tool_item(action); - if ( GTK_IS_TOOL_BUTTON(item) ) { - GtkToolButton* button = GTK_TOOL_BUTTON(item); - if ( act->private_data->iconId ) { - GtkWidget* child = sp_icon_new( act->private_data->iconSize, act->private_data->iconId ); - gtk_tool_button_set_icon_widget( button, child ); - } else { - gchar *label; - g_object_get (G_OBJECT(action), "label", &label, NULL); - gtk_tool_button_set_label( button, label ); - } - } else { - // For now trigger a warning but don't do anything else - GtkToolButton* button = GTK_TOOL_BUTTON(item); - (void)button; - } - gtk_widget_show_all( item ); - - return item; + GtkWidget* item = gInkToggleActionParentClass->parent_class.create_tool_item(action); + if ( GTK_IS_TOOL_BUTTON(item) ) { + GtkToolButton* button = GTK_TOOL_BUTTON(item); + if ( act->private_data->iconId ) { + GtkWidget* child = sp_icon_new( act->private_data->iconSize, act->private_data->iconId ); + gtk_tool_button_set_icon_widget( button, child ); + } else { + gchar *label; + g_object_get (G_OBJECT(action), "short_label", &label, NULL); + gtk_tool_button_set_label( button, label ); + } + } else { + // For now trigger a warning but don't do anything else + GtkToolButton* button = GTK_TOOL_BUTTON(item); + (void)button; + } + gtk_widget_show_all( item ); + + return item; } |
