Commit e475183f authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

oops, forgot a debugging g_print().

2000-05-08  Michael Natterer  <mitch@gimp.org>

	* app/errors.c (gimp_fatal_error): oops, forgot a debugging
	g_print().

	* app/gdisplay.c (gdisplay_set_menu_sensitivity): there _can_ be
	an active drawable even if there is no layer. Also reordered
	the rest if the checks.
parent 3b85cb5d
2000-05-08 Michael Natterer <mitch@gimp.org>
* app/errors.c (gimp_fatal_error): oops, forgot a debugging
g_print().
* app/gdisplay.c (gdisplay_set_menu_sensitivity): there _can_ be
an active drawable even if there is no layer. Also reordered
the rest if the checks.
2000-05-08 Sven Neumann <sven@gimp.org>
 
* libgimp/gimpmenu.[ch]: code review, no real changes
......
......@@ -1615,32 +1615,39 @@ gdisplay_remove_tool_cursor (GDisplay *gdisp)
void
gdisplay_set_menu_sensitivity (GDisplay *gdisp)
{
Layer *layer = NULL;
gboolean fs = FALSE;
gboolean aux = FALSE;
gboolean lm = FALSE;
gboolean lp = FALSE;
GimpImageBaseType base_type = 0;
GimpImageType type = -1;
GimpDrawable *drawable = NULL;
Layer *layer = NULL;
gboolean fs = FALSE;
gboolean aux = FALSE;
gboolean lm = FALSE;
gboolean lp = FALSE;
gboolean alpha = FALSE;
GimpDrawable *drawable = NULL;
GimpImageBaseType base_type = 0;
GimpImageType type = -1;
gint lind = -1;
gint lnum = -1;
gint lind = -1;
gint lnum = -1;
if (gdisp)
{
fs = (gimage_floating_sel (gdisp->gimage) != NULL);
aux = (gimage_get_active_channel (gdisp->gimage) != NULL);
if ((layer = gimage_get_active_layer (gdisp->gimage)) != NULL)
lm = (layer->mask) ? TRUE : FALSE;
base_type = gimage_base_type (gdisp->gimage);
lp = (gdisp->gimage->layers != NULL);
alpha = layer && layer_has_alpha (layer);
fs = (gimage_floating_sel (gdisp->gimage) != NULL);
aux = (gimage_get_active_channel (gdisp->gimage) != NULL);
lp = (gdisp->gimage->layers != NULL);
drawable = gimage_active_drawable (gdisp->gimage);
if (drawable)
type = drawable_type (drawable);
if (lp)
{
drawable = gimage_active_drawable (gdisp->gimage);
type = drawable_type (drawable);
layer = gimage_get_active_layer (gdisp->gimage);
if (layer)
{
lm = layer_get_mask (layer) ? TRUE : FALSE;
alpha = layer_has_alpha (layer);
}
lind = gimage_get_layer_index (gdisp->gimage,
gdisp->gimage->active_layer);
lnum = g_slist_length (gdisp->gimage->layers);
......
......@@ -1615,32 +1615,39 @@ gdisplay_remove_tool_cursor (GDisplay *gdisp)
void
gdisplay_set_menu_sensitivity (GDisplay *gdisp)
{
Layer *layer = NULL;
gboolean fs = FALSE;
gboolean aux = FALSE;
gboolean lm = FALSE;
gboolean lp = FALSE;
GimpImageBaseType base_type = 0;
GimpImageType type = -1;
GimpDrawable *drawable = NULL;
Layer *layer = NULL;
gboolean fs = FALSE;
gboolean aux = FALSE;
gboolean lm = FALSE;
gboolean lp = FALSE;
gboolean alpha = FALSE;
GimpDrawable *drawable = NULL;
GimpImageBaseType base_type = 0;
GimpImageType type = -1;
gint lind = -1;
gint lnum = -1;
gint lind = -1;
gint lnum = -1;
if (gdisp)
{
fs = (gimage_floating_sel (gdisp->gimage) != NULL);
aux = (gimage_get_active_channel (gdisp->gimage) != NULL);
if ((layer = gimage_get_active_layer (gdisp->gimage)) != NULL)
lm = (layer->mask) ? TRUE : FALSE;
base_type = gimage_base_type (gdisp->gimage);
lp = (gdisp->gimage->layers != NULL);
alpha = layer && layer_has_alpha (layer);
fs = (gimage_floating_sel (gdisp->gimage) != NULL);
aux = (gimage_get_active_channel (gdisp->gimage) != NULL);
lp = (gdisp->gimage->layers != NULL);
drawable = gimage_active_drawable (gdisp->gimage);
if (drawable)
type = drawable_type (drawable);
if (lp)
{
drawable = gimage_active_drawable (gdisp->gimage);
type = drawable_type (drawable);
layer = gimage_get_active_layer (gdisp->gimage);
if (layer)
{
lm = layer_get_mask (layer) ? TRUE : FALSE;
alpha = layer_has_alpha (layer);
}
lind = gimage_get_layer_index (gdisp->gimage,
gdisp->gimage->active_layer);
lnum = g_slist_length (gdisp->gimage->layers);
......
......@@ -78,8 +78,6 @@ gimp_fatal_error (gchar *fmt, ...)
g_print ("%s: fatal error: %s\n", prog_name, g_strdup_vprintf (fmt, args));
va_end (args);
g_print ("g_on_error_query()\n");
g_on_error_query (prog_name);
#else
/* g_on_error_query doesn't do anything reasonable on Win32. */
......
......@@ -1615,32 +1615,39 @@ gdisplay_remove_tool_cursor (GDisplay *gdisp)
void
gdisplay_set_menu_sensitivity (GDisplay *gdisp)
{
Layer *layer = NULL;
gboolean fs = FALSE;
gboolean aux = FALSE;
gboolean lm = FALSE;
gboolean lp = FALSE;
GimpImageBaseType base_type = 0;
GimpImageType type = -1;
GimpDrawable *drawable = NULL;
Layer *layer = NULL;
gboolean fs = FALSE;
gboolean aux = FALSE;
gboolean lm = FALSE;
gboolean lp = FALSE;
gboolean alpha = FALSE;
GimpDrawable *drawable = NULL;
GimpImageBaseType base_type = 0;
GimpImageType type = -1;
gint lind = -1;
gint lnum = -1;
gint lind = -1;
gint lnum = -1;
if (gdisp)
{
fs = (gimage_floating_sel (gdisp->gimage) != NULL);
aux = (gimage_get_active_channel (gdisp->gimage) != NULL);
if ((layer = gimage_get_active_layer (gdisp->gimage)) != NULL)
lm = (layer->mask) ? TRUE : FALSE;
base_type = gimage_base_type (gdisp->gimage);
lp = (gdisp->gimage->layers != NULL);
alpha = layer && layer_has_alpha (layer);
fs = (gimage_floating_sel (gdisp->gimage) != NULL);
aux = (gimage_get_active_channel (gdisp->gimage) != NULL);
lp = (gdisp->gimage->layers != NULL);
drawable = gimage_active_drawable (gdisp->gimage);
if (drawable)
type = drawable_type (drawable);
if (lp)
{
drawable = gimage_active_drawable (gdisp->gimage);
type = drawable_type (drawable);
layer = gimage_get_active_layer (gdisp->gimage);
if (layer)
{
lm = layer_get_mask (layer) ? TRUE : FALSE;
alpha = layer_has_alpha (layer);
}
lind = gimage_get_layer_index (gdisp->gimage,
gdisp->gimage->active_layer);
lnum = g_slist_length (gdisp->gimage->layers);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment