[gimp] app: remove the "edit" button from GimpItemTreeView
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove the "edit" button from GimpItemTreeView
- Date: Sun, 30 Oct 2016 16:37:56 +0000 (UTC)
commit 967ac88c35f901dc1b5ffed1e5d103b7f81f39a9
Author: Michael Natterer <mitch gimp org>
Date: Sun Oct 30 17:36:32 2016 +0100
app: remove the "edit" button from GimpItemTreeView
the layers and paths dialogs were already hiding it, now it's gone
also from the channels dialog. It was redundant anyway.
app/widgets/gimpchanneltreeview.c | 1 -
app/widgets/gimpitemtreeview.c | 17 -----------------
app/widgets/gimpitemtreeview.h | 2 --
app/widgets/gimplayertreeview.c | 14 ++------------
app/widgets/gimpvectorstreeview.c | 4 ----
5 files changed, 2 insertions(+), 36 deletions(-)
---
diff --git a/app/widgets/gimpchanneltreeview.c b/app/widgets/gimpchanneltreeview.c
index aabfe08..2706b25 100644
--- a/app/widgets/gimpchanneltreeview.c
+++ b/app/widgets/gimpchanneltreeview.c
@@ -115,7 +115,6 @@ gimp_channel_tree_view_class_init (GimpChannelTreeViewClass *klass)
iv_class->action_group = "channels";
iv_class->activate_action = "channels-edit-attributes";
- iv_class->edit_action = "channels-edit-attributes";
iv_class->new_action = "channels-new";
iv_class->new_default_action = "channels-new-last-values";
iv_class->raise_action = "channels-raise";
diff --git a/app/widgets/gimpitemtreeview.c b/app/widgets/gimpitemtreeview.c
index 8ec7a97..e48782d 100644
--- a/app/widgets/gimpitemtreeview.c
+++ b/app/widgets/gimpitemtreeview.c
@@ -76,7 +76,6 @@ struct _GimpItemTreeViewPriv
GtkWidget *lock_content_toggle;
GtkWidget *lock_position_toggle;
- GtkWidget *edit_button;
GtkWidget *new_button;
GtkWidget *raise_button;
GtkWidget *lower_button;
@@ -267,7 +266,6 @@ gimp_item_tree_view_class_init (GimpItemTreeViewClass *klass)
klass->new_item = NULL;
klass->action_group = NULL;
- klass->edit_action = NULL;
klass->new_action = NULL;
klass->new_default_action = NULL;
klass->raise_action = NULL;
@@ -423,13 +421,6 @@ gimp_item_tree_view_constructed (GObject *object)
item_view_class->item_type,
GDK_ACTION_MOVE | GDK_ACTION_COPY);
- item_view->priv->edit_button =
- gimp_editor_add_action_button (editor, item_view_class->action_group,
- item_view_class->edit_action, NULL);
- gimp_container_view_enable_dnd (GIMP_CONTAINER_VIEW (item_view),
- GTK_BUTTON (item_view->priv->edit_button),
- item_view_class->item_type);
-
item_view->priv->new_button =
gimp_editor_add_action_button (editor, item_view_class->action_group,
item_view_class->new_action,
@@ -781,14 +772,6 @@ gimp_item_tree_view_get_new_button (GimpItemTreeView *view)
return view->priv->new_button;
}
-GtkWidget *
-gimp_item_tree_view_get_edit_button (GimpItemTreeView *view)
-{
- g_return_val_if_fail (GIMP_IS_ITEM_TREE_VIEW (view), NULL);
-
- return view->priv->edit_button;
-}
-
gint
gimp_item_tree_view_get_drop_index (GimpItemTreeView *view,
GimpViewable *dest_viewable,
diff --git a/app/widgets/gimpitemtreeview.h b/app/widgets/gimpitemtreeview.h
index 5bd43a6..19a39c1 100644
--- a/app/widgets/gimpitemtreeview.h
+++ b/app/widgets/gimpitemtreeview.h
@@ -81,7 +81,6 @@ struct _GimpItemTreeViewClass
/* action names */
const gchar *action_group;
const gchar *activate_action;
- const gchar *edit_action;
const gchar *new_action;
const gchar *new_default_action;
const gchar *raise_action;
@@ -123,7 +122,6 @@ void gimp_item_tree_view_add_options (GimpItemTreeView *view,
GtkWidget * gimp_item_tree_view_get_lock_box (GimpItemTreeView *view);
GtkWidget * gimp_item_tree_view_get_new_button (GimpItemTreeView *view);
-GtkWidget * gimp_item_tree_view_get_edit_button (GimpItemTreeView *view);
gint gimp_item_tree_view_get_drop_index (GimpItemTreeView *view,
GimpViewable *dest_viewable,
diff --git a/app/widgets/gimplayertreeview.c b/app/widgets/gimplayertreeview.c
index 0470f05..b06dd00 100644
--- a/app/widgets/gimplayertreeview.c
+++ b/app/widgets/gimplayertreeview.c
@@ -210,7 +210,6 @@ gimp_layer_tree_view_class_init (GimpLayerTreeViewClass *klass)
item_view_class->action_group = "layers";
item_view_class->activate_action = "layers-text-tool";
- item_view_class->edit_action = "layers-edit-attributes";
item_view_class->new_action = "layers-new";
item_view_class->new_default_action = "layers-new-last-values";
item_view_class->raise_action = "layers-raise";
@@ -374,13 +373,10 @@ gimp_layer_tree_view_constructed (GObject *object)
gimp_dnd_pixbuf_dest_add (GTK_WIDGET (tree_view->view),
NULL, tree_view);
- /* 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 (gimp_editor_get_button_box (GIMP_EDITOR (layer_view)),
- button, 2);
+ button, 1);
button = gimp_editor_add_action_button (GIMP_EDITOR (layer_view), "layers",
"layers-anchor", NULL);
@@ -388,7 +384,7 @@ gimp_layer_tree_view_constructed (GObject *object)
GTK_BUTTON (button),
GIMP_TYPE_LAYER);
gtk_box_reorder_child (gimp_editor_get_button_box (GIMP_EDITOR (layer_view)),
- button, 6);
+ button, 5);
button = gimp_editor_add_action_button (GIMP_EDITOR (layer_view), "layers",
"layers-mask-add-button",
@@ -565,7 +561,6 @@ gimp_layer_tree_view_select_item (GimpContainerView *view,
GimpViewable *item,
gpointer insert_data)
{
- GimpItemTreeView *item_view = GIMP_ITEM_TREE_VIEW (view);
GimpLayerTreeView *layer_view = GIMP_LAYER_TREE_VIEW (view);
gboolean success;
@@ -580,11 +575,6 @@ gimp_layer_tree_view_select_item (GimpContainerView *view,
gimp_layer_tree_view_update_options (layer_view, GIMP_LAYER (item));
gimp_layer_tree_view_update_menu (layer_view, GIMP_LAYER (item));
}
-
- if (! success || gimp_layer_is_floating_sel (GIMP_LAYER (item)))
- {
- gtk_widget_set_sensitive (gimp_item_tree_view_get_edit_button (item_view), FALSE);
- }
}
return success;
diff --git a/app/widgets/gimpvectorstreeview.c b/app/widgets/gimpvectorstreeview.c
index f2d8f77..e5df0e6 100644
--- a/app/widgets/gimpvectorstreeview.c
+++ b/app/widgets/gimpvectorstreeview.c
@@ -99,7 +99,6 @@ gimp_vectors_tree_view_class_init (GimpVectorsTreeViewClass *klass)
iv_class->action_group = "vectors";
iv_class->activate_action = "vectors-path-tool";
- iv_class->edit_action = "vectors-edit-attributes";
iv_class->new_action = "vectors-new";
iv_class->new_default_action = "vectors-new-last-values";
iv_class->raise_action = "vectors-raise";
@@ -145,9 +144,6 @@ gimp_vectors_tree_view_constructed (GObject *object)
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)));
-
view->toselection_button =
gimp_editor_add_action_button (editor, "vectors",
"vectors-selection-replace",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]