app/Makefile.am po/POTFILES.in app/brushes.[ch] app/gradients.[ch]

2001-02-14  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am
	* po/POTFILES.in
	* app/brushes.[ch]
	* app/gradients.[ch]
	* app/palettes.[ch]
	* app/patterns.[ch]: removed.

	* app/gimpdatafactory.[ch]: completely manage the data lists,
	including loading with different callbacks per extension.

	* app/gimpdatafactoryview.[ch]: enabled "new", "edit", "delete"
	and "refresh".

	* app/context_manager.c: initisalize the data factories.

	* app/gimpcontext.c: fixed some bad bugs introduced yesterday.

	* app/gradient_editor.[ch]: removed the public "create" function
	and create the editor implicitly on "set_gradient"

	* app/app_procs.c
	* app/apptypes.h
	* app/brush_edit.h
	* app/brush_select.c
	* app/commands.c
	* app/convert.c
	* app/devices.c
	* app/gimpbrushpipe.c
	* app/gimpcontainerview.h
	* app/gimpgradient.c
	* app/gimppattern.c
	* app/gradient_select.c
	* app/palette.c
	* app/pattern_select.c
	* app/pdb/brush_select_cmds.c
	* app/pdb/brushes_cmds.c
	* app/pdb/convert_cmds.c
	* app/pdb/gradient_select_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/palette_cmds.c
	* app/pdb/pattern_select_cmds.c
	* app/pdb/patterns_cmds.c
	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/convert.pdb
	* tools/pdbgen/pdb/gradient_select.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/palette.pdb
	* tools/pdbgen/pdb/pattern_select.pdb
	* tools/pdbgen/pdb/patterns.pdb: um, much stuff, mostly "changed
	accordingly" ;-)
This commit is contained in:
Michael Natterer
2001-02-14 01:42:12 +00:00
committed by Michael Natterer
parent a16b420306
commit a97e433ba2
80 changed files with 888 additions and 723 deletions

View File

@ -77,7 +77,6 @@
#include "gimplist.h"
#include "gimprc.h"
#include "gradient_editor.h"
#include "gradients.h"
#include "libgimp/gimpenv.h"
#include "libgimp/gimplimits.h"
@ -237,6 +236,8 @@ typedef struct
/***** Local functions *****/
static void gradient_editor_create (void);
static void gradient_editor_drop_gradient (GtkWidget *widget,
GimpViewable *viewable,
gpointer data);
@ -530,9 +531,35 @@ static void seg_get_closest_handle (GimpGradient *grad,
static GradientEditor *g_editor = NULL;
/***** Public gradient editor functions *****/
void
gradient_editor_set_gradient (GimpGradient *gradient)
{
if (! g_editor)
gradient_editor_create ();
if (gimp_container_have (global_gradient_factory->container,
GIMP_OBJECT (gradient)))
{
gimp_context_set_gradient (g_editor->context, gradient);
}
if (! GTK_WIDGET_VISIBLE (g_editor->shell))
gtk_widget_show (g_editor->shell);
else
gdk_window_raise (g_editor->shell->window);
}
void
gradient_editor_free (void)
{
}
/***** The main gradient editor dialog *****/
void
static void
gradient_editor_create (void)
{
GtkWidget *vbox;
@ -544,14 +571,7 @@ gradient_editor_create (void)
/* If the editor already exists, just show it */
if (g_editor)
{
if (! GTK_WIDGET_VISIBLE (g_editor->shell))
gtk_widget_show (g_editor->shell);
else
gdk_window_raise (g_editor->shell->window);
return;
}
return;
g_editor = g_new (GradientEditor, 1);
@ -855,24 +875,6 @@ gradient_editor_create (void)
gtk_widget_show (g_editor->shell);
}
void
gradient_editor_free (void)
{
}
void
gradient_editor_set_gradient (GimpGradient *gradient)
{
if (gimp_container_have (global_gradient_factory->container,
GIMP_OBJECT (gradient)) &&
g_editor)
{
gimp_context_set_gradient (g_editor->context, gradient);
}
}
/***** Gradient editor functions *****/
static void
gradient_editor_drop_gradient (GtkWidget *widget,
GimpViewable *viewable,
@ -886,7 +888,7 @@ gradient_editor_gradient_changed (GimpContext *context,
GimpGradient *gradient,
gpointer data)
{
preview_update (TRUE);
ed_update_editor (GRAD_UPDATE_PREVIEW | GRAD_RESET_CONTROL);
}
/*****/
@ -913,8 +915,6 @@ ed_update_editor (int flags)
control_update (gradient, TRUE);
}
/*****/
static GtkWidget *
ed_create_button (gchar *label,
gchar *help_data,
@ -944,8 +944,6 @@ ed_set_hint (gchar *str)
gtk_label_set_text (GTK_LABEL (g_editor->hint_label), str);
}
/*****/
static void
ed_initialize_saved_colors (void)
{
@ -1375,7 +1373,7 @@ static void
ed_refresh_grads_callback (GtkWidget *widget,
gpointer data)
{
gradients_init (FALSE);
gimp_data_factory_data_init (global_gradient_factory, FALSE);
if (! gimp_container_num_children (global_gradient_factory->container))
{