gimp r24892 - in branches/weskaggs: . app/core app/gegl app/text app/widgets libgimpthumb libgimpwidgets plug-ins/common plug-ins/gfli plug-ins/pygimp/plug-ins po po-libgimp po-plug-ins po-python po-script-fu
- From: weskaggs svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r24892 - in branches/weskaggs: . app/core app/gegl app/text app/widgets libgimpthumb libgimpwidgets plug-ins/common plug-ins/gfli plug-ins/pygimp/plug-ins po po-libgimp po-plug-ins po-python po-script-fu
- Date: Fri, 15 Feb 2008 18:48:41 +0000 (GMT)
Author: weskaggs
Date: Fri Feb 15 18:48:40 2008
New Revision: 24892
URL: http://svn.gnome.org/viewvc/gimp?rev=24892&view=rev
Log:
Bill Skaggs <weskaggs primate ucdavis edu>
Merge 24846:24891 from trunk.
Added:
branches/weskaggs/app/widgets/gimplanguageentry.c
- copied unchanged from r24891, /trunk/app/widgets/gimplanguageentry.c
branches/weskaggs/app/widgets/gimplanguageentry.h
- copied unchanged from r24891, /trunk/app/widgets/gimplanguageentry.h
Modified:
branches/weskaggs/ChangeLog
branches/weskaggs/app/core/gimpcurve.c
branches/weskaggs/app/core/gimpcurve.h
branches/weskaggs/app/gegl/gimpcurvesconfig.c
branches/weskaggs/app/gegl/gimpoperationcolorbalance.c
branches/weskaggs/app/gegl/gimpoperationcolorize.c
branches/weskaggs/app/gegl/gimpoperationcurves.c
branches/weskaggs/app/gegl/gimpoperationdesaturate.c
branches/weskaggs/app/gegl/gimpoperationhuesaturation.c
branches/weskaggs/app/gegl/gimpoperationlevels.c
branches/weskaggs/app/gegl/gimpoperationposterize.c
branches/weskaggs/app/gegl/gimpoperationthreshold.c
branches/weskaggs/app/gegl/gimpoperationtilesink.c
branches/weskaggs/app/gegl/gimpoperationtilesource.c
branches/weskaggs/app/text/gimpfont.c
branches/weskaggs/app/widgets/Makefile.am
branches/weskaggs/app/widgets/gimpcolormapeditor.c
branches/weskaggs/app/widgets/gimpcolormapeditor.h
branches/weskaggs/app/widgets/gimpcurveview.c
branches/weskaggs/app/widgets/gimpeditor.c
branches/weskaggs/app/widgets/gimplanguagestore-parser.c
branches/weskaggs/app/widgets/gimptexteditor.c
branches/weskaggs/app/widgets/widgets-types.h
branches/weskaggs/libgimpthumb/Makefile.am
branches/weskaggs/libgimpwidgets/Makefile.am
branches/weskaggs/libgimpwidgets/gimpscaleentry.c
branches/weskaggs/libgimpwidgets/gimpscaleentry.h
branches/weskaggs/plug-ins/common/vpropagate.c
branches/weskaggs/plug-ins/gfli/fli.c
branches/weskaggs/plug-ins/pygimp/plug-ins/pyconsole.py
branches/weskaggs/po-libgimp/ChangeLog
branches/weskaggs/po-libgimp/fr.po
branches/weskaggs/po-plug-ins/ChangeLog
branches/weskaggs/po-plug-ins/sv.po
branches/weskaggs/po-python/ChangeLog
branches/weskaggs/po-python/sv.po
branches/weskaggs/po-script-fu/ChangeLog
branches/weskaggs/po-script-fu/de.po
branches/weskaggs/po-script-fu/sv.po
branches/weskaggs/po/ChangeLog
branches/weskaggs/po/fr.po
branches/weskaggs/po/sv.po
Modified: branches/weskaggs/app/core/gimpcurve.c
==============================================================================
--- branches/weskaggs/app/core/gimpcurve.c (original)
+++ branches/weskaggs/app/core/gimpcurve.c Fri Feb 15 18:48:40 2008
@@ -476,6 +476,21 @@
}
void
+gimp_curve_get_point (GimpCurve *curve,
+ gint point,
+ gdouble *x,
+ gdouble *y)
+{
+ g_return_if_fail (GIMP_IS_CURVE (curve));
+
+ if (curve->curve_type == GIMP_CURVE_FREE)
+ return;
+
+ if (x) *x = curve->points[point].x;
+ if (y) *y = curve->points[point].y;
+}
+
+void
gimp_curve_set_curve (GimpCurve *curve,
gdouble x,
gdouble y)
Modified: branches/weskaggs/app/core/gimpcurve.h
==============================================================================
--- branches/weskaggs/app/core/gimpcurve.h (original)
+++ branches/weskaggs/app/core/gimpcurve.h Fri Feb 15 18:48:40 2008
@@ -67,6 +67,7 @@
gint gimp_curve_get_closest_point (GimpCurve *curve,
gdouble x);
+
void gimp_curve_set_point (GimpCurve *curve,
gint point,
gdouble x,
@@ -74,6 +75,10 @@
void gimp_curve_move_point (GimpCurve *curve,
gint point,
gdouble y);
+void gimp_curve_get_point (GimpCurve *curve,
+ gint point,
+ gdouble *x,
+ gdouble *y);
void gimp_curve_set_curve (GimpCurve *curve,
gdouble x,
Modified: branches/weskaggs/app/gegl/gimpcurvesconfig.c
==============================================================================
--- branches/weskaggs/app/gegl/gimpcurvesconfig.c (original)
+++ branches/weskaggs/app/gegl/gimpcurvesconfig.c Fri Feb 15 18:48:40 2008
@@ -417,9 +417,15 @@
}
for (j = 0; j < GIMP_CURVE_NUM_POINTS; j++)
- fprintf (file, "%d %d ",
- (gint) (curve->points[j].x * 255.999),
- (gint) (curve->points[j].y * 255.999));
+ {
+ gdouble x, y;
+
+ gimp_curve_get_point (curve, j, &x, &y);
+
+ fprintf (file, "%d %d ",
+ (gint) (x * 255.999),
+ (gint) (y * 255.999));
+ }
fprintf (file, "\n");
}
Modified: branches/weskaggs/app/gegl/gimpoperationcolorbalance.c
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationcolorbalance.c (original)
+++ branches/weskaggs/app/gegl/gimpoperationcolorbalance.c Fri Feb 15 18:48:40 2008
@@ -51,12 +51,14 @@
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
- object_class->set_property = gimp_operation_point_filter_set_property;
- object_class->get_property = gimp_operation_point_filter_get_property;
+ object_class->set_property = gimp_operation_point_filter_set_property;
+ object_class->get_property = gimp_operation_point_filter_get_property;
- operation_class->name = "gimp-color-balance";
+ operation_class->name = "gimp-color-balance";
+ operation_class->categories = "color";
+ operation_class->description = "GIMP Color Balance operation";
- point_class->process = gimp_operation_color_balance_process;
+ point_class->process = gimp_operation_color_balance_process;
g_object_class_install_property (object_class,
GIMP_OPERATION_POINT_FILTER_PROP_CONFIG,
Modified: branches/weskaggs/app/gegl/gimpoperationcolorize.c
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationcolorize.c (original)
+++ branches/weskaggs/app/gegl/gimpoperationcolorize.c Fri Feb 15 18:48:40 2008
@@ -50,12 +50,14 @@
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
- object_class->set_property = gimp_operation_point_filter_set_property;
- object_class->get_property = gimp_operation_point_filter_get_property;
+ object_class->set_property = gimp_operation_point_filter_set_property;
+ object_class->get_property = gimp_operation_point_filter_get_property;
- operation_class->name = "gimp-colorize";
+ operation_class->name = "gimp-colorize";
+ operation_class->categories = "color";
+ operation_class->description = "GIMP Colorize operation";
- point_class->process = gimp_operation_colorize_process;
+ point_class->process = gimp_operation_colorize_process;
g_object_class_install_property (object_class,
GIMP_OPERATION_POINT_FILTER_PROP_CONFIG,
Modified: branches/weskaggs/app/gegl/gimpoperationcurves.c
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationcurves.c (original)
+++ branches/weskaggs/app/gegl/gimpoperationcurves.c Fri Feb 15 18:48:40 2008
@@ -53,12 +53,14 @@
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
- object_class->set_property = gimp_operation_point_filter_set_property;
- object_class->get_property = gimp_operation_point_filter_get_property;
+ object_class->set_property = gimp_operation_point_filter_set_property;
+ object_class->get_property = gimp_operation_point_filter_get_property;
- operation_class->name = "gimp-curves";
+ operation_class->name = "gimp-curves";
+ operation_class->categories = "color";
+ operation_class->description = "GIMP Curves operation";
- point_class->process = gimp_operation_curves_process;
+ point_class->process = gimp_operation_curves_process;
g_object_class_install_property (object_class,
GIMP_OPERATION_POINT_FILTER_PROP_CONFIG,
Modified: branches/weskaggs/app/gegl/gimpoperationdesaturate.c
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationdesaturate.c (original)
+++ branches/weskaggs/app/gegl/gimpoperationdesaturate.c Fri Feb 15 18:48:40 2008
@@ -65,12 +65,14 @@
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
- object_class->set_property = gimp_operation_desaturate_set_property;
- object_class->get_property = gimp_operation_desaturate_get_property;
+ object_class->set_property = gimp_operation_desaturate_set_property;
+ object_class->get_property = gimp_operation_desaturate_get_property;
- operation_class->name = "gimp-desaturate";
+ operation_class->name = "gimp-desaturate";
+ operation_class->categories = "color";
+ operation_class->description = "GIMP Desaturate operation";
- point_class->process = gimp_operation_desaturate_process;
+ point_class->process = gimp_operation_desaturate_process;
g_object_class_install_property (object_class,
PROP_MODE,
Modified: branches/weskaggs/app/gegl/gimpoperationhuesaturation.c
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationhuesaturation.c (original)
+++ branches/weskaggs/app/gegl/gimpoperationhuesaturation.c Fri Feb 15 18:48:40 2008
@@ -51,12 +51,14 @@
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
- object_class->set_property = gimp_operation_point_filter_set_property;
- object_class->get_property = gimp_operation_point_filter_get_property;
+ object_class->set_property = gimp_operation_point_filter_set_property;
+ object_class->get_property = gimp_operation_point_filter_get_property;
- operation_class->name = "gimp-hue-saturation";
+ operation_class->name = "gimp-hue-saturation";
+ operation_class->categories = "color";
+ operation_class->description = "GIMP Hue-Saturation operation";
- point_class->process = gimp_operation_hue_saturation_process;
+ point_class->process = gimp_operation_hue_saturation_process;
g_object_class_install_property (object_class,
GIMP_OPERATION_POINT_FILTER_PROP_CONFIG,
Modified: branches/weskaggs/app/gegl/gimpoperationlevels.c
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationlevels.c (original)
+++ branches/weskaggs/app/gegl/gimpoperationlevels.c Fri Feb 15 18:48:40 2008
@@ -51,12 +51,14 @@
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
- object_class->set_property = gimp_operation_point_filter_set_property;
- object_class->get_property = gimp_operation_point_filter_get_property;
+ object_class->set_property = gimp_operation_point_filter_set_property;
+ object_class->get_property = gimp_operation_point_filter_get_property;
- operation_class->name = "gimp-levels";
+ operation_class->name = "gimp-levels";
+ operation_class->categories = "color";
+ operation_class->description = "GIMP Levels operation";
- point_class->process = gimp_operation_levels_process;
+ point_class->process = gimp_operation_levels_process;
g_object_class_install_property (object_class,
GIMP_OPERATION_POINT_FILTER_PROP_CONFIG,
Modified: branches/weskaggs/app/gegl/gimpoperationposterize.c
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationposterize.c (original)
+++ branches/weskaggs/app/gegl/gimpoperationposterize.c Fri Feb 15 18:48:40 2008
@@ -51,12 +51,14 @@
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
- object_class->set_property = gimp_operation_point_filter_set_property;
- object_class->get_property = gimp_operation_point_filter_get_property;
+ object_class->set_property = gimp_operation_point_filter_set_property;
+ object_class->get_property = gimp_operation_point_filter_get_property;
- operation_class->name = "gimp-posterize";
+ operation_class->name = "gimp-posterize";
+ operation_class->categories = "color";
+ operation_class->description = "GIMP Posterize operation";
- point_class->process = gimp_operation_posterize_process;
+ point_class->process = gimp_operation_posterize_process;
g_object_class_install_property (object_class,
GIMP_OPERATION_POINT_FILTER_PROP_CONFIG,
Modified: branches/weskaggs/app/gegl/gimpoperationthreshold.c
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationthreshold.c (original)
+++ branches/weskaggs/app/gegl/gimpoperationthreshold.c Fri Feb 15 18:48:40 2008
@@ -50,12 +50,14 @@
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
- object_class->set_property = gimp_operation_point_filter_set_property;
- object_class->get_property = gimp_operation_point_filter_get_property;
+ object_class->set_property = gimp_operation_point_filter_set_property;
+ object_class->get_property = gimp_operation_point_filter_get_property;
- operation_class->name = "gimp-threshold";
+ operation_class->name = "gimp-threshold";
+ operation_class->categories = "color";
+ operation_class->description = "GIMP Threshold operation";
- point_class->process = gimp_operation_threshold_process;
+ point_class->process = gimp_operation_threshold_process;
g_object_class_install_property (object_class,
GIMP_OPERATION_POINT_FILTER_PROP_CONFIG,
Modified: branches/weskaggs/app/gegl/gimpoperationtilesink.c
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationtilesink.c (original)
+++ branches/weskaggs/app/gegl/gimpoperationtilesink.c Fri Feb 15 18:48:40 2008
@@ -90,14 +90,16 @@
G_TYPE_NONE, 1,
G_TYPE_POINTER);
- object_class->finalize = gimp_operation_tile_sink_finalize;
- object_class->set_property = gimp_operation_tile_sink_set_property;
- object_class->get_property = gimp_operation_tile_sink_get_property;
+ object_class->finalize = gimp_operation_tile_sink_finalize;
+ object_class->set_property = gimp_operation_tile_sink_set_property;
+ object_class->get_property = gimp_operation_tile_sink_get_property;
+
+ operation_class->name = "gimp-tilemanager-sink";
+ operation_class->categories = "output";
+ operation_class->description = "GIMP TileManager sink";
- operation_class->name = "gimp-tilemanager-sink";
-
- sink_class->process = gimp_operation_tile_sink_process;
- sink_class->needs_full = FALSE;
+ sink_class->process = gimp_operation_tile_sink_process;
+ sink_class->needs_full = FALSE;
g_object_class_install_property (object_class, PROP_TILE_MANAGER,
Modified: branches/weskaggs/app/gegl/gimpoperationtilesource.c
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationtilesource.c (original)
+++ branches/weskaggs/app/gegl/gimpoperationtilesource.c Fri Feb 15 18:48:40 2008
@@ -55,9 +55,8 @@
static void gimp_operation_tile_source_prepare (GeglOperation *operation);
static GeglRectangle
- gimp_operation_tile_source_get_bounding_box (GeglOperation *operation);
+ gimp_operation_tile_source_get_bounding_box (GeglOperation *operation);
static gboolean gimp_operation_tile_source_process (GeglOperation *operation,
- GeglNodeContext *context,
GeglBuffer *output,
const GeglRectangle *result);
@@ -80,6 +79,8 @@
object_class->get_property = gimp_operation_tile_source_get_property;
operation_class->name = "gimp-tilemanager-source";
+ operation_class->categories = "input";
+ operation_class->description = "GIMP TileManager source";
operation_class->prepare = gimp_operation_tile_source_prepare;
operation_class->get_bounding_box = gimp_operation_tile_source_get_bounding_box;
operation_class->get_cached_region = NULL; /* the default source is
@@ -215,7 +216,6 @@
static gboolean
gimp_operation_tile_source_process (GeglOperation *operation,
- GeglNodeContext *context,
GeglBuffer *output,
const GeglRectangle *result)
{
Modified: branches/weskaggs/app/text/gimpfont.c
==============================================================================
--- branches/weskaggs/app/text/gimpfont.c (original)
+++ branches/weskaggs/app/text/gimpfont.c Fri Feb 15 18:48:40 2008
@@ -23,8 +23,11 @@
#include "config.h"
#include <glib-object.h>
+
+#define PANGO_ENABLE_BACKEND 1 /* Argh */
#include <pango/pangoft2.h>
-#define PANGO_ENABLE_ENGINE 1 /* Argh */
+
+#define PANGO_ENABLE_ENGINE 1 /* Argh */
#include <pango/pango-ot.h>
#include <freetype/tttables.h>
@@ -327,6 +330,21 @@
}
+static inline gboolean
+gimp_font_covers_string (PangoFcFont *font,
+ const gchar *sample)
+{
+ const gchar *p;
+
+ for (p = sample; *p; p = g_utf8_next_char (p))
+ {
+ if (! pango_fc_font_has_char (font, g_utf8_get_char (p)))
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
/* Guess a suitable short sample string for the font. */
static const gchar *
gimp_font_get_sample_string (PangoContext *context,
@@ -366,7 +384,7 @@
static const struct
{
const gchar script[4];
- int bit;
+ gint bit;
const gchar *sample;
} scripts[] = {
/* Han is first because fonts that support it presumably are primarily
@@ -648,7 +666,9 @@
{
#define TAG(s) FT_MAKE_TAG (s[0], s[1], s[2], s[3])
- if (slist[j] == TAG (scripts[i].script))
+ if (slist[j] == TAG (scripts[i].script) &&
+ gimp_font_covers_string (PANGO_FC_FONT (font),
+ scripts[i].sample))
{
ot_alts[n_ot_alts++] = i;
DEBUGPRINT (("%.4s ", scripts[i].script));
@@ -656,6 +676,7 @@
#undef TAG
}
}
+
g_free (slist);
}
}
@@ -675,7 +696,9 @@
i++)
{
if (scripts[i].bit >= 0 &&
- (&os2->ulUnicodeRange1)[scripts[i].bit/32] & (1 << (scripts[i].bit % 32)))
+ (&os2->ulUnicodeRange1)[scripts[i].bit/32] & (1 << (scripts[i].bit % 32)) &&
+ gimp_font_covers_string (PANGO_FC_FONT (font),
+ scripts[i].sample))
{
sr_alts[n_sr_alts++] = i;
DEBUGPRINT (("%.4s ", scripts[i].script));
Modified: branches/weskaggs/app/widgets/Makefile.am
==============================================================================
--- branches/weskaggs/app/widgets/Makefile.am (original)
+++ branches/weskaggs/app/widgets/Makefile.am Fri Feb 15 18:48:40 2008
@@ -191,6 +191,8 @@
gimpimageview.h \
gimpitemtreeview.c \
gimpitemtreeview.h \
+ gimplanguageentry.c \
+ gimplanguageentry.h \
gimplanguagestore.c \
gimplanguagestore.h \
gimplanguagestore-parser.c \
Modified: branches/weskaggs/app/widgets/gimpcolormapeditor.c
==============================================================================
--- branches/weskaggs/app/widgets/gimpcolormapeditor.c (original)
+++ branches/weskaggs/app/widgets/gimpcolormapeditor.c Fri Feb 15 18:48:40 2008
@@ -76,12 +76,16 @@
guint n_params,
GObjectConstructParam *params);
+static void gimp_colormap_editor_finalize (GObject *object);
static void gimp_colormap_editor_destroy (GtkObject *object);
static void gimp_colormap_editor_unmap (GtkWidget *widget);
static void gimp_colormap_editor_set_image (GimpImageEditor *editor,
GimpImage *image);
+static PangoLayout *
+ gimp_colormap_editor_create_layout (GtkWidget *widget);
+
static void gimp_colormap_editor_draw (GimpColormapEditor *editor);
static void gimp_colormap_editor_draw_cell (GimpColormapEditor *editor,
gint col);
@@ -92,6 +96,9 @@
static void gimp_colormap_preview_size_allocate (GtkWidget *widget,
GtkAllocation *allocation,
GimpColormapEditor *editor);
+static void gimp_colormap_preview_expose (GtkWidget *widget,
+ GdkEventExpose *event,
+ GimpColormapEditor *editor);
static gboolean
gimp_colormap_preview_button_press (GtkWidget *widget,
GdkEventButton *bevent,
@@ -144,6 +151,7 @@
GDK_TYPE_MODIFIER_TYPE);
object_class->constructor = gimp_colormap_editor_constructor;
+ object_class->finalize = gimp_colormap_editor_finalize;
gtk_object_class->destroy = gimp_colormap_editor_destroy;
@@ -157,9 +165,11 @@
static void
gimp_colormap_editor_init (GimpColormapEditor *editor)
{
- GtkWidget *frame;
- GtkWidget *table;
- GtkObject *adj;
+ GtkWidget *frame;
+ GtkWidget *table;
+ GtkObject *adj;
+ gint width;
+ gint height;
editor->col_index = 0;
editor->dnd_col_index = 0;
@@ -174,16 +184,25 @@
gtk_widget_show (frame);
editor->preview = gtk_preview_new (GTK_PREVIEW_COLOR);
- gtk_widget_set_size_request (editor->preview, -1, 60);
gtk_preview_set_expand (GTK_PREVIEW (editor->preview), TRUE);
gtk_widget_add_events (editor->preview, GDK_BUTTON_PRESS_MASK);
gtk_container_add (GTK_CONTAINER (frame), editor->preview);
gtk_widget_show (editor->preview);
+ editor->layout = gimp_colormap_editor_create_layout (editor->preview);
+
+ pango_layout_set_width (editor->layout, 180 * PANGO_SCALE);
+ pango_layout_get_pixel_size (editor->layout, &width, &height);
+ gtk_widget_set_size_request (editor->preview, width, height);
+
g_signal_connect_after (editor->preview, "size-allocate",
G_CALLBACK (gimp_colormap_preview_size_allocate),
editor);
+ g_signal_connect_after (editor->preview, "expose-event",
+ G_CALLBACK (gimp_colormap_preview_expose),
+ editor);
+
g_signal_connect (editor->preview, "button-press-event",
G_CALLBACK (gimp_colormap_preview_button_press),
editor);
@@ -250,6 +269,20 @@
}
static void
+gimp_colormap_editor_finalize (GObject *object)
+{
+ GimpColormapEditor *editor = GIMP_COLORMAP_EDITOR (object);
+
+ if (editor->layout)
+ {
+ g_object_unref (editor->layout);
+ editor->layout = NULL;
+ }
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
gimp_colormap_editor_destroy (GtkObject *object)
{
GimpColormapEditor *editor = GIMP_COLORMAP_EDITOR (object);
@@ -448,6 +481,32 @@
/* private functions */
+
+static PangoLayout *
+gimp_colormap_editor_create_layout (GtkWidget *widget)
+{
+ PangoLayout *layout;
+ PangoAttrList *attrs;
+ PangoAttribute *attr;
+
+ layout = gtk_widget_create_pango_layout (widget,
+ _("Only indexed images have "
+ "a colormap."));
+ pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
+
+ attrs = pango_attr_list_new ();
+
+ attr = pango_attr_style_new (PANGO_STYLE_ITALIC);
+ attr->start_index = 0;
+ attr->end_index = -1;
+ pango_attr_list_insert (attrs, attr);
+
+ pango_layout_set_attributes (layout, attrs);
+ pango_attr_list_unref (attrs);
+
+ return layout;
+}
+
#define MIN_CELL_SIZE 4
static void
@@ -592,6 +651,30 @@
}
static void
+gimp_colormap_preview_expose (GtkWidget *widget,
+ GdkEventExpose *event,
+ GimpColormapEditor *editor)
+{
+ GimpImageEditor *image_editor = GIMP_IMAGE_EDITOR (editor);
+ gint x, y;
+ gint width, height;
+
+ if (image_editor->image == NULL ||
+ gimp_image_base_type (image_editor->image) == GIMP_INDEXED)
+ return;
+
+ pango_layout_get_pixel_size (editor->layout, &width, &height);
+
+ x = (widget->allocation.width - width) / 2;
+ y = (widget->allocation.height - height) / 2;
+
+ gdk_draw_layout (editor->preview->window,
+ editor->preview->style->fg_gc[widget->state],
+ MAX (x, 0), MAX (y, 0),
+ editor->layout);
+}
+
+static void
gimp_colormap_editor_clear (GimpColormapEditor *editor,
gint start_row)
{
Modified: branches/weskaggs/app/widgets/gimpcolormapeditor.h
==============================================================================
--- branches/weskaggs/app/widgets/gimpcolormapeditor.h (original)
+++ branches/weskaggs/app/widgets/gimpcolormapeditor.h Fri Feb 15 18:48:40 2008
@@ -37,13 +37,15 @@
{
GimpImageEditor parent_instance;
+ GtkWidget *preview;
gint col_index;
gint dnd_col_index;
- GtkWidget *preview;
gint xn;
gint yn;
gint cellsize;
+ PangoLayout *layout;
+
GtkWidget *edit_button;
GtkWidget *add_button;
Modified: branches/weskaggs/app/widgets/gimpcurveview.c
==============================================================================
--- branches/weskaggs/app/widgets/gimpcurveview.c (original)
+++ branches/weskaggs/app/widgets/gimpcurveview.c Fri Feb 15 18:48:40 2008
@@ -315,12 +315,13 @@
{
gdouble x, y;
- x = view->curve->points[i].x;
- y = 1.0 - view->curve->points[i].y;
+ gimp_curve_get_point (view->curve, i, &x, &y);
if (x < 0.0)
return;
+ y = 1.0 - y;
+
#define RADIUS 3
cairo_move_to (cr,
@@ -553,19 +554,31 @@
/* determine the leftmost and rightmost points */
view->leftmost = -1.0;
for (i = closest_point - 1; i >= 0; i--)
- if (curve->points[i].x >= 0.0)
- {
- view->leftmost = curve->points[i].x;
- break;
- }
+ {
+ gdouble point_x;
+
+ gimp_curve_get_point (curve, i, &point_x, NULL);
+
+ if (point_x >= 0.0)
+ {
+ view->leftmost = point_x;
+ break;
+ }
+ }
view->rightmost = 2.0;
for (i = closest_point + 1; i < GIMP_CURVE_NUM_POINTS; i++)
- if (curve->points[i].x >= 0.0)
- {
- view->rightmost = curve->points[i].x;
- break;
- }
+ {
+ gdouble point_x;
+
+ gimp_curve_get_point (curve, i, &point_x, NULL);
+
+ if (point_x >= 0.0)
+ {
+ view->rightmost = point_x;
+ break;
+ }
+ }
gimp_curve_view_set_selected (view, closest_point);
@@ -632,10 +645,14 @@
switch (gimp_curve_get_curve_type (curve))
{
+ gdouble point_x;
+
case GIMP_CURVE_SMOOTH:
if (! view->grabbed) /* If no point is grabbed... */
{
- if (curve->points[closest_point].x >= 0.0)
+ gimp_curve_get_point (curve, closest_point, &x, NULL);
+
+ if (point_x >= 0.0)
new_cursor = GDK_FLEUR;
else
new_cursor = GDK_TCROSS;
@@ -651,7 +668,10 @@
if (x > view->leftmost && x < view->rightmost)
{
closest_point = ((gint) (x * 255.999) + 8) / 16;
- if (curve->points[closest_point].x < 0.0)
+
+ gimp_curve_get_point (curve, closest_point, &point_x, NULL);
+
+ if (point_x < 0.0)
gimp_curve_view_set_selected (view, closest_point);
gimp_curve_set_point (curve, view->selected, x, 1.0 - y);
@@ -737,19 +757,23 @@
GimpCurveView *view = GIMP_CURVE_VIEW (widget);
GimpCurve *curve = view->curve;
gint i = view->selected;
- gdouble y = curve->points[i].y;
+ gdouble x, y;
gboolean retval = FALSE;
if (view->grabbed || ! curve ||
gimp_curve_get_curve_type (curve) == GIMP_CURVE_FREE)
return FALSE;
+ gimp_curve_get_point (curve, i, NULL, &y);
+
switch (kevent->keyval)
{
case GDK_Left:
for (i = i - 1; i >= 0 && ! retval; i--)
{
- if (curve->points[i].x >= 0.0)
+ gimp_curve_get_point (curve, i, &x, NULL);
+
+ if (x >= 0.0)
{
gimp_curve_view_set_selected (view, i);
@@ -761,7 +785,9 @@
case GDK_Right:
for (i = i + 1; i < GIMP_CURVE_NUM_POINTS && ! retval; i++)
{
- if (curve->points[i].x >= 0.0)
+ gimp_curve_get_point (curve, i, &x, NULL);
+
+ if (x >= 0.0)
{
gimp_curve_view_set_selected (view, i);
Modified: branches/weskaggs/app/widgets/gimpeditor.c
==============================================================================
--- branches/weskaggs/app/widgets/gimpeditor.c (original)
+++ branches/weskaggs/app/widgets/gimpeditor.c Fri Feb 15 18:48:40 2008
@@ -40,6 +40,7 @@
#define DEFAULT_CONTENT_SPACING 2
#define DEFAULT_BUTTON_SPACING 2
#define DEFAULT_BUTTON_ICON_SIZE GTK_ICON_SIZE_MENU
+#define DEFAULT_BUTTON_RELIEF GTK_RELIEF_NONE
enum
@@ -79,7 +80,8 @@
gboolean show);
static gboolean gimp_editor_get_show_button_bar (GimpDocked *docked);
-static GtkIconSize gimp_editor_ensure_button_box (GimpEditor *editor);
+static GtkIconSize gimp_editor_ensure_button_box (GimpEditor *editor,
+ GtkReliefStyle *button_relief);
G_DEFINE_TYPE_WITH_CODE (GimpEditor, gimp_editor, GTK_TYPE_VBOX,
@@ -166,6 +168,13 @@
GTK_TYPE_ICON_SIZE,
DEFAULT_BUTTON_ICON_SIZE,
GIMP_PARAM_READABLE));
+
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_enum ("button-relief",
+ NULL, NULL,
+ GTK_TYPE_RELIEF_STYLE,
+ DEFAULT_BUTTON_RELIEF,
+ GIMP_PARAM_READABLE));
}
static void
@@ -459,18 +468,20 @@
GCallback extended_callback,
gpointer callback_data)
{
- GtkWidget *button;
- GtkWidget *image;
- GtkIconSize button_icon_size;
+ GtkWidget *button;
+ GtkWidget *image;
+ GtkIconSize button_icon_size;
+ GtkReliefStyle button_relief;
g_return_val_if_fail (GIMP_IS_EDITOR (editor), NULL);
g_return_val_if_fail (stock_id != NULL, NULL);
- button_icon_size = gimp_editor_ensure_button_box (editor);
+ button_icon_size = gimp_editor_ensure_button_box (editor, &button_relief);
button = g_object_new (GIMP_TYPE_BUTTON,
"use-stock", TRUE,
NULL);
+ gtk_button_set_relief (GTK_BUTTON (button), button_relief);
gtk_box_pack_start (GTK_BOX (editor->button_box), button, TRUE, TRUE, 0);
gtk_widget_show (button);
@@ -501,17 +512,18 @@
GCallback callback,
gpointer callback_data)
{
- GtkWidget *hbox;
- GtkWidget *first_button;
- GtkIconSize button_icon_size;
- GList *children;
- GList *list;
+ GtkWidget *hbox;
+ GtkWidget *first_button;
+ GtkIconSize button_icon_size;
+ GtkReliefStyle button_relief;
+ GList *children;
+ GList *list;
g_return_val_if_fail (GIMP_IS_EDITOR (editor), NULL);
g_return_val_if_fail (g_type_is_a (enum_type, G_TYPE_ENUM), NULL);
g_return_val_if_fail (stock_prefix != NULL, NULL);
- button_icon_size = gimp_editor_ensure_button_box (editor);
+ button_icon_size = gimp_editor_ensure_button_box (editor, &button_relief);
hbox = gimp_enum_stock_box_new (enum_type, stock_prefix, button_icon_size,
callback, callback_data,
@@ -525,6 +537,8 @@
g_object_ref (button);
+ gtk_button_set_relief (GTK_BUTTON (button), button_relief);
+
gtk_container_remove (GTK_CONTAINER (hbox), button);
gtk_box_pack_start (GTK_BOX (editor->button_box), button,
TRUE, TRUE, 0);
@@ -591,6 +605,7 @@
GtkWidget *old_child;
GtkWidget *image;
GtkIconSize button_icon_size;
+ GtkReliefStyle button_relief;
gchar *stock_id;
gchar *tooltip;
const gchar *help_id;
@@ -610,7 +625,7 @@
g_return_val_if_fail (action != NULL, NULL);
- button_icon_size = gimp_editor_ensure_button_box (editor);
+ button_icon_size = gimp_editor_ensure_button_box (editor, &button_relief);
if (GTK_IS_TOGGLE_ACTION (action))
{
@@ -622,6 +637,8 @@
button = gimp_button_new ();
}
+ gtk_button_set_relief (GTK_BUTTON (button), button_relief);
+
g_object_get (action,
"stock-id", &stock_id,
"tooltip", &tooltip,
@@ -731,10 +748,11 @@
gimp_editor_set_box_style (GimpEditor *editor,
GtkBox *box)
{
- GtkIconSize button_icon_size;
- gint button_spacing;
- GList *children;
- GList *list;
+ GtkIconSize button_icon_size;
+ gint button_spacing;
+ GtkReliefStyle button_relief;
+ GList *children;
+ GList *list;
g_return_if_fail (GIMP_IS_EDITOR (editor));
g_return_if_fail (GTK_IS_BOX (box));
@@ -742,6 +760,7 @@
gtk_widget_style_get (GTK_WIDGET (editor),
"button-icon-size", &button_icon_size,
"button-spacing", &button_spacing,
+ "button-relief", &button_relief,
NULL);
gtk_box_set_spacing (box, button_spacing);
@@ -754,6 +773,8 @@
{
GtkWidget *child;
+ gtk_button_set_relief (GTK_BUTTON (list->data), button_relief);
+
child = gtk_bin_get_child (GTK_BIN (list->data));
if (GTK_IS_IMAGE (child))
@@ -774,7 +795,8 @@
/* private functions */
static GtkIconSize
-gimp_editor_ensure_button_box (GimpEditor *editor)
+gimp_editor_ensure_button_box (GimpEditor *editor,
+ GtkReliefStyle *button_relief)
{
GtkIconSize button_icon_size;
gint button_spacing;
@@ -782,6 +804,7 @@
gtk_widget_style_get (GTK_WIDGET (editor),
"button-icon-size", &button_icon_size,
"button-spacing", &button_spacing,
+ "button-relief", button_relief,
NULL);
if (! editor->button_box)
Modified: branches/weskaggs/app/widgets/gimplanguagestore-parser.c
==============================================================================
--- branches/weskaggs/app/widgets/gimplanguagestore-parser.c (original)
+++ branches/weskaggs/app/widgets/gimplanguagestore-parser.c Fri Feb 15 18:48:40 2008
@@ -25,6 +25,8 @@
#include <gtk/gtk.h>
+#include "libgimpbase/gimpenv.h"
+
#include "widgets-types.h"
#include "config/gimpxmlparser.h"
@@ -90,13 +92,26 @@
g_return_val_if_fail (GIMP_IS_LANGUAGE_STORE (store), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+#ifdef G_OS_WIN32
+ /* on Win32, assume iso-codes is installed in the same location as GIMP */
+ bindtextdomain ("iso_639", gimp_locale_directory ());
+#else
bindtextdomain ("iso_639", ISO_CODES_LOCALEDIR);
+#endif
+
+ bind_textdomain_codeset ("iso_639", "UTF-8");
parser.store = g_object_ref (store);
xml_parser = gimp_xml_parser_new (&markup_parser, &parser);
+#ifdef G_OS_WIN32
+ filename = g_build_filename (gimp_data_directory (),
+ "..", "..", "xml", "iso-codes", "iso_639.xml",
+ NULL);
+#else
filename = g_build_filename (ISO_CODES_LOCATION, "iso_639.xml", NULL);
+#endif
success = gimp_xml_parser_parse_file (xml_parser, filename, error);
Modified: branches/weskaggs/app/widgets/gimptexteditor.c
==============================================================================
--- branches/weskaggs/app/widgets/gimptexteditor.c (original)
+++ branches/weskaggs/app/widgets/gimptexteditor.c Fri Feb 15 18:48:40 2008
@@ -31,7 +31,7 @@
#include "gimphelp-ids.h"
#include "gimpmenufactory.h"
-#include "gimplanguagestore.h"
+#include "gimplanguageentry.h"
#include "gimptexteditor.h"
#include "gimpuimanager.h"
@@ -46,14 +46,12 @@
};
-static void gimp_text_editor_finalize (GObject *object);
+static void gimp_text_editor_finalize (GObject *object);
-static GtkWidget * gimp_text_editor_language_entry_new (void);
-
-static void gimp_text_editor_text_changed (GtkTextBuffer *buffer,
- GimpTextEditor *editor);
-static void gimp_text_editor_font_toggled (GtkToggleButton *button,
- GimpTextEditor *editor);
+static void gimp_text_editor_text_changed (GtkTextBuffer *buffer,
+ GimpTextEditor *editor);
+static void gimp_text_editor_font_toggled (GtkToggleButton *button,
+ GimpTextEditor *editor);
G_DEFINE_TYPE (GimpTextEditor, gimp_text_editor, GIMP_TYPE_DIALOG)
@@ -188,7 +186,7 @@
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
- entry = gimp_text_editor_language_entry_new ();
+ entry = gimp_language_entry_new ();
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
gtk_widget_show (entry);
@@ -205,6 +203,8 @@
gtk_widget_show (scrolled_window);
editor->view = gtk_text_view_new ();
+ gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (editor->view),
+ GTK_WRAP_WORD_CHAR);
gtk_container_add (GTK_CONTAINER (scrolled_window), editor->view);
gtk_widget_show (editor->view);
@@ -350,30 +350,6 @@
/* private functions */
-static GtkWidget *
-gimp_text_editor_language_entry_new (void)
-{
- GtkWidget *entry;
- GtkListStore *store;
- GtkEntryCompletion *completion;
-
- entry = gtk_entry_new ();
-
- completion = gtk_entry_completion_new ();
- gtk_entry_completion_set_text_column (completion,
- GIMP_LANGUAGE_STORE_LANGUAGE);
- gtk_entry_completion_set_inline_completion (completion, TRUE);
-
- store = gimp_language_store_new (FALSE);
- gtk_entry_completion_set_model (completion, GTK_TREE_MODEL (store));
- g_object_unref (store);
-
- gtk_entry_set_completion (GTK_ENTRY (entry), completion);
- g_object_unref (completion);
-
- return entry;
-}
-
static void
gimp_text_editor_text_changed (GtkTextBuffer *buffer,
GimpTextEditor *editor)
Modified: branches/weskaggs/app/widgets/widgets-types.h
==============================================================================
--- branches/weskaggs/app/widgets/widgets-types.h (original)
+++ branches/weskaggs/app/widgets/widgets-types.h Fri Feb 15 18:48:40 2008
@@ -171,12 +171,16 @@
typedef struct _GimpImageParasiteView GimpImageParasiteView;
typedef struct _GimpImagePropView GimpImagePropView;
typedef struct _GimpImageProfileView GimpImageProfileView;
+typedef struct _GimpLanguageStore GimpLanguageStore;
+typedef struct _GimpLanguageEntry GimpLanguageEntry;
typedef struct _GimpMessageBox GimpMessageBox;
typedef struct _GimpProgressBox GimpProgressBox;
typedef struct _GimpSizeBox GimpSizeBox;
typedef struct _GimpStrokeEditor GimpStrokeEditor;
typedef struct _GimpTemplateEditor GimpTemplateEditor;
typedef struct _GimpThumbBox GimpThumbBox;
+typedef struct _GimpUnitStore GimpUnitStore;
+typedef struct _GimpUnitComboBox GimpUnitComboBox;
/* views */
@@ -209,9 +213,6 @@
/* misc utilities & constructors */
typedef struct _GimpDialogFactory GimpDialogFactory;
-typedef struct _GimpLanguageStore GimpLanguageStore;
-typedef struct _GimpUnitStore GimpUnitStore;
-typedef struct _GimpUnitComboBox GimpUnitComboBox;
/* structs */
Modified: branches/weskaggs/libgimpthumb/Makefile.am
==============================================================================
--- branches/weskaggs/libgimpthumb/Makefile.am (original)
+++ branches/weskaggs/libgimpthumb/Makefile.am Fri Feb 15 18:48:40 2008
@@ -81,7 +81,7 @@
$(no_undefined) \
$(libgimpthumb_export_symbols)
-libgimpthumb_2_0_la_LIBADD = $(libgimpmath) $(GDK_PIXBUF_LIBS)
+libgimpthumb_2_0_la_LIBADD = $(libgimpmath) $(GDK_PIXBUF_LIBS) $(GLIB_LIBS)
noinst_PROGRAMS = gimp-thumbnail-list
Modified: branches/weskaggs/libgimpwidgets/Makefile.am
==============================================================================
--- branches/weskaggs/libgimpwidgets/Makefile.am (original)
+++ branches/weskaggs/libgimpwidgets/Makefile.am Fri Feb 15 18:48:40 2008
@@ -150,8 +150,8 @@
gimppropwidgets.h \
gimpquerybox.c \
gimpquerybox.h \
- gimpscaleentry.h \
gimpscaleentry.c \
+ gimpscaleentry.h \
gimpscrolledpreview.c \
gimpscrolledpreview.h \
gimpsizeentry.c \
Modified: branches/weskaggs/libgimpwidgets/gimpscaleentry.c
==============================================================================
--- branches/weskaggs/libgimpwidgets/gimpscaleentry.c (original)
+++ branches/weskaggs/libgimpwidgets/gimpscaleentry.c Fri Feb 15 18:48:40 2008
@@ -1,7 +1,7 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
- * gimpwidgets.c
+ * gimpscaleentry.c
* Copyright (C) 2000 Michael Natterer <mitch gimp org>
*
* This library is free software; you can redistribute it and/or
@@ -30,6 +30,7 @@
#include "gimpwidgets.h"
+
static void gimp_scale_entry_unconstrained_adjustment_callback (GtkAdjustment *adjustment,
GtkAdjustment *other_adj);
static void gimp_scale_entry_exp_adjustment_callback (GtkAdjustment *adjustment,
@@ -547,40 +548,3 @@
if (widget)
gtk_widget_set_sensitive (widget, sensitive);
}
-
-gdouble
-gimp_scale_entry_popup_new (GtkWindow *parent,
- const gchar *text,
- gint scale_width,
- gint spinbutton_width,
- gdouble value,
- gdouble lower,
- gdouble upper,
- gdouble step_increment,
- gdouble page_increment,
- guint digits,
- gboolean constrain,
- gdouble unconstrained_lower,
- gdouble unconstrained_upper,
- const gchar *tooltip,
- const gchar *help_id)
-{
- GtkWidget *window;
- GtkWidget *table = NULL;
- GtkObject *entry;
-
- window = gtk_window_new (GTK_WINDOW_POPUP);
- gtk_window_set_decorated (GTK_WINDOW (window), FALSE);
- gtk_window_set_modal (GTK_WINDOW (window), TRUE);
-
- entry = gimp_scale_entry_new (GTK_TABLE (table), 0, 0, text,
- scale_width, spinbutton_width,
- value, lower, upper,
- step_increment, page_increment,
- digits, constrain,
- unconstrained_lower, unconstrained_upper,
- tooltip, help_id);
-
-
- return value;
-}
Modified: branches/weskaggs/libgimpwidgets/gimpscaleentry.h
==============================================================================
--- branches/weskaggs/libgimpwidgets/gimpscaleentry.h (original)
+++ branches/weskaggs/libgimpwidgets/gimpscaleentry.h Fri Feb 15 18:48:40 2008
@@ -3,7 +3,7 @@
*
* gimpscaleentry.h
* Copyright (C) 2000 Michael Natterer <mitch gimp org>,
- * 2008 Bill Skaggs <weskaggs primate ucdavis edu>
+ * 2008 Bill Skaggs <weskaggs primate ucdavis edu>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -24,6 +24,9 @@
#ifndef __GIMP_SCALE_ENTRY_H__
#define __GIMP_SCALE_ENTRY_H__
+G_BEGIN_DECLS
+
+
#define GIMP_SCALE_ENTRY_LABEL(adj) \
(g_object_get_data (G_OBJECT (adj), "label"))
@@ -39,46 +42,46 @@
gtk_spin_button_get_adjustment \
(GTK_SPIN_BUTTON (g_object_get_data (G_OBJECT (adj), "spinbutton")))
-GtkObject * gimp_scale_entry_new (GtkTable *table,
- gint column,
- gint row,
- const gchar *text,
- gint scale_width,
- gint spinbutton_width,
- gdouble value,
- gdouble lower,
- gdouble upper,
- gdouble step_increment,
- gdouble page_increment,
- guint digits,
- gboolean constrain,
- gdouble unconstrained_lower,
- gdouble unconstrained_upper,
- const gchar *tooltip,
- const gchar *help_id);
-
-
-GtkObject * gimp_color_scale_entry_new (GtkTable *table,
- gint column,
- gint row,
- const gchar *text,
- gint scale_width,
- gint spinbutton_width,
- gdouble value,
- gdouble lower,
- gdouble upper,
- gdouble step_increment,
- gdouble page_increment,
- guint digits,
- const gchar *tooltip,
- const gchar *help_id);
-
-void gimp_scale_entry_set_sensitive (GtkObject *adjustment,
- gboolean sensitive);
-
-void gimp_scale_entry_set_logarithmic (GtkObject *adjustment,
- gboolean logarithmic);
-gboolean gimp_scale_entry_get_logarithmic (GtkObject *adjustment);
+
+GtkObject * gimp_scale_entry_new (GtkTable *table,
+ gint column,
+ gint row,
+ const gchar *text,
+ gint scale_width,
+ gint spinbutton_width,
+ gdouble value,
+ gdouble lower,
+ gdouble upper,
+ gdouble step_increment,
+ gdouble page_increment,
+ guint digits,
+ gboolean constrain,
+ gdouble unconstrained_lower,
+ gdouble unconstrained_upper,
+ const gchar *tooltip,
+ const gchar *help_id);
+
+GtkObject * gimp_color_scale_entry_new (GtkTable *table,
+ gint column,
+ gint row,
+ const gchar *text,
+ gint scale_width,
+ gint spinbutton_width,
+ gdouble value,
+ gdouble lower,
+ gdouble upper,
+ gdouble step_increment,
+ gdouble page_increment,
+ guint digits,
+ const gchar *tooltip,
+ const gchar *help_id);
+
+void gimp_scale_entry_set_sensitive (GtkObject *adjustment,
+ gboolean sensitive);
+
+void gimp_scale_entry_set_logarithmic (GtkObject *adjustment,
+ gboolean logarithmic);
+gboolean gimp_scale_entry_get_logarithmic (GtkObject *adjustment);
Modified: branches/weskaggs/plug-ins/common/vpropagate.c
==============================================================================
--- branches/weskaggs/plug-ins/common/vpropagate.c (original)
+++ branches/weskaggs/plug-ins/common/vpropagate.c Fri Feb 15 18:48:40 2008
@@ -242,7 +242,7 @@
args, NULL);
gimp_install_procedure (ERODE_PROC,
- N_("Shrink darker areas of the image"),
+ N_("Shrink lighter areas of the image"),
"Erode image",
"Shuji Narazaki (narazaki InetQ or jp)",
"Shuji Narazaki",
@@ -254,7 +254,7 @@
args, NULL);
gimp_install_procedure (DILATE_PROC,
- N_("Grow darker areas of the image"),
+ N_("Grow lighter areas of the image"),
"Dilate image",
"Shuji Narazaki (narazaki InetQ or jp)",
"Shuji Narazaki",
Modified: branches/weskaggs/plug-ins/gfli/fli.c
==============================================================================
--- branches/weskaggs/plug-ins/gfli/fli.c (original)
+++ branches/weskaggs/plug-ins/gfli/fli.c Fri Feb 15 18:48:40 2008
@@ -99,6 +99,12 @@
fli_header->magic = NO_HEADER;
}
}
+
+ if (fli_header->width == 0)
+ fli_header->width = 320;
+
+ if (fli_header->height == 0)
+ fli_header->height = 200;
}
void fli_write_header(FILE *f, s_fli_header *fli_header)
@@ -268,14 +274,14 @@
fli_write_char(f, cmap[col_pos]>>2);
}
} else {
- unsigned short num_packets, cnt_skip, cnt_col, col_pos, col_start;
- num_packets=0; col_pos=0;
+ unsigned short cnt_skip, cnt_col, col_pos, col_start;
+ col_pos=0;
do {
cnt_skip=0;
while ((col_pos<256) && (old_cmap[col_pos*3+0]==cmap[col_pos*3+0]) && (old_cmap[col_pos*3+1]==cmap[col_pos*3+1]) && (old_cmap[col_pos*3+2]==cmap[col_pos*3+2])) {
cnt_skip++; col_pos++;
}
- col_start=col_pos;
+ col_start=col_pos*3;
cnt_col=0;
while ((col_pos<256) && !((old_cmap[col_pos*3+0]==cmap[col_pos*3+0]) && (old_cmap[col_pos*3+1]==cmap[col_pos*3+1]) && (old_cmap[col_pos*3+2]==cmap[col_pos*3+2]))) {
cnt_col++; col_pos++;
@@ -359,14 +365,14 @@
fli_write_char(f, cmap[col_pos]);
}
} else {
- unsigned short num_packets, cnt_skip, cnt_col, col_pos, col_start;
- num_packets=0; col_pos=0;
+ unsigned short cnt_skip, cnt_col, col_pos, col_start;
+ col_pos=0;
do {
cnt_skip=0;
while ((col_pos<256) && (old_cmap[col_pos*3+0]==cmap[col_pos*3+0]) && (old_cmap[col_pos*3+1]==cmap[col_pos*3+1]) && (old_cmap[col_pos*3+2]==cmap[col_pos*3+2])) {
cnt_skip++; col_pos++;
}
- col_start=col_pos;
+ col_start=col_pos*3;
cnt_col=0;
while ((col_pos<256) && !((old_cmap[col_pos*3+0]==cmap[col_pos*3+0]) && (old_cmap[col_pos*3+1]==cmap[col_pos*3+1]) && (old_cmap[col_pos*3+2]==cmap[col_pos*3+2]))) {
cnt_col++; col_pos++;
@@ -375,10 +381,11 @@
num_packets++;
fli_write_char(f, cnt_skip);
fli_write_char(f, cnt_col);
- for (; cnt_col>0; cnt_col--) {
+ while (cnt_col>0) {
fli_write_char(f, cmap[col_start++]);
fli_write_char(f, cmap[col_start++]);
fli_write_char(f, cmap[col_start++]);
+ cnt_col--;
}
}
} while (col_pos<256);
Modified: branches/weskaggs/plug-ins/pygimp/plug-ins/pyconsole.py
==============================================================================
--- branches/weskaggs/plug-ins/pygimp/plug-ins/pyconsole.py (original)
+++ branches/weskaggs/plug-ins/pygimp/plug-ins/pyconsole.py Fri Feb 15 18:48:40 2008
@@ -16,17 +16,20 @@
# This module 'runs' python interpreter in a TextView widget.
# The main class is Console, usage is:
# Console(locals=None, banner=None, completer=None, use_rlcompleter=True, start_script='') -
-# it creates the widget and 'starts' interactive session; see the end of
-# this file. If start_script is not empty, it pastes it as it was entered from keyboard.
+# it creates the widget and 'starts' interactive session; see the end
+# of this file. If start_script is not empty, it pastes it as it was
+# entered from keyboard.
#
# Console has "command" signal which is emitted when code is about to
-# be executed. You may connect to it using console.connect or console.connect_after
-# to get your callback ran before or after the code is executed.
+# be executed. You may connect to it using console.connect or
+# console.connect_after to get your callback ran before or after the
+# code is executed.
#
# To modify output appearance, set attributes of console.stdout_tag and
# console.stderr_tag.
#
-# Console may subclass a type other than gtk.TextView, to allow syntax highlighting and stuff,
+# Console may subclass a type other than gtk.TextView, to allow syntax
+# highlighting and stuff,
# e.g.:
# console_type = pyconsole.ConsoleType(moo.edit.TextView)
# console = console_type(use_rlcompleter=False, start_script="import moo\nimport gtk\n")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]