[gimp/metadata-browser] app: port the channels and paths dialog to portable selection modifiers
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] app: port the channels and paths dialog to portable selection modifiers
- Date: Fri, 2 Dec 2011 02:07:55 +0000 (UTC)
commit 43ed802548bc88afeca6a25add42ba070ffb41df
Author: Michael Natterer <mitch gimp org>
Date: Wed Oct 5 19:25:29 2011 +0200
app: port the channels and paths dialog to portable selection modifiers
instead of hardcoding SHIFT and CONTROL.
app/widgets/gimpchanneltreeview.c | 13 ++++++++++---
app/widgets/gimpvectorstreeview.c | 13 ++++++++++---
2 files changed, 20 insertions(+), 6 deletions(-)
---
diff --git a/app/widgets/gimpchanneltreeview.c b/app/widgets/gimpchanneltreeview.c
index 3963469..458c749 100644
--- a/app/widgets/gimpchanneltreeview.c
+++ b/app/widgets/gimpchanneltreeview.c
@@ -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),
diff --git a/app/widgets/gimpvectorstreeview.c b/app/widgets/gimpvectorstreeview.c
index bfcc5cb..ae4da93 100644
--- a/app/widgets/gimpvectorstreeview.c
+++ b/app/widgets/gimpvectorstreeview.c
@@ -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),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]