Commit d6a2d391 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

took gimpcontextpreview.[ch] out of the build but still left the sources

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

	* app/Makefile.am: took gimpcontextpreview.[ch] out of the build
	but still left the sources there as reference.

	* app/app_procs.c: initialize the render stuff before creating the
	toolbox (needed for the previews).

	* app/devices.c
	* app/indicator_area.c: use GimpPreviews instead of
	GimpContextPreviews.

	* app/context_manager.[ch]: create the global data lists here
	because they now must exist before any context is created.

	* app/brushes.[ch]
	* app/gradients.[ch]
	* app/palettes.[ch]
	* app/patterns.[ch]: removed them here.

	* app/gimpcontainer.[ch]: added a "freeze_count" and emit the
	"freeze" and "thaw" signals accordingly.

	* app/gimpcontext.[ch]: greatly simplified the way how the
	contexts connect to the data lists (simply keep them connected all
	the time). Also removed all those ugly explicit update functions
	because "thaw" callbacks do this job now.

	* app/gimpdata.c: a GimpData object now becomes dirty on
	"name_changed"; "dirty" now triggers "invalidate_preview" because
	the context does not dispatch these signals any more soon.

	* app/brush_select.c
	* app/convert.c
	* app/gimpdnd.c
	* app/gradient_editor.c
	* app/gradient_select.c
	* app/pattern_select.c
	* app/gradient_editor.c
	* app/gradient_select.c
	* app/gradients.[ch]
	* 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/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/pattern_select.pdb
	* tools/pdbgen/pdb/patterns.pdb: changed accordingly.
parent 6fc9702b
2001-02-12 Michael Natterer <mitch@gimp.org>
* app/Makefile.am: took gimpcontextpreview.[ch] out of the build
but still left the sources there as reference.
* app/app_procs.c: initialize the render stuff before creating the
toolbox (needed for the previews).
* app/devices.c
* app/indicator_area.c: use GimpPreviews instead of
GimpContextPreviews.
* app/context_manager.[ch]: create the global data lists here
because they now must exist before any context is created.
* app/brushes.[ch]
* app/gradients.[ch]
* app/palettes.[ch]
* app/patterns.[ch]: removed them here.
* app/gimpcontainer.[ch]: added a "freeze_count" and emit the
"freeze" and "thaw" signals accordingly.
* app/gimpcontext.[ch]: greatly simplified the way how the
contexts connect to the data lists (simply keep them connected all
the time). Also removed all those ugly explicit update functions
because "thaw" callbacks do this job now.
* app/gimpdata.c: a GimpData object now becomes dirty on
"name_changed"; "dirty" now triggers "invalidate_preview" because
the context does not dispatch these signals any more soon.
* app/brush_select.c
* app/convert.c
* app/gimpdnd.c
* app/gradient_editor.c
* app/gradient_select.c
* app/pattern_select.c
* app/gradient_editor.c
* app/gradient_select.c
* app/gradients.[ch]
* 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/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/pattern_select.pdb
* tools/pdbgen/pdb/patterns.pdb: changed accordingly.
2001-02-11 Michael Natterer <mitch@gimp.org>
* app/apptypes.h: added the datafile loader_func typedefs.
......
......@@ -114,8 +114,6 @@ gimp_SOURCES = \
gimpcontainer.h \
gimpcontext.c \
gimpcontext.h \
gimpcontextpreview.c \
gimpcontextpreview.h \
gimpdata.c \
gimpdata.h \
gimpdatalist.c \
......
......@@ -604,6 +604,9 @@ app_init (void)
/* Things to do only if there is an interface */
if (no_interface == FALSE)
{
gximage_init ();
render_setup (transparency_type, transparency_size);
devices_init ();
session_init ();
......@@ -636,8 +639,6 @@ app_init (void)
g_free (filenames);
}
gximage_init ();
render_setup (transparency_type, transparency_size);
tool_options_dialog_new ();
/* EEK: force signal emission */
......
......@@ -27,6 +27,7 @@
#include "apptypes.h"
#include "appenv.h"
#include "context_manager.h"
#include "brush_scale.h"
#include "brush_edit.h"
#include "brush_select.h"
......@@ -1879,13 +1880,12 @@ brush_select_delete_brush_callback (GtkWidget *widget,
if (GIMP_IS_BRUSH_GENERATED (brush))
{
gimp_data_delete_from_disk (GIMP_DATA (brush));
if (GIMP_DATA (brush)->filename)
gimp_data_delete_from_disk (GIMP_DATA (brush));
brush_select_freeze_all ();
gimp_container_remove (GIMP_CONTAINER (global_brush_list),
GIMP_OBJECT (brush));
gimp_context_refresh_brushes ();
gimp_container_remove (global_brush_list, GIMP_OBJECT (brush));
brush_select_thaw_all ();
}
......
......@@ -22,29 +22,22 @@
#include "apptypes.h"
#include "context_manager.h"
#include "brush_select.h"
#include "brushes.h"
#include "gimpbrush.h"
#include "gimpbrushgenerated.h"
#include "gimpbrushpipe.h"
#include "gimpcontext.h"
#include "gimpdatalist.h"
#include "gimprc.h"
/* global variables */
GimpContainer *global_brush_list = NULL;
/* public functions */
void
brushes_init (gboolean no_data)
{
if (global_brush_list)
brushes_free ();
else
global_brush_list = GIMP_CONTAINER (gimp_data_list_new (GIMP_TYPE_BRUSH));
brushes_free ();
if (brush_path != NULL && !no_data)
{
......@@ -78,14 +71,12 @@ brushes_init (gboolean no_data)
brush_select_thaw_all ();
}
gimp_context_refresh_brushes ();
}
void
brushes_free (void)
{
if (! global_brush_list)
if (gimp_container_num_children (global_brush_list) == 0)
return;
brush_select_freeze_all ();
......
......@@ -20,9 +20,6 @@
#define __BRUSHES_H__
extern GimpContainer *global_brush_list;
void brushes_init (gboolean no_data);
void brushes_free (void);
......
......@@ -26,10 +26,15 @@
#include "cursorutil.h"
#include "context_manager.h"
#include "gdisplay.h"
#include "gimpbrush.h"
#include "gimpcontainer.h"
#include "gimpcontext.h"
#include "gimpdatalist.h"
#include "gimpgradient.h"
#include "gimpimage.h"
#include "gimplist.h"
#include "gimppalette.h"
#include "gimppattern.h"
#include "gimprc.h"
#include "tools/paint_options.h"
......@@ -39,7 +44,15 @@
/*
* the list of all images
*/
GimpContainer *image_context = NULL;
GimpContainer *image_context = NULL;
/*
* the global data lists
*/
GimpContainer *global_brush_list = NULL;
GimpContainer *global_pattern_list = NULL;
GimpContainer *global_gradient_list = NULL;
GimpContainer *global_palette_list = NULL;
static GimpContext *global_tool_context = NULL;
......@@ -137,14 +150,28 @@ context_manager_init (void)
image_context = GIMP_CONTAINER (gimp_list_new (GIMP_TYPE_IMAGE,
GIMP_CONTAINER_POLICY_WEAK));
/* Create the global data lists */
global_brush_list = GIMP_CONTAINER (gimp_data_list_new (GIMP_TYPE_BRUSH));
global_pattern_list = GIMP_CONTAINER (gimp_data_list_new (GIMP_TYPE_PATTERN));
global_gradient_list = GIMP_CONTAINER (gimp_data_list_new (GIMP_TYPE_GRADIENT));
global_palette_list = GIMP_CONTAINER (gimp_data_list_new (GIMP_TYPE_PALETTE));
/* Implicitly create the standard context */
standard_context = gimp_context_get_standard ();
/* TODO: load from disk */
default_context = gimp_context_new ("Default", NULL);
/*
default_context->brush_name = g_strdup (default_brush);
default_context->pattern_name = g_strdup (default_pattern);
default_context->gradient_name = g_strdup (default_gradient);
default_context->palette_name = g_strdup (default_palette);
*/
gimp_context_set_default (default_context);
/* Initialize the user context will with the default context's values */
/* Initialize the user context with the default context's values */
user_context = gimp_context_new ("User", default_context);
gimp_context_set_user (user_context);
......
......@@ -25,6 +25,14 @@
*/
extern GimpContainer *image_context;
/*
* the global data lists
*/
extern GimpContainer *global_brush_list;
extern GimpContainer *global_pattern_list;
extern GimpContainer *global_gradient_list;
extern GimpContainer *global_palette_list;
void context_manager_init (void);
void context_manager_free (void);
......
......@@ -97,6 +97,7 @@
#include "apptypes.h"
#include "context_manager.h"
#include "convert.h"
#include "cursorutil.h"
#include "floating_sel.h"
......@@ -792,9 +793,6 @@ build_palette_button (void)
UserHasWebPal = FALSE;
if (! global_palette_list)
palettes_init (FALSE);
list = GIMP_LIST (global_palette_list)->list;
if (! list)
......
......@@ -98,6 +98,7 @@ gimp_container_init (GimpContainer *container)
container->num_children = 0;
container->handlers = NULL;
container->freeze_count = 0;
}
static void
......@@ -466,7 +467,10 @@ gimp_container_freeze (GimpContainer *container)
g_return_if_fail (container != NULL);
g_return_if_fail (GIMP_IS_CONTAINER (container));
gtk_signal_emit (GTK_OBJECT (container), container_signals[FREEZE]);
container->freeze_count++;
if (container->freeze_count == 1)
gtk_signal_emit (GTK_OBJECT (container), container_signals[FREEZE]);
}
void
......@@ -475,7 +479,20 @@ gimp_container_thaw (GimpContainer *container)
g_return_if_fail (container != NULL);
g_return_if_fail (GIMP_IS_CONTAINER (container));
gtk_signal_emit (GTK_OBJECT (container), container_signals[THAW]);
if (container->freeze_count > 0)
container->freeze_count--;
if (container->freeze_count == 0)
gtk_signal_emit (GTK_OBJECT (container), container_signals[THAW]);
}
gboolean
gimp_container_frozen (GimpContainer *container)
{
g_return_val_if_fail (container != NULL, FALSE);
g_return_val_if_fail (GIMP_IS_CONTAINER (container), FALSE);
return (container->freeze_count > 0) ? TRUE : FALSE;
}
static void
......
......@@ -50,6 +50,7 @@ struct _GimpContainer
/* private */
GList *handlers;
gint freeze_count;
};
struct _GimpContainerClass
......@@ -102,6 +103,7 @@ gint gimp_container_get_child_index (const GimpContainer *container,
void gimp_container_freeze (GimpContainer *container);
void gimp_container_thaw (GimpContainer *container);
gboolean gimp_container_frozen (GimpContainer *container);
GQuark gimp_container_add_handler (GimpContainer *container,
const gchar *signame,
......
This diff is collapsed.
......@@ -205,9 +205,11 @@ void gimp_context_copy_args (GimpContext *src,
GimpContext *dest,
GimpContextArgMask args_mask);
/* manipulate by GtkType */
GimpContextArgType gimp_context_type_to_arg (GtkType type);
const gchar * gimp_context_type_to_signal_name (GtkType type);
GimpContextArgType gimp_context_type_to_arg (GtkType type);
const gchar * gimp_context_type_to_signal_name (GtkType type);
GimpObject * gimp_context_get_by_type (GimpContext *context,
GtkType type);
void gimp_context_set_by_type (GimpContext *context,
......@@ -216,24 +218,28 @@ void gimp_context_set_by_type (GimpContext *context,
void gimp_context_changed_by_type (GimpContext *context,
GtkType type);
/* image */
GimpImage * gimp_context_get_image (GimpContext *context);
void gimp_context_set_image (GimpContext *context,
GimpImage *image);
void gimp_context_image_changed (GimpContext *context);
/* display */
GDisplay * gimp_context_get_display (GimpContext *context);
void gimp_context_set_display (GimpContext *context,
GDisplay *display);
void gimp_context_display_changed (GimpContext *context);
/* tool */
ToolType gimp_context_get_tool (GimpContext *context);
void gimp_context_set_tool (GimpContext *context,
ToolType tool_type);
void gimp_context_tool_changed (GimpContext *context);
/* foreground color */
void gimp_context_get_foreground (GimpContext *context,
GimpRGB *color);
......@@ -241,6 +247,7 @@ void gimp_context_set_foreground (GimpContext *context,
const GimpRGB *color);
void gimp_context_foreground_changed (GimpContext *context);
/* background color */
void gimp_context_get_background (GimpContext *context,
GimpRGB *color);
......@@ -248,50 +255,52 @@ void gimp_context_set_background (GimpContext *context,
const GimpRGB *color);
void gimp_context_background_changed (GimpContext *context);
/* color utility functions */
void gimp_context_set_default_colors (GimpContext *context);
void gimp_context_swap_colors (GimpContext *context);
/* opacity */
gdouble gimp_context_get_opacity (GimpContext *context);
void gimp_context_set_opacity (GimpContext *context,
gdouble opacity);
void gimp_context_opacity_changed (GimpContext *context);
/* paint mode */
LayerModeEffects gimp_context_get_paint_mode (GimpContext *context);
void gimp_context_set_paint_mode (GimpContext *context,
LayerModeEffects paint_mode);
void gimp_context_paint_mode_changed (GimpContext *context);
/* brush */
GimpBrush * gimp_context_get_brush (GimpContext *context);
void gimp_context_set_brush (GimpContext *context,
GimpBrush *brush);
void gimp_context_brush_changed (GimpContext *context);
void gimp_context_refresh_brushes (void);
/* pattern */
GimpPattern * gimp_context_get_pattern (GimpContext *context);
void gimp_context_set_pattern (GimpContext *context,
GimpPattern *pattern);
void gimp_context_pattern_changed (GimpContext *context);
void gimp_context_refresh_patterns (void);
/* gradient */
GimpGradient * gimp_context_get_gradient (GimpContext *context);
void gimp_context_set_gradient (GimpContext *context,
GimpGradient *gradient);
void gimp_context_gradient_changed (GimpContext *context);
void gimp_context_refresh_gradients (void);
void gimp_context_update_gradients (GimpGradient *gradient);
/* palette */
GimpPalette * gimp_context_get_palette (GimpContext *context);
void gimp_context_set_palette (GimpContext *context,
GimpPalette *palette);
void gimp_context_palette_changed (GimpContext *context);
void gimp_context_refresh_palettes (void);
#endif /* __GIMP_CONTEXT_H__ */
......@@ -43,10 +43,11 @@ enum
};
static void gimp_data_class_init (GimpDataClass *klass);
static void gimp_data_init (GimpData *data);
static void gimp_data_destroy (GtkObject *object);
static void gimp_data_real_dirty (GimpData *data);
static void gimp_data_class_init (GimpDataClass *klass);
static void gimp_data_init (GimpData *data);
static void gimp_data_destroy (GtkObject *object);
static void gimp_data_name_changed (GimpObject *object);
static void gimp_data_real_dirty (GimpData *data);
static guint data_signals[LAST_SIGNAL] = { 0 };
......@@ -82,9 +83,11 @@ gimp_data_get_type (void)
static void
gimp_data_class_init (GimpDataClass *klass)
{
GtkObjectClass *object_class;
GtkObjectClass *object_class;
GimpObjectClass *gimp_object_class;
object_class = (GtkObjectClass *) klass;
object_class = (GtkObjectClass *) klass;
gimp_object_class = (GimpObjectClass *) klass;
parent_class = gtk_type_class (GIMP_TYPE_VIEWABLE);
......@@ -108,6 +111,8 @@ gimp_data_class_init (GimpDataClass *klass)
object_class->destroy = gimp_data_destroy;
gimp_object_class->name_changed = gimp_data_name_changed;
klass->dirty = gimp_data_real_dirty;
klass->save = NULL;
}
......@@ -132,6 +137,15 @@ gimp_data_destroy (GtkObject *object)
GTK_OBJECT_CLASS (parent_class)->destroy (object);
}
static void
gimp_data_name_changed (GimpObject *object)
{
if (GIMP_OBJECT_CLASS (parent_class)->name_changed)
GIMP_OBJECT_CLASS (parent_class)->name_changed (object);
gimp_data_dirty (GIMP_DATA (object));
}
gboolean
gimp_data_save (GimpData *data)
{
......@@ -169,6 +183,8 @@ static void
gimp_data_real_dirty (GimpData *data)
{
data->dirty = TRUE;
gimp_viewable_invalidate_preview (GIMP_VIEWABLE (data));
}
gboolean
......
......@@ -97,6 +97,7 @@
#include "apptypes.h"
#include "context_manager.h"
#include "convert.h"
#include "cursorutil.h"
#include "floating_sel.h"
......@@ -792,9 +793,6 @@ build_palette_button (void)
UserHasWebPal = FALSE;
if (! global_palette_list)
palettes_init (FALSE);
list = GIMP_LIST (global_palette_list)->list;
if (! list)
......
......@@ -29,15 +29,16 @@
#include "apptypes.h"
#include "appenv.h"
#include "context_manager.h"
#include "brushes.h"
#include "devices.h"
#include "dialog_handler.h"
#include "gimpbrush.h"
#include "gimpcontext.h"
#include "gimpcontextpreview.h"
#include "gimpdnd.h"
#include "gimpgradient.h"
#include "gimppattern.h"
#include "gimppreview.h"
#include "gimplist.h"
#include "gimprc.h"
#include "gradients.h"
......@@ -751,7 +752,7 @@ device_status_create (void)
GimpRGB color;
GList *list;
gint i;
if (deviceD == NULL)
{
deviceD = g_new (DeviceInfoDialog, 1);
......@@ -888,23 +889,45 @@ device_status_create (void)
/* the brush */
deviceD->brushes[i] =
gimp_context_preview_new (GCP_BRUSH,
CELL_SIZE, CELL_SIZE,
FALSE, TRUE,
GTK_SIGNAL_FUNC (device_status_drop_brush),
GUINT_TO_POINTER (device_info->device));
gtk_table_attach (GTK_TABLE(deviceD->table), deviceD->brushes[i],
gimp_preview_new_full (GIMP_VIEWABLE (gimp_context_get_brush (device_info->context)),
CELL_SIZE, CELL_SIZE, 0,
FALSE, FALSE, TRUE);
gtk_signal_connect_object_while_alive
(GTK_OBJECT (device_info->context),
"brush_changed",
GTK_SIGNAL_FUNC (gimp_preview_set_viewable),
GTK_OBJECT (deviceD->brushes[i]));
gimp_gtk_drag_dest_set_by_type (deviceD->brushes[i],
GTK_DEST_DEFAULT_ALL,
GIMP_TYPE_BRUSH,
GDK_ACTION_COPY);
gimp_dnd_viewable_dest_set (deviceD->brushes[i],
GIMP_TYPE_BRUSH,
device_status_drop_brush,
NULL);
gtk_table_attach (GTK_TABLE (deviceD->table), deviceD->brushes[i],
4, 5, i, i+1,
0, 0, 2, 2);
/* the pattern */
deviceD->patterns[i] =
gimp_context_preview_new (GCP_PATTERN,
CELL_SIZE, CELL_SIZE,
FALSE, TRUE,
GTK_SIGNAL_FUNC (device_status_drop_pattern),
GUINT_TO_POINTER (device_info->device));
gimp_preview_new_full (GIMP_VIEWABLE (gimp_context_get_pattern (device_info->context)),
CELL_SIZE, CELL_SIZE, 0,
FALSE, FALSE, TRUE);
gtk_signal_connect_object_while_alive
(GTK_OBJECT (device_info->context),
"pattern_changed",
GTK_SIGNAL_FUNC (gimp_preview_set_viewable),
GTK_OBJECT (deviceD->patterns[i]));
gimp_gtk_drag_dest_set_by_type (deviceD->patterns[i],
GTK_DEST_DEFAULT_ALL,
GIMP_TYPE_PATTERN,
GDK_ACTION_COPY);
gimp_dnd_viewable_dest_set (deviceD->patterns[i],
GIMP_TYPE_PATTERN,
device_status_drop_pattern,
NULL);
gtk_table_attach (GTK_TABLE(deviceD->table), deviceD->patterns[i],
5, 6, i, i+1,
0, 0, 2, 2);
......@@ -912,11 +935,22 @@ device_status_create (void)
/* the gradient */
deviceD->gradients[i] =
gimp_context_preview_new (GCP_GRADIENT,
CELL_SIZE * 2, CELL_SIZE,
FALSE, TRUE,
GTK_SIGNAL_FUNC (device_status_drop_gradient),
GUINT_TO_POINTER (device_info->device));
gimp_preview_new_full (GIMP_VIEWABLE (gimp_context_get_gradient (device_info->context)),
CELL_SIZE * 2, CELL_SIZE, 0,
FALSE, FALSE, TRUE);
gtk_signal_connect_object_while_alive
(GTK_OBJECT (device_info->context),
"gradient_changed",
GTK_SIGNAL_FUNC (gimp_preview_set_viewable),
GTK_OBJECT (deviceD->gradients[i]));
gimp_gtk_drag_dest_set_by_type (deviceD->gradients[i],
GTK_DEST_DEFAULT_ALL,
GIMP_TYPE_GRADIENT,
GDK_ACTION_COPY);
gimp_dnd_viewable_dest_set (deviceD->gradients[i],
GIMP_TYPE_GRADIENT,
device_status_drop_gradient,
NULL);
gtk_table_attach (GTK_TABLE(deviceD->table), deviceD->gradients[i],
6, 7, i, i+1,
0, 0, 2, 2);
......@@ -1085,25 +1119,16 @@ device_status_update (guint32 deviceid)
if (gimp_context_get_brush (device_info->context))
{
gimp_context_preview_update
(GIMP_CONTEXT_PREVIEW (deviceD->brushes[i]),
gimp_context_get_brush (device_info->context));
gtk_widget_show (deviceD->brushes[i]);
}
if (gimp_context_get_pattern (device_info->context))
{
gimp_context_preview_update
(GIMP_CONTEXT_PREVIEW (deviceD->patterns[i]),
gimp_context_get_pattern (device_info->context));
gtk_widget_show (deviceD->patterns[i]);
}
if (gimp_context_get_gradient (device_info->context))
{
gimp_context_preview_update
(GIMP_CONTEXT_PREVIEW (deviceD->gradients[i]),
gimp_context_get_gradient (device_info->context));
gtk_widget_show (deviceD->gradients[i]);
}
}
......
......@@ -37,6 +37,7 @@
#include "gradient_select.h"
#include "palette.h"
#include "palette_import.h"
#include "paletteP.h"
#include "pixel_region.h"
#include "temp_buf.h"
......
......@@ -98,6 +98,7 @@ gimp_container_init (GimpContainer *container)
container->num_children = 0;
container->handlers = NULL;
container->freeze_count = 0;
}
static void
......@@ -466,7 +467,10 @@ gimp_container_freeze (GimpContainer *container)
g_return_if_fail (container != NULL);
g_return_if_fail (GIMP_IS_CONTAINER (container));
gtk_signal_emit (GTK_OBJECT (container), container_signals[FREEZE]);
container->freeze_count++;
if (container->freeze_count == 1)
gtk_signal_emit (GTK_OBJECT (container), container_signals[FREEZE]);
}
void
......@@ -475,7 +479,20 @@ gimp_container_thaw (GimpContainer *container)
g_return_if_fail (container != NULL);
g_return_if_fail (GIMP_IS_CONTAINER (container));
gtk_signal_emit (GTK_OBJECT (container), container_signals[THAW]);
if (container->freeze_count > 0)
container->freeze_count--;
if (container->freeze_count == 0)
gtk_signal_emit (GTK_OBJECT (container), container_signals[THAW]);
}
gboolean
gimp_container_frozen (GimpContainer *container)
{
g_return_val_if_fail (container != NULL, FALSE);
g_return_val_if_fail (GIMP_IS_CONTAINER (container), FALSE);
return (container->freeze_count > 0) ? TRUE : FALSE;
}
static void
......
......@@ -50,6 +50,7 @@ struct _GimpContainer
/* private */
GList *handlers;
gint freeze_count;
};
struct _GimpContainerClass
......@@ -102,6 +103,7 @@ gint gimp_container_get_child_index (const GimpContainer *container,
void gimp_container_freeze (GimpContainer *container);
void gimp_container_thaw (GimpContainer *container);
gboolean gimp_container_frozen (GimpContainer *container);
GQuark gimp_container_add_handler (GimpContainer *container,
const gchar *signame,
......
This diff is collapsed.
......@@ -205,9 +205,11 @@ void gimp_context_copy_args (GimpContext *src,
GimpContext *dest,
GimpContextArgMask args_mask);
/* manipulate by GtkType */
GimpContextArgType gimp_context_type_to_arg (GtkType type);
const gchar * gimp_context_type_to_signal_name (GtkType type);
GimpContextArgType gimp_context_type_to_arg (GtkType type);
const gchar * gimp_context_type_to_signal_name (GtkType type);
GimpObject * gimp_context_get_by_type (GimpContext *context,
GtkType type);
void gimp_context_set_by_type (GimpContext *context,