changed the GimpNewDrawableFunc typedef to take an additional
2001-12-17 Michael Natterer <mitch@gimp.org> * app/widgets/gimpdrawablelistview.[ch]: changed the GimpNewDrawableFunc typedef to take an additional "GimpDrawable *template" paramater, added the "Drop to New" feature again by passing the dropped drawable to view->new_drawable_func(). * app/gui/channels-commands.[ch]: channels_new_channel_query: * app/gui/layers-commands.[ch]: layers_new_layer_query: Added the "template" parameter because they are used as the views' new_drawable_func(), create layers/channels with the template's properties if a template is passed.
This commit is contained in:
committed by
Michael Natterer
parent
9901ec4846
commit
d15b07b486
@ -72,8 +72,6 @@ static void gimp_drawable_list_view_context_item (GimpContainerView *v
|
||||
GimpViewable *item,
|
||||
gpointer insert_data);
|
||||
|
||||
static void gimp_drawable_list_view_new_drawable (GimpDrawableListView *view,
|
||||
GimpDrawable *drawable);
|
||||
static void gimp_drawable_list_view_new_clicked (GtkWidget *widget,
|
||||
GimpDrawableListView *view);
|
||||
static void gimp_drawable_list_view_new_dropped (GtkWidget *widget,
|
||||
@ -526,25 +524,11 @@ gimp_drawable_list_view_context_item (GimpContainerView *view,
|
||||
|
||||
/* "New" functions */
|
||||
|
||||
static void
|
||||
gimp_drawable_list_view_new_drawable (GimpDrawableListView *view,
|
||||
GimpDrawable *drawable)
|
||||
{
|
||||
if (drawable)
|
||||
{
|
||||
g_print ("new with \"%s\"'s properties\n", GIMP_OBJECT (drawable)->name);
|
||||
}
|
||||
else
|
||||
{
|
||||
view->new_drawable_func (view->gimage);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_drawable_list_view_new_clicked (GtkWidget *widget,
|
||||
GimpDrawableListView *view)
|
||||
{
|
||||
gimp_drawable_list_view_new_drawable (view, NULL);
|
||||
view->new_drawable_func (view->gimage, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -559,7 +543,7 @@ gimp_drawable_list_view_new_dropped (GtkWidget *widget,
|
||||
if (viewable && gimp_container_have (GIMP_CONTAINER_VIEW (view)->container,
|
||||
GIMP_OBJECT (viewable)))
|
||||
{
|
||||
gimp_drawable_list_view_new_drawable (view, GIMP_DRAWABLE (viewable));
|
||||
view->new_drawable_func (view->gimage, GIMP_DRAWABLE (viewable));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user