app/widgets/gimplayertreeview.c app/widgets/gimpvectorstreeview.c remove

2004-03-17  Simon Budig  <simon@gimp.org>

	* app/widgets/gimplayertreeview.c
	* app/widgets/gimpvectorstreeview.c
	* app/widgets/gimpdatafactoryview.c: remove basically useless
	edit buttons in the layers, vectors and patterns dialog.

	* app/widgets/gimpitemtreeview.c: Make Shift-Click on the "New"
	button create a new item using defaults.
This commit is contained in:
Simon Budig 2004-03-16 23:45:48 +00:00 committed by Simon Budig
parent b9c6ec61bf
commit 4aef30a5aa
5 changed files with 58 additions and 14 deletions

View File

@ -1,3 +1,13 @@
2004-03-17 Simon Budig <simon@gimp.org>
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c
* app/widgets/gimpdatafactoryview.c: remove basically useless
edit buttons in the layers, vectors and patterns dialog.
* app/widgets/gimpitemtreeview.c: Make Shift-Click on the "New"
button create a new item using defaults.
2004-03-16 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.c (gimp_drawable_set_tiles): ref new

View File

@ -210,13 +210,16 @@ gimp_data_factory_view_construct (GimpDataFactoryView *factory_view,
factory_view);
}
factory_view->edit_button =
gimp_editor_add_button (GIMP_EDITOR (editor->view),
GIMP_STOCK_EDIT,
_("Edit"), NULL,
G_CALLBACK (gimp_data_factory_view_edit_clicked),
NULL,
editor);
if (edit_func != NULL)
{
factory_view->edit_button =
gimp_editor_add_button (GIMP_EDITOR (editor->view),
GIMP_STOCK_EDIT,
_("Edit"), NULL,
G_CALLBACK (gimp_data_factory_view_edit_clicked),
NULL,
editor);
}
factory_view->new_button =
gimp_editor_add_button (GIMP_EDITOR (editor->view),
@ -257,9 +260,12 @@ gimp_data_factory_view_construct (GimpDataFactoryView *factory_view,
(GimpViewable *) gimp_context_get_by_type (context,
factory->container->children_type));
gimp_container_view_enable_dnd (editor->view,
GTK_BUTTON (factory_view->edit_button),
factory->container->children_type);
if (factory_view->edit_button)
{
gimp_container_view_enable_dnd (editor->view,
GTK_BUTTON (factory_view->edit_button),
factory->container->children_type);
}
gimp_container_view_enable_dnd (editor->view,
GTK_BUTTON (factory_view->duplicate_button),
factory->container->children_type);
@ -452,7 +458,9 @@ gimp_data_factory_view_select_item (GimpContainerEditor *editor,
delete_sensitive = data->deletable;
}
gtk_widget_set_sensitive (view->edit_button, edit_sensitive);
if (view->edit_button)
gtk_widget_set_sensitive (view->edit_button, edit_sensitive);
gtk_widget_set_sensitive (view->duplicate_button, duplicate_sensitive);
gtk_widget_set_sensitive (view->delete_button, delete_sensitive);
}

View File

@ -122,6 +122,10 @@ static void gimp_item_tree_view_edit_clicked (GtkWidget *widget,
static void gimp_item_tree_view_new_clicked (GtkWidget *widget,
GimpItemTreeView *view);
static void gimp_item_tree_view_new_extended_clicked
(GtkWidget *widget,
guint state,
GimpItemTreeView *view);
static void gimp_item_tree_view_new_dropped (GtkWidget *widget,
GimpViewable *viewable,
gpointer data);
@ -340,14 +344,20 @@ gimp_item_tree_view_init (GimpItemTreeView *view,
NULL,
view);
str = g_strdup_printf (_("%s\n"
"%s use defaults"),
view_class->new_desc,
gimp_get_mod_name_shift ());
view->new_button =
gimp_editor_add_button (editor,
GTK_STOCK_NEW, view_class->new_desc,
view_class->new_help_id,
GTK_STOCK_NEW, str, view_class->new_help_id,
G_CALLBACK (gimp_item_tree_view_new_clicked),
NULL,
G_CALLBACK (gimp_item_tree_view_new_extended_clicked),
view);
g_free (str);
str = g_strdup_printf (_("%s\n"
"%s To Top"),
view_class->raise_desc,
@ -1002,6 +1012,14 @@ gimp_item_tree_view_new_clicked (GtkWidget *widget,
view->new_item_func (view->gimage, NULL, TRUE, GTK_WIDGET (view));
}
static void
gimp_item_tree_view_new_extended_clicked (GtkWidget *widget,
guint state,
GimpItemTreeView *view)
{
view->new_item_func (view->gimage, NULL, FALSE, GTK_WIDGET (view));
}
static void
gimp_item_tree_view_new_dropped (GtkWidget *widget,
GimpViewable *viewable,

View File

@ -312,6 +312,10 @@ gimp_layer_tree_view_init (GimpLayerTreeView *view)
G_CALLBACK (gimp_layer_tree_view_opacity_scale_changed),
view);
/* Hide basically useless Edit button */
gtk_widget_hide (GIMP_ITEM_TREE_VIEW (view)->edit_button);
/* Anchor button */
view->anchor_button =

View File

@ -153,6 +153,10 @@ gimp_vectors_tree_view_init (GimpVectorsTreeView *view)
editor = GIMP_EDITOR (view);
/* Hide basically useless Edit button */
gtk_widget_hide (GIMP_ITEM_TREE_VIEW (view)->edit_button);
str = g_strdup_printf (_("Path to Selection\n"
"%s Add\n"
"%s Subtract\n"