don't add the open-as-image button to all data factory views.

2007-01-22  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdatafactoryview.c: don't add the open-as-image
	button to all data factory views.

	* app/widgets/gimppatternfactoryview.c: but do it here for the
	Pattern dialog.


svn path=/trunk/; revision=21755
This commit is contained in:
Sven Neumann 2007-01-22 16:55:39 +00:00 committed by Sven Neumann
parent f44e3986db
commit 0e55a7f5f7
3 changed files with 16 additions and 9 deletions

View File

@ -1,3 +1,11 @@
2007-01-22 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdatafactoryview.c: don't add the open-as-image
button to all data factory views.
* app/widgets/gimppatternfactoryview.c: but do it here for the
Pattern dialog.
2007-01-22 Michael Schumacher <schumaml@cvs.gnome.org>
* plug-ins/script-fu/scripts/guides-new-percent.scm: replaced

View File

@ -175,15 +175,6 @@ gimp_data_factory_view_construct (GimpDataFactoryView *factory_view,
str, NULL);
g_free (str);
str = g_strdup_printf ("%s-open-as-image", action_group);
if (gimp_ui_manager_find_action (GIMP_EDITOR (editor->view)->ui_manager,
action_group, str))
{
gimp_editor_add_action_button (GIMP_EDITOR (editor->view), action_group,
str, NULL);
}
g_free (str);
if (factory_view->factory->data_new_func)
{
str = g_strdup_printf ("%s-new", action_group);

View File

@ -32,6 +32,7 @@
#include "core/gimpviewable.h"
#include "gimpcontainerview.h"
#include "gimpeditor.h"
#include "gimppatternfactoryview.h"
#include "gimpviewrenderer.h"
@ -59,6 +60,7 @@ gimp_pattern_factory_view_new (GimpViewType view_type,
GimpMenuFactory *menu_factory)
{
GimpPatternFactoryView *factory_view;
GimpContainerEditor *editor;
g_return_val_if_fail (GIMP_IS_DATA_FACTORY (factory), NULL);
g_return_val_if_fail (view_size > 0 &&
@ -82,6 +84,12 @@ gimp_pattern_factory_view_new (GimpViewType view_type,
return NULL;
}
editor = GIMP_CONTAINER_EDITOR (factory_view);
gimp_editor_add_action_button (GIMP_EDITOR (editor->view),
"patterns", "patterns-open-as-image",
NULL);
gtk_widget_hide (GIMP_DATA_FACTORY_VIEW (factory_view)->edit_button);
gtk_widget_hide (GIMP_DATA_FACTORY_VIEW (factory_view)->duplicate_button);