Add a button to create a group layer to the layers dialog

Will probably hide that button again, or make it only appear
when some environment variable is set until the stuff works
completely.
This commit is contained in:
Michael Natterer 2009-08-06 21:34:54 +02:00
parent d059f239ac
commit d2e1f2ac74
1 changed files with 8 additions and 1 deletions

View File

@ -253,6 +253,8 @@ gimp_layer_tree_view_view_iface_init (GimpContainerViewInterface *iface)
iface->insert_item = gimp_layer_tree_view_insert_item;
iface->select_item = gimp_layer_tree_view_select_item;
iface->set_view_size = gimp_layer_tree_view_set_view_size;
iface->model_is_tree = TRUE;
}
static void
@ -413,13 +415,18 @@ gimp_layer_tree_view_constructor (GType type,
/* hide basically useless edit button */
gtk_widget_hide (gimp_item_tree_view_get_edit_button (GIMP_ITEM_TREE_VIEW (layer_view)));
button = gimp_editor_add_action_button (GIMP_EDITOR (layer_view), "layers",
"layers-new-group", NULL);
gtk_box_reorder_child (GTK_BOX (GIMP_EDITOR (layer_view)->button_box),
button, 2);
button = gimp_editor_add_action_button (GIMP_EDITOR (layer_view), "layers",
"layers-anchor", NULL);
gimp_container_view_enable_dnd (GIMP_CONTAINER_VIEW (layer_view),
GTK_BUTTON (button),
GIMP_TYPE_LAYER);
gtk_box_reorder_child (GTK_BOX (GIMP_EDITOR (layer_view)->button_box),
button, 5);
button, 6);
return object;
}