GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 96a27b59 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/actions/brushes-actions.c app/actions/gradients-actions.c

2004-09-27  Michael Natterer  <mitch@gimp.org>

	* app/actions/brushes-actions.c
	* app/actions/gradients-actions.c
	* app/actions/palettes-actions.c
	* app/actions/patterns-actions.c: made the "foo-edit" actions
	GimpStringActions and pass the identifier of the editor dialog
	to the callback.

	* app/actions/data-commands.[ch] (data_edit_data_cmd_callback):
	show the editor dialog here instead of calling view->edit_func().

	* app/dialogs/dialogs-constructors.[ch]: removed the brush,
	gradient and palette edit_funcs.

	* app/widgets/widgets-types.h: removed typedef GimpDataEditFunc.

	* app/widgets/gimpdatafactoryview.[ch]: removed the edit_func
	member and parameters and create the edit button unconditionally.

	* app/widgets/gimpbrushfactoryview.[ch]
	* app/widgets/gimppatternfactoryview.[ch]: changed accordingly.

	* app/widgets/Makefile.am
	* app/widgets/gimpdataselect.[ch]: removed this class, it's not
	needed any longer.

	* app/widgets/gimpbrushselect.[ch]
	* app/widgets/gimpgradientselect.[ch]
	* app/widgets/gimppaletteselect.[ch]
	* app/widgets/gimppatternselect.[ch]: derive them from GimpPdbDialog
	and follow the edit_func removal.

	* app/gui/gui-vtable.c (gui_pdb_dialog_new): removed edit_func
	stuff.

	* app/widgets/gimpcontainereditor.c: minor unrelated cleanup.
parent f097d886
2004-09-27 Michael Natterer <mitch@gimp.org>
* app/actions/brushes-actions.c
* app/actions/gradients-actions.c
* app/actions/palettes-actions.c
* app/actions/patterns-actions.c: made the "foo-edit" actions
GimpStringActions and pass the identifier of the editor dialog
to the callback.
* app/actions/data-commands.[ch] (data_edit_data_cmd_callback):
show the editor dialog here instead of calling view->edit_func().
* app/dialogs/dialogs-constructors.[ch]: removed the brush,
gradient and palette edit_funcs.
* app/widgets/widgets-types.h: removed typedef GimpDataEditFunc.
* app/widgets/gimpdatafactoryview.[ch]: removed the edit_func
member and parameters and create the edit button unconditionally.
* app/widgets/gimpbrushfactoryview.[ch]
* app/widgets/gimppatternfactoryview.[ch]: changed accordingly.
* app/widgets/Makefile.am
* app/widgets/gimpdataselect.[ch]: removed this class, it's not
needed any longer.
* app/widgets/gimpbrushselect.[ch]
* app/widgets/gimpgradientselect.[ch]
* app/widgets/gimppaletteselect.[ch]
* app/widgets/gimppatternselect.[ch]: derive them from GimpPdbDialog
and follow the edit_func removal.
* app/gui/gui-vtable.c (gui_pdb_dialog_new): removed edit_func
stuff.
* app/widgets/gimpcontainereditor.c: minor unrelated cleanup.
2004-09-27 Michael Natterer <mitch@gimp.org>
* app/dialogs/dialogs-constrcutors.[ch]: renamed some constructors
......
......@@ -43,12 +43,6 @@ static GimpActionEntry brushes_actions[] =
{ "brushes-popup", GIMP_STOCK_BRUSH, N_("Brushes Menu"), NULL, NULL, NULL,
GIMP_HELP_BRUSH_DIALOG },
{ "brushes-edit", GIMP_STOCK_EDIT,
N_("_Edit Brush..."), NULL,
N_("Edit brush"),
G_CALLBACK (data_edit_data_cmd_callback),
GIMP_HELP_BRUSH_EDIT },
{ "brushes-new", GTK_STOCK_NEW,
N_("New Brush"), "",
N_("New brush"),
......@@ -74,6 +68,15 @@ static GimpActionEntry brushes_actions[] =
GIMP_HELP_BRUSH_REFRESH }
};
static GimpStringActionEntry brushes_edit_actions[] =
{
{ "brushes-edit", GIMP_STOCK_EDIT,
N_("_Edit Brush..."), NULL,
N_("Edit brush"),
"gimp-brush-editor",
GIMP_HELP_BRUSH_EDIT }
};
void
brushes_actions_setup (GimpActionGroup *group)
......@@ -81,6 +84,11 @@ brushes_actions_setup (GimpActionGroup *group)
gimp_action_group_add_actions (group,
brushes_actions,
G_N_ELEMENTS (brushes_actions));
gimp_action_group_add_string_actions (group,
brushes_edit_actions,
G_N_ELEMENTS (brushes_edit_actions),
G_CALLBACK (data_edit_data_cmd_callback));
}
void
......
......@@ -30,7 +30,11 @@
#include "core/gimpdatafactory.h"
#include "widgets/gimpcontainerview.h"
#include "widgets/gimpdataeditor.h"
#include "widgets/gimpdatafactoryview.h"
#include "widgets/gimpdialogfactory.h"
#include "dialogs/dialogs.h"
#include "actions.h"
#include "data-commands.h"
......@@ -38,28 +42,6 @@
#include "gimp-intl.h"
void
data_edit_data_cmd_callback (GtkAction *action,
gpointer user_data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
GimpContext *context;
GimpData *data;
context = gimp_container_view_get_context (GIMP_CONTAINER_EDITOR (view)->view);
data = (GimpData *)
gimp_context_get_by_type (context,
view->factory->container->children_type);
if (view->data_edit_func && data &&
gimp_container_have (view->factory->container,
GIMP_OBJECT (data)))
{
view->data_edit_func (data, GTK_WIDGET (view));
}
}
void
data_new_data_cmd_callback (GtkAction *action,
gpointer user_data)
......@@ -206,3 +188,32 @@ data_refresh_data_cmd_callback (GtkAction *action,
gimp_data_factory_data_save (view->factory);
gimp_data_factory_data_init (view->factory, FALSE);
}
void
data_edit_data_cmd_callback (GtkAction *action,
const gchar *value,
gpointer user_data)
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
GimpContext *context;
GimpData *data;
context = gimp_container_view_get_context (GIMP_CONTAINER_EDITOR (view)->view);
data = (GimpData *)
gimp_context_get_by_type (context,
view->factory->container->children_type);
if (data && gimp_container_have (view->factory->container,
GIMP_OBJECT (data)))
{
GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (view));
GtkWidget *dockable;
dockable = gimp_dialog_factory_dialog_raise (global_dock_factory, screen,
value, -1);
gimp_data_editor_set_data (GIMP_DATA_EDITOR (GTK_BIN (dockable)->child),
data);
}
}
......@@ -20,16 +20,17 @@
#define __DATA_COMMANDS_H__
void data_new_data_cmd_callback (GtkAction *action,
gpointer data);
void data_duplicate_data_cmd_callback (GtkAction *action,
gpointer data);
void data_edit_data_cmd_callback (GtkAction *action,
gpointer data);
void data_delete_data_cmd_callback (GtkAction *action,
gpointer data);
void data_refresh_data_cmd_callback (GtkAction *action,
gpointer data);
void data_new_data_cmd_callback (GtkAction *action,
gpointer data);
void data_duplicate_data_cmd_callback (GtkAction *action,
gpointer data);
void data_delete_data_cmd_callback (GtkAction *action,
gpointer data);
void data_refresh_data_cmd_callback (GtkAction *action,
gpointer data);
void data_edit_data_cmd_callback (GtkAction *action,
const gchar *value,
gpointer data);
#endif /* __DATA_COMMANDS_H__ */
......@@ -44,12 +44,6 @@ static GimpActionEntry gradients_actions[] =
NULL, NULL, NULL,
GIMP_HELP_GRADIENT_DIALOG },
{ "gradients-edit", GIMP_STOCK_EDIT,
N_("_Edit Gradient..."), NULL,
N_("Edit gradient"),
G_CALLBACK (data_edit_data_cmd_callback),
GIMP_HELP_GRADIENT_EDIT },
{ "gradients-new", GTK_STOCK_NEW,
N_("_New Gradient"), "",
N_("New gradient"),
......@@ -81,6 +75,15 @@ static GimpActionEntry gradients_actions[] =
GIMP_HELP_GRADIENT_REFRESH }
};
static GimpStringActionEntry gradients_edit_actions[] =
{
{ "gradients-edit", GIMP_STOCK_EDIT,
N_("_Edit Gradient..."), NULL,
N_("Edit gradient"),
"gimp-gradient-editor",
GIMP_HELP_GRADIENT_EDIT }
};
void
gradients_actions_setup (GimpActionGroup *group)
......@@ -88,6 +91,11 @@ gradients_actions_setup (GimpActionGroup *group)
gimp_action_group_add_actions (group,
gradients_actions,
G_N_ELEMENTS (gradients_actions));
gimp_action_group_add_string_actions (group,
gradients_edit_actions,
G_N_ELEMENTS (gradients_edit_actions),
G_CALLBACK (data_edit_data_cmd_callback));
}
void
......
......@@ -43,12 +43,6 @@ static GimpActionEntry palettes_actions[] =
{ "palettes-popup", GIMP_STOCK_PALETTE, N_("Palettes Menu"), NULL, NULL, NULL,
GIMP_HELP_PALETTE_DIALOG },
{ "palettes-edit", GIMP_STOCK_EDIT,
N_("_Edit Palette..."), NULL,
N_("Edit palette"),
G_CALLBACK (data_edit_data_cmd_callback),
GIMP_HELP_PALETTE_EDIT },
{ "palettes-new", GTK_STOCK_NEW,
N_("_New Palette"), "",
N_("New palette"),
......@@ -86,6 +80,15 @@ static GimpActionEntry palettes_actions[] =
GIMP_HELP_PALETTE_REFRESH }
};
static GimpStringActionEntry palettes_edit_actions[] =
{
{ "palettes-edit", GIMP_STOCK_EDIT,
N_("_Edit Palette..."), NULL,
N_("Edit palette"),
"gimp-palette-editor",
GIMP_HELP_PALETTE_EDIT }
};
void
palettes_actions_setup (GimpActionGroup *group)
......@@ -93,6 +96,11 @@ palettes_actions_setup (GimpActionGroup *group)
gimp_action_group_add_actions (group,
palettes_actions,
G_N_ELEMENTS (palettes_actions));
gimp_action_group_add_string_actions (group,
palettes_edit_actions,
G_N_ELEMENTS (palettes_edit_actions),
G_CALLBACK (data_edit_data_cmd_callback));
}
void
......
......@@ -42,12 +42,6 @@ static GimpActionEntry patterns_actions[] =
{ "patterns-popup", GIMP_STOCK_PATTERN, N_("Patterns Menu"), NULL, NULL, NULL,
GIMP_HELP_PATTERN_DIALOG },
{ "patterns-edit", GIMP_STOCK_EDIT,
N_("_Edit Pattern..."), NULL,
N_("Edit pattern"),
G_CALLBACK (data_edit_data_cmd_callback),
GIMP_HELP_PATTERN_EDIT },
{ "patterns-new", GTK_STOCK_NEW,
N_("_New Pattern"), "",
N_("New pattern"),
......@@ -73,6 +67,15 @@ static GimpActionEntry patterns_actions[] =
GIMP_HELP_PATTERN_REFRESH }
};
static GimpStringActionEntry patterns_edit_actions[] =
{
{ "patterns-edit", GIMP_STOCK_EDIT,
N_("_Edit Pattern..."), NULL,
N_("Edit pattern"),
"gimp-pattern-editor",
GIMP_HELP_PATTERN_EDIT }
};
void
patterns_actions_setup (GimpActionGroup *group)
......@@ -80,6 +83,11 @@ patterns_actions_setup (GimpActionGroup *group)
gimp_action_group_add_actions (group,
patterns_actions,
G_N_ELEMENTS (patterns_actions));
gimp_action_group_add_string_actions (group,
patterns_edit_actions,
G_N_ELEMENTS (patterns_edit_actions),
G_CALLBACK (data_edit_data_cmd_callback));
}
void
......
......@@ -286,7 +286,6 @@ dialogs_brush_list_view_new (GimpDialogFactory *factory,
{
return gimp_brush_factory_view_new (GIMP_VIEW_TYPE_LIST,
context->gimp->brush_factory,
dialogs_edit_brush_func,
context,
TRUE,
preview_size, 1,
......@@ -300,7 +299,6 @@ dialogs_pattern_list_view_new (GimpDialogFactory *factory,
{
return gimp_pattern_factory_view_new (GIMP_VIEW_TYPE_LIST,
context->gimp->pattern_factory,
NULL,
context,
preview_size, 1,
factory->menu_factory);
......@@ -313,7 +311,6 @@ dialogs_gradient_list_view_new (GimpDialogFactory *factory,
{
return gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
context->gimp->gradient_factory,
dialogs_edit_gradient_func,
context,
preview_size, 1,
factory->menu_factory, "<Gradients>",
......@@ -328,7 +325,6 @@ dialogs_palette_list_view_new (GimpDialogFactory *factory,
{
return gimp_data_factory_view_new (GIMP_VIEW_TYPE_LIST,
context->gimp->palette_factory,
dialogs_edit_palette_func,
context,
preview_size, 1,
factory->menu_factory, "<Palettes>",
......@@ -418,7 +414,6 @@ dialogs_brush_grid_view_new (GimpDialogFactory *factory,
{
return gimp_brush_factory_view_new (GIMP_VIEW_TYPE_GRID,
context->gimp->brush_factory,
dialogs_edit_brush_func,
context,
TRUE,
preview_size, 1,
......@@ -432,7 +427,6 @@ dialogs_pattern_grid_view_new (GimpDialogFactory *factory,
{
return gimp_pattern_factory_view_new (GIMP_VIEW_TYPE_GRID,
context->gimp->pattern_factory,
NULL,
context,
preview_size, 1,
factory->menu_factory);
......@@ -445,7 +439,6 @@ dialogs_gradient_grid_view_new (GimpDialogFactory *factory,
{
return gimp_data_factory_view_new (GIMP_VIEW_TYPE_GRID,
context->gimp->gradient_factory,
dialogs_edit_gradient_func,
context,
preview_size, 1,
factory->menu_factory, "<Gradients>",
......@@ -460,7 +453,6 @@ dialogs_palette_grid_view_new (GimpDialogFactory *factory,
{
return gimp_data_factory_view_new (GIMP_VIEW_TYPE_GRID,
context->gimp->palette_factory,
dialogs_edit_palette_func,
context,
preview_size, 1,
factory->menu_factory, "<Palettes>",
......@@ -659,8 +651,6 @@ dialogs_color_editor_new (GimpDialogFactory *factory,
/***** editors *****/
/*********************/
/* the brush editor */
GtkWidget *
dialogs_brush_editor_get (GimpDialogFactory *factory,
GimpContext *context,
......@@ -669,24 +659,6 @@ dialogs_brush_editor_get (GimpDialogFactory *factory,
return gimp_brush_editor_new (context->gimp);
}
void
dialogs_edit_brush_func (GimpData *data,
GtkWidget *parent)
{
GtkWidget *dockable;
dockable = gimp_dialog_factory_dialog_raise (global_dock_factory,
gtk_widget_get_screen (parent),
"gimp-brush-editor",
-1);
gimp_data_editor_set_data (GIMP_DATA_EDITOR (GTK_BIN (dockable)->child),
data);
}
/* the gradient editor */
GtkWidget *
dialogs_gradient_editor_get (GimpDialogFactory *factory,
GimpContext *context,
......@@ -696,24 +668,6 @@ dialogs_gradient_editor_get (GimpDialogFactory *factory,
factory->menu_factory);
}
void
dialogs_edit_gradient_func (GimpData *data,
GtkWidget *parent)
{
GtkWidget *dockable;
dockable = gimp_dialog_factory_dialog_raise (global_dock_factory,
gtk_widget_get_screen (parent),
"gimp-gradient-editor",
-1);
gimp_data_editor_set_data (GIMP_DATA_EDITOR (GTK_BIN (dockable)->child),
data);
}
/* the palette editor */
GtkWidget *
dialogs_palette_editor_get (GimpDialogFactory *factory,
GimpContext *context,
......@@ -723,21 +677,6 @@ dialogs_palette_editor_get (GimpDialogFactory *factory,
factory->menu_factory);
}
void
dialogs_edit_palette_func (GimpData *data,
GtkWidget *parent)
{
GtkWidget *dockable;
dockable = gimp_dialog_factory_dialog_raise (global_dock_factory,
gtk_widget_get_screen (parent),
"gimp-palette-editor",
-1);
gimp_data_editor_set_data (GIMP_DATA_EDITOR (GTK_BIN (dockable)->child),
data);
}
/* private functions */
......
......@@ -179,20 +179,12 @@ GtkWidget * dialogs_color_editor_new (GimpDialogFactory *factory,
GtkWidget * dialogs_brush_editor_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size);
void dialogs_edit_brush_func (GimpData *data,
GtkWidget *parent);
GtkWidget * dialogs_gradient_editor_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size);
void dialogs_edit_gradient_func (GimpData *data,
GtkWidget *parent);
GtkWidget * dialogs_palette_editor_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size);
void dialogs_edit_palette_func (GimpData *data,
GtkWidget *parent);
#endif /* __DIALOGS_CONSTRUCTORS_H__ */
......@@ -69,7 +69,6 @@
#include "menus/plug-in-menus.h"
#include "dialogs/dialogs.h"
#include "dialogs/dialogs-constructors.h"
#include "themes.h"
......@@ -462,17 +461,15 @@ gui_pdb_dialog_new (Gimp *gimp,
const gchar *object_name,
va_list args)
{
GType dialog_type = G_TYPE_NONE;
const gchar *dialog_role = NULL;
const gchar *help_id = NULL;
GimpDataEditFunc edit_func = NULL;
GType dialog_type = G_TYPE_NONE;
const gchar *dialog_role = NULL;
const gchar *help_id = NULL;
if (container->children_type == GIMP_TYPE_BRUSH)
{
dialog_type = GIMP_TYPE_BRUSH_SELECT;
dialog_role = "gimp-brush-selection";
help_id = GIMP_HELP_BRUSH_DIALOG;
edit_func = dialogs_edit_brush_func;
}
else if (container->children_type == GIMP_TYPE_FONT)
{
......@@ -485,14 +482,12 @@ gui_pdb_dialog_new (Gimp *gimp,
dialog_type = GIMP_TYPE_GRADIENT_SELECT;
dialog_role = "gimp-gradient-selection";
help_id = GIMP_HELP_GRADIENT_DIALOG;
edit_func = dialogs_edit_gradient_func;
}
else if (container->children_type == GIMP_TYPE_PALETTE)
{
dialog_type = GIMP_TYPE_PALETTE_SELECT;
dialog_role = "gimp-palette-selection";
help_id = GIMP_HELP_PALETTE_DIALOG;
edit_func = dialogs_edit_palette_func;
}
else if (container->children_type == GIMP_TYPE_PATTERN)
{
......@@ -544,11 +539,6 @@ gui_pdb_dialog_new (Gimp *gimp,
"menu-factory", global_menu_factory,
NULL);
if (edit_func)
params = gimp_parameters_append (dialog_type, params, &n_params,
"edit-func", edit_func,
NULL);
params = gimp_parameters_append_valist (dialog_type,
params, &n_params,
args);
......
......@@ -97,8 +97,6 @@ libappwidgets_a_sources = \
gimpdataeditor.h \
gimpdatafactoryview.c \
gimpdatafactoryview.h \
gimpdataselect.c \
gimpdataselect.h \
gimpdeviceinfo.c \
gimpdeviceinfo.h \
gimpdevices.c \
......
......@@ -148,14 +148,13 @@ gimp_brush_factory_view_destroy (GtkObject *object)
}
GtkWidget *
gimp_brush_factory_view_new (GimpViewType view_type,
GimpDataFactory *factory,
GimpDataEditFunc edit_func,
GimpContext *context,
gboolean change_brush_spacing,
gint view_size,
gint view_border_width,
GimpMenuFactory *menu_factory)
gimp_brush_factory_view_new (GimpViewType view_type,
GimpDataFactory *factory,
GimpContext *context,
gboolean change_brush_spacing,
gint view_size,
gint view_border_width,
GimpMenuFactory *menu_factory)
{
GimpBrushFactoryView *factory_view;
GimpContainerEditor *editor;
......@@ -174,7 +173,6 @@ gimp_brush_factory_view_new (GimpViewType view_type,
if (! gimp_data_factory_view_construct (GIMP_DATA_FACTORY_VIEW (factory_view),
view_type,
factory,
edit_func,
context,
view_size, view_border_width,
menu_factory, "<Brushes>",
......
......@@ -54,14 +54,13 @@ struct _GimpBrushFactoryViewClass
GType gimp_brush_factory_view_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_brush_factory_view_new (GimpViewType view_type,
GimpDataFactory *factory,
GimpDataEditFunc edit_func,
GimpContext *context,
gboolean change_brush_spacing,
gint preview_size,
gint preview_border_width,
GimpMenuFactory *menu_factory);
GtkWidget * gimp_brush_factory_view_new (GimpViewType view_type,
GimpDataFactory *factory,
GimpContext *context,
gboolean change_brush_spacing,
gint preview_size,
gint preview_border_width,
GimpMenuFactory *menu_factory);
#endif /* __GIMP_BRUSH_FACTORY_VIEW_H__ */
......@@ -82,7 +82,7 @@ static void gimp_brush_select_spacing_update (GtkAdjustment *adj,
GimpBrushSelect *select);
static GimpDataSelectClass *parent_class = NULL;
static GimpPdbDialogClass *parent_class = NULL;
GType
......@@ -105,7 +105,7 @@ gimp_brush_select_get_type (void)
NULL /* instance_init */
};
dialog_type = g_type_register_static (GIMP_TYPE_DATA_SELECT,
dialog_type = g_type_register_static (GIMP_TYPE_PDB_DIALOG,
"GimpBrushSelect",
&dialog_info, 0);
}
......@@ -177,7 +177,6 @@ gimp_brush_select_constructor (GType type,
dialog->view =
gimp_brush_factory_view_new (GIMP_VIEW_TYPE_GRID,
dialog->context->gimp->brush_factory,
GIMP_DATA_SELECT (dialog)->edit_func,
dialog->context,
FALSE,
GIMP_VIEW_SIZE_MEDIUM, 1,
......
......@@ -22,7 +22,7 @@
#ifndef __GIMP_BRUSH_SELECT_H__
#define __GIMP_BRUSH_SELECT_H__
#include "gimpdataselect.h"
#include "gimppdbdialog.h"
G_BEGIN_DECLS
......@@ -39,7 +39,7 @@ typedef struct _GimpBrushSelectClass GimpBrushSelectClass;
struct _GimpBrushSelect
{
GimpDataSelect parent_instance;
GimpPdbDialog parent_instance;
gdouble initial_opacity;
GimpLayerModeEffects initial_mode;
......@@ -51,7 +51,7 @@ struct _GimpBrushSelect
struct _GimpBrushSelectClass
{
GimpDataSelectClass parent_class;
GimpPdbDialogClass parent_class;
};
......
......@@ -229,7 +229,8 @@ gimp_container_editor_select_item (GtkWidget *widget,
klass->select_item (editor, viewable);
if (GIMP_EDITOR (editor->view)->ui_manager)
gimp_ui_manager_update (GIMP_EDITOR (editor->view)->ui_manager, editor);
gimp_ui_manager_update (GIMP_EDITOR (editor->view)->ui_manager,
GIMP_EDITOR (editor->view)->popup_data);
return TRUE;
}
......
......@@ -113,7 +113,6 @@ gimp_data_factory_view_init (GimpDataFactoryView *view)
GtkWidget *
gimp_data_factory_view_new (GimpViewType view_type,
GimpDataFactory *factory,
GimpDataEditFunc edit_func,
GimpContext *context,
gint preview_size,
gint preview_border_width,
......@@ -129,7 +128,6 @@ gimp_data_factory_view_new (GimpViewType view_type,
if (! gimp_data_factory_view_construct (factory_view,
view_type,
factory,
edit_func,
context,
preview_size,
preview_border_width,
......@@ -149,7 +147,6 @@ gboolean
gimp_data_factory_view_construct (GimpDataFactoryView *factory_view,
GimpViewType view_type,
GimpDataFactory *factory,
GimpDataEditFunc edit_func,
GimpContext *context,
gint preview_size,
gint preview_border_width,
......@@ -169,8 +166,7 @@ gimp_data_factory_view_construct (GimpDataFactoryView *factory_view,
preview_border_width <= GIMP_VIEW_MAX_BORDER_WIDTH,
FALSE);
factory_view->factory = factory;
factory_view->data_edit_func = edit_func;
factory_view->factory = factory;
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (factory_view),
view_type,
......@@ -201,57 +197,42 @@ gimp_data_factory_view_construct (GimpDataFactoryView *factory_view,
factory_view);
}
if (edit_func)
{
str = g_strdup_printf ("%s-edit", action_group);
factory_view->edit_button =
gimp_editor_add_action_button (GIMP_EDITOR (editor->view), action_group,
str, NULL);
g_free (str);
}