mirror of https://github.com/GNOME/gimp.git
in the spirit of the fix for bug #131721 below, don't try to figure
2004-01-18 Michael Natterer <mitch@gimp.org> * app/core/gimpimage.c (gimp_image_add_layer,remove_layer): in the spirit of the fix for bug #131721 below, don't try to figure manually if "alpha_changed" needs to be emitted but simply compare the old and new values of gimp_image_has_alpha(). * app/gui/preferences-dialog.c (prefs_dialog_new): follow "foo-window-type" -> "foo-window-hint" change.
This commit is contained in:
parent
9efe077ca2
commit
d528848f97
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2004-01-18 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/core/gimpimage.c (gimp_image_add_layer,remove_layer): in the
|
||||
spirit of the fix for bug #131721 below, don't try to figure
|
||||
manually if "alpha_changed" needs to be emitted but simply compare
|
||||
the old and new values of gimp_image_has_alpha().
|
||||
|
||||
* app/gui/preferences-dialog.c (prefs_dialog_new): follow
|
||||
"foo-window-type" -> "foo-window-hint" change.
|
||||
|
||||
2004-01-18 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/core/gimpimage.[ch] (gimp_image_get_color): also return the
|
||||
|
|
|
@ -2408,7 +2408,7 @@ gimp_image_add_layer (GimpImage *gimage,
|
|||
{
|
||||
GimpLayer *active_layer;
|
||||
GimpLayer *floating_sel;
|
||||
gboolean alpha_changed = FALSE;
|
||||
gboolean old_has_alpha;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_LAYER (layer), FALSE);
|
||||
|
@ -2440,6 +2440,8 @@ gimp_image_add_layer (GimpImage *gimage,
|
|||
|
||||
active_layer = gimp_image_get_active_layer (gimage);
|
||||
|
||||
old_has_alpha = gimp_image_has_alpha (gimage);
|
||||
|
||||
gimp_image_undo_push_layer_add (gimage, _("Add Layer"),
|
||||
layer, 0, active_layer);
|
||||
|
||||
|
@ -2468,12 +2470,6 @@ gimp_image_add_layer (GimpImage *gimage,
|
|||
if (position == 0 && floating_sel)
|
||||
position = 1;
|
||||
|
||||
if (gimp_container_num_children (gimage->layers) == 1 &&
|
||||
! gimp_drawable_has_alpha (GIMP_LIST (gimage->layers)->list->data))
|
||||
{
|
||||
alpha_changed = TRUE;
|
||||
}
|
||||
|
||||
/* Don't add at a non-existing index */
|
||||
if (position > gimp_container_num_children (gimage->layers))
|
||||
position = gimp_container_num_children (gimage->layers);
|
||||
|
@ -2484,7 +2480,7 @@ gimp_image_add_layer (GimpImage *gimage,
|
|||
/* notify the layers dialog of the currently active layer */
|
||||
gimp_image_set_active_layer (gimage, layer);
|
||||
|
||||
if (alpha_changed)
|
||||
if (old_has_alpha != gimp_image_has_alpha (gimage))
|
||||
gimp_image_alpha_changed (gimage);
|
||||
|
||||
return TRUE;
|
||||
|
@ -2496,6 +2492,7 @@ gimp_image_remove_layer (GimpImage *gimage,
|
|||
{
|
||||
GimpLayer *active_layer;
|
||||
gint index;
|
||||
gboolean old_has_alpha;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
g_return_if_fail (GIMP_IS_LAYER (layer));
|
||||
|
@ -2507,6 +2504,8 @@ gimp_image_remove_layer (GimpImage *gimage,
|
|||
index = gimp_container_get_child_index (gimage->layers,
|
||||
GIMP_OBJECT (layer));
|
||||
|
||||
old_has_alpha = gimp_image_has_alpha (gimage);
|
||||
|
||||
gimp_image_undo_push_layer_remove (gimage, _("Remove Layer"),
|
||||
layer, index, active_layer);
|
||||
|
||||
|
@ -2557,11 +2556,8 @@ gimp_image_remove_layer (GimpImage *gimage,
|
|||
|
||||
g_object_unref (layer);
|
||||
|
||||
if (gimp_container_num_children (gimage->layers) == 1 &&
|
||||
! gimp_drawable_has_alpha (GIMP_LIST (gimage->layers)->list->data))
|
||||
{
|
||||
gimp_image_alpha_changed (gimage);
|
||||
}
|
||||
if (old_has_alpha != gimp_image_has_alpha (gimage))
|
||||
gimp_image_alpha_changed (gimage);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
|
|
@ -1797,11 +1797,11 @@ prefs_dialog_new (Gimp *gimp,
|
|||
|
||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2), FALSE);
|
||||
|
||||
prefs_enum_option_menu_add (object, "toolbox-window-type", 0, 0,
|
||||
prefs_enum_option_menu_add (object, "toolbox-window-hint", 0, 0,
|
||||
_("Window Type Hint for the _Toolbox:"),
|
||||
GTK_TABLE (table), 0);
|
||||
|
||||
prefs_enum_option_menu_add (object, "dock-window-type", 0, 0,
|
||||
prefs_enum_option_menu_add (object, "dock-window-hint", 0, 0,
|
||||
_("Window Type Hint for the _Docks:"),
|
||||
GTK_TABLE (table), 1);
|
||||
|
||||
|
|
|
@ -1797,11 +1797,11 @@ prefs_dialog_new (Gimp *gimp,
|
|||
|
||||
table = prefs_table_new (2, GTK_CONTAINER (vbox2), FALSE);
|
||||
|
||||
prefs_enum_option_menu_add (object, "toolbox-window-type", 0, 0,
|
||||
prefs_enum_option_menu_add (object, "toolbox-window-hint", 0, 0,
|
||||
_("Window Type Hint for the _Toolbox:"),
|
||||
GTK_TABLE (table), 0);
|
||||
|
||||
prefs_enum_option_menu_add (object, "dock-window-type", 0, 0,
|
||||
prefs_enum_option_menu_add (object, "dock-window-hint", 0, 0,
|
||||
_("Window Type Hint for the _Docks:"),
|
||||
GTK_TABLE (table), 1);
|
||||
|
||||
|
|
Loading…
Reference in New Issue