Bill Skaggs <weskaggs@primate.ucdavis.edu>

Merge 24846:24891 from trunk.

svn path=/branches/weskaggs/; revision=24892
This commit is contained in:
William Skaggs 2008-02-15 18:48:40 +00:00
parent cb7bb12525
commit ea30e016fd
44 changed files with 2506 additions and 1950 deletions

View File

@ -1,3 +1,7 @@
2008-02-15 Bill Skaggs <weskaggs@primate.ucdavis.edu>
Merge 24846:24891 from trunk.
2008-02-15 Bill Skaggs <weskaggs@primate.ucdavis.edu>
Clean up code for two-column toolbox.

View File

@ -475,6 +475,21 @@ gimp_curve_move_point (GimpCurve *curve,
gimp_data_dirty (GIMP_DATA (curve));
}
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,

View File

@ -67,6 +67,7 @@ GimpCurveType gimp_curve_get_curve_type (GimpCurve *curve);
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_set_point (GimpCurve *curve,
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,

View File

@ -417,9 +417,15 @@ gimp_curves_config_save_cruft (GimpCurvesConfig *config,
}
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");
}

View File

@ -51,12 +51,14 @@ gimp_operation_color_balance_class_init (GimpOperationColorBalanceClass *klass)
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,

View File

@ -50,12 +50,14 @@ gimp_operation_colorize_class_init (GimpOperationColorizeClass *klass)
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,

View File

@ -53,12 +53,14 @@ gimp_operation_curves_class_init (GimpOperationCurvesClass *klass)
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,

View File

@ -65,12 +65,14 @@ gimp_operation_desaturate_class_init (GimpOperationDesaturateClass *klass)
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,

View File

@ -51,12 +51,14 @@ gimp_operation_hue_saturation_class_init (GimpOperationHueSaturationClass *klass
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,

View File

@ -51,12 +51,14 @@ gimp_operation_levels_class_init (GimpOperationLevelsClass *klass)
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,

View File

@ -51,12 +51,14 @@ gimp_operation_posterize_class_init (GimpOperationPosterizeClass *klass)
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,

View File

@ -50,12 +50,14 @@ gimp_operation_threshold_class_init (GimpOperationThresholdClass *klass)
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,

View File

@ -90,14 +90,16 @@ gimp_operation_tile_sink_class_init (GimpOperationTileSinkClass *klass)
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->name = "gimp-tilemanager-sink";
operation_class->categories = "output";
operation_class->description = "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,

View File

@ -55,9 +55,8 @@ static void gimp_operation_tile_source_set_property (GObject *object,
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 @@ gimp_operation_tile_source_class_init (GimpOperationTileSourceClass *klass)
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 @@ 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)
{

View File

@ -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 @@ gimp_font_get_standard (void)
}
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 @@ gimp_font_get_sample_string (PangoContext *context,
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 @@ gimp_font_get_sample_string (PangoContext *context,
{
#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 @@ gimp_font_get_sample_string (PangoContext *context,
#undef TAG
}
}
g_free (slist);
}
}
@ -675,7 +696,9 @@ gimp_font_get_sample_string (PangoContext *context,
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));

View File

@ -191,6 +191,8 @@ libappwidgets_a_sources = \
gimpimageview.h \
gimpitemtreeview.c \
gimpitemtreeview.h \
gimplanguageentry.c \
gimplanguageentry.h \
gimplanguagestore.c \
gimplanguagestore.h \
gimplanguagestore-parser.c \

View File

@ -76,12 +76,16 @@ static GObject * gimp_colormap_editor_constructor (GType type,
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_editor_update_entries (GimpColormapEditor *editor);
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 @@ gimp_colormap_editor_class_init (GimpColormapEditorClass* klass)
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 @@ gimp_colormap_editor_class_init (GimpColormapEditorClass* klass)
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 @@ gimp_colormap_editor_init (GimpColormapEditor *editor)
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);
@ -249,6 +268,20 @@ gimp_colormap_editor_constructor (GType type,
return object;
}
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)
{
@ -448,6 +481,32 @@ gimp_colormap_editor_max_index (GimpColormapEditor *editor)
/* 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
@ -591,6 +650,30 @@ gimp_colormap_editor_draw_cell (GimpColormapEditor *editor,
cellsize, cellsize);
}
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)

View File

@ -37,13 +37,15 @@ struct _GimpColormapEditor
{
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;

View File

@ -315,12 +315,13 @@ gimp_curve_view_draw_point (GimpCurveView *view,
{
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 @@ gimp_curve_view_button_press (GtkWidget *widget,
/* 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 @@ gimp_curve_view_motion_notify (GtkWidget *widget,
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 @@ gimp_curve_view_motion_notify (GtkWidget *widget,
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 @@ gimp_curve_view_key_press (GtkWidget *widget,
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 @@ gimp_curve_view_key_press (GtkWidget *widget,
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);

View File

@ -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 @@ static void gimp_editor_set_show_button_bar (GimpDocked *docked,
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 @@ gimp_editor_class_init (GimpEditorClass *klass)
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 @@ gimp_editor_add_button (GimpEditor *editor,
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 @@ gimp_editor_add_stock_box (GimpEditor *editor,
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 @@ gimp_editor_add_stock_box (GimpEditor *editor,
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 @@ gimp_editor_add_action_button (GimpEditor *editor,
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 @@ gimp_editor_add_action_button (GimpEditor *editor,
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 @@ gimp_editor_add_action_button (GimpEditor *editor,
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 @@ void
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 @@ gimp_editor_set_box_style (GimpEditor *editor,
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 @@ gimp_editor_set_box_style (GimpEditor *editor,
{
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 @@ gimp_editor_set_box_style (GimpEditor *editor,
/* 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 @@ gimp_editor_ensure_button_box (GimpEditor *editor)
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)

View File

@ -0,0 +1,109 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimplanguageentry.c
* Copyright (C) 2008 Sven Neumann <sven@gimp.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <gtk/gtk.h>
#include "widgets-types.h"
#include "gimplanguagestore.h"
#include "gimplanguageentry.h"
static void gimp_language_entry_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_language_entry_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
G_DEFINE_TYPE (GimpLanguageEntry, gimp_language_entry, GTK_TYPE_ENTRY)
static void
gimp_language_entry_class_init (GimpLanguageEntryClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->set_property = gimp_language_entry_set_property;
object_class->get_property = gimp_language_entry_get_property;
}
static void
gimp_language_entry_init (GimpLanguageEntry *entry)
{
GtkListStore *store;
GtkEntryCompletion *completion;
store = gimp_language_store_new (FALSE);
completion = g_object_new (GTK_TYPE_ENTRY_COMPLETION,
"model", store,
"text-column", GIMP_LANGUAGE_STORE_LANGUAGE,
"inline-completion", TRUE,
NULL);
gtk_entry_set_completion (GTK_ENTRY (entry), completion);
g_object_unref (completion);
g_object_unref (store);
}
static void
gimp_language_entry_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
GimpLanguageEntry *entry = GIMP_LANGUAGE_ENTRY (object);
switch (property_id)
{
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
gimp_language_entry_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
GimpLanguageEntry *entry = GIMP_LANGUAGE_ENTRY (object);
switch (property_id)
{
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
GtkWidget *
gimp_language_entry_new (void)
{
return g_object_new (GIMP_TYPE_LANGUAGE_ENTRY, NULL);
}

View File

@ -0,0 +1,52 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimplanguageentry.h
* Copyright (C) 2008 Sven Neumann <sven@gimp.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_LANGUAGE_ENTRY_H__
#define __GIMP_LANGUAGE_ENTRY_H__
#define GIMP_TYPE_LANGUAGE_ENTRY (gimp_language_entry_get_type ())
#define GIMP_LANGUAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_LANGUAGE_ENTRY, GimpLanguageEntry))
#define GIMP_LANGUAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_LANGUAGE_ENTRY, GimpLanguageEntryClass))
#define GIMP_IS_LANGUAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_LANGUAGE_ENTRY))
#define GIMP_IS_LANGUAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_LANGUAGE_ENTRY))
#define GIMP_LANGUAGE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_LANGUAGE_ENTRY, GimpLanguageEntryClass))
typedef struct _GimpLanguageEntryClass GimpLanguageEntryClass;
struct _GimpLanguageEntryClass
{
GtkEntryClass parent_class;
};
struct _GimpLanguageEntry
{
GtkEntry parent_instance;
};
GType gimp_language_entry_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_language_entry_new (void);
#endif /* __GIMP_LANGUAGE_ENTRY_H__ */

View File

@ -25,6 +25,8 @@
#include <gtk/gtk.h>
#include "libgimpbase/gimpenv.h"
#include "widgets-types.h"
#include "config/gimpxmlparser.h"
@ -90,13 +92,26 @@ gimp_language_store_populate (GimpLanguageStore *store,
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);

View File

@ -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 @@ enum
};
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 @@ gimp_text_editor_new (const gchar *title,
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 @@ gimp_text_editor_new (const gchar *title,
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 @@ gimp_text_editor_get_font_name (GimpTextEditor *editor)
/* 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)

View File

@ -171,12 +171,16 @@ typedef struct _GimpImageCommentEditor GimpImageCommentEditor;
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 @@ typedef struct _GimpCellRendererViewable GimpCellRendererViewable;
/* misc utilities & constructors */
typedef struct _GimpDialogFactory GimpDialogFactory;
typedef struct _GimpLanguageStore GimpLanguageStore;
typedef struct _GimpUnitStore GimpUnitStore;
typedef struct _GimpUnitComboBox GimpUnitComboBox;
/* structs */

View File

@ -81,7 +81,7 @@ libgimpthumb_2_0_la_LDFLAGS = \
$(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

View File

@ -150,8 +150,8 @@ libgimpwidgets_2_0_la_sources = \
gimppropwidgets.h \
gimpquerybox.c \
gimpquerybox.h \
gimpscaleentry.h \
gimpscaleentry.c \
gimpscaleentry.h \
gimpscrolledpreview.c \
gimpscrolledpreview.h \
gimpsizeentry.c \

View File

@ -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 @@ gimp_scale_entry_set_sensitive (GtkObject *adjustment,
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;
}

View File

@ -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_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);
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_sensitive (GtkObject *adjustment,
gboolean sensitive);
void gimp_scale_entry_set_logarithmic (GtkObject *adjustment,
gboolean logarithmic);
gboolean gimp_scale_entry_get_logarithmic (GtkObject *adjustment);
void gimp_scale_entry_set_logarithmic (GtkObject *adjustment,
gboolean logarithmic);
gboolean gimp_scale_entry_get_logarithmic (GtkObject *adjustment);

View File

@ -242,7 +242,7 @@ query (void)
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 @@ query (void)
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",

View File

@ -99,6 +99,12 @@ void fli_read_header(FILE *f, s_fli_header *fli_header)
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 @@ int fli_write_color(FILE *f, s_fli_header *fli_header, unsigned char *old_cmap,
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 @@ int fli_write_color_2(FILE *f, s_fli_header *fli_header, unsigned char *old_cmap
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 @@ int fli_write_color_2(FILE *f, s_fli_header *fli_header, unsigned char *old_cmap
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);

View File

@ -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")

View File

@ -1,3 +1,7 @@
2008-02-12 Stéphane Raimbault <stephane.raimbault@gmail.com>
* fr.po: Fixed French translation.
2008-01-10 Maxim Dziumanenko <dziumanenko@gmail.com>
* uk.po: Updated Ukrainian translation.

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,7 @@
2008-02-10 Daniel Nylander <po@danielnylander.se>
* sv.po: Updated Swedish translation.
2008-01-22 Sven Neumann <sven@gimp.org>
* POTFILES.in: added files from the new PSD load plug-in.

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,7 @@
2008-02-10 Daniel Nylander <po@danielnylander.se>
* sv.po: Updated Swedish translation.
2008-01-10 Maxim Dziumanenko <dziumanenko@gmail.com>
* uk.po: Updated Ukrainian translation.

View File

@ -1,6 +1,6 @@
# Swedish messages for GIMP Python.
# Copyright (C) 2000, 2001, 2002, 2003, 2007 Free Software Foundation, Inc.
# Daniel Nylander <po@danielnylander.se>, 2007.
# Copyright (C) 2000, 2001, 2002, 2003, 2007, 2008 Free Software Foundation, Inc.
# Daniel Nylander <po@danielnylander.se>, 2007, 2008.
# Christian Rose <menthos@menthos.com>, 2000, 2001, 2002, 2003.
# Jan Morén <jan.moren@lucs.lu.se>, 2003.
# Tomas Ögren <stric@ing.umu.se>, 2001.
@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gimp-python\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-07-28 14:35+0200\n"
"PO-Revision-Date: 2007-08-01 08:25+0100\n"
"POT-Creation-Date: 2008-02-10 18:46+0100\n"
"PO-Revision-Date: 2008-02-10 18:46+0100\n"
"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
"MIME-Version: 1.0\n"
@ -42,7 +42,7 @@ msgid "Yes"
msgstr "Ja"
#: ../plug-ins/pygimp/gimpfu.py:558
#: ../plug-ins/pygimp/gimpui.py:222
#: ../plug-ins/pygimp/gimpui.py:224
msgid "Python-Fu File Selection"
msgstr "Python-Fu filväljare"
@ -55,7 +55,7 @@ msgstr "Python-Fu mappväljare"
msgid "Invalid input for '%s'"
msgstr "Ogiltig inmatning för \"%s\""
#: ../plug-ins/pygimp/gimpui.py:175
#: ../plug-ins/pygimp/gimpui.py:177
msgid "Python-Fu Color Selection"
msgstr "Python-Fu färgval"
@ -126,38 +126,38 @@ msgid "Save Python-Fu Console Output"
msgstr "Spara Python-Fu konsollutdata"
#: ../plug-ins/pygimp/plug-ins/gimpcons.py:218
msgid "Interactive Gimp-Python interpreter"
msgstr "Interaktiv Gimp-Python-tolkare"
msgid "Interactive GIMP Python interpreter"
msgstr "Interaktiv GIMP Python-tolk"
#: ../plug-ins/pygimp/plug-ins/gimpcons.py:223
msgid "_Console"
msgstr "_Konsoll"
#: ../plug-ins/pygimp/plug-ins/foggify.py:51
#: ../plug-ins/pygimp/plug-ins/foggify.py:53
msgid "Add a layer of fog"
msgstr "Lägg till ett lager av dimma"
#: ../plug-ins/pygimp/plug-ins/foggify.py:56
#: ../plug-ins/pygimp/plug-ins/foggify.py:58
msgid "_Fog..."
msgstr "_Dimma..."
#: ../plug-ins/pygimp/plug-ins/foggify.py:61
#: ../plug-ins/pygimp/plug-ins/foggify.py:63
msgid "_Layer name"
msgstr "_Lagernamn"
#: ../plug-ins/pygimp/plug-ins/foggify.py:61
#: ../plug-ins/pygimp/plug-ins/foggify.py:63
msgid "Clouds"
msgstr "Moln"
#: ../plug-ins/pygimp/plug-ins/foggify.py:62
#: ../plug-ins/pygimp/plug-ins/foggify.py:64
msgid "_Fog color"
msgstr "Färg_ på dimma"
#: ../plug-ins/pygimp/plug-ins/foggify.py:63
#: ../plug-ins/pygimp/plug-ins/foggify.py:65
msgid "_Turbulence"
msgstr "_Turbulens"
#: ../plug-ins/pygimp/plug-ins/foggify.py:64
#: ../plug-ins/pygimp/plug-ins/foggify.py:66
msgid "Op_acity"
msgstr "Op_acitet"

View File

@ -1,3 +1,12 @@
2008-02-12 Kevin Cozens <kcozens@cvs.gnome.org>
* de.po: Fixed translation for "Difference Clouds". It was using
same string as "Solid Noise".
2008-02-10 Daniel Nylander <po@danielnylander.se>
* sv.po: Updated Swedish translation.
2008-01-10 Maxim Dziumanenko <dziumanenko@gmail.com>
* uk.po: Updated Ukrainian translation.

View File

@ -1356,7 +1356,7 @@ msgstr "Krista_ll …"
#: ../plug-ins/script-fu/scripts/difference-clouds.scm.h:1
msgid "Difference Clouds..."
msgstr "Plastisches Rauschen …"
msgstr "Differenz-Wolken …"
#: ../plug-ins/script-fu/scripts/difference-clouds.scm.h:2
msgid "Solid noise applied with Difference layer mode"

View File

@ -1,6 +1,6 @@
# Swedish messages for GIMP Script-Fu.
# Copyright (C) 2000, 2001, 2002, 2003, 2007 Free Software Foundation, Inc.
# Daniel Nylander <po@danielnylander.se>, 2007.
# Copyright (C) 2000, 2001, 2002, 2003, 2007, 2008 Free Software Foundation, Inc.
# Daniel Nylander <po@danielnylander.se>, 2007, 2008.
# Christian Rose <menthos@menthos.com>, 2000, 2001, 2002, 2003.
# Jan Morén <jan.moren@lucs.lu.se>, 2003.
# Tomas Ögren <stric@ing.umu.se>, 2001.
@ -9,45 +9,45 @@ msgid ""
msgstr ""
"Project-Id-Version: gimp-script-fu\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-09-12 20:40+0200\n"
"PO-Revision-Date: 2007-10-27 20:58+0100\n"
"POT-Creation-Date: 2008-02-10 18:48+0100\n"
"PO-Revision-Date: 2008-02-10 18:49+0100\n"
"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../plug-ins/script-fu/script-fu-console.c:135
#: ../plug-ins/script-fu/script-fu-console.c:202
#: ../plug-ins/script-fu/script-fu-console.c:133
#: ../plug-ins/script-fu/script-fu-console.c:200
msgid "Script-Fu Console"
msgstr "Script-Fu-konsoll"
#: ../plug-ins/script-fu/script-fu-console.c:198
#: ../plug-ins/script-fu/script-fu-console.c:196
msgid "Welcome to TinyScheme"
msgstr "Välkommen till TinyScheme"
#: ../plug-ins/script-fu/script-fu-console.c:204
#: ../plug-ins/script-fu/script-fu-console.c:202
msgid "Interactive Scheme Development"
msgstr "Interaktiv Scheme-utveckling"
#: ../plug-ins/script-fu/script-fu-console.c:240
#: ../plug-ins/script-fu/script-fu-console.c:238
msgid "_Browse..."
msgstr "_Bläddra..."
#: ../plug-ins/script-fu/script-fu-console.c:300
#: ../plug-ins/script-fu/script-fu-console.c:296
msgid "Save Script-Fu Console Output"
msgstr "Spara utdata från Script-Fu-konsoll"
#: ../plug-ins/script-fu/script-fu-console.c:347
#: ../plug-ins/script-fu/script-fu-console.c:343
#, c-format
msgid "Could not open '%s' for writing: %s"
msgstr "Kunde inte öppna \"%s\" för skrivning: %s"
#: ../plug-ins/script-fu/script-fu-console.c:376
#: ../plug-ins/script-fu/script-fu-console.c:372
msgid "Script-Fu Procedure Browser"
msgstr "Script-Fu-procedurbläddrare"
#: ../plug-ins/script-fu/script-fu-console.c:719
#: ../plug-ins/script-fu/script-fu-console.c:716
msgid "Script-Fu evaluation mode only allows non-interactive invocation"
msgstr "Script-Fu-evalueringsläget tillåter endast icke-interaktiv användning"
@ -117,19 +117,19 @@ msgstr ""
"\n"
"%s"
#: ../plug-ins/script-fu/script-fu-server.c:711
#: ../plug-ins/script-fu/script-fu-server.c:712
msgid "Script-Fu Server Options"
msgstr "Script-Fu-serveralternativ"
#: ../plug-ins/script-fu/script-fu-server.c:716
#: ../plug-ins/script-fu/script-fu-server.c:717
msgid "_Start Server"
msgstr "_Starta servern"
#: ../plug-ins/script-fu/script-fu-server.c:744
#: ../plug-ins/script-fu/script-fu-server.c:745
msgid "Server port:"
msgstr "Serverport:"
#: ../plug-ins/script-fu/script-fu-server.c:750
#: ../plug-ins/script-fu/script-fu-server.c:751
msgid "Server logfile:"
msgstr "Serverloggfil:"
@ -138,8 +138,8 @@ msgid "Interactive console for Script-Fu development"
msgstr "Interaktiv konsoll för Script-Fu-utveckling"
#: ../plug-ins/script-fu/script-fu.c:116
msgid "Script-Fu _Console"
msgstr "Script-Fu-konsoll"
msgid "_Console"
msgstr "_Konsoll"
#: ../plug-ins/script-fu/script-fu.c:140
msgid "Server for remote Script-Fu operation"
@ -149,115 +149,115 @@ msgstr "Server för fjärråtgärder i Script-Fu"
msgid "_Start Server..."
msgstr "_Starta servern..."
#: ../plug-ins/script-fu/script-fu.c:298
#: ../plug-ins/script-fu/script-fu.c:301
msgid "_GIMP Online"
msgstr "_GIMP på nätet"
#: ../plug-ins/script-fu/script-fu.c:299
#: ../plug-ins/script-fu/script-fu.c:302
msgid "_User Manual"
msgstr "A_nvändarhandbok"
#: ../plug-ins/script-fu/script-fu.c:302
#: ../plug-ins/script-fu/script-fu.c:305
msgid "_Script-Fu"
msgstr "_Script-Fu"
#: ../plug-ins/script-fu/script-fu.c:304
#: ../plug-ins/script-fu/script-fu.c:307
msgid "_Buttons"
msgstr "_Knappar"
#: ../plug-ins/script-fu/script-fu.c:306
#: ../plug-ins/script-fu/script-fu.c:309
msgid "_Logos"
msgstr "_Logotyper"
#: ../plug-ins/script-fu/script-fu.c:308
#: ../plug-ins/script-fu/script-fu.c:311
msgid "_Misc"
msgstr "_Diverse"
#: ../plug-ins/script-fu/script-fu.c:310
#: ../plug-ins/script-fu/script-fu.c:313
msgid "_Patterns"
msgstr "_Mönster"
#: ../plug-ins/script-fu/script-fu.c:312
#: ../plug-ins/script-fu/script-fu.c:315
msgid "_Test"
msgstr "_Testa"
#: ../plug-ins/script-fu/script-fu.c:314
#: ../plug-ins/script-fu/script-fu.c:317
msgid "_Utilities"
msgstr "_Verktyg"
#: ../plug-ins/script-fu/script-fu.c:316
#: ../plug-ins/script-fu/script-fu.c:319
msgid "_Web Page Themes"
msgstr "_Webbsideteman"
#: ../plug-ins/script-fu/script-fu.c:318
#: ../plug-ins/script-fu/script-fu.c:321
msgid "_Alien Glow"
msgstr "Rymd_glöd"
#: ../plug-ins/script-fu/script-fu.c:320
#: ../plug-ins/script-fu/script-fu.c:323
msgid "_Beveled Pattern"
msgstr "Av_fasat mönster"
#: ../plug-ins/script-fu/script-fu.c:322
#: ../plug-ins/script-fu/script-fu.c:325
msgid "_Classic.Gimp.Org"
msgstr "_Classic.Gimp.Org"
#: ../plug-ins/script-fu/script-fu.c:325
#: ../plug-ins/script-fu/script-fu.c:328
msgid "Alpha to _Logo"
msgstr "Alfa till _logotyp"
#: ../plug-ins/script-fu/script-fu.c:327
#: ../plug-ins/script-fu/script-fu.c:330
msgid "An_imation"
msgstr "An_imation"
#: ../plug-ins/script-fu/script-fu.c:329
#: ../plug-ins/script-fu/script-fu.c:332
msgid "_Animators"
msgstr "_Animatörer"
#: ../plug-ins/script-fu/script-fu.c:331
#: ../plug-ins/script-fu/script-fu.c:334
msgid "_Artistic"
msgstr "_Konstnärlig"
#: ../plug-ins/script-fu/script-fu.c:333
#: ../plug-ins/script-fu/script-fu.c:336
msgid "_Blur"
msgstr "_Utsmetning"
#: ../plug-ins/script-fu/script-fu.c:335
#: ../plug-ins/script-fu/script-fu.c:338
msgid "_Decor"
msgstr "_Dekor"
#: ../plug-ins/script-fu/script-fu.c:337
#: ../plug-ins/script-fu/script-fu.c:340
msgid "_Effects"
msgstr "_Effekter"
#: ../plug-ins/script-fu/script-fu.c:339
#: ../plug-ins/script-fu/script-fu.c:342
msgid "En_hance"
msgstr "För_bättra"
#: ../plug-ins/script-fu/script-fu.c:341
#: ../plug-ins/script-fu/script-fu.c:344
msgid "_Light and Shadow"
msgstr "_Ljus och skugga"
#: ../plug-ins/script-fu/script-fu.c:343
#: ../plug-ins/script-fu/script-fu.c:346
msgid "S_hadow"
msgstr "Sk_ugga"
#: ../plug-ins/script-fu/script-fu.c:345
#: ../plug-ins/script-fu/script-fu.c:348
msgid "_Render"
msgstr "_Rendera"
#: ../plug-ins/script-fu/script-fu.c:347
#: ../plug-ins/script-fu/script-fu.c:350
msgid "_Alchemy"
msgstr "_Alkemi"
#: ../plug-ins/script-fu/script-fu.c:350
#: ../plug-ins/script-fu/script-fu.c:353
msgid "Re-read all available Script-Fu scripts"
msgstr "Läs om alla tillgängliga Script-Fu-skript"
#: ../plug-ins/script-fu/script-fu.c:355
#: ../plug-ins/script-fu/script-fu.c:358
msgid "_Refresh Scripts"
msgstr "_Uppdatera skript"
#: ../plug-ins/script-fu/script-fu.c:378
#: ../plug-ins/script-fu/script-fu.c:381
msgid "You can not use \"Refresh Scripts\" while a Script-Fu dialog box is open. Please close all Script-Fu windows and try again."
msgstr "Du kan inte använda \"Uppdatera skript\" när en Script-Fu-dialogruta är öppen. Stäng alla Script-Fu-fönster och försök igen."
@ -1781,46 +1781,6 @@ msgstr "Ta bort alla horisontella och vertikala hjälplinjer"
msgid "_Remove all Guides"
msgstr "_Ta bort alla guider"
#: ../plug-ins/script-fu/scripts/hsv-graph.scm.h:1
msgid "BG opacity"
msgstr "Bakgrundsopacitet"
#: ../plug-ins/script-fu/scripts/hsv-graph.scm.h:2
msgid "Create a graph of the Hue, Saturation, and Value distributions"
msgstr "Skapa en graf över användningen av nyans, mättnad och intensitet"
#: ../plug-ins/script-fu/scripts/hsv-graph.scm.h:3
msgid "Draw _HSV Graph..."
msgstr "Rita _NMI-graf..."
#: ../plug-ins/script-fu/scripts/hsv-graph.scm.h:4
msgid "End X"
msgstr "X-slut"
#: ../plug-ins/script-fu/scripts/hsv-graph.scm.h:5
msgid "End Y"
msgstr "Y-slut"
#: ../plug-ins/script-fu/scripts/hsv-graph.scm.h:6
msgid "From top-left to bottom-right"
msgstr "Från övre vänsterkant till nedre högerkant"
#: ../plug-ins/script-fu/scripts/hsv-graph.scm.h:7
msgid "Graph scale"
msgstr "Grafskala"
#: ../plug-ins/script-fu/scripts/hsv-graph.scm.h:8
msgid "Start X"
msgstr "Start i X-led"
#: ../plug-ins/script-fu/scripts/hsv-graph.scm.h:9
msgid "Start Y"
msgstr "Start i Y-led"
#: ../plug-ins/script-fu/scripts/hsv-graph.scm.h:10
msgid "Use selection bounds instead of values below"
msgstr "Använd markeringsgränser istället för nedanstående värden"
#: ../plug-ins/script-fu/scripts/i26-gunya2.scm.h:1
msgid "Create a logo in a two-color, scribbled text style"
msgstr "Skapa en tvåfärgerslogotyp med en textstil som liknar klotter "
@ -2823,6 +2783,26 @@ msgstr "Markeringsopacitet"
msgid "_Xach-Effect..."
msgstr "_Xach-effekt..."
#~ msgid "BG opacity"
#~ msgstr "Bakgrundsopacitet"
#~ msgid "Create a graph of the Hue, Saturation, and Value distributions"
#~ msgstr "Skapa en graf över användningen av nyans, mättnad och intensitet"
#~ msgid "Draw _HSV Graph..."
#~ msgstr "Rita _NMI-graf..."
#~ msgid "End X"
#~ msgstr "X-slut"
#~ msgid "End Y"
#~ msgstr "Y-slut"
#~ msgid "From top-left to bottom-right"
#~ msgstr "Från övre vänsterkant till nedre högerkant"
#~ msgid "Graph scale"
#~ msgstr "Grafskala"
#~ msgid "Start X"
#~ msgstr "Start i X-led"
#~ msgid "Start Y"
#~ msgstr "Start i Y-led"
#~ msgid "Use selection bounds instead of values below"
#~ msgstr "Använd markeringsgränser istället för nedanstående värden"
#~ msgid "Darken only\\n(Better, but only for images with a lot of white)"
#~ msgstr "Gör endast mörkare\\n(bättre, men bara för bilder med mycket vitt)"
#~ msgid "Apply generated layermask"

View File

@ -1,3 +1,16 @@
2008-02-12 Stéphane Raimbault <stephane.raimbault@gmail.com>
* fr.po: Fixed French translation by Julien Hardelin and Stéphane
Raimbault (merged from gimp-2-4).
2008-02-11 Stéphane Raimbault <stephane.raimbault@gmail.com>
* fr.po: Merged from gimp-2-4.
2008-02-10 Daniel Nylander <po@danielnylander.se>
* sv.po: Updated Swedish translation.
2008-02-05 Stéphane Raimbault <stephane.raimbault@gmail.com>
* fr.po: Merged from gimp-2-4.

377
po/fr.po

File diff suppressed because it is too large Load Diff

1684
po/sv.po

File diff suppressed because it is too large Load Diff