[gimp] app: replace all g_assert() by the newly added gimp_assert()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: replace all g_assert() by the newly added gimp_assert()
- Date: Sun, 11 Feb 2018 21:25:37 +0000 (UTC)
commit 539927ebfab6a7308aacaa92757546312eea026c
Author: Michael Natterer <mitch gimp org>
Date: Sun Feb 11 22:23:10 2018 +0100
app: replace all g_assert() by the newly added gimp_assert()
which is just a #define to g_assert for now, but can now easily be
turned into something that does some nicer debugging using our new
stack trace infrastructure. This commit also reverts all constructed()
functions to use assert again.
app/config/config-types.h | 7 ++++
app/config/gimpdialogconfig.c | 2 +-
app/core/gimp-internal-data.c | 2 +-
app/core/gimp-utils.c | 2 +-
app/core/gimpbrushcache.c | 2 +-
app/core/gimpbrushclipboard.c | 2 +-
app/core/gimpchannelpropundo.c | 2 +-
app/core/gimpchannelundo.c | 2 +-
app/core/gimpcontext.c | 2 +-
app/core/gimpdrawablemodundo.c | 2 +-
app/core/gimpdrawablestack.c | 4 +-
app/core/gimpdrawableundo.c | 4 +-
app/core/gimpfilteredcontainer.c | 2 +-
app/core/gimpfilterstack.c | 4 +-
app/core/gimpfloatingselectionundo.c | 2 +-
app/core/gimpguideundo.c | 2 +-
app/core/gimpimage-convert-indexed.c | 12 +++---
app/core/gimpimage.c | 2 +-
app/core/gimpimageundo.c | 4 +-
app/core/gimpitem.c | 4 +-
app/core/gimpitempropundo.c | 2 +-
app/core/gimpitemstack.c | 4 +-
app/core/gimpitemtree.c | 8 ++--
app/core/gimpitemundo.c | 2 +-
app/core/gimplayermaskpropundo.c | 2 +-
app/core/gimplayermaskundo.c | 4 +-
app/core/gimplayerpropundo.c | 2 +-
app/core/gimplayerstack.c | 4 +-
app/core/gimplayerundo.c | 2 +-
app/core/gimpmaskundo.c | 2 +-
app/core/gimppatternclipboard.c | 2 +-
app/core/gimppdbprogress.c | 4 +-
app/core/gimpsamplepointundo.c | 2 +-
app/core/gimpundo.c | 2 +-
app/dialogs/preferences-dialog.c | 2 +-
app/dialogs/tips-parser.c | 4 +-
app/display/gimpcanvashandle.c | 2 +-
app/display/gimpcanvasitem.c | 2 +-
app/display/gimpdisplay.c | 6 ---
app/display/gimpdisplayshell.c | 4 +-
app/display/gimpdisplayxfer.c | 10 +++---
app/display/gimpimagewindow.c | 6 ++--
app/display/gimpnavigationeditor.c | 2 +-
app/display/gimptoolline.c | 8 ++--
app/display/gimptooltransformgrid.c | 12 +++---
app/display/gimptoolwidget.c | 2 +-
app/file/file-remote.c | 4 +-
app/gegl/gimp-gegl-apply-operation.c | 2 +-
app/gui/gimpuiconfigurer.c | 2 +-
app/operations/layer-modes/gimp-layer-modes.c | 2 +-
.../layer-modes/gimpoperationlayermode.c | 4 +-
app/paint/gimpbrushcore.c | 2 +-
app/paint/gimpinkundo.c | 2 +-
app/paint/gimppaintcoreundo.c | 2 +-
app/pdb/drawable-cmds.c | 2 +-
app/pdb/gimpprocedure.c | 2 +-
app/pdb/image-cmds.c | 2 +-
app/plug-in/gimpplugin.c | 2 +-
app/text/gimptextundo.c | 8 ++--
app/tools/gimpblendtool-editor.c | 38 ++++++++++----------
app/tools/gimpbrushtool.c | 2 +-
app/tools/gimpfiltertool.c | 2 +-
app/tools/gimpforegroundselecttoolundo.c | 2 +-
app/tools/gimpguidetool.c | 2 +-
app/tools/gimppainttool.c | 6 ++--
app/tools/gimptool.c | 2 +-
app/tools/gimptransformtoolundo.c | 2 +-
app/tools/gimpwarptool.c | 2 +-
app/vectors/gimpvectorsmodundo.c | 2 +-
app/vectors/gimpvectorspropundo.c | 6 ++--
app/vectors/gimpvectorsundo.c | 2 +-
app/widgets/gimpactiongroup.c | 2 +-
app/widgets/gimpcontainereditor.c | 6 ++--
app/widgets/gimpcontainertreestore.c | 30 ++++++++--------
app/widgets/gimpcontrollereditor.c | 2 +-
app/widgets/gimpcontrollerlist.c | 2 +-
app/widgets/gimpdataeditor.c | 4 +-
app/widgets/gimpdatafactoryview.c | 4 +-
app/widgets/gimpdeviceeditor.c | 2 +-
app/widgets/gimpdeviceinfo.c | 4 +-
app/widgets/gimpdeviceinfoeditor.c | 2 +-
app/widgets/gimpdevicemanager.c | 2 +-
app/widgets/gimpdevicestatus.c | 2 +-
app/widgets/gimpdynamicsoutputeditor.c | 2 +-
app/widgets/gimpfilleditor.c | 2 +-
app/widgets/gimpgrideditor.c | 2 +-
app/widgets/gimpiconpicker.c | 2 +-
app/widgets/gimpimageparasiteview.c | 4 +-
app/widgets/gimpimagepropview.c | 2 +-
app/widgets/gimplanguagestore-parser.c | 3 +-
app/widgets/gimppdbdialog.c | 6 ++--
app/widgets/gimppickablebutton.c | 2 +-
app/widgets/gimppickablepopup.c | 2 +-
app/widgets/gimpselectiondata.c | 2 +-
app/widgets/gimpsettingsbox.c | 6 ++--
app/widgets/gimpsettingseditor.c | 6 ++--
app/widgets/gimpstrokeeditor.c | 2 +-
app/widgets/gimptemplateeditor.c | 4 +-
app/widgets/gimptextbuffer-serialize.c | 28 +++++++-------
app/widgets/gimptextstyleeditor.c | 8 ++--
app/widgets/gimptoolbox.c | 2 +-
app/xcf/xcf-seek.c | 2 +-
pdb/groups/drawable.pdb | 2 +-
pdb/groups/image.pdb | 2 +-
104 files changed, 213 insertions(+), 211 deletions(-)
---
diff --git a/app/config/config-types.h b/app/config/config-types.h
index 2bbb79f..15b9695 100644
--- a/app/config/config-types.h
+++ b/app/config/config-types.h
@@ -49,4 +49,11 @@ typedef struct _GimpGrid GimpGrid;
typedef struct _GimpTemplate GimpTemplate;
+/* for now these are defines, but can be turned into something
+ * fancier for nicer debugging
+ */
+#define gimp_assert g_assert
+#define gimp_assert_not_reached g_assert_not_reached
+
+
#endif /* __CONFIG_TYPES_H__ */
diff --git a/app/config/gimpdialogconfig.c b/app/config/gimpdialogconfig.c
index 61ab19c..abf4243 100644
--- a/app/config/gimpdialogconfig.c
+++ b/app/config/gimpdialogconfig.c
@@ -542,7 +542,7 @@ gimp_dialog_config_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_GIMP (priv->gimp));
+ gimp_assert (GIMP_IS_GIMP (priv->gimp));
context = gimp_get_user_context (priv->gimp);
diff --git a/app/core/gimp-internal-data.c b/app/core/gimp-internal-data.c
index 7417c00..9ebd9b4 100644
--- a/app/core/gimp-internal-data.c
+++ b/app/core/gimp-internal-data.c
@@ -273,7 +273,7 @@ gimp_internal_data_save_data_file (Gimp *gimp,
* gradients, so this is not a big concern, but if we save more expensive
* data in the future, we should fix this.
*/
- g_return_val_if_fail (GIMP_DATA_GET_CLASS (data)->save, FALSE);
+ gimp_assert (GIMP_DATA_GET_CLASS (data)->save);
success = GIMP_DATA_GET_CLASS (data)->save (data, output, error);
g_object_unref (output);
diff --git a/app/core/gimp-utils.c b/app/core/gimp-utils.c
index 99b8c7a..9f3daf0 100644
--- a/app/core/gimp-utils.c
+++ b/app/core/gimp-utils.c
@@ -461,7 +461,7 @@ unescape_gstring (GString *string)
}
}
- g_return_val_if_fail (to - string->str <= string->len, FALSE);
+ gimp_assert (to - string->str <= string->len);
if (to - string->str != string->len)
g_string_truncate (string, to - string->str);
diff --git a/app/core/gimpbrushcache.c b/app/core/gimpbrushcache.c
index 9badcc9..6aa498b 100644
--- a/app/core/gimpbrushcache.c
+++ b/app/core/gimpbrushcache.c
@@ -103,7 +103,7 @@ gimp_brush_cache_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (cache->data_destroy != NULL);
+ gimp_assert (cache->data_destroy != NULL);
}
static void
diff --git a/app/core/gimpbrushclipboard.c b/app/core/gimpbrushclipboard.c
index cda04c9..48db35b 100644
--- a/app/core/gimpbrushclipboard.c
+++ b/app/core/gimpbrushclipboard.c
@@ -111,7 +111,7 @@ gimp_brush_clipboard_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_GIMP (brush->gimp));
+ gimp_assert (GIMP_IS_GIMP (brush->gimp));
g_signal_connect_object (brush->gimp, "clipboard-changed",
G_CALLBACK (gimp_brush_clipboard_changed),
diff --git a/app/core/gimpchannelpropundo.c b/app/core/gimpchannelpropundo.c
index 5e846a9..d6d3a40 100644
--- a/app/core/gimpchannelpropundo.c
+++ b/app/core/gimpchannelpropundo.c
@@ -65,7 +65,7 @@ gimp_channel_prop_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_CHANNEL (GIMP_ITEM_UNDO (object)->item));
+ gimp_assert (GIMP_IS_CHANNEL (GIMP_ITEM_UNDO (object)->item));
channel = GIMP_CHANNEL (GIMP_ITEM_UNDO (object)->item);
diff --git a/app/core/gimpchannelundo.c b/app/core/gimpchannelundo.c
index ecdc521..660ed0f 100644
--- a/app/core/gimpchannelundo.c
+++ b/app/core/gimpchannelundo.c
@@ -106,7 +106,7 @@ gimp_channel_undo_constructed (GObject *object)
{
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_CHANNEL (GIMP_ITEM_UNDO (object)->item));
+ gimp_assert (GIMP_IS_CHANNEL (GIMP_ITEM_UNDO (object)->item));
}
static void
diff --git a/app/core/gimpcontext.c b/app/core/gimpcontext.c
index 27c9081..dfda990 100644
--- a/app/core/gimpcontext.c
+++ b/app/core/gimpcontext.c
@@ -846,7 +846,7 @@ gimp_context_constructed (GObject *object)
gimp = GIMP_CONTEXT (object)->gimp;
- g_return_if_fail (GIMP_IS_GIMP (gimp));
+ gimp_assert (GIMP_IS_GIMP (gimp));
gimp->context_list = g_list_prepend (gimp->context_list, object);
diff --git a/app/core/gimpdrawablemodundo.c b/app/core/gimpdrawablemodundo.c
index 349835d..0547407 100644
--- a/app/core/gimpdrawablemodundo.c
+++ b/app/core/gimpdrawablemodundo.c
@@ -100,7 +100,7 @@ gimp_drawable_mod_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_DRAWABLE (GIMP_ITEM_UNDO (object)->item));
+ gimp_assert (GIMP_IS_DRAWABLE (GIMP_ITEM_UNDO (object)->item));
item = GIMP_ITEM_UNDO (object)->item;
drawable = GIMP_DRAWABLE (item);
diff --git a/app/core/gimpdrawablestack.c b/app/core/gimpdrawablestack.c
index b2083e9..1af4f9f 100644
--- a/app/core/gimpdrawablestack.c
+++ b/app/core/gimpdrawablestack.c
@@ -104,8 +104,8 @@ gimp_drawable_stack_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (g_type_is_a (gimp_container_get_children_type (container),
- GIMP_TYPE_DRAWABLE));
+ gimp_assert (g_type_is_a (gimp_container_get_children_type (container),
+ GIMP_TYPE_DRAWABLE));
gimp_container_add_handler (container, "update",
G_CALLBACK (gimp_drawable_stack_drawable_update),
diff --git a/app/core/gimpdrawableundo.c b/app/core/gimpdrawableundo.c
index 23b1724..e185544 100644
--- a/app/core/gimpdrawableundo.c
+++ b/app/core/gimpdrawableundo.c
@@ -111,8 +111,8 @@ gimp_drawable_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_DRAWABLE (GIMP_ITEM_UNDO (object)->item));
- g_return_if_fail (GEGL_IS_BUFFER (drawable_undo->buffer));
+ gimp_assert (GIMP_IS_DRAWABLE (GIMP_ITEM_UNDO (object)->item));
+ gimp_assert (GEGL_IS_BUFFER (drawable_undo->buffer));
}
static void
diff --git a/app/core/gimpfilteredcontainer.c b/app/core/gimpfilteredcontainer.c
index 6135c7a..bb7a48c 100644
--- a/app/core/gimpfilteredcontainer.c
+++ b/app/core/gimpfilteredcontainer.c
@@ -124,7 +124,7 @@ gimp_filtered_container_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_CONTAINER (filtered_container->src_container));
+ gimp_assert (GIMP_IS_CONTAINER (filtered_container->src_container));
if (! gimp_container_frozen (filtered_container->src_container))
{
diff --git a/app/core/gimpfilterstack.c b/app/core/gimpfilterstack.c
index cb4a1c7..0dbf193 100644
--- a/app/core/gimpfilterstack.c
+++ b/app/core/gimpfilterstack.c
@@ -83,8 +83,8 @@ gimp_filter_stack_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (g_type_is_a (gimp_container_get_children_type (container),
- GIMP_TYPE_FILTER));
+ gimp_assert (g_type_is_a (gimp_container_get_children_type (container),
+ GIMP_TYPE_FILTER));
gimp_container_add_handler (container, "active-changed",
G_CALLBACK (gimp_filter_stack_filter_active),
diff --git a/app/core/gimpfloatingselectionundo.c b/app/core/gimpfloatingselectionundo.c
index 9c552c7..885f8f2 100644
--- a/app/core/gimpfloatingselectionundo.c
+++ b/app/core/gimpfloatingselectionundo.c
@@ -68,7 +68,7 @@ gimp_floating_selection_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
+ gimp_assert (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
layer = GIMP_LAYER (GIMP_ITEM_UNDO (object)->item);
diff --git a/app/core/gimpguideundo.c b/app/core/gimpguideundo.c
index ee17498..3074fab 100644
--- a/app/core/gimpguideundo.c
+++ b/app/core/gimpguideundo.c
@@ -89,7 +89,7 @@ gimp_guide_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_GUIDE (guide_undo->guide));
+ gimp_assert (GIMP_IS_GUIDE (guide_undo->guide));
guide_undo->orientation = gimp_guide_get_orientation (guide_undo->guide);
guide_undo->position = gimp_guide_get_position (guide_undo->guide);
diff --git a/app/core/gimpimage-convert-indexed.c b/app/core/gimpimage-convert-indexed.c
index e3ba739..85e6397 100644
--- a/app/core/gimpimage-convert-indexed.c
+++ b/app/core/gimpimage-convert-indexed.c
@@ -1910,12 +1910,12 @@ update_box_rgb (const CFHistogram histogram,
/*
fprintf(stderr, " %d,%d", dummyqo.cmap[0].blue, boxp->Bmax);
- g_assert(boxp->Rhalferror >= boxp->Rmin);
- g_assert(boxp->Rhalferror < boxp->Rmax);
- g_assert(boxp->Ghalferror >= boxp->Gmin);
- g_assert(boxp->Ghalferror < boxp->Gmax);
- g_assert(boxp->Bhalferror >= boxp->Bmin);
- g_assert(boxp->Bhalferror < boxp->Bmax);*/
+ gimp_assert (boxp->Rhalferror >= boxp->Rmin);
+ gimp_assert (boxp->Rhalferror < boxp->Rmax);
+ gimp_assert (boxp->Ghalferror >= boxp->Gmin);
+ gimp_assert (boxp->Ghalferror < boxp->Gmax);
+ gimp_assert (boxp->Bhalferror >= boxp->Bmin);
+ gimp_assert (boxp->Bhalferror < boxp->Bmax);*/
/*boxp->error = (sqrt((double)(boxp->error/ccount)));*/
/* boxp->rerror = (sqrt((double)((boxp->rerror)/ccount)));
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index c0e413c..2ba4b3d 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -818,7 +818,7 @@ gimp_image_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_GIMP (image->gimp));
+ gimp_assert (GIMP_IS_GIMP (image->gimp));
config = image->gimp->config;
diff --git a/app/core/gimpimageundo.c b/app/core/gimpimageundo.c
index bfbc825..83d356b 100644
--- a/app/core/gimpimageundo.c
+++ b/app/core/gimpimageundo.c
@@ -179,7 +179,7 @@ gimp_image_undo_constructed (GObject *object)
break;
case GIMP_UNDO_IMAGE_GRID:
- g_return_if_fail (GIMP_IS_GRID (image_undo->grid));
+ gimp_assert (GIMP_IS_GRID (image_undo->grid));
break;
case GIMP_UNDO_IMAGE_COLORMAP:
@@ -199,7 +199,7 @@ gimp_image_undo_constructed (GObject *object)
case GIMP_UNDO_PARASITE_ATTACH:
case GIMP_UNDO_PARASITE_REMOVE:
- g_return_if_fail (image_undo->parasite_name != NULL);
+ gimp_assert (image_undo->parasite_name != NULL);
image_undo->parasite = gimp_parasite_copy
(gimp_image_parasite_find (image, image_undo->parasite_name));
diff --git a/app/core/gimpitem.c b/app/core/gimpitem.c
index 3879f73..536a42a 100644
--- a/app/core/gimpitem.c
+++ b/app/core/gimpitem.c
@@ -364,8 +364,8 @@ gimp_item_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_IMAGE (private->image));
- g_return_if_fail (private->ID != 0);
+ gimp_assert (GIMP_IS_IMAGE (private->image));
+ gimp_assert (private->ID != 0);
}
static void
diff --git a/app/core/gimpitempropundo.c b/app/core/gimpitempropundo.c
index 93a3e11..d959d54 100644
--- a/app/core/gimpitempropundo.c
+++ b/app/core/gimpitempropundo.c
@@ -141,7 +141,7 @@ gimp_item_prop_undo_constructed (GObject *object)
case GIMP_UNDO_PARASITE_ATTACH:
case GIMP_UNDO_PARASITE_REMOVE:
- g_return_if_fail (item_prop_undo->parasite_name != NULL);
+ gimp_assert (item_prop_undo->parasite_name != NULL);
item_prop_undo->parasite = gimp_parasite_copy
(gimp_item_parasite_find (item, item_prop_undo->parasite_name));
diff --git a/app/core/gimpitemstack.c b/app/core/gimpitemstack.c
index 1eed35d..11c1c4a 100644
--- a/app/core/gimpitemstack.c
+++ b/app/core/gimpitemstack.c
@@ -73,8 +73,8 @@ gimp_item_stack_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (g_type_is_a (gimp_container_get_children_type (container),
- GIMP_TYPE_ITEM));
+ gimp_assert (g_type_is_a (gimp_container_get_children_type (container),
+ GIMP_TYPE_ITEM));
}
static void
diff --git a/app/core/gimpitemtree.c b/app/core/gimpitemtree.c
index 656898d..98b323a 100644
--- a/app/core/gimpitemtree.c
+++ b/app/core/gimpitemtree.c
@@ -150,10 +150,10 @@ gimp_item_tree_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_IMAGE (private->image));
- g_return_if_fail (g_type_is_a (private->container_type, GIMP_TYPE_ITEM_STACK));
- g_return_if_fail (g_type_is_a (private->item_type, GIMP_TYPE_ITEM));
- g_return_if_fail (private->item_type != GIMP_TYPE_ITEM);
+ gimp_assert (GIMP_IS_IMAGE (private->image));
+ gimp_assert (g_type_is_a (private->container_type, GIMP_TYPE_ITEM_STACK));
+ gimp_assert (g_type_is_a (private->item_type, GIMP_TYPE_ITEM));
+ gimp_assert (private->item_type != GIMP_TYPE_ITEM);
tree->container = g_object_new (private->container_type,
"name", g_type_name (private->item_type),
diff --git a/app/core/gimpitemundo.c b/app/core/gimpitemundo.c
index fcb5852..96697f0 100644
--- a/app/core/gimpitemundo.c
+++ b/app/core/gimpitemundo.c
@@ -84,7 +84,7 @@ gimp_item_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_ITEM (item_undo->item));
+ gimp_assert (GIMP_IS_ITEM (item_undo->item));
}
static void
diff --git a/app/core/gimplayermaskpropundo.c b/app/core/gimplayermaskpropundo.c
index 0de9982..3dc377f 100644
--- a/app/core/gimplayermaskpropundo.c
+++ b/app/core/gimplayermaskpropundo.c
@@ -65,7 +65,7 @@ gimp_layer_mask_prop_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
+ gimp_assert (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
layer = GIMP_LAYER (GIMP_ITEM_UNDO (object)->item);
diff --git a/app/core/gimplayermaskundo.c b/app/core/gimplayermaskundo.c
index 823fb5f..a05c2ca 100644
--- a/app/core/gimplayermaskundo.c
+++ b/app/core/gimplayermaskundo.c
@@ -95,8 +95,8 @@ gimp_layer_mask_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
- g_return_if_fail (GIMP_IS_LAYER_MASK (layer_mask_undo->layer_mask));
+ gimp_assert (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
+ gimp_assert (GIMP_IS_LAYER_MASK (layer_mask_undo->layer_mask));
}
static void
diff --git a/app/core/gimplayerpropundo.c b/app/core/gimplayerpropundo.c
index ff2c1ba..a8cc694 100644
--- a/app/core/gimplayerpropundo.c
+++ b/app/core/gimplayerpropundo.c
@@ -65,7 +65,7 @@ gimp_layer_prop_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
+ gimp_assert (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
layer = GIMP_LAYER (GIMP_ITEM_UNDO (object)->item);
diff --git a/app/core/gimplayerstack.c b/app/core/gimplayerstack.c
index 7c0862b..81ab8b0 100644
--- a/app/core/gimplayerstack.c
+++ b/app/core/gimplayerstack.c
@@ -85,8 +85,8 @@ gimp_layer_stack_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (g_type_is_a (gimp_container_get_children_type (container),
- GIMP_TYPE_LAYER));
+ gimp_assert (g_type_is_a (gimp_container_get_children_type (container),
+ GIMP_TYPE_LAYER));
gimp_container_add_handler (container, "active-changed",
G_CALLBACK (gimp_layer_stack_layer_active),
diff --git a/app/core/gimplayerundo.c b/app/core/gimplayerundo.c
index 0f15b89..8614a41 100644
--- a/app/core/gimplayerundo.c
+++ b/app/core/gimplayerundo.c
@@ -104,7 +104,7 @@ gimp_layer_undo_constructed (GObject *object)
{
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
+ gimp_assert (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
}
static void
diff --git a/app/core/gimpmaskundo.c b/app/core/gimpmaskundo.c
index 4a0c4ae..3525a95 100644
--- a/app/core/gimpmaskundo.c
+++ b/app/core/gimpmaskundo.c
@@ -100,7 +100,7 @@ gimp_mask_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_CHANNEL (GIMP_ITEM_UNDO (object)->item));
+ gimp_assert (GIMP_IS_CHANNEL (GIMP_ITEM_UNDO (object)->item));
item = GIMP_ITEM_UNDO (object)->item;
drawable = GIMP_DRAWABLE (item);
diff --git a/app/core/gimppatternclipboard.c b/app/core/gimppatternclipboard.c
index 1ffe614..88c3c3d 100644
--- a/app/core/gimppatternclipboard.c
+++ b/app/core/gimppatternclipboard.c
@@ -103,7 +103,7 @@ gimp_pattern_clipboard_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_GIMP (pattern->gimp));
+ gimp_assert (GIMP_IS_GIMP (pattern->gimp));
g_signal_connect_object (pattern->gimp, "clipboard-changed",
G_CALLBACK (gimp_pattern_clipboard_changed),
diff --git a/app/core/gimppdbprogress.c b/app/core/gimppdbprogress.c
index a560c3b..5b5a60b 100644
--- a/app/core/gimppdbprogress.c
+++ b/app/core/gimppdbprogress.c
@@ -177,8 +177,8 @@ gimp_pdb_progress_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_PDB (progress->pdb));
- g_return_if_fail (GIMP_IS_CONTEXT (progress->context));
+ gimp_assert (GIMP_IS_PDB (progress->pdb));
+ gimp_assert (GIMP_IS_CONTEXT (progress->context));
}
static void
diff --git a/app/core/gimpsamplepointundo.c b/app/core/gimpsamplepointundo.c
index 32cb850..6057a3e 100644
--- a/app/core/gimpsamplepointundo.c
+++ b/app/core/gimpsamplepointundo.c
@@ -89,7 +89,7 @@ gimp_sample_point_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (sample_point_undo->sample_point != NULL);
+ gimp_assert (sample_point_undo->sample_point != NULL);
gimp_sample_point_get_position (sample_point_undo->sample_point,
&sample_point_undo->x,
diff --git a/app/core/gimpundo.c b/app/core/gimpundo.c
index 433e2ec..a02b804 100644
--- a/app/core/gimpundo.c
+++ b/app/core/gimpundo.c
@@ -184,7 +184,7 @@ gimp_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_return_if_fail (GIMP_IS_IMAGE (undo->image));
+ gimp_assert (GIMP_IS_IMAGE (undo->image));
}
static void
diff --git a/app/dialogs/preferences-dialog.c b/app/dialogs/preferences-dialog.c
index d67e6b9..690b973 100644
--- a/app/dialogs/preferences-dialog.c
+++ b/app/dialogs/preferences-dialog.c
@@ -2925,7 +2925,7 @@ prefs_dialog_new (Gimp *gimp,
gint format;
- g_assert (G_N_ELEMENTS (format_strings) == G_N_ELEMENTS (format_names));
+ gimp_assert (G_N_ELEMENTS (format_strings) == G_N_ELEMENTS (format_names));
formats[0].current_setting = display_config->image_title_format;
formats[1].current_setting = display_config->image_status_format;
diff --git a/app/dialogs/tips-parser.c b/app/dialogs/tips-parser.c
index 3c8a590..33670de 100644
--- a/app/dialogs/tips-parser.c
+++ b/app/dialogs/tips-parser.c
@@ -382,7 +382,7 @@ static void
tips_parser_end_markup (TipsParser *parser,
const gchar *markup_name)
{
- g_assert (parser->markup_depth > 0);
+ gimp_assert (parser->markup_depth > 0);
parser->markup_depth--;
g_string_append_printf (parser->value, "</%s>", markup_name);
@@ -401,7 +401,7 @@ tips_parser_start_unknown (TipsParser *parser)
static void
tips_parser_end_unknown (TipsParser *parser)
{
- g_assert (parser->unknown_depth > 0 && parser->state == TIPS_IN_UNKNOWN);
+ gimp_assert (parser->unknown_depth > 0 && parser->state == TIPS_IN_UNKNOWN);
parser->unknown_depth--;
diff --git a/app/display/gimpcanvashandle.c b/app/display/gimpcanvashandle.c
index 9543a8d..e0da074 100644
--- a/app/display/gimpcanvashandle.c
+++ b/app/display/gimpcanvashandle.c
@@ -402,7 +402,7 @@ gimp_canvas_handle_draw (GimpCanvasItem *item,
break;
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
}
cairo_restore (cr);
diff --git a/app/display/gimpcanvasitem.c b/app/display/gimpcanvasitem.c
index d216936..d40c87f 100644
--- a/app/display/gimpcanvasitem.c
+++ b/app/display/gimpcanvasitem.c
@@ -184,7 +184,7 @@ gimp_canvas_item_constructed (GObject *object)
{
GimpCanvasItem *item = GIMP_CANVAS_ITEM (object);
- g_assert (GIMP_IS_DISPLAY_SHELL (item->private->shell));
+ gimp_assert (GIMP_IS_DISPLAY_SHELL (item->private->shell));
item->private->change_count = 0; /* undo hack from init() */
diff --git a/app/display/gimpdisplay.c b/app/display/gimpdisplay.c
index 5d6b8ed..0ed57de 100644
--- a/app/display/gimpdisplay.c
+++ b/app/display/gimpdisplay.c
@@ -220,12 +220,6 @@ gimp_display_set_property (GObject *object,
}
break;
- case PROP_ID:
- case PROP_IMAGE:
- case PROP_SHELL:
- g_assert_not_reached ();
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c
index bd97772..e7f8965 100644
--- a/app/display/gimpdisplayshell.c
+++ b/app/display/gimpdisplayshell.c
@@ -397,8 +397,8 @@ gimp_display_shell_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_UI_MANAGER (shell->popup_manager));
- g_assert (GIMP_IS_DISPLAY (shell->display));
+ gimp_assert (GIMP_IS_UI_MANAGER (shell->popup_manager));
+ gimp_assert (GIMP_IS_DISPLAY (shell->display));
config = shell->display->config;
image = gimp_display_get_image (shell->display);
diff --git a/app/display/gimpdisplayxfer.c b/app/display/gimpdisplayxfer.c
index 73b22a1..3932377 100644
--- a/app/display/gimpdisplayxfer.c
+++ b/app/display/gimpdisplayxfer.c
@@ -69,8 +69,8 @@ rtree_node_create (RTree *rtree,
{
RTreeNode *node;
- g_assert (x >= 0 && x+w <= rtree->root.w);
- g_assert (y >= 0 && y+h <= rtree->root.h);
+ gimp_assert (x >= 0 && x+w <= rtree->root.w);
+ gimp_assert (y >= 0 && y+h <= rtree->root.h);
node = g_slice_alloc (sizeof (*node));
if (node == NULL)
@@ -271,8 +271,8 @@ gimp_display_xfer_get_surface (GimpDisplayXfer *xfer,
{
RTreeNode *node;
- g_assert (w <= GIMP_DISPLAY_RENDER_BUF_WIDTH &&
- h <= GIMP_DISPLAY_RENDER_BUF_HEIGHT);
+ gimp_assert (w <= GIMP_DISPLAY_RENDER_BUF_WIDTH &&
+ h <= GIMP_DISPLAY_RENDER_BUF_HEIGHT);
node = rtree_insert (&xfer->rtree, w, h);
if (node == NULL)
@@ -282,7 +282,7 @@ gimp_display_xfer_get_surface (GimpDisplayXfer *xfer,
rtree_reset (&xfer->rtree);
cairo_surface_mark_dirty (xfer->render_surface[xfer->page]); /* XXX */
node = rtree_insert (&xfer->rtree, w, h);
- g_assert (node != NULL);
+ gimp_assert (node != NULL);
}
*src_x = node->x;
diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c
index eb2e827..7040e8f 100644
--- a/app/display/gimpimagewindow.c
+++ b/app/display/gimpimagewindow.c
@@ -378,8 +378,8 @@ gimp_image_window_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_GIMP (private->gimp));
- g_assert (GIMP_IS_DIALOG_FACTORY (private->dialog_factory));
+ gimp_assert (GIMP_IS_GIMP (private->gimp));
+ gimp_assert (GIMP_IS_DIALOG_FACTORY (private->dialog_factory));
menu_factory = gimp_dialog_factory_get_menu_factory (private->dialog_factory);
@@ -1904,7 +1904,7 @@ gimp_image_window_update_ui_manager_idle (GimpImageWindow *window)
{
GimpImageWindowPrivate *private = GIMP_IMAGE_WINDOW_GET_PRIVATE (window);
- g_assert (private->active_shell != NULL);
+ gimp_assert (private->active_shell != NULL);
gimp_ui_manager_update (private->menubar_manager,
private->active_shell->display);
diff --git a/app/display/gimpnavigationeditor.c b/app/display/gimpnavigationeditor.c
index 33df757..389fd80 100644
--- a/app/display/gimpnavigationeditor.c
+++ b/app/display/gimpnavigationeditor.c
@@ -581,7 +581,7 @@ gimp_navigation_editor_scroll (GimpNavigationView *view,
break;
}
- g_assert (adj != NULL);
+ gimp_assert (adj != NULL);
value = gtk_adjustment_get_value (adj);
diff --git a/app/display/gimptoolline.c b/app/display/gimptoolline.c
index 6990e7d..fd1ba3f 100644
--- a/app/display/gimptoolline.c
+++ b/app/display/gimptoolline.c
@@ -1101,7 +1101,7 @@ gimp_tool_line_get_slider (GimpToolLine *line,
{
GimpToolLinePrivate *private = line->private;
- g_assert (slider >= 0 && slider < private->sliders->len);
+ gimp_assert (slider >= 0 && slider < private->sliders->len);
return &g_array_index (private->sliders, GimpControllerSlider, slider);
}
@@ -1124,8 +1124,8 @@ gimp_tool_line_get_handle (GimpToolLine *line,
return private->end_handle;
default:
- g_assert (handle >= 0 &&
- handle < (gint) private->slider_handles->len);
+ gimp_assert (handle >= 0 &&
+ handle < (gint) private->slider_handles->len);
return g_array_index (private->slider_handles,
GimpCanvasItem *, handle);
@@ -1198,7 +1198,7 @@ gimp_tool_line_selection_motion (GimpToolLine *line,
switch (private->selection)
{
case GIMP_TOOL_LINE_HANDLE_NONE:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
case GIMP_TOOL_LINE_HANDLE_START:
if (constrain)
diff --git a/app/display/gimptooltransformgrid.c b/app/display/gimptooltransformgrid.c
index ba80be6..e91cc92 100644
--- a/app/display/gimptooltransformgrid.c
+++ b/app/display/gimptooltransformgrid.c
@@ -1429,7 +1429,7 @@ gimp_tool_transform_grid_motion (GimpToolWidget *widget,
this = 3; left = 2; right = 1; opposite = 0;
}
else
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
/* when the keep aspect transformation constraint is enabled,
* the translation shall only be along the diagonal that runs
@@ -1533,7 +1533,7 @@ gimp_tool_transform_grid_motion (GimpToolWidget *widget,
this_l = 0; this_r = 2;
}
else
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
opp_l = 3 - this_r; opp_r = 3 - this_l;
@@ -1619,7 +1619,7 @@ gimp_tool_transform_grid_motion (GimpToolWidget *widget,
this_l = 3; this_r = 1;
}
else
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
if (private->constrain_shear)
{
@@ -1670,7 +1670,7 @@ gimp_tool_transform_grid_motion (GimpToolWidget *widget,
this = 3; left = 2; right = 1; opposite = 0;
}
else
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
if (private->constrain_perspective)
{
@@ -1781,7 +1781,7 @@ get_friendly_operation_name (GimpTransformHandle handle)
case GIMP_TRANSFORM_HANDLE_ROTATION:
return _("Click-Drag to rotate");
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
}
}
@@ -2157,7 +2157,7 @@ gimp_tool_transform_grid_get_cursor (GimpToolWidget *widget,
flip = TRUE;
break;
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
}
if (flip)
diff --git a/app/display/gimptoolwidget.c b/app/display/gimptoolwidget.c
index ce777b5..eb442ca 100644
--- a/app/display/gimptoolwidget.c
+++ b/app/display/gimptoolwidget.c
@@ -200,7 +200,7 @@ gimp_tool_widget_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_DISPLAY_SHELL (private->shell));
+ gimp_assert (GIMP_IS_DISPLAY_SHELL (private->shell));
private->item = gimp_canvas_group_new (private->shell);
}
diff --git a/app/file/file-remote.c b/app/file/file-remote.c
index bf2bdb3..9b093cb 100644
--- a/app/file/file-remote.c
+++ b/app/file/file-remote.c
@@ -362,7 +362,7 @@ file_remote_progress_callback (goffset current_num_bytes,
break;
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
}
gimp_progress_set_text (progress->progress, format, done, total);
@@ -389,7 +389,7 @@ file_remote_progress_callback (goffset current_num_bytes,
break;
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
}
gimp_progress_set_text (progress->progress, format, done);
diff --git a/app/gegl/gimp-gegl-apply-operation.c b/app/gegl/gimp-gegl-apply-operation.c
index c22e5e0..ee8131a 100644
--- a/app/gegl/gimp-gegl-apply-operation.c
+++ b/app/gegl/gimp-gegl-apply-operation.c
@@ -438,7 +438,7 @@ gimp_gegl_apply_border (GeglBuffer *src_buffer,
break;
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
}
gimp_gegl_apply_operation (src_buffer, progress, undo_desc,
diff --git a/app/gui/gimpuiconfigurer.c b/app/gui/gimpuiconfigurer.c
index ec49633..0e8459a 100644
--- a/app/gui/gimpuiconfigurer.c
+++ b/app/gui/gimpuiconfigurer.c
@@ -409,7 +409,7 @@ gimp_ui_configurer_move_docks_to_window (GimpUIConfigurer *ui_configurer,
}
else
{
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
}
gtk_window_parse_geometry (GTK_WINDOW (dock_window), geometry);
diff --git a/app/operations/layer-modes/gimp-layer-modes.c b/app/operations/layer-modes/gimp-layer-modes.c
index 55840c8..a42311d 100644
--- a/app/operations/layer-modes/gimp-layer-modes.c
+++ b/app/operations/layer-modes/gimp-layer-modes.c
@@ -1107,7 +1107,7 @@ gimp_layer_modes_init (void)
for (i = 0; i < G_N_ELEMENTS (layer_mode_infos); i++)
{
- g_assert ((GimpLayerMode) i == layer_mode_infos[i].layer_mode);
+ gimp_assert ((GimpLayerMode) i == layer_mode_infos[i].layer_mode);
}
}
diff --git a/app/operations/layer-modes/gimpoperationlayermode.c
b/app/operations/layer-modes/gimpoperationlayermode.c
index f2998ff..bf5c9c4 100644
--- a/app/operations/layer-modes/gimpoperationlayermode.c
+++ b/app/operations/layer-modes/gimpoperationlayermode.c
@@ -571,8 +571,8 @@ gimp_operation_layer_mode_real_process (GeglOperation *operation,
if (blend_space != GIMP_LAYER_COLOR_SPACE_AUTO)
{
- g_assert (composite_space >= 1 && composite_space < 4);
- g_assert (blend_space >= 1 && blend_space < 4);
+ gimp_assert (composite_space >= 1 && composite_space < 4);
+ gimp_assert (blend_space >= 1 && blend_space < 4);
composite_to_blend_fish = gimp_layer_color_space_fish [composite_space - 1]
[blend_space - 1];
diff --git a/app/paint/gimpbrushcore.c b/app/paint/gimpbrushcore.c
index 5d192b0..1eecd0c 100644
--- a/app/paint/gimpbrushcore.c
+++ b/app/paint/gimpbrushcore.c
@@ -228,7 +228,7 @@ gimp_brush_core_init (GimpBrushCore *core)
BRUSH_CORE_JITTER_LUTSIZE));
}
- g_assert (BRUSH_CORE_SUBSAMPLE == KERNEL_SUBSAMPLE);
+ gimp_assert (BRUSH_CORE_SUBSAMPLE == KERNEL_SUBSAMPLE);
for (i = 0; i < KERNEL_SUBSAMPLE + 1; i++)
{
diff --git a/app/paint/gimpinkundo.c b/app/paint/gimpinkundo.c
index b3aae31..c48ed7a 100644
--- a/app/paint/gimpinkundo.c
+++ b/app/paint/gimpinkundo.c
@@ -69,7 +69,7 @@ gimp_ink_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_INK (GIMP_PAINT_CORE_UNDO (ink_undo)->paint_core));
+ gimp_assert (GIMP_IS_INK (GIMP_PAINT_CORE_UNDO (ink_undo)->paint_core));
ink = GIMP_INK (GIMP_PAINT_CORE_UNDO (ink_undo)->paint_core);
diff --git a/app/paint/gimppaintcoreundo.c b/app/paint/gimppaintcoreundo.c
index 939f5f6..0035a8c 100644
--- a/app/paint/gimppaintcoreundo.c
+++ b/app/paint/gimppaintcoreundo.c
@@ -87,7 +87,7 @@ gimp_paint_core_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_PAINT_CORE (paint_core_undo->paint_core));
+ gimp_assert (GIMP_IS_PAINT_CORE (paint_core_undo->paint_core));
paint_core_undo->last_coords = paint_core_undo->paint_core->start_coords;
diff --git a/app/pdb/drawable-cmds.c b/app/pdb/drawable-cmds.c
index 377212c..ef78d65 100644
--- a/app/pdb/drawable-cmds.c
+++ b/app/pdb/drawable-cmds.c
@@ -794,7 +794,7 @@ drawable_thumbnail_invoker (GimpProcedure *procedure,
GimpTempBuf *buf;
gint dwidth, dheight;
- g_assert (GIMP_VIEWABLE_MAX_PREVIEW_SIZE >= 1024);
+ gimp_assert (GIMP_VIEWABLE_MAX_PREVIEW_SIZE >= 1024);
/* Adjust the width/height ratio */
dwidth = gimp_item_get_width (GIMP_ITEM (drawable));
diff --git a/app/pdb/gimpprocedure.c b/app/pdb/gimpprocedure.c
index f14bdc9..c94f98d 100644
--- a/app/pdb/gimpprocedure.c
+++ b/app/pdb/gimpprocedure.c
@@ -592,7 +592,7 @@ gimp_procedure_get_return_values (GimpProcedure *procedure,
break;
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
}
}
else
diff --git a/app/pdb/image-cmds.c b/app/pdb/image-cmds.c
index 7c96937..08da2a4 100644
--- a/app/pdb/image-cmds.c
+++ b/app/pdb/image-cmds.c
@@ -1655,7 +1655,7 @@ image_thumbnail_invoker (GimpProcedure *procedure,
GimpTempBuf *buf;
gint dwidth, dheight;
- g_assert (GIMP_VIEWABLE_MAX_PREVIEW_SIZE >= 1024);
+ gimp_assert (GIMP_VIEWABLE_MAX_PREVIEW_SIZE >= 1024);
/* Adjust the width/height ratio */
dwidth = gimp_image_get_width (image);
diff --git a/app/plug-in/gimpplugin.c b/app/plug-in/gimpplugin.c
index fabb7dd..5a3f20f 100644
--- a/app/plug-in/gimpplugin.c
+++ b/app/plug-in/gimpplugin.c
@@ -313,7 +313,7 @@ gimp_plug_in_open (GimpPlugIn *plug_in,
break;
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
}
stm = g_strdup_printf ("%d", plug_in->manager->gimp->stack_trace_mode);
diff --git a/app/text/gimptextundo.c b/app/text/gimptextundo.c
index af934a5..2ce8458 100644
--- a/app/text/gimptextundo.c
+++ b/app/text/gimptextundo.c
@@ -103,7 +103,7 @@ gimp_text_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_TEXT_LAYER (GIMP_ITEM_UNDO (text_undo)->item));
+ gimp_assert (GIMP_IS_TEXT_LAYER (GIMP_ITEM_UNDO (text_undo)->item));
layer = GIMP_TEXT_LAYER (GIMP_ITEM_UNDO (text_undo)->item);
@@ -112,7 +112,7 @@ gimp_text_undo_constructed (GObject *object)
case GIMP_UNDO_TEXT_LAYER:
if (text_undo->pspec)
{
- g_assert (text_undo->pspec->owner_type == GIMP_TYPE_TEXT);
+ gimp_assert (text_undo->pspec->owner_type == GIMP_TYPE_TEXT);
text_undo->value = g_slice_new0 (GValue);
@@ -135,7 +135,7 @@ gimp_text_undo_constructed (GObject *object)
break;
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
}
}
@@ -282,7 +282,7 @@ gimp_text_undo_pop (GimpUndo *undo,
break;
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
}
}
diff --git a/app/tools/gimpblendtool-editor.c b/app/tools/gimpblendtool-editor.c
index 4f45dbf..62d57df 100644
--- a/app/tools/gimpblendtool-editor.c
+++ b/app/tools/gimpblendtool-editor.c
@@ -257,7 +257,7 @@ gimp_blend_tool_editor_line_prepare_to_remove_slider (GimpToolLine *line,
{
/* see comment in gimp_blend_tool_editor_delete_stop() */
- g_assert (info->gradient != NULL);
+ gimp_assert (info->gradient != NULL);
tentative_gradient = g_object_ref (info->gradient);
}
@@ -595,7 +595,7 @@ gimp_blend_tool_editor_endpoint_se_value_changed (GimpSizeEntry *se,
break;
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
}
gimp_blend_tool_editor_unblock_handlers (blend_tool);
@@ -843,7 +843,7 @@ gimp_blend_tool_editor_handle_get_segment (GimpBlendTool *blend_tool,
sliders = gimp_tool_line_get_sliders (GIMP_TOOL_LINE (blend_tool->widget),
&n_sliders);
- g_assert (handle >= 0 && handle < n_sliders);
+ gimp_assert (handle >= 0 && handle < n_sliders);
seg_i = GPOINTER_TO_INT (sliders[handle].data);
@@ -862,7 +862,7 @@ gimp_blend_tool_editor_block_handlers (GimpBlendTool *blend_tool)
static void
gimp_blend_tool_editor_unblock_handlers (GimpBlendTool *blend_tool)
{
- g_assert (blend_tool->block_handlers_count > 0);
+ gimp_assert (blend_tool->block_handlers_count > 0);
blend_tool->block_handlers_count--;
}
@@ -886,7 +886,7 @@ gimp_blend_tool_editor_freeze_gradient (GimpBlendTool *blend_tool)
if (blend_tool->gradient == custom || options->modify_active)
{
- g_assert (gimp_blend_tool_editor_is_gradient_editable (blend_tool));
+ gimp_assert (gimp_blend_tool_editor_is_gradient_editable (blend_tool));
gimp_data_freeze (GIMP_DATA (blend_tool->gradient));
}
@@ -901,8 +901,8 @@ gimp_blend_tool_editor_freeze_gradient (GimpBlendTool *blend_tool)
gimp_context_set_gradient (GIMP_CONTEXT (options), custom);
- g_assert (blend_tool->gradient == custom);
- g_assert (gimp_blend_tool_editor_is_gradient_editable (blend_tool));
+ gimp_assert (blend_tool->gradient == custom);
+ gimp_assert (gimp_blend_tool_editor_is_gradient_editable (blend_tool));
}
if (blend_tool->edit_count > 0)
@@ -963,7 +963,7 @@ gimp_blend_tool_editor_delete_stop (GimpBlendTool *blend_tool,
{
BlendInfo *info;
- g_assert (gimp_blend_tool_editor_handle_is_stop (blend_tool, slider));
+ gimp_assert (gimp_blend_tool_editor_handle_is_stop (blend_tool, slider));
gimp_blend_tool_editor_start_edit (blend_tool);
gimp_blend_tool_editor_freeze_gradient (blend_tool);
@@ -982,7 +982,7 @@ gimp_blend_tool_editor_delete_stop (GimpBlendTool *blend_tool,
* way during the action, which is ugly, but currently always true.
*/
- g_assert (info->gradient != NULL);
+ gimp_assert (info->gradient != NULL);
gimp_data_copy (GIMP_DATA (blend_tool->gradient),
GIMP_DATA (info->gradient));
@@ -1013,7 +1013,7 @@ gimp_blend_tool_editor_midpoint_to_stop (GimpBlendTool *blend_tool,
{
const GimpControllerSlider *sliders;
- g_assert (gimp_blend_tool_editor_handle_is_midpoint (blend_tool, slider));
+ gimp_assert (gimp_blend_tool_editor_handle_is_midpoint (blend_tool, slider));
sliders = gimp_tool_line_get_sliders (GIMP_TOOL_LINE (blend_tool->widget),
NULL);
@@ -1631,7 +1631,7 @@ gimp_blend_tool_editor_update_endpoint_gui (GimpBlendTool *blend_tool,
break;
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
}
/* swap the endpoint handles, if necessary */
@@ -1670,7 +1670,7 @@ gimp_blend_tool_editor_update_endpoint_gui (GimpBlendTool *blend_tool,
break;
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
}
gimp_tool_gui_set_title (blend_tool->gui, title);
@@ -1930,8 +1930,8 @@ gimp_blend_tool_editor_blend_info_apply (GimpBlendTool *blend_tool,
{
gint selection;
- g_assert (blend_tool->widget != NULL);
- g_assert (blend_tool->gradient != NULL);
+ gimp_assert (blend_tool->widget != NULL);
+ gimp_assert (blend_tool->gradient != NULL);
/* pick the handle to select */
if (info->gradient)
@@ -1946,7 +1946,7 @@ gimp_blend_tool_editor_blend_info_apply (GimpBlendTool *blend_tool,
else if (info->added_handle != GIMP_TOOL_LINE_HANDLE_NONE)
{
/* we're undoing a stop addition operation */
- g_assert (gimp_blend_tool_editor_handle_is_stop (blend_tool,
+ gimp_assert (gimp_blend_tool_editor_handle_is_stop (blend_tool,
info->added_handle));
selection =
@@ -2380,8 +2380,8 @@ gimp_blend_tool_editor_undo (GimpBlendTool *blend_tool)
BlendInfo *info;
BlendInfo *new_info;
- g_assert (blend_tool->undo_stack != NULL);
- g_assert (blend_tool->edit_count == 0);
+ gimp_assert (blend_tool->undo_stack != NULL);
+ gimp_assert (blend_tool->edit_count == 0);
info = blend_tool->undo_stack->data;
@@ -2419,8 +2419,8 @@ gimp_blend_tool_editor_redo (GimpBlendTool *blend_tool)
BlendInfo *info;
BlendInfo *new_info;
- g_assert (blend_tool->redo_stack != NULL);
- g_assert (blend_tool->edit_count == 0);
+ gimp_assert (blend_tool->redo_stack != NULL);
+ gimp_assert (blend_tool->edit_count == 0);
info = blend_tool->redo_stack->data;
diff --git a/app/tools/gimpbrushtool.c b/app/tools/gimpbrushtool.c
index f814cdd..7cd9fe6 100644
--- a/app/tools/gimpbrushtool.c
+++ b/app/tools/gimpbrushtool.c
@@ -125,7 +125,7 @@ gimp_brush_tool_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_BRUSH_CORE (paint_tool->core));
+ gimp_assert (GIMP_IS_BRUSH_CORE (paint_tool->core));
g_signal_connect_object (gimp_tool_get_options (tool), "brush-changed",
G_CALLBACK (gimp_brush_tool_brush_changed),
diff --git a/app/tools/gimpfiltertool.c b/app/tools/gimpfiltertool.c
index 15d668f..3b0bab6 100644
--- a/app/tools/gimpfiltertool.c
+++ b/app/tools/gimpfiltertool.c
@@ -1048,7 +1048,7 @@ gimp_filter_tool_create_filter (GimpFilterTool *filter_tool)
g_object_unref (filter_tool->filter);
}
- g_assert (filter_tool->operation);
+ gimp_assert (filter_tool->operation);
filter_tool->filter = gimp_drawable_filter_new (tool->drawable,
gimp_tool_get_undo_desc (tool),
diff --git a/app/tools/gimpforegroundselecttoolundo.c b/app/tools/gimpforegroundselecttoolundo.c
index df05cfc..c1aff95 100644
--- a/app/tools/gimpforegroundselecttoolundo.c
+++ b/app/tools/gimpforegroundselecttoolundo.c
@@ -93,7 +93,7 @@ gimp_foreground_select_tool_undo_constructed (GObject *object)
fg_select_tool_undo = GIMP_FOREGROUND_SELECT_TOOL_UNDO (object);
- g_assert (GIMP_IS_FOREGROUND_SELECT_TOOL (fg_select_tool_undo->foreground_select_tool));
+ gimp_assert (GIMP_IS_FOREGROUND_SELECT_TOOL (fg_select_tool_undo->foreground_select_tool));
g_object_add_weak_pointer (G_OBJECT (fg_select_tool_undo->foreground_select_tool),
(gpointer) &fg_select_tool_undo->foreground_select_tool);
diff --git a/app/tools/gimpguidetool.c b/app/tools/gimpguidetool.c
index 215558a..9ae4ebf 100644
--- a/app/tools/gimpguidetool.c
+++ b/app/tools/gimpguidetool.c
@@ -175,7 +175,7 @@ gimp_guide_tool_button_release (GimpTool *tool,
break;
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
}
}
}
diff --git a/app/tools/gimppainttool.c b/app/tools/gimppainttool.c
index 0b5bac9..a0f3f9d 100644
--- a/app/tools/gimppainttool.c
+++ b/app/tools/gimppainttool.c
@@ -172,14 +172,14 @@ gimp_paint_tool_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_TOOL_INFO (tool->tool_info));
- g_assert (GIMP_IS_PAINT_INFO (tool->tool_info->paint_info));
+ gimp_assert (GIMP_IS_TOOL_INFO (tool->tool_info));
+ gimp_assert (GIMP_IS_PAINT_INFO (tool->tool_info->paint_info));
display_config = GIMP_DISPLAY_CONFIG (tool->tool_info->gimp->config);
paint_info = tool->tool_info->paint_info;
- g_assert (g_type_is_a (paint_info->paint_type, GIMP_TYPE_PAINT_CORE));
+ gimp_assert (g_type_is_a (paint_info->paint_type, GIMP_TYPE_PAINT_CORE));
paint_tool->core = g_object_new (paint_info->paint_type,
"undo-desc", paint_info->blurb,
diff --git a/app/tools/gimptool.c b/app/tools/gimptool.c
index 1a59913..c4d3563 100644
--- a/app/tools/gimptool.c
+++ b/app/tools/gimptool.c
@@ -209,7 +209,7 @@ gimp_tool_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_TOOL_INFO (tool->tool_info));
+ gimp_assert (GIMP_IS_TOOL_INFO (tool->tool_info));
g_signal_connect_object (gimp_tool_get_options (tool), "notify",
G_CALLBACK (gimp_tool_options_notify),
diff --git a/app/tools/gimptransformtoolundo.c b/app/tools/gimptransformtoolundo.c
index 1470df7..25830b9 100644
--- a/app/tools/gimptransformtoolundo.c
+++ b/app/tools/gimptransformtoolundo.c
@@ -91,7 +91,7 @@ gimp_transform_tool_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_TRANSFORM_TOOL (transform_tool_undo->transform_tool));
+ gimp_assert (GIMP_IS_TRANSFORM_TOOL (transform_tool_undo->transform_tool));
transform_tool = transform_tool_undo->transform_tool;
diff --git a/app/tools/gimpwarptool.c b/app/tools/gimpwarptool.c
index 1ccb3bb..c660d0e 100644
--- a/app/tools/gimpwarptool.c
+++ b/app/tools/gimpwarptool.c
@@ -1051,7 +1051,7 @@ gimp_warp_tool_free_op (GeglNode *op)
parent = gegl_node_get_parent (op);
- g_assert (parent != NULL);
+ gimp_assert (parent != NULL);
gegl_node_remove_child (parent, op);
}
diff --git a/app/vectors/gimpvectorsmodundo.c b/app/vectors/gimpvectorsmodundo.c
index 86b8b6d..571937f 100644
--- a/app/vectors/gimpvectorsmodundo.c
+++ b/app/vectors/gimpvectorsmodundo.c
@@ -71,7 +71,7 @@ gimp_vectors_mod_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_VECTORS (GIMP_ITEM_UNDO (object)->item));
+ gimp_assert (GIMP_IS_VECTORS (GIMP_ITEM_UNDO (object)->item));
vectors = GIMP_VECTORS (GIMP_ITEM_UNDO (object)->item);
diff --git a/app/vectors/gimpvectorspropundo.c b/app/vectors/gimpvectorspropundo.c
index 5813362..14fe556 100644
--- a/app/vectors/gimpvectorspropundo.c
+++ b/app/vectors/gimpvectorspropundo.c
@@ -63,14 +63,14 @@ gimp_vectors_prop_undo_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_VECTORS (GIMP_ITEM_UNDO (object)->item));
+ gimp_assert (GIMP_IS_VECTORS (GIMP_ITEM_UNDO (object)->item));
/* vectors = GIMP_VECTORS (GIMP_ITEM_UNDO (object)->item); */
switch (GIMP_UNDO (object)->undo_type)
{
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
}
}
@@ -89,6 +89,6 @@ gimp_vectors_prop_undo_pop (GimpUndo *undo,
switch (undo->undo_type)
{
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
}
}
diff --git a/app/vectors/gimpvectorsundo.c b/app/vectors/gimpvectorsundo.c
index c279193..e1399ae 100644
--- a/app/vectors/gimpvectorsundo.c
+++ b/app/vectors/gimpvectorsundo.c
@@ -105,7 +105,7 @@ gimp_vectors_undo_constructed (GObject *object)
{
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_VECTORS (GIMP_ITEM_UNDO (object)->item));
+ gimp_assert (GIMP_IS_VECTORS (GIMP_ITEM_UNDO (object)->item));
}
static void
diff --git a/app/widgets/gimpactiongroup.c b/app/widgets/gimpactiongroup.c
index acdd18a..27ff5b3 100644
--- a/app/widgets/gimpactiongroup.c
+++ b/app/widgets/gimpactiongroup.c
@@ -136,7 +136,7 @@ gimp_action_group_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_GIMP (group->gimp));
+ gimp_assert (GIMP_IS_GIMP (group->gimp));
name = gtk_action_group_get_name (GTK_ACTION_GROUP (object));
diff --git a/app/widgets/gimpcontainereditor.c b/app/widgets/gimpcontainereditor.c
index 1c3c148..c6cc41f 100644
--- a/app/widgets/gimpcontainereditor.c
+++ b/app/widgets/gimpcontainereditor.c
@@ -226,8 +226,8 @@ gimp_container_editor_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_CONTAINER (editor->priv->container));
- g_assert (GIMP_IS_CONTEXT (editor->priv->context));
+ gimp_assert (GIMP_IS_CONTAINER (editor->priv->container));
+ gimp_assert (GIMP_IS_CONTEXT (editor->priv->context));
switch (editor->priv->view_type)
{
@@ -256,7 +256,7 @@ gimp_container_editor_constructed (GObject *object)
break;
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
}
if (GIMP_IS_LIST (editor->priv->container))
diff --git a/app/widgets/gimpcontainertreestore.c b/app/widgets/gimpcontainertreestore.c
index be22d6d..315205a 100644
--- a/app/widgets/gimpcontainertreestore.c
+++ b/app/widgets/gimpcontainertreestore.c
@@ -514,25 +514,25 @@ gimp_container_tree_store_columns_init (GType *types,
g_return_if_fail (n_types != NULL);
g_return_if_fail (*n_types == 0);
- g_assert (GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER ==
- gimp_container_tree_store_columns_add (types, n_types,
- GIMP_TYPE_VIEW_RENDERER));
+ gimp_assert (GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER ==
+ gimp_container_tree_store_columns_add (types, n_types,
+ GIMP_TYPE_VIEW_RENDERER));
- g_assert (GIMP_CONTAINER_TREE_STORE_COLUMN_NAME ==
- gimp_container_tree_store_columns_add (types, n_types,
- G_TYPE_STRING));
+ gimp_assert (GIMP_CONTAINER_TREE_STORE_COLUMN_NAME ==
+ gimp_container_tree_store_columns_add (types, n_types,
+ G_TYPE_STRING));
- g_assert (GIMP_CONTAINER_TREE_STORE_COLUMN_NAME_ATTRIBUTES ==
- gimp_container_tree_store_columns_add (types, n_types,
- PANGO_TYPE_ATTR_LIST));
+ gimp_assert (GIMP_CONTAINER_TREE_STORE_COLUMN_NAME_ATTRIBUTES ==
+ gimp_container_tree_store_columns_add (types, n_types,
+ PANGO_TYPE_ATTR_LIST));
- g_assert (GIMP_CONTAINER_TREE_STORE_COLUMN_NAME_SENSITIVE ==
- gimp_container_tree_store_columns_add (types, n_types,
- G_TYPE_BOOLEAN));
+ gimp_assert (GIMP_CONTAINER_TREE_STORE_COLUMN_NAME_SENSITIVE ==
+ gimp_container_tree_store_columns_add (types, n_types,
+ G_TYPE_BOOLEAN));
- g_assert (GIMP_CONTAINER_TREE_STORE_COLUMN_USER_DATA ==
- gimp_container_tree_store_columns_add (types, n_types,
- G_TYPE_POINTER));
+ gimp_assert (GIMP_CONTAINER_TREE_STORE_COLUMN_USER_DATA ==
+ gimp_container_tree_store_columns_add (types, n_types,
+ G_TYPE_POINTER));
}
gint
diff --git a/app/widgets/gimpcontrollereditor.c b/app/widgets/gimpcontrollereditor.c
index b4e804f..78b4442 100644
--- a/app/widgets/gimpcontrollereditor.c
+++ b/app/widgets/gimpcontrollereditor.c
@@ -177,7 +177,7 @@ gimp_controller_editor_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_CONTROLLER_INFO (editor->info));
+ gimp_assert (GIMP_IS_CONTROLLER_INFO (editor->info));
info = editor->info;
controller = info->controller;
diff --git a/app/widgets/gimpcontrollerlist.c b/app/widgets/gimpcontrollerlist.c
index 404528d..2a78aa0 100644
--- a/app/widgets/gimpcontrollerlist.c
+++ b/app/widgets/gimpcontrollerlist.c
@@ -327,7 +327,7 @@ gimp_controller_list_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_GIMP (list->gimp));
+ gimp_assert (GIMP_IS_GIMP (list->gimp));
gimp_container_view_set_container (GIMP_CONTAINER_VIEW (list->dest),
gimp_controllers_get_list (list->gimp));
diff --git a/app/widgets/gimpdataeditor.c b/app/widgets/gimpdataeditor.c
index 32008ce..def0d53 100644
--- a/app/widgets/gimpdataeditor.c
+++ b/app/widgets/gimpdataeditor.c
@@ -200,8 +200,8 @@ gimp_data_editor_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_DATA_FACTORY (editor->data_factory));
- g_assert (GIMP_IS_CONTEXT (editor->context));
+ gimp_assert (GIMP_IS_DATA_FACTORY (editor->data_factory));
+ gimp_assert (GIMP_IS_CONTEXT (editor->context));
gimp_data_editor_set_edit_active (editor, TRUE);
}
diff --git a/app/widgets/gimpdatafactoryview.c b/app/widgets/gimpdatafactoryview.c
index 7438d54..6367030 100644
--- a/app/widgets/gimpdatafactoryview.c
+++ b/app/widgets/gimpdatafactoryview.c
@@ -198,8 +198,8 @@ gimp_data_factory_view_constructor (GType type,
factory_view = GIMP_DATA_FACTORY_VIEW (object);
- g_assert (GIMP_IS_DATA_FACTORY (factory_view->priv->factory));
- g_assert (factory_view->priv->action_group != NULL);
+ gimp_assert (GIMP_IS_DATA_FACTORY (factory_view->priv->factory));
+ gimp_assert (factory_view->priv->action_group != NULL);
factory_view->priv->tagged_container =
gimp_tagged_container_new (gimp_data_factory_get_container (factory_view->priv->factory));
diff --git a/app/widgets/gimpdeviceeditor.c b/app/widgets/gimpdeviceeditor.c
index c499650..d4854e7 100644
--- a/app/widgets/gimpdeviceeditor.c
+++ b/app/widgets/gimpdeviceeditor.c
@@ -220,7 +220,7 @@ gimp_device_editor_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_GIMP (private->gimp));
+ gimp_assert (GIMP_IS_GIMP (private->gimp));
devices = GIMP_CONTAINER (gimp_devices_get_manager (private->gimp));
diff --git a/app/widgets/gimpdeviceinfo.c b/app/widgets/gimpdeviceinfo.c
index 2a43f8a..7c54e24 100644
--- a/app/widgets/gimpdeviceinfo.c
+++ b/app/widgets/gimpdeviceinfo.c
@@ -192,8 +192,8 @@ gimp_device_info_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert ((info->device == NULL && info->display == NULL) ||
- (GDK_IS_DEVICE (info->device) && GDK_IS_DISPLAY (info->display)));
+ gimp_assert ((info->device == NULL && info->display == NULL) ||
+ (GDK_IS_DEVICE (info->device) && GDK_IS_DISPLAY (info->display)));
gimp = GIMP_CONTEXT (object)->gimp;
diff --git a/app/widgets/gimpdeviceinfoeditor.c b/app/widgets/gimpdeviceinfoeditor.c
index 92e1cd1..b6b07e8 100644
--- a/app/widgets/gimpdeviceinfoeditor.c
+++ b/app/widgets/gimpdeviceinfoeditor.c
@@ -337,7 +337,7 @@ gimp_device_info_editor_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_DEVICE_INFO (private->info));
+ gimp_assert (GIMP_IS_DEVICE_INFO (private->info));
/* the mode menu */
diff --git a/app/widgets/gimpdevicemanager.c b/app/widgets/gimpdevicemanager.c
index b2c3cd8..b952bae 100644
--- a/app/widgets/gimpdevicemanager.c
+++ b/app/widgets/gimpdevicemanager.c
@@ -140,7 +140,7 @@ gimp_device_manager_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_GIMP (private->gimp));
+ gimp_assert (GIMP_IS_GIMP (private->gimp));
disp_manager = gdk_display_manager_get ();
diff --git a/app/widgets/gimpdevicestatus.c b/app/widgets/gimpdevicestatus.c
index a63c2a5..a274979 100644
--- a/app/widgets/gimpdevicestatus.c
+++ b/app/widgets/gimpdevicestatus.c
@@ -157,7 +157,7 @@ gimp_device_status_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_GIMP (status->gimp));
+ gimp_assert (GIMP_IS_GIMP (status->gimp));
devices = GIMP_CONTAINER (gimp_devices_get_manager (status->gimp));
diff --git a/app/widgets/gimpdynamicsoutputeditor.c b/app/widgets/gimpdynamicsoutputeditor.c
index c5ac0ac..36abb86 100644
--- a/app/widgets/gimpdynamicsoutputeditor.c
+++ b/app/widgets/gimpdynamicsoutputeditor.c
@@ -181,7 +181,7 @@ gimp_dynamics_output_editor_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_DYNAMICS_OUTPUT (private->output));
+ gimp_assert (GIMP_IS_DYNAMICS_OUTPUT (private->output));
private->curve_view = gimp_curve_view_new ();
g_object_set (private->curve_view,
diff --git a/app/widgets/gimpfilleditor.c b/app/widgets/gimpfilleditor.c
index 98f3648..0d18d35 100644
--- a/app/widgets/gimpfilleditor.c
+++ b/app/widgets/gimpfilleditor.c
@@ -107,7 +107,7 @@ gimp_fill_editor_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_FILL_OPTIONS (editor->options));
+ gimp_assert (GIMP_IS_FILL_OPTIONS (editor->options));
box = gimp_prop_enum_radio_box_new (G_OBJECT (editor->options), "style",
0, 0);
diff --git a/app/widgets/gimpgrideditor.c b/app/widgets/gimpgrideditor.c
index f5f025e..1b47011 100644
--- a/app/widgets/gimpgrideditor.c
+++ b/app/widgets/gimpgrideditor.c
@@ -129,7 +129,7 @@ gimp_grid_editor_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (editor->grid != NULL);
+ gimp_assert (editor->grid != NULL);
frame = gimp_frame_new (_("Appearance"));
gtk_box_pack_start (GTK_BOX (editor), frame, FALSE, FALSE, 0);
diff --git a/app/widgets/gimpiconpicker.c b/app/widgets/gimpiconpicker.c
index 2a1e5dc..b460838 100644
--- a/app/widgets/gimpiconpicker.c
+++ b/app/widgets/gimpiconpicker.c
@@ -172,7 +172,7 @@ gimp_icon_picker_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_GIMP (private->gimp));
+ gimp_assert (GIMP_IS_GIMP (private->gimp));
/* Set up the icon picker */
private->icon_name_container = gimp_list_new (GIMP_TYPE_TEMPLATE, FALSE);
diff --git a/app/widgets/gimpimageparasiteview.c b/app/widgets/gimpimageparasiteview.c
index 2da6569..5ffcc66 100644
--- a/app/widgets/gimpimageparasiteview.c
+++ b/app/widgets/gimpimageparasiteview.c
@@ -123,8 +123,8 @@ gimp_image_parasite_view_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (view->parasite != NULL);
- g_assert (view->image != NULL);
+ gimp_assert (view->parasite != NULL);
+ gimp_assert (view->image != NULL);
g_signal_connect_object (view->image, "parasite-attached",
G_CALLBACK (gimp_image_parasite_view_parasite_changed),
diff --git a/app/widgets/gimpimagepropview.c b/app/widgets/gimpimagepropview.c
index 08fc72f..0514e85 100644
--- a/app/widgets/gimpimagepropview.c
+++ b/app/widgets/gimpimagepropview.c
@@ -169,7 +169,7 @@ gimp_image_prop_view_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (view->image != NULL);
+ gimp_assert (view->image != NULL);
g_signal_connect_object (view->image, "name-changed",
G_CALLBACK (gimp_image_prop_view_file_update),
diff --git a/app/widgets/gimplanguagestore-parser.c b/app/widgets/gimplanguagestore-parser.c
index 96574bf..cc78248 100644
--- a/app/widgets/gimplanguagestore-parser.c
+++ b/app/widgets/gimplanguagestore-parser.c
@@ -507,7 +507,8 @@ iso_codes_parser_start_unknown (IsoCodesParser *parser)
static void
iso_codes_parser_end_unknown (IsoCodesParser *parser)
{
- g_assert (parser->unknown_depth > 0 && parser->state == ISO_CODES_IN_UNKNOWN);
+ gimp_assert (parser->unknown_depth > 0 &&
+ parser->state == ISO_CODES_IN_UNKNOWN);
parser->unknown_depth--;
diff --git a/app/widgets/gimppdbdialog.c b/app/widgets/gimppdbdialog.c
index 2e059d7..e08d892 100644
--- a/app/widgets/gimppdbdialog.c
+++ b/app/widgets/gimppdbdialog.c
@@ -183,9 +183,9 @@ gimp_pdb_dialog_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_PDB (dialog->pdb));
- g_assert (GIMP_IS_CONTEXT (dialog->caller_context));
- g_assert (g_type_is_a (dialog->select_type, GIMP_TYPE_OBJECT));
+ gimp_assert (GIMP_IS_PDB (dialog->pdb));
+ gimp_assert (GIMP_IS_CONTEXT (dialog->caller_context));
+ gimp_assert (g_type_is_a (dialog->select_type, GIMP_TYPE_OBJECT));
dialog->context = gimp_context_new (dialog->caller_context->gimp,
G_OBJECT_TYPE_NAME (object),
diff --git a/app/widgets/gimppickablebutton.c b/app/widgets/gimppickablebutton.c
index 3e4251b..a422024 100644
--- a/app/widgets/gimppickablebutton.c
+++ b/app/widgets/gimppickablebutton.c
@@ -151,7 +151,7 @@ gimp_pickable_button_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_CONTEXT (button->private->context));
+ gimp_assert (GIMP_IS_CONTEXT (button->private->context));
button->private->view =
gimp_view_new_by_types (button->private->context,
diff --git a/app/widgets/gimppickablepopup.c b/app/widgets/gimppickablepopup.c
index de9be27..b7aa916 100644
--- a/app/widgets/gimppickablepopup.c
+++ b/app/widgets/gimppickablepopup.c
@@ -160,7 +160,7 @@ gimp_pickable_popup_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_CONTEXT (popup->priv->context));
+ gimp_assert (GIMP_IS_CONTEXT (popup->priv->context));
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
diff --git a/app/widgets/gimpselectiondata.c b/app/widgets/gimpselectiondata.c
index 597cd87..cb88122 100644
--- a/app/widgets/gimpselectiondata.c
+++ b/app/widgets/gimpselectiondata.c
@@ -910,7 +910,7 @@ gimp_unescape_uri_string (const char *escaped,
*out++ = c;
}
- g_assert (out - result <= len);
+ gimp_assert (out - result <= len);
*out = '\0';
if (in != in_end)
diff --git a/app/widgets/gimpsettingsbox.c b/app/widgets/gimpsettingsbox.c
index 08b8433..9609623 100644
--- a/app/widgets/gimpsettingsbox.c
+++ b/app/widgets/gimpsettingsbox.c
@@ -288,9 +288,9 @@ gimp_settings_box_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_GIMP (private->gimp));
- g_assert (GIMP_IS_CONFIG (private->config));
- g_assert (GIMP_IS_CONTAINER (private->container));
+ gimp_assert (GIMP_IS_GIMP (private->gimp));
+ gimp_assert (GIMP_IS_CONFIG (private->config));
+ gimp_assert (GIMP_IS_CONTAINER (private->container));
private->combo = gimp_container_combo_box_new (private->container,
gimp_get_user_context (private->gimp),
diff --git a/app/widgets/gimpsettingseditor.c b/app/widgets/gimpsettingseditor.c
index 8ee14ae..93a9fd2 100644
--- a/app/widgets/gimpsettingseditor.c
+++ b/app/widgets/gimpsettingseditor.c
@@ -164,9 +164,9 @@ gimp_settings_editor_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_GIMP (private->gimp));
- g_assert (GIMP_IS_CONFIG (private->config));
- g_assert (GIMP_IS_CONTAINER (private->container));
+ gimp_assert (GIMP_IS_GIMP (private->gimp));
+ gimp_assert (GIMP_IS_CONFIG (private->config));
+ gimp_assert (GIMP_IS_CONTAINER (private->container));
private->view = gimp_container_tree_view_new (private->container,
gimp_get_user_context (private->gimp),
diff --git a/app/widgets/gimpstrokeeditor.c b/app/widgets/gimpstrokeeditor.c
index 0d710a5..5fdff41 100644
--- a/app/widgets/gimpstrokeeditor.c
+++ b/app/widgets/gimpstrokeeditor.c
@@ -118,7 +118,7 @@ gimp_stroke_editor_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_STROKE_OPTIONS (fill_editor->options));
+ gimp_assert (GIMP_IS_STROKE_OPTIONS (fill_editor->options));
options = GIMP_STROKE_OPTIONS (fill_editor->options);
diff --git a/app/widgets/gimptemplateeditor.c b/app/widgets/gimptemplateeditor.c
index c27f40b..f40a544 100644
--- a/app/widgets/gimptemplateeditor.c
+++ b/app/widgets/gimptemplateeditor.c
@@ -167,8 +167,8 @@ gimp_template_editor_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (private->gimp != NULL);
- g_assert (private->template != NULL);
+ gimp_assert (private->gimp != NULL);
+ gimp_assert (private->template != NULL);
template = private->template;
diff --git a/app/widgets/gimptextbuffer-serialize.c b/app/widgets/gimptextbuffer-serialize.c
index 4b1810a..7de9300 100644
--- a/app/widgets/gimptextbuffer-serialize.c
+++ b/app/widgets/gimptextbuffer-serialize.c
@@ -293,9 +293,9 @@ parse_tag_element (GMarkupParseContext *context,
const gchar *attribute_name = NULL;
const gchar *attribute_value = NULL;
- g_assert (peek_state (info) == STATE_MARKUP ||
- peek_state (info) == STATE_TAG ||
- peek_state (info) == STATE_UNKNOWN);
+ gimp_assert (peek_state (info) == STATE_MARKUP ||
+ peek_state (info) == STATE_TAG ||
+ peek_state (info) == STATE_UNKNOWN);
if (attribute_names)
attribute_name = attribute_names[0];
@@ -359,7 +359,7 @@ start_element_handler (GMarkupParseContext *context,
break;
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
break;
}
}
@@ -376,16 +376,16 @@ end_element_handler (GMarkupParseContext *context,
{
case STATE_UNKNOWN:
pop_state (info);
- g_assert (peek_state (info) == STATE_UNKNOWN ||
- peek_state (info) == STATE_TAG ||
- peek_state (info) == STATE_MARKUP);
+ gimp_assert (peek_state (info) == STATE_UNKNOWN ||
+ peek_state (info) == STATE_TAG ||
+ peek_state (info) == STATE_MARKUP);
break;
case STATE_TAG:
pop_state (info);
- g_assert (peek_state (info) == STATE_UNKNOWN ||
- peek_state (info) == STATE_TAG ||
- peek_state (info) == STATE_MARKUP);
+ gimp_assert (peek_state (info) == STATE_UNKNOWN ||
+ peek_state (info) == STATE_TAG ||
+ peek_state (info) == STATE_MARKUP);
/* Pop tag */
info->tag_stack = g_slist_delete_link (info->tag_stack,
@@ -394,13 +394,13 @@ end_element_handler (GMarkupParseContext *context,
case STATE_MARKUP:
pop_state (info);
- g_assert (peek_state (info) == STATE_START);
+ gimp_assert (peek_state (info) == STATE_START);
info->spans = g_list_reverse (info->spans);
break;
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
break;
}
}
@@ -442,7 +442,7 @@ text_handler (GMarkupParseContext *context,
switch (peek_state (info))
{
case STATE_START:
- g_assert_not_reached (); /* gmarkup shouldn't do this */
+ gimp_assert_not_reached (); /* gmarkup shouldn't do this */
break;
case STATE_MARKUP:
@@ -459,7 +459,7 @@ text_handler (GMarkupParseContext *context,
break;
default:
- g_assert_not_reached ();
+ gimp_assert_not_reached ();
break;
}
}
diff --git a/app/widgets/gimptextstyleeditor.c b/app/widgets/gimptextstyleeditor.c
index bbe5967..c37e3cf 100644
--- a/app/widgets/gimptextstyleeditor.c
+++ b/app/widgets/gimptextstyleeditor.c
@@ -301,10 +301,10 @@ gimp_text_style_editor_constructed (GObject *object)
G_OBJECT_CLASS (parent_class)->constructed (object);
- g_assert (GIMP_IS_GIMP (editor->gimp));
- g_assert (GIMP_IS_FONT_LIST (editor->fonts));
- g_assert (GIMP_IS_TEXT (editor->text));
- g_assert (GIMP_IS_TEXT_BUFFER (editor->buffer));
+ gimp_assert (GIMP_IS_GIMP (editor->gimp));
+ gimp_assert (GIMP_IS_FONT_LIST (editor->fonts));
+ gimp_assert (GIMP_IS_TEXT (editor->text));
+ gimp_assert (GIMP_IS_TEXT_BUFFER (editor->buffer));
editor->context = gimp_context_new (editor->gimp, "text style editor", NULL);
diff --git a/app/widgets/gimptoolbox.c b/app/widgets/gimptoolbox.c
index 4f29b53..b70bc15 100644
--- a/app/widgets/gimptoolbox.c
+++ b/app/widgets/gimptoolbox.c
@@ -198,7 +198,7 @@ gimp_toolbox_constructed (GObject *object)
GdkDisplay *display;
GList *list;
- g_assert (GIMP_IS_CONTEXT (toolbox->p->context));
+ gimp_assert (GIMP_IS_CONTEXT (toolbox->p->context));
config = GIMP_GUI_CONFIG (toolbox->p->context->gimp->config);
diff --git a/app/xcf/xcf-seek.c b/app/xcf/xcf-seek.c
index 257e0a9..a1ca86a 100644
--- a/app/xcf/xcf-seek.c
+++ b/app/xcf/xcf-seek.c
@@ -46,7 +46,7 @@ xcf_seek_pos (XcfInfo *info,
return FALSE;
}
- g_assert (info->cp == g_seekable_tell (info->seekable));
+ gimp_assert (info->cp == g_seekable_tell (info->seekable));
}
return TRUE;
diff --git a/pdb/groups/drawable.pdb b/pdb/groups/drawable.pdb
index a794ffb..e9b47e5 100644
--- a/pdb/groups/drawable.pdb
+++ b/pdb/groups/drawable.pdb
@@ -765,7 +765,7 @@ HELP
GimpTempBuf *buf;
gint dwidth, dheight;
- g_assert (GIMP_VIEWABLE_MAX_PREVIEW_SIZE >= 1024);
+ gimp_assert (GIMP_VIEWABLE_MAX_PREVIEW_SIZE >= 1024);
/* Adjust the width/height ratio */
dwidth = gimp_item_get_width (GIMP_ITEM (drawable));
diff --git a/pdb/groups/image.pdb b/pdb/groups/image.pdb
index 8397f82..43afb02 100644
--- a/pdb/groups/image.pdb
+++ b/pdb/groups/image.pdb
@@ -2797,7 +2797,7 @@ HELP
GimpTempBuf *buf;
gint dwidth, dheight;
- g_assert (GIMP_VIEWABLE_MAX_PREVIEW_SIZE >= 1024);
+ gimp_assert (GIMP_VIEWABLE_MAX_PREVIEW_SIZE >= 1024);
/* Adjust the width/height ratio */
dwidth = gimp_image_get_width (image);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]