app: add multi-channel drag'n drop ability.
This commit is contained in:
parent
58302ee332
commit
45e18f696c
4 changed files with 21 additions and 3 deletions
|
|
@ -206,6 +206,7 @@ gimp_container_tree_view_drop_status (GimpContainerTreeView *tree_view,
|
|||
}
|
||||
break;
|
||||
|
||||
case GIMP_DND_TYPE_CHANNEL_LIST:
|
||||
case GIMP_DND_TYPE_LAYER_LIST:
|
||||
/* Various GimpViewable list (GList) drag data. */
|
||||
{
|
||||
|
|
|
|||
|
|
@ -643,6 +643,20 @@ static const GimpDndDataDef dnd_data_defs[] =
|
|||
gimp_dnd_set_item_list_data,
|
||||
},
|
||||
|
||||
{
|
||||
GIMP_TARGET_CHANNEL_LIST,
|
||||
|
||||
"gimp-dnd-get-channel-list-func",
|
||||
"gimp-dnd-get-channel-list-data",
|
||||
|
||||
"gimp-dnd-set-channel-list-func",
|
||||
"gimp-dnd-set-channel-list-data",
|
||||
|
||||
gimp_dnd_get_viewable_list_icon,
|
||||
gimp_dnd_get_item_list_data,
|
||||
gimp_dnd_set_item_list_data,
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1916,9 +1930,9 @@ gimp_dnd_data_type_get_by_g_type (GType type,
|
|||
{
|
||||
dnd_type = GIMP_DND_TYPE_LAYER_MASK;
|
||||
}
|
||||
else if (g_type_is_a (type, GIMP_TYPE_CHANNEL) && ! list)
|
||||
else if (g_type_is_a (type, GIMP_TYPE_CHANNEL))
|
||||
{
|
||||
dnd_type = GIMP_DND_TYPE_CHANNEL;
|
||||
dnd_type = list ? GIMP_DND_TYPE_CHANNEL_LIST : GIMP_DND_TYPE_CHANNEL;
|
||||
}
|
||||
else if (g_type_is_a (type, GIMP_TYPE_VECTORS) && ! list)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -97,6 +97,8 @@
|
|||
#define GIMP_TARGET_LAYER_LIST \
|
||||
{ "application/x-gimp-layer-list", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_LAYER_LIST }
|
||||
|
||||
#define GIMP_TARGET_CHANNEL_LIST \
|
||||
{ "application/x-gimp-channel-list", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_CHANNEL_LIST }
|
||||
|
||||
/* dnd initialization */
|
||||
|
||||
|
|
|
|||
|
|
@ -168,8 +168,9 @@ typedef enum /*< skip >*/
|
|||
GIMP_DND_TYPE_NOTEBOOK_TAB = 24,
|
||||
|
||||
GIMP_DND_TYPE_LAYER_LIST = 25,
|
||||
GIMP_DND_TYPE_CHANNEL_LIST = 26,
|
||||
|
||||
GIMP_DND_TYPE_LAST = GIMP_DND_TYPE_LAYER_LIST
|
||||
GIMP_DND_TYPE_LAST = GIMP_DND_TYPE_CHANNEL_LIST
|
||||
} GimpDndType;
|
||||
|
||||
typedef enum /*< skip >*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue