mirror of https://github.com/GNOME/gimp.git
app: port the channels and paths dialog to portable selection modifiers
instead of hardcoding SHIFT and CONTROL.
This commit is contained in:
parent
f22d6b9d3b
commit
4b3d3fe431
|
@ -153,10 +153,17 @@ gimp_channel_tree_view_constructed (GObject *object)
|
|||
{
|
||||
GimpChannelTreeView *view = GIMP_CHANNEL_TREE_VIEW (object);
|
||||
GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (object);
|
||||
GdkModifierType extend_mask;
|
||||
GdkModifierType modify_mask;
|
||||
|
||||
if (G_OBJECT_CLASS (parent_class)->constructed)
|
||||
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||
|
||||
extend_mask = gtk_widget_get_modifier_mask (GTK_WIDGET (object),
|
||||
GDK_MODIFIER_INTENT_EXTEND_SELECTION);
|
||||
modify_mask = gtk_widget_get_modifier_mask (GTK_WIDGET (object),
|
||||
GDK_MODIFIER_INTENT_MODIFY_SELECTION);
|
||||
|
||||
gimp_dnd_viewable_dest_add (GTK_WIDGET (tree_view->view), GIMP_TYPE_LAYER,
|
||||
NULL, tree_view);
|
||||
gimp_dnd_viewable_dest_add (GTK_WIDGET (tree_view->view), GIMP_TYPE_LAYER_MASK,
|
||||
|
@ -168,11 +175,11 @@ gimp_channel_tree_view_constructed (GObject *object)
|
|||
gimp_editor_add_action_button (GIMP_EDITOR (view), "channels",
|
||||
"channels-selection-replace",
|
||||
"channels-selection-add",
|
||||
GDK_SHIFT_MASK,
|
||||
extend_mask,
|
||||
"channels-selection-subtract",
|
||||
GDK_CONTROL_MASK,
|
||||
modify_mask,
|
||||
"channels-selection-intersect",
|
||||
GDK_SHIFT_MASK | GDK_CONTROL_MASK,
|
||||
extend_mask | modify_mask,
|
||||
NULL);
|
||||
gimp_container_view_enable_dnd (GIMP_CONTAINER_VIEW (view),
|
||||
GTK_BUTTON (view->priv->toselection_button),
|
||||
|
|
|
@ -130,10 +130,17 @@ gimp_vectors_tree_view_constructed (GObject *object)
|
|||
GimpEditor *editor = GIMP_EDITOR (object);
|
||||
GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (object);
|
||||
GimpVectorsTreeView *view = GIMP_VECTORS_TREE_VIEW (object);
|
||||
GdkModifierType extend_mask;
|
||||
GdkModifierType modify_mask;
|
||||
|
||||
if (G_OBJECT_CLASS (parent_class)->constructed)
|
||||
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||
|
||||
extend_mask = gtk_widget_get_modifier_mask (GTK_WIDGET (object),
|
||||
GDK_MODIFIER_INTENT_EXTEND_SELECTION);
|
||||
modify_mask = gtk_widget_get_modifier_mask (GTK_WIDGET (object),
|
||||
GDK_MODIFIER_INTENT_MODIFY_SELECTION);
|
||||
|
||||
/* hide basically useless edit button */
|
||||
gtk_widget_hide (gimp_item_tree_view_get_edit_button (GIMP_ITEM_TREE_VIEW (view)));
|
||||
|
||||
|
@ -141,11 +148,11 @@ gimp_vectors_tree_view_constructed (GObject *object)
|
|||
gimp_editor_add_action_button (editor, "vectors",
|
||||
"vectors-selection-replace",
|
||||
"vectors-selection-add",
|
||||
GDK_SHIFT_MASK,
|
||||
extend_mask,
|
||||
"vectors-selection-subtract",
|
||||
GDK_CONTROL_MASK,
|
||||
modify_mask,
|
||||
"vectors-selection-intersect",
|
||||
GDK_SHIFT_MASK | GDK_CONTROL_MASK,
|
||||
extend_mask | modify_mask,
|
||||
NULL);
|
||||
gimp_container_view_enable_dnd (GIMP_CONTAINER_VIEW (editor),
|
||||
GTK_BUTTON (view->toselection_button),
|
||||
|
|
Loading…
Reference in New Issue