mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-20 19:43:01 +00:00
renamed convert_to_indexed() to convert_dialog_new() and return the
2004-04-20 Michael Natterer <mitch@gimp.org> * app/gui/convert-dialog.[ch]: renamed convert_to_indexed() to convert_dialog_new() and return the dialog. Removed convert_to_rgb() and convert_to_grayscale(). * app/gui/offset-dialog.[ch]: renamed offset_dialog_create() to offset_dialog_new() and return the dialog. * app/Makefile.am * app/actions/drawable-commands.c * app/actions/image-commands.c: changed accordingly.
This commit is contained in:
parent
661f6ddeb8
commit
c8efb90364
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2004-04-20 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/gui/convert-dialog.[ch]: renamed convert_to_indexed()
|
||||
to convert_dialog_new() and return the dialog. Removed
|
||||
convert_to_rgb() and convert_to_grayscale().
|
||||
|
||||
* app/gui/offset-dialog.[ch]: renamed offset_dialog_create()
|
||||
to offset_dialog_new() and return the dialog.
|
||||
|
||||
* app/Makefile.am
|
||||
* app/actions/drawable-commands.c
|
||||
* app/actions/image-commands.c: changed accordingly.
|
||||
|
||||
2004-04-20 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/gui/*-commands.[ch]: removed...
|
||||
|
|
|
@ -81,11 +81,11 @@ gimp_2_1_LDFLAGS = \
|
|||
-u $(SYMPREFIX)gimp_xml_parser_new \
|
||||
-u $(SYMPREFIX)gimp_drawable_stroke_vectors \
|
||||
\
|
||||
-u $(SYMPREFIX)convert_to_indexed \
|
||||
-u $(SYMPREFIX)convert_dialog_new \
|
||||
-u $(SYMPREFIX)grid_dialog_new \
|
||||
-u $(SYMPREFIX)info_dialog_new \
|
||||
-u $(SYMPREFIX)info_window_create \
|
||||
-u $(SYMPREFIX)offset_dialog_create \
|
||||
-u $(SYMPREFIX)offset_dialog_new \
|
||||
-u $(SYMPREFIX)palette_import_dialog_show \
|
||||
-u $(SYMPREFIX)resize_widget_new \
|
||||
-u $(SYMPREFIX)stroke_dialog_new \
|
||||
|
|
|
@ -219,7 +219,9 @@ drawable_offset_cmd_callback (GtkWidget *widget,
|
|||
{
|
||||
GimpImage *gimage;
|
||||
GimpDrawable *drawable;
|
||||
GtkWidget *dialog;
|
||||
return_if_no_drawable (gimage, drawable, data);
|
||||
|
||||
offset_dialog_create (drawable, widget);
|
||||
dialog = offset_dialog_new (drawable, widget);
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "core/gimpchannel.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-convert.h"
|
||||
#include "core/gimpimage-crop.h"
|
||||
#include "core/gimpimage-duplicate.h"
|
||||
#include "core/gimpimage-flip.h"
|
||||
|
@ -115,7 +116,8 @@ image_convert_rgb_cmd_callback (GtkWidget *widget,
|
|||
GimpImage *gimage;
|
||||
return_if_no_image (gimage, data);
|
||||
|
||||
convert_to_rgb (gimage);
|
||||
gimp_image_convert (gimage, GIMP_RGB, 0, 0, FALSE, FALSE, 0, NULL);
|
||||
gimp_image_flush (gimage);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -125,7 +127,8 @@ image_convert_grayscale_cmd_callback (GtkWidget *widget,
|
|||
GimpImage *gimage;
|
||||
return_if_no_image (gimage, data);
|
||||
|
||||
convert_to_grayscale (gimage);
|
||||
gimp_image_convert (gimage, GIMP_GRAY, 0, 0, FALSE, FALSE, 0, NULL);
|
||||
gimp_image_flush (gimage);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -133,9 +136,11 @@ image_convert_indexed_cmd_callback (GtkWidget *widget,
|
|||
gpointer data)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GtkWidget *dialog;
|
||||
return_if_no_image (gimage, data);
|
||||
|
||||
convert_to_indexed (gimage, widget);
|
||||
dialog = convert_dialog_new (gimage, widget);
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -80,26 +80,8 @@ static gint saved_num_colors = 256;
|
|||
static GimpConvertPaletteType saved_palette_type = GIMP_MAKE_PALETTE;
|
||||
|
||||
|
||||
void
|
||||
convert_to_rgb (GimpImage *gimage)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
|
||||
gimp_image_convert (gimage, GIMP_RGB, 0, 0, FALSE, FALSE, 0, NULL);
|
||||
gimp_image_flush (gimage);
|
||||
}
|
||||
|
||||
void
|
||||
convert_to_grayscale (GimpImage* gimage)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
|
||||
gimp_image_convert (gimage, GIMP_GRAY, 0, 0, FALSE, FALSE, 0, NULL);
|
||||
gimp_image_flush (gimage);
|
||||
}
|
||||
|
||||
void
|
||||
convert_to_indexed (GimpImage *gimage,
|
||||
GtkWidget *
|
||||
convert_dialog_new (GimpImage *gimage,
|
||||
GtkWidget *parent)
|
||||
{
|
||||
IndexedDialog *dialog;
|
||||
|
@ -113,8 +95,8 @@ convert_to_indexed (GimpImage *gimage,
|
|||
GtkWidget *toggle;
|
||||
GSList *group = NULL;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
g_return_if_fail (GTK_IS_WIDGET (parent));
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (parent), NULL);
|
||||
|
||||
dialog = g_new0 (IndexedDialog, 1);
|
||||
|
||||
|
@ -359,7 +341,7 @@ convert_to_indexed (GimpImage *gimage,
|
|||
gtk_widget_show (label);
|
||||
}
|
||||
|
||||
gtk_widget_show (dialog->shell);
|
||||
return dialog->shell;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,10 +20,8 @@
|
|||
#define __CONVERT_DIALOG_H__
|
||||
|
||||
|
||||
void convert_to_rgb (GimpImage *gimage);
|
||||
void convert_to_grayscale (GimpImage *gimage);
|
||||
void convert_to_indexed (GimpImage *gimage,
|
||||
GtkWidget *parent);
|
||||
GtkWidget * convert_dialog_new (GimpImage *gimage,
|
||||
GtkWidget *parent);
|
||||
|
||||
|
||||
#endif /* __CONVERT_DIALOG_H__ */
|
||||
|
|
|
@ -69,9 +69,9 @@ static void offset_halfheight_callback (GtkWidget *widget,
|
|||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
offset_dialog_create (GimpDrawable *drawable,
|
||||
GtkWidget *parent)
|
||||
GtkWidget *
|
||||
offset_dialog_new (GimpDrawable *drawable,
|
||||
GtkWidget *parent)
|
||||
{
|
||||
OffsetDialog *off_d;
|
||||
GtkWidget *check;
|
||||
|
@ -84,8 +84,8 @@ offset_dialog_create (GimpDrawable *drawable,
|
|||
GtkWidget *radio_button;
|
||||
const gchar *title = NULL;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
|
||||
g_return_if_fail (GTK_IS_WIDGET (parent));
|
||||
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (parent), NULL);
|
||||
|
||||
off_d = g_new0 (OffsetDialog, 1);
|
||||
|
||||
|
@ -223,7 +223,8 @@ offset_dialog_create (GimpDrawable *drawable,
|
|||
gtk_widget_set_sensitive (frame, ! off_d->wrap_around);
|
||||
|
||||
gtk_widget_show (vbox);
|
||||
gtk_widget_show (off_d->dlg);
|
||||
|
||||
return off_d->dlg;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
#define __OFFSET_DIALOG_H__
|
||||
|
||||
|
||||
void offset_dialog_create (GimpDrawable *drawable,
|
||||
GtkWidget *parent);
|
||||
GtkWidget * offset_dialog_new (GimpDrawable *drawable,
|
||||
GtkWidget *parent);
|
||||
|
||||
|
||||
#endif /* __OFFSET_DIALOG_H__ */
|
||||
|
|
|
@ -80,26 +80,8 @@ static gint saved_num_colors = 256;
|
|||
static GimpConvertPaletteType saved_palette_type = GIMP_MAKE_PALETTE;
|
||||
|
||||
|
||||
void
|
||||
convert_to_rgb (GimpImage *gimage)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
|
||||
gimp_image_convert (gimage, GIMP_RGB, 0, 0, FALSE, FALSE, 0, NULL);
|
||||
gimp_image_flush (gimage);
|
||||
}
|
||||
|
||||
void
|
||||
convert_to_grayscale (GimpImage* gimage)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
|
||||
gimp_image_convert (gimage, GIMP_GRAY, 0, 0, FALSE, FALSE, 0, NULL);
|
||||
gimp_image_flush (gimage);
|
||||
}
|
||||
|
||||
void
|
||||
convert_to_indexed (GimpImage *gimage,
|
||||
GtkWidget *
|
||||
convert_dialog_new (GimpImage *gimage,
|
||||
GtkWidget *parent)
|
||||
{
|
||||
IndexedDialog *dialog;
|
||||
|
@ -113,8 +95,8 @@ convert_to_indexed (GimpImage *gimage,
|
|||
GtkWidget *toggle;
|
||||
GSList *group = NULL;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
g_return_if_fail (GTK_IS_WIDGET (parent));
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (parent), NULL);
|
||||
|
||||
dialog = g_new0 (IndexedDialog, 1);
|
||||
|
||||
|
@ -359,7 +341,7 @@ convert_to_indexed (GimpImage *gimage,
|
|||
gtk_widget_show (label);
|
||||
}
|
||||
|
||||
gtk_widget_show (dialog->shell);
|
||||
return dialog->shell;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,10 +20,8 @@
|
|||
#define __CONVERT_DIALOG_H__
|
||||
|
||||
|
||||
void convert_to_rgb (GimpImage *gimage);
|
||||
void convert_to_grayscale (GimpImage *gimage);
|
||||
void convert_to_indexed (GimpImage *gimage,
|
||||
GtkWidget *parent);
|
||||
GtkWidget * convert_dialog_new (GimpImage *gimage,
|
||||
GtkWidget *parent);
|
||||
|
||||
|
||||
#endif /* __CONVERT_DIALOG_H__ */
|
||||
|
|
|
@ -69,9 +69,9 @@ static void offset_halfheight_callback (GtkWidget *widget,
|
|||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
offset_dialog_create (GimpDrawable *drawable,
|
||||
GtkWidget *parent)
|
||||
GtkWidget *
|
||||
offset_dialog_new (GimpDrawable *drawable,
|
||||
GtkWidget *parent)
|
||||
{
|
||||
OffsetDialog *off_d;
|
||||
GtkWidget *check;
|
||||
|
@ -84,8 +84,8 @@ offset_dialog_create (GimpDrawable *drawable,
|
|||
GtkWidget *radio_button;
|
||||
const gchar *title = NULL;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
|
||||
g_return_if_fail (GTK_IS_WIDGET (parent));
|
||||
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (parent), NULL);
|
||||
|
||||
off_d = g_new0 (OffsetDialog, 1);
|
||||
|
||||
|
@ -223,7 +223,8 @@ offset_dialog_create (GimpDrawable *drawable,
|
|||
gtk_widget_set_sensitive (frame, ! off_d->wrap_around);
|
||||
|
||||
gtk_widget_show (vbox);
|
||||
gtk_widget_show (off_d->dlg);
|
||||
|
||||
return off_d->dlg;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
#define __OFFSET_DIALOG_H__
|
||||
|
||||
|
||||
void offset_dialog_create (GimpDrawable *drawable,
|
||||
GtkWidget *parent);
|
||||
GtkWidget * offset_dialog_new (GimpDrawable *drawable,
|
||||
GtkWidget *parent);
|
||||
|
||||
|
||||
#endif /* __OFFSET_DIALOG_H__ */
|
||||
|
|
Loading…
Reference in a new issue