Commit 7c542ea7 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

app/gui/layers-commands.[ch] added "Merge Visible Layers..." and "Flatten

2003-08-31  Sven Neumann  <sven@gimp.org>

	* app/gui/layers-commands.[ch]
	* app/gui/layers-menu.c: added "Merge Visible Layers..." and
	"Flatten Image" menu entries as suggested in bug #120959.

	* app/text/gimptext-vectors.c: fixed function declaration; we are
	passing a PangoGlyph here, not a (PangoGlyph*).
parent 16235e4e
2003-08-31 Sven Neumann <sven@gimp.org>
* app/gui/layers-commands.[ch]
* app/gui/layers-menu.c: added "Merge Visible Layers..." and
"Flatten Image" menu entries as suggested in bug #120959.
* app/text/gimptext-vectors.c: fixed function declaration; we are
passing a PangoGlyph here, not a (PangoGlyph*).
2003-08-31 Sven Neumann <sven@gimp.org>
* plug-ins/common/psd.c: applied a modified version of a patch
......@@ -50,6 +50,7 @@
#include "display/gimpdisplay.h"
#include "layers-commands.h"
#include "image-commands.h"
#include "resize-dialog.h"
#include "gimp-intl.h"
......@@ -73,7 +74,6 @@ static void layers_resize_layer_query (GimpImage *gimage,
gimage = ((GimpItemTreeView *) data)->gimage; \
else \
gimage = NULL; \
\
if (! gimage) \
return
......@@ -472,6 +472,27 @@ layers_alpha_to_selection_cmd_callback (GtkWidget *widget,
}
}
void
layers_merge_layers_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpImage *gimage;
return_if_no_image (gimage, data);
image_layers_merge_query (gimage, TRUE);
}
void
layers_flatten_image_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpImage *gimage;
return_if_no_image (gimage, data);
gimp_image_flatten (gimage);
gimp_image_flush (gimage);
}
void
layers_edit_attributes_cmd_callback (GtkWidget *widget,
gpointer data)
......
......@@ -74,6 +74,11 @@ void layers_alpha_to_selection_cmd_callback (GtkWidget *widet,
gpointer data,
guint action);
void layers_merge_layers_cmd_callback (GtkWidget *widget,
gpointer data);
void layers_flatten_image_cmd_callback (GtkWidget *widget,
gpointer data);
void layers_edit_attributes_cmd_callback (GtkWidget *widet,
gpointer data);
......
......@@ -50,6 +50,7 @@
#include "display/gimpdisplay.h"
#include "layers-commands.h"
#include "image-commands.h"
#include "resize-dialog.h"
#include "gimp-intl.h"
......@@ -73,7 +74,6 @@ static void layers_resize_layer_query (GimpImage *gimage,
gimage = ((GimpItemTreeView *) data)->gimage; \
else \
gimage = NULL; \
\
if (! gimage) \
return
......@@ -472,6 +472,27 @@ layers_alpha_to_selection_cmd_callback (GtkWidget *widget,
}
}
void
layers_merge_layers_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpImage *gimage;
return_if_no_image (gimage, data);
image_layers_merge_query (gimage, TRUE);
}
void
layers_flatten_image_cmd_callback (GtkWidget *widget,
gpointer data)
{
GimpImage *gimage;
return_if_no_image (gimage, data);
gimp_image_flatten (gimage);
gimp_image_flush (gimage);
}
void
layers_edit_attributes_cmd_callback (GtkWidget *widget,
gpointer data)
......
......@@ -74,6 +74,11 @@ void layers_alpha_to_selection_cmd_callback (GtkWidget *widet,
gpointer data,
guint action);
void layers_merge_layers_cmd_callback (GtkWidget *widget,
gpointer data);
void layers_flatten_image_cmd_callback (GtkWidget *widget,
gpointer data);
void layers_edit_attributes_cmd_callback (GtkWidget *widet,
gpointer data);
......
......@@ -142,6 +142,19 @@ GimpItemFactoryEntry layers_menu_entries[] =
MENU_SEPARATOR ("/---"),
{ { N_("/Merge Visible Layers..."), NULL,
layers_merge_layers_cmd_callback, 0,
NULL, NULL },
NULL,
GIMP_HELP_IMAGE_MERGE_LAYERS, NULL },
{ { N_("/Flatten Image"), NULL,
layers_flatten_image_cmd_callback, 0,
NULL, NULL },
NULL,
GIMP_HELP_IMAGE_FLATTEN, NULL },
MENU_SEPARATOR ("/---"),
{ { N_("/_Edit Layer Attributes..."), NULL,
layers_edit_attributes_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_EDIT },
......@@ -231,6 +244,9 @@ layers_menu_update (GtkItemFactory *factory,
SET_SENSITIVE ("/Add Alpha Channel", layer && !fs && !alpha);
SET_SENSITIVE ("/Alpha to Selection", layer && !fs && !ac && alpha);
SET_SENSITIVE ("/Merge Visible Layers...", layer && !fs && !ac);
SET_SENSITIVE ("/Flatten Image", layer && !fs && !ac);
SET_SENSITIVE ("/Edit Layer Attributes...", layer && !fs && !ac);
#undef SET_SENSITIVE
......
......@@ -59,7 +59,7 @@ struct _RenderContext
static void gimp_text_render_vectors (PangoFont *font,
PangoGlyph *glyph,
PangoGlyph glyph,
FT_Int32 flags,
FT_Matrix *matrix,
gint x,
......@@ -274,7 +274,7 @@ cubicto (FT_Vector *control1,
static void
gimp_text_render_vectors (PangoFont *font,
PangoGlyph *pango_glyph,
PangoGlyph pango_glyph,
FT_Int32 flags,
FT_Matrix *trafo,
gint x,
......
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