Bill Skaggs <weskaggs@primate.ucdavis.edu>

Merge 24892:25025 from trunk.

svn path=/branches/weskaggs/; revision=25026
This commit is contained in:
William Skaggs 2008-03-04 03:15:17 +00:00
parent 10e1807a40
commit a4c0af770f
125 changed files with 43195 additions and 39445 deletions

View File

@ -1,3 +1,7 @@
2008-03-03 Bill Skaggs <weskaggs@primate.ucdavis.edu>
Merge 24892:25025 from trunk.
2008-03-03 Bill Skaggs <weskaggs@primate.ucdavis.edu> 2008-03-03 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/widgets/gimptoolbox.[ch] * app/widgets/gimptoolbox.[ch]

View File

@ -28,8 +28,9 @@ header files installed.
1. You need to have installed a recent version of pkg-config available 1. You need to have installed a recent version of pkg-config available
from http://www.freedesktop.org/software/pkgconfig/. from http://www.freedesktop.org/software/pkgconfig/.
2. You need to have installed GEGL trunk. To check out GEGL trunk: 2. You need to have GEGL version 0.0.16 or newer. You can get it from
svn co http://svn.gnome.org/svn/gegl/trunk gegl-trunk http://gegl.org/ or check it out from the subversion repository:
http://svn.gnome.org/svn/gegl/trunk
3. You need to have installed GTK+ version 2.12.1 or newer. GIMP 3. You need to have installed GTK+ version 2.12.1 or newer. GIMP
also need a recent versions of GLib (>= 2.14.1) and Pango (>= 1.12.2). also need a recent versions of GLib (>= 2.14.1) and Pango (>= 1.12.2).

19
NEWS
View File

@ -6,22 +6,7 @@
This is the unstable development branch of GIMP. This is the unstable development branch of GIMP.
Changes in GIMP 2.4.1 Changes in GIMP 2.5.0
===================== =====================
- fixed a minor display rendering problem (there has been no release in the 2.5 development series yet)
- improved the workaround for broken graphics card drivers (bug #421466)
- fixed a crash with broken scripts and plug-ins (bug #490055)
- fixed potential syntax error in configure script (bug #490068)
- fixed parsing of floating point numbers in Script-Fu (bug #490198)
- fixed potential crash when converting an indexed image to RGB (bug #490048)
- update the histogram while doing color corrections (bug #490182)
- fixed another crash with broken plug-ins (bug #490617)
- fixed problems on Win32 when GIMP is installed into a non-ASCII path
- fixed handling of truncated ASCII PNM files (bug #490827)
- make sure that there's always a cursor, even for small brushes (bug #491272)
- fixed line-drawing with a tablet and the Shift key (bug #164240)
- added code to use the system monitor profile on OS X (bug #488170)
- show changes to the rounded corners in the Rectangle Select tool (bug #418284)
- reduced rounding errors in the display render routines (bug #490785)
- translation updates (ca, de, et, lt, mk, pa, sv)

View File

@ -51,6 +51,8 @@ app_sources = \
sanity.h \ sanity.h \
units.c \ units.c \
units.h \ units.h \
version.c \
version.h \
gimp-log.c \ gimp-log.c \
gimp-log.h \ gimp-log.h \
gimp-intl.h gimp-intl.h
@ -88,13 +90,15 @@ INCLUDES = \
$(GEGL_CFLAGS) \ $(GEGL_CFLAGS) \
-I$(includedir) -I$(includedir)
AM_LDFLAGS = $(mwindows) $(munix) \ AM_LDFLAGS = $(munix) \
$(CARBON_LDFLAGS) \ $(CARBON_LDFLAGS) \
-u $(SYMPREFIX)xcf_init \ -u $(SYMPREFIX)xcf_init \
-u $(SYMPREFIX)internal_procs_init \ -u $(SYMPREFIX)internal_procs_init \
-u $(SYMPREFIX)gimp_coords_mix \ -u $(SYMPREFIX)gimp_coords_mix \
-u $(SYMPREFIX)gimp_plug_in_manager_restore -u $(SYMPREFIX)gimp_plug_in_manager_restore
gimp_2_5_LDFLAGS = $(AM_LDFLAGS) $(mwindows)
gimp_2_5_LDADD = \ gimp_2_5_LDADD = \
gui/libappgui.a \ gui/libappgui.a \
actions/libappactions.a \ actions/libappactions.a \

View File

@ -117,7 +117,7 @@ static const GimpActionEntry edit_actions[] =
GIMP_HELP_EDIT_COPY }, GIMP_HELP_EDIT_COPY },
{ "edit-copy-visible", NULL, /* GIMP_STOCK_COPY_VISIBLE, */ { "edit-copy-visible", NULL, /* GIMP_STOCK_COPY_VISIBLE, */
N_("Copy _Visible"), "", N_("Copy _Visible"), "<control><shift>C",
N_("Copy the selected region to the clipboard"), N_("Copy the selected region to the clipboard"),
G_CALLBACK (edit_copy_visible_cmd_callback), G_CALLBACK (edit_copy_visible_cmd_callback),
GIMP_HELP_EDIT_COPY_VISIBLE }, GIMP_HELP_EDIT_COPY_VISIBLE },
@ -135,7 +135,7 @@ static const GimpActionEntry edit_actions[] =
GIMP_HELP_EDIT_PASTE_INTO }, GIMP_HELP_EDIT_PASTE_INTO },
{ "edit-paste-as-new", GIMP_STOCK_PASTE_AS_NEW, { "edit-paste-as-new", GIMP_STOCK_PASTE_AS_NEW,
N_("Paste as New"), NULL, N_("Paste as New"), "<control><shift>V",
N_("Create a new image from the content of the clipboard"), N_("Create a new image from the content of the clipboard"),
G_CALLBACK (edit_paste_as_new_cmd_callback), G_CALLBACK (edit_paste_as_new_cmd_callback),
GIMP_HELP_EDIT_PASTE_AS_NEW }, GIMP_HELP_EDIT_PASTE_AS_NEW },
@ -147,13 +147,13 @@ static const GimpActionEntry edit_actions[] =
GIMP_HELP_EDIT_PASTE_AS_NEW }, GIMP_HELP_EDIT_PASTE_AS_NEW },
{ "edit-named-cut", GTK_STOCK_CUT, { "edit-named-cut", GTK_STOCK_CUT,
N_("Cu_t Named..."), "<control><shift>X", N_("Cu_t Named..."), "",
N_("Move the selected pixels to a named buffer"), N_("Move the selected pixels to a named buffer"),
G_CALLBACK (edit_named_cut_cmd_callback), G_CALLBACK (edit_named_cut_cmd_callback),
GIMP_HELP_BUFFER_CUT }, GIMP_HELP_BUFFER_CUT },
{ "edit-named-copy", GTK_STOCK_COPY, { "edit-named-copy", GTK_STOCK_COPY,
N_("_Copy Named..."), "<control><shift>C", N_("_Copy Named..."), "",
N_("Copy the selected pixels to a named buffer"), N_("Copy the selected pixels to a named buffer"),
G_CALLBACK (edit_named_copy_cmd_callback), G_CALLBACK (edit_named_copy_cmd_callback),
GIMP_HELP_BUFFER_COPY }, GIMP_HELP_BUFFER_COPY },
@ -165,7 +165,7 @@ static const GimpActionEntry edit_actions[] =
GIMP_HELP_BUFFER_COPY }, GIMP_HELP_BUFFER_COPY },
{ "edit-named-paste", GTK_STOCK_PASTE, { "edit-named-paste", GTK_STOCK_PASTE,
N_("_Paste Named..."), "<control><shift>V", N_("_Paste Named..."), "",
N_("Paste the content of a named buffer"), N_("Paste the content of a named buffer"),
G_CALLBACK (edit_named_paste_cmd_callback), G_CALLBACK (edit_named_paste_cmd_callback),
GIMP_HELP_BUFFER_PASTE }, GIMP_HELP_BUFFER_PASTE },

View File

@ -491,9 +491,21 @@ plug_in_actions_history_changed (GimpPlugInManager *manager,
if (proc) if (proc)
{ {
GtkAction *actual_action;
const gchar *label; const gchar *label;
gchar *repeat; gchar *repeat;
gchar *reshow; gchar *reshow;
gboolean sensitive = FALSE;
/* copy the sensitivity of the plug-in procedure's actual action
* instead of calling plug_in_actions_update() because doing the
* latter would set the sensitivity of this image's action on
* all images' actions. See bug #517683.
*/
actual_action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
GIMP_OBJECT (proc)->name);
if (actual_action)
sensitive = gtk_action_get_sensitive (actual_action);
label = gimp_plug_in_procedure_get_label (proc); label = gimp_plug_in_procedure_get_label (proc);
@ -503,6 +515,9 @@ plug_in_actions_history_changed (GimpPlugInManager *manager,
gimp_action_group_set_action_label (group, "plug-in-repeat", repeat); gimp_action_group_set_action_label (group, "plug-in-repeat", repeat);
gimp_action_group_set_action_label (group, "plug-in-reshow", reshow); gimp_action_group_set_action_label (group, "plug-in-reshow", reshow);
gimp_action_group_set_action_sensitive (group, "plug-in-repeat", sensitive);
gimp_action_group_set_action_sensitive (group, "plug-in-reshow", sensitive);
g_free (repeat); g_free (repeat);
g_free (reshow); g_free (reshow);
} }
@ -512,20 +527,32 @@ plug_in_actions_history_changed (GimpPlugInManager *manager,
_("Repeat Last")); _("Repeat Last"));
gimp_action_group_set_action_label (group, "plug-in-reshow", gimp_action_group_set_action_label (group, "plug-in-reshow",
_("Re-Show Last")); _("Re-Show Last"));
gimp_action_group_set_action_sensitive (group, "plug-in-repeat", FALSE);
gimp_action_group_set_action_sensitive (group, "plug-in-reshow", FALSE);
} }
for (i = 0; i < gimp_plug_in_manager_history_length (manager); i++) for (i = 0; i < gimp_plug_in_manager_history_length (manager); i++)
{ {
GtkAction *action; GtkAction *action;
gchar *name = g_strdup_printf ("plug-in-recent-%02d", i + 1); GtkAction *actual_action;
gchar *name = g_strdup_printf ("plug-in-recent-%02d", i + 1);
gboolean sensitive = FALSE;
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name); action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name);
g_free (name); g_free (name);
proc = gimp_plug_in_manager_history_nth (manager, i); proc = gimp_plug_in_manager_history_nth (manager, i);
/* see comment above */
actual_action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
GIMP_OBJECT (proc)->name);
if (actual_action)
sensitive = gtk_action_get_sensitive (actual_action);
g_object_set (action, g_object_set (action,
"visible", TRUE, "visible", TRUE,
"sensitive", sensitive,
"procedure", proc, "procedure", proc,
"label", gimp_plug_in_procedure_get_label (proc), "label", gimp_plug_in_procedure_get_label (proc),
"stock-id", gimp_plug_in_procedure_get_stock_id (proc), "stock-id", gimp_plug_in_procedure_get_stock_id (proc),
@ -546,9 +573,6 @@ plug_in_actions_history_changed (GimpPlugInManager *manager,
"procedure", NULL, "procedure", NULL,
NULL); NULL);
} }
/* update sensitivity of the actions */
plug_in_actions_update (group, manager->gimp);
} }
static gboolean static gboolean

View File

@ -278,7 +278,7 @@ app_exit_after_callback (Gimp *gimp,
GMainLoop *loop) GMainLoop *loop)
{ {
if (gimp->be_verbose) if (gimp->be_verbose)
g_print ("EXIT: app_exit_after_callback\n"); g_print ("EXIT: %s\n", G_STRFUNC);
/* /*
* In stable releases, we simply call exit() here. This speeds up * In stable releases, we simply call exit() here. This speeds up

View File

@ -21,11 +21,11 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <glib-object.h> #include <gegl.h>
#include "core/core-types.h" #include "core/core-types.h"
#include "base/base.h" #include "base/tile-swap.h"
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimpparamspecs.h" #include "core/gimpparamspecs.h"
@ -41,8 +41,7 @@
#define BATCH_DEFAULT_EVAL_PROC "plug-in-script-fu-eval" #define BATCH_DEFAULT_EVAL_PROC "plug-in-script-fu-eval"
static gboolean batch_exit_after_callback (Gimp *gimp, static gboolean batch_exit_after_callback (Gimp *gimp);
gboolean kill_it);
static void batch_run_cmd (Gimp *gimp, static void batch_run_cmd (Gimp *gimp,
const gchar *proc_name, const gchar *proc_name,
GimpProcedure *procedure, GimpProcedure *procedure,
@ -118,15 +117,23 @@ batch_run (Gimp *gimp,
} }
/*
* The purpose of this handler is to exit GIMP cleanly when the batch
* procedure calls the gimp-exit procedure. Without this callback, the
* message "batch command experienced an execution error" would appear
* and gimp would hang forever.
*/
static gboolean static gboolean
batch_exit_after_callback (Gimp *gimp, batch_exit_after_callback (Gimp *gimp)
gboolean kill_it)
{ {
if (gimp->be_verbose) if (gimp->be_verbose)
g_print ("EXIT: %s\n", G_STRLOC); g_print ("EXIT: %s\n", G_STRFUNC);
gegl_exit ();
/* make sure that the swap files are removed before we quit */
tile_swap_exit ();
/* make sure that the swap file is removed before we quit */
base_exit ();
exit (EXIT_SUCCESS); exit (EXIT_SUCCESS);
return TRUE; return TRUE;

View File

@ -258,7 +258,7 @@ gimp_dispose (GObject *object)
Gimp *gimp = GIMP (object); Gimp *gimp = GIMP (object);
if (gimp->be_verbose) if (gimp->be_verbose)
g_print ("EXIT: gimp_dispose\n"); g_print ("EXIT: %s\n", G_STRFUNC);
if (gimp->brush_factory) if (gimp->brush_factory)
gimp_data_factory_data_free (gimp->brush_factory); gimp_data_factory_data_free (gimp->brush_factory);
@ -281,7 +281,7 @@ gimp_finalize (GObject *object)
Gimp *gimp = GIMP (object); Gimp *gimp = GIMP (object);
if (gimp->be_verbose) if (gimp->be_verbose)
g_print ("EXIT: gimp_finalize\n"); g_print ("EXIT: %s\n", G_STRFUNC);
gimp_contexts_exit (gimp); gimp_contexts_exit (gimp);
@ -526,7 +526,7 @@ gimp_real_initialize (Gimp *gimp,
GimpData *clipboard_pattern; GimpData *clipboard_pattern;
if (gimp->be_verbose) if (gimp->be_verbose)
g_print ("INIT: gimp_real_initialize\n"); g_print ("INIT: %s\n", G_STRFUNC);
status_callback (_("Initialization"), NULL, 0.0); status_callback (_("Initialization"), NULL, 0.0);
@ -617,7 +617,7 @@ gimp_real_restore (Gimp *gimp,
GimpInitStatusFunc status_callback) GimpInitStatusFunc status_callback)
{ {
if (gimp->be_verbose) if (gimp->be_verbose)
g_print ("INIT: gimp_real_restore\n"); g_print ("INIT: %s\n", G_STRFUNC);
gimp_plug_in_manager_restore (gimp->plug_in_manager, gimp_plug_in_manager_restore (gimp->plug_in_manager,
gimp_get_user_context (gimp), status_callback); gimp_get_user_context (gimp), status_callback);
@ -630,7 +630,7 @@ gimp_real_exit (Gimp *gimp,
GError *error = NULL; GError *error = NULL;
if (gimp->be_verbose) if (gimp->be_verbose)
g_print ("EXIT: gimp_real_exit\n"); g_print ("EXIT: %s\n", G_STRFUNC);
gimp_plug_in_manager_exit (gimp->plug_in_manager); gimp_plug_in_manager_exit (gimp->plug_in_manager);
gimp_modules_unload (gimp); gimp_modules_unload (gimp);
@ -778,7 +778,7 @@ gimp_load_config (Gimp *gimp,
g_return_if_fail (gimp->edit_config == NULL); g_return_if_fail (gimp->edit_config == NULL);
if (gimp->be_verbose) if (gimp->be_verbose)
g_print ("INIT: gimp_load_config\n"); g_print ("INIT: %s\n", G_STRFUNC);
/* this needs to be done before gimprc loading because gimprc can /* this needs to be done before gimprc loading because gimprc can
* use user defined units * use user defined units
@ -810,7 +810,7 @@ gimp_initialize (Gimp *gimp,
g_return_if_fail (GIMP_IS_CORE_CONFIG (gimp->config)); g_return_if_fail (GIMP_IS_CORE_CONFIG (gimp->config));
if (gimp->be_verbose) if (gimp->be_verbose)
g_print ("INIT: gimp_initialize\n"); g_print ("INIT: %s\n", G_STRFUNC);
g_signal_emit (gimp, gimp_signals[INITIALIZE], 0, status_callback); g_signal_emit (gimp, gimp_signals[INITIALIZE], 0, status_callback);
} }
@ -825,7 +825,7 @@ gimp_restore (Gimp *gimp,
g_return_if_fail (status_callback != NULL); g_return_if_fail (status_callback != NULL);
if (gimp->be_verbose) if (gimp->be_verbose)
g_print ("INIT: gimp_restore\n"); g_print ("INIT: %s\n", G_STRFUNC);
/* initialize the global parasite table */ /* initialize the global parasite table */
status_callback (_("Looking for data files"), _("Parasites"), 0.0); status_callback (_("Looking for data files"), _("Parasites"), 0.0);
@ -890,7 +890,7 @@ gimp_exit (Gimp *gimp,
gimp->exiting = TRUE; gimp->exiting = TRUE;
if (gimp->be_verbose) if (gimp->be_verbose)
g_print ("EXIT: gimp_exit\n"); g_print ("EXIT: %s\n", G_STRFUNC);
g_signal_emit (gimp, gimp_signals[EXIT], 0, g_signal_emit (gimp, gimp_signals[EXIT], 0,
force ? TRUE : FALSE, force ? TRUE : FALSE,

View File

@ -38,8 +38,10 @@ enum
{ {
PROP_0, PROP_0,
PROP_CURVE_TYPE, PROP_CURVE_TYPE,
PROP_N_POINTS,
PROP_POINTS, PROP_POINTS,
PROP_CURVE PROP_N_SAMPLES,
PROP_SAMPLES
}; };
@ -81,6 +83,11 @@ static void gimp_curve_dirty (GimpData *data);
static gchar * gimp_curve_get_extension (GimpData *data); static gchar * gimp_curve_get_extension (GimpData *data);
static GimpData * gimp_curve_duplicate (GimpData *data); static GimpData * gimp_curve_duplicate (GimpData *data);
static void gimp_curve_set_n_points (GimpCurve *curve,
gint n_points);
static void gimp_curve_set_n_samples (GimpCurve *curve,
gint n_samples);
static void gimp_curve_calculate (GimpCurve *curve); static void gimp_curve_calculate (GimpCurve *curve);
static void gimp_curve_plot (GimpCurve *curve, static void gimp_curve_plot (GimpCurve *curve,
gint p1, gint p1,
@ -126,14 +133,26 @@ gimp_curve_class_init (GimpCurveClass *klass)
GIMP_PARAM_READWRITE | GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT)); G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class, PROP_N_POINTS,
g_param_spec_int ("n-points", NULL, NULL,
17, 17, 17,
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (object_class, PROP_POINTS, g_object_class_install_property (object_class, PROP_POINTS,
g_param_spec_boolean ("points", NULL, NULL, g_param_spec_boolean ("points", NULL, NULL,
FALSE, FALSE,
GIMP_PARAM_READWRITE | GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT)); G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class, PROP_CURVE, g_object_class_install_property (object_class, PROP_N_SAMPLES,
g_param_spec_boolean ("curve", NULL, NULL, g_param_spec_int ("n-samples", NULL, NULL,
256, 256, 256,
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (object_class, PROP_SAMPLES,
g_param_spec_boolean ("samples", NULL, NULL,
FALSE, FALSE,
GIMP_PARAM_READWRITE | GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT)); G_PARAM_CONSTRUCT));
@ -142,7 +161,6 @@ gimp_curve_class_init (GimpCurveClass *klass)
static void static void
gimp_curve_init (GimpCurve *curve) gimp_curve_init (GimpCurve *curve)
{ {
gimp_curve_reset (curve, TRUE);
} }
static void static void
@ -150,6 +168,18 @@ gimp_curve_finalize (GObject *object)
{ {
GimpCurve *curve = GIMP_CURVE (object); GimpCurve *curve = GIMP_CURVE (object);
if (curve->points)
{
g_free (curve->points);
curve->points = NULL;
}
if (curve->samples)
{
g_free (curve->samples);
curve->samples = NULL;
}
G_OBJECT_CLASS (parent_class)->finalize (object); G_OBJECT_CLASS (parent_class)->finalize (object);
} }
@ -167,8 +197,18 @@ gimp_curve_set_property (GObject *object,
gimp_curve_set_curve_type (curve, g_value_get_enum (value)); gimp_curve_set_curve_type (curve, g_value_get_enum (value));
break; break;
case PROP_N_POINTS:
gimp_curve_set_n_points (curve, g_value_get_int (value));
break;
case PROP_POINTS: case PROP_POINTS:
case PROP_CURVE: break;
case PROP_N_SAMPLES:
gimp_curve_set_n_samples (curve, g_value_get_int (value));
break;
case PROP_SAMPLES:
break; break;
default: default:
@ -191,8 +231,18 @@ gimp_curve_get_property (GObject *object,
g_value_set_enum (value, curve->curve_type); g_value_set_enum (value, curve->curve_type);
break; break;
case PROP_N_POINTS:
g_value_set_int (value, curve->n_points);
break;
case PROP_POINTS: case PROP_POINTS:
case PROP_CURVE: break;
case PROP_N_SAMPLES:
g_value_set_int (value, curve->n_samples);
break;
case PROP_SAMPLES:
break; break;
default: default:
@ -208,6 +258,9 @@ gimp_curve_get_memsize (GimpObject *object,
GimpCurve *curve = GIMP_CURVE (object); GimpCurve *curve = GIMP_CURVE (object);
gint64 memsize = 0; gint64 memsize = 0;
memsize += curve->n_points * sizeof (GimpVector2);
memsize += curve->n_samples * sizeof (gdouble);
return memsize + GIMP_OBJECT_CLASS (parent_class)->get_memsize (object, return memsize + GIMP_OBJECT_CLASS (parent_class)->get_memsize (object,
gui_size); gui_size);
} }
@ -327,30 +380,32 @@ gimp_curve_reset (GimpCurve *curve,
g_return_if_fail (GIMP_IS_CURVE (curve)); g_return_if_fail (GIMP_IS_CURVE (curve));
if (reset_type) g_object_freeze_notify (G_OBJECT (curve));
curve->curve_type = GIMP_CURVE_SMOOTH;
for (i = 0; i < 256; i++) for (i = 0; i < curve->n_samples; i++)
curve->curve[i] = (gdouble) i / 255.0; curve->samples[i] = (gdouble) i / (gdouble) (curve->n_samples - 1);
for (i = 0; i < GIMP_CURVE_NUM_POINTS; i++) g_object_notify (G_OBJECT (curve), "samples");
curve->points[0].x = 0.0;
curve->points[0].y = 0.0;
for (i = 1; i < curve->n_points - 1; i++)
{ {
curve->points[i].x = -1.0; curve->points[i].x = -1.0;
curve->points[i].y = -1.0; curve->points[i].y = -1.0;
} }
curve->points[0].x = 0.0; curve->points[curve->n_points - 1].x = 1.0;
curve->points[0].y = 0.0; curve->points[curve->n_points - 1].y = 1.0;
curve->points[GIMP_CURVE_NUM_POINTS - 1].x = 1.0;
curve->points[GIMP_CURVE_NUM_POINTS - 1].y = 1.0;
g_object_freeze_notify (G_OBJECT (curve));
g_object_notify (G_OBJECT (curve), "points"); g_object_notify (G_OBJECT (curve), "points");
g_object_notify (G_OBJECT (curve), "curve");
if (reset_type) if (reset_type)
g_object_notify (G_OBJECT (curve), "curve-type"); {
curve->curve_type = GIMP_CURVE_SMOOTH;
g_object_notify (G_OBJECT (curve), "curve-type");
}
g_object_thaw_notify (G_OBJECT (curve)); g_object_thaw_notify (G_OBJECT (curve));
@ -371,17 +426,28 @@ gimp_curve_set_curve_type (GimpCurve *curve,
if (curve_type == GIMP_CURVE_SMOOTH) if (curve_type == GIMP_CURVE_SMOOTH)
{ {
gint n_points;
gint i; gint i;
/* pick representative points from the curve and make them for (i = 0; i < curve->n_points; i++)
* control points
*/
for (i = 0; i <= 8; i++)
{ {
gint32 index = CLAMP0255 (i * 32); curve->points[i].x = -1;
curve->points[i].y = -1;
}
curve->points[i * 2].x = (gdouble) index / 255.0; /* pick some points from the curve and make them control
curve->points[i * 2].y = curve->curve[index]; * points
*/
n_points = CLAMP (9, curve->n_points / 2, curve->n_points);
for (i = 0; i < n_points; i++)
{
gint sample = i * (curve->n_samples - 1) / (n_points - 1);
gint point = i * (curve->n_points - 1) / (n_points - 1);
curve->points[point].x = ((gdouble) sample /
(gdouble) (curve->n_samples - 1));
curve->points[point].y = curve->samples[sample];
} }
g_object_notify (G_OBJECT (curve), "points"); g_object_notify (G_OBJECT (curve), "points");
@ -403,7 +469,82 @@ gimp_curve_get_curve_type (GimpCurve *curve)
return curve->curve_type; return curve->curve_type;
} }
#define MIN_DISTANCE (8.0 / 255.0) static void
gimp_curve_set_n_points (GimpCurve *curve,
gint n_points)
{
g_return_if_fail (GIMP_IS_CURVE (curve));
if (n_points != curve->n_points)
{
gint i;
g_object_freeze_notify (G_OBJECT (curve));
curve->n_points = n_points;
g_object_notify (G_OBJECT (curve), "n-points");
curve->points = g_renew (GimpVector2, curve->points, curve->n_points);
curve->points[0].x = 0.0;
curve->points[0].y = 0.0;
for (i = 1; i < curve->n_points - 1; i++)
{
curve->points[i].x = -1.0;
curve->points[i].y = -1.0;
}
curve->points[curve->n_points - 1].x = 1.0;
curve->points[curve->n_points - 1].y = 1.0;
g_object_notify (G_OBJECT (curve), "points");
g_object_thaw_notify (G_OBJECT (curve));
}
}
gint
gimp_curve_get_n_points (GimpCurve *curve)
{
g_return_val_if_fail (GIMP_IS_CURVE (curve), 0);
return curve->n_points;
}
static void
gimp_curve_set_n_samples (GimpCurve *curve,
gint n_samples)
{
g_return_if_fail (GIMP_IS_CURVE (curve));
if (n_samples != curve->n_samples)
{
gint i;
g_object_freeze_notify (G_OBJECT (curve));
curve->n_samples = n_samples;
g_object_notify (G_OBJECT (curve), "n-samples");
curve->samples = g_renew (gdouble, curve->samples, curve->n_samples);
for (i = 0; i < curve->n_samples; i++)
curve->samples[i] = (gdouble) i / (gdouble) (curve->n_samples - 1);
g_object_notify (G_OBJECT (curve), "samples");
g_object_thaw_notify (G_OBJECT (curve));
}
}
gint
gimp_curve_get_n_samples (GimpCurve *curve)
{
g_return_val_if_fail (GIMP_IS_CURVE (curve), 0);
return curve->n_samples;
}
gint gint
gimp_curve_get_closest_point (GimpCurve *curve, gimp_curve_get_closest_point (GimpCurve *curve,
@ -415,7 +556,7 @@ gimp_curve_get_closest_point (GimpCurve *curve,
g_return_val_if_fail (GIMP_IS_CURVE (curve), 0); g_return_val_if_fail (GIMP_IS_CURVE (curve), 0);
for (i = 0; i < GIMP_CURVE_NUM_POINTS; i++) for (i = 0; i < curve->n_points; i++)
{ {
if (curve->points[i].x >= 0.0 && if (curve->points[i].x >= 0.0 &&
fabs (x - curve->points[i].x) < distance) fabs (x - curve->points[i].x) < distance)
@ -425,8 +566,8 @@ gimp_curve_get_closest_point (GimpCurve *curve,
} }
} }
if (distance > MIN_DISTANCE) if (distance > (1.0 / (curve->n_points * 2.0)))
closest_point = ((gint) (x * 255.999) + 8) / 16; closest_point = ROUND (x * (gdouble) (curve->n_points - 1));
return closest_point; return closest_point;
} }
@ -438,6 +579,9 @@ gimp_curve_set_point (GimpCurve *curve,
gdouble y) gdouble y)
{ {
g_return_if_fail (GIMP_IS_CURVE (curve)); g_return_if_fail (GIMP_IS_CURVE (curve));
g_return_if_fail (point >= 0 && point < curve->n_points);
g_return_if_fail (x == -1.0 || (x >= 0 && x <= 1.0));
g_return_if_fail (y == -1.0 || (y >= 0 && y <= 1.0));
if (curve->curve_type == GIMP_CURVE_FREE) if (curve->curve_type == GIMP_CURVE_FREE)
return; return;
@ -460,6 +604,8 @@ gimp_curve_move_point (GimpCurve *curve,
gdouble y) gdouble y)
{ {
g_return_if_fail (GIMP_IS_CURVE (curve)); g_return_if_fail (GIMP_IS_CURVE (curve));
g_return_if_fail (point >= 0 && point < curve->n_points);
g_return_if_fail (y >= 0 && y <= 1.0);
if (curve->curve_type == GIMP_CURVE_FREE) if (curve->curve_type == GIMP_CURVE_FREE)
return; return;
@ -482,6 +628,7 @@ gimp_curve_get_point (GimpCurve *curve,
gdouble *y) gdouble *y)
{ {
g_return_if_fail (GIMP_IS_CURVE (curve)); g_return_if_fail (GIMP_IS_CURVE (curve));
g_return_if_fail (point >= 0 && point < curve->n_points);
if (curve->curve_type == GIMP_CURVE_FREE) if (curve->curve_type == GIMP_CURVE_FREE)
return; return;
@ -496,15 +643,17 @@ gimp_curve_set_curve (GimpCurve *curve,
gdouble y) gdouble y)
{ {
g_return_if_fail (GIMP_IS_CURVE (curve)); g_return_if_fail (GIMP_IS_CURVE (curve));
g_return_if_fail (x >= 0 && x <= 1.0);
g_return_if_fail (y >= 0 && y <= 1.0);
if (curve->curve_type == GIMP_CURVE_SMOOTH) if (curve->curve_type == GIMP_CURVE_SMOOTH)
return; return;
g_object_freeze_notify (G_OBJECT (curve)); g_object_freeze_notify (G_OBJECT (curve));
curve->curve[(gint) (x * 255.999)] = y; curve->samples[ROUND (x * (gdouble) (curve->n_samples - 1))] = y;
g_object_notify (G_OBJECT (curve), "curve"); g_object_notify (G_OBJECT (curve), "samples");
g_object_thaw_notify (G_OBJECT (curve)); g_object_thaw_notify (G_OBJECT (curve));
@ -521,19 +670,19 @@ gimp_curve_map (GimpCurve *curve,
if (x < 0.0) if (x < 0.0)
{ {
value = curve->curve[0]; value = curve->samples[0];
} }
else if (x >= 1.0) else if (x >= 1.0)
{ {
value = curve->curve[255]; value = curve->samples[curve->n_samples - 1];
} }
else /* interpolate the curve */ else /* interpolate the curve */
{ {
gint index = floor (x * 255.0); gint index = floor (x * (gdouble) (curve->n_samples - 1));
gdouble f = x * 255.0 - index; gdouble f = x * (gdouble) (curve->n_samples - 1) - index;
value = ((1.0 - f) * curve->curve[index ] + value = ((1.0 - f) * curve->samples[index ] +
f * curve->curve[index + 1]); f * curve->samples[index + 1]);
} }
return value; return value;
@ -541,15 +690,20 @@ gimp_curve_map (GimpCurve *curve,
void void
gimp_curve_get_uchar (GimpCurve *curve, gimp_curve_get_uchar (GimpCurve *curve,
guchar *dest_array) gint n_samples,
guchar *samples)
{ {
gint i; gint i;
g_return_if_fail (GIMP_IS_CURVE (curve)); g_return_if_fail (GIMP_IS_CURVE (curve));
g_return_if_fail (dest_array != NULL); #ifdef __GNUC__
#warning: FIXME: support n_samples != curve->n_samples
#endif
g_return_if_fail (n_samples == curve->n_samples);
g_return_if_fail (samples != NULL);
for (i = 0; i < 256; i++) for (i = 0; i < curve->n_samples; i++)
dest_array[i] = curve->curve[i] * 255.999; samples[i] = curve->samples[i] * 255.999;
} }
@ -559,7 +713,7 @@ static void
gimp_curve_calculate (GimpCurve *curve) gimp_curve_calculate (GimpCurve *curve)
{ {
gint i; gint i;
gint points[GIMP_CURVE_NUM_POINTS]; gint points[curve->n_points];
gint num_pts; gint num_pts;
gint p1, p2, p3, p4; gint p1, p2, p3, p4;
@ -571,18 +725,27 @@ gimp_curve_calculate (GimpCurve *curve)
case GIMP_CURVE_SMOOTH: case GIMP_CURVE_SMOOTH:
/* cycle through the curves */ /* cycle through the curves */
num_pts = 0; num_pts = 0;
for (i = 0; i < GIMP_CURVE_NUM_POINTS; i++) for (i = 0; i < curve->n_points; i++)
if (curve->points[i].x >= 0.0) if (curve->points[i].x >= 0.0)
points[num_pts++] = i; points[num_pts++] = i;
/* Initialize boundary curve points */ /* Initialize boundary curve points */
if (num_pts != 0) if (num_pts != 0)
{ {
for (i = 0; i < (gint) (curve->points[points[0]].x * 255.999); i++) GimpVector2 point;
curve->curve[i] = curve->points[points[0]].y; gint boundary;
for (i = (gint) (curve->points[points[num_pts - 1]].x * 255.999); i < 256; i++) point = curve->points[points[0]];
curve->curve[i] = curve->points[points[num_pts - 1]].y; boundary = ROUND (point.x * (gdouble) (curve->n_samples - 1));
for (i = 0; i < boundary; i++)
curve->samples[i] = point.y;
point = curve->points[points[num_pts - 1]];
boundary = ROUND (point.x * (gdouble) (curve->n_samples - 1));
for (i = boundary; i < curve->n_samples; i++)
curve->samples[i] = point.y;
} }
for (i = 0; i < num_pts - 1; i++) for (i = 0; i < num_pts - 1; i++)
@ -601,10 +764,10 @@ gimp_curve_calculate (GimpCurve *curve)
gdouble x = curve->points[points[i]].x; gdouble x = curve->points[points[i]].x;
gdouble y = curve->points[points[i]].y; gdouble y = curve->points[points[i]].y;
curve->curve[(gint) (x * 255.999)] = y; curve->samples[ROUND (x * (gdouble) (curve->n_samples - 1))] = y;
} }
g_object_notify (G_OBJECT (curve), "curve"); g_object_notify (G_OBJECT (curve), "samples");
break; break;
case GIMP_CURVE_FREE: case GIMP_CURVE_FREE:
@ -632,7 +795,6 @@ gimp_curve_plot (GimpCurve *curve,
gdouble x0, x3; gdouble x0, x3;
gdouble y0, y1, y2, y3; gdouble y0, y1, y2, y3;
gdouble dx, dy; gdouble dx, dy;
gdouble y, t;
gdouble slope; gdouble slope;
/* the outer control points for the bezier curve. */ /* the outer control points for the bezier curve. */
@ -706,14 +868,19 @@ gimp_curve_plot (GimpCurve *curve,
* finally calculate the y(t) values for the given bezier values. We can * finally calculate the y(t) values for the given bezier values. We can
* use homogenously distributed values for t, since x(t) increases linearily. * use homogenously distributed values for t, since x(t) increases linearily.
*/ */
for (i = 0; i <= (gint) (dx * 255.999); i++) for (i = 0; i <= ROUND (dx * (gdouble) (curve->n_samples - 1)); i++)
{ {
t = i / dx / 255.0; gdouble y, t;
gint index;
t = i / dx / (gdouble) (curve->n_samples - 1);
y = y0 * (1-t) * (1-t) * (1-t) + y = y0 * (1-t) * (1-t) * (1-t) +
3 * y1 * (1-t) * (1-t) * t + 3 * y1 * (1-t) * (1-t) * t +
3 * y2 * (1-t) * t * t + 3 * y2 * (1-t) * t * t +
y3 * t * t * t; y3 * t * t * t;
curve->curve[(gint) (x0 * 255.999) + i] = CLAMP (y, 0.0, 1.0); index = ROUND (x0 * (gdouble) (curve->n_samples - 1)) + i;
curve->samples[index] = CLAMP (y, 0.0, 1.0);
} }
} }

View File

@ -24,9 +24,6 @@
#include "libgimpmath/gimpvector.h" #include "libgimpmath/gimpvector.h"
#define GIMP_CURVE_NUM_POINTS 17 /* TODO: get rid of this limit */
#define GIMP_TYPE_CURVE (gimp_curve_get_type ()) #define GIMP_TYPE_CURVE (gimp_curve_get_type ())
#define GIMP_CURVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_CURVE, GimpCurve)) #define GIMP_CURVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_CURVE, GimpCurve))
#define GIMP_CURVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CURVE, GimpCurveClass)) #define GIMP_CURVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CURVE, GimpCurveClass))
@ -43,8 +40,11 @@ struct _GimpCurve
GimpCurveType curve_type; GimpCurveType curve_type;
GimpVector2 points[GIMP_CURVE_NUM_POINTS]; gint n_points;
gdouble curve[256]; GimpVector2 *points;
gint n_samples;
gdouble *samples;
}; };
struct _GimpCurveClass struct _GimpCurveClass
@ -65,6 +65,9 @@ void gimp_curve_set_curve_type (GimpCurve *curve,
GimpCurveType curve_type); GimpCurveType curve_type);
GimpCurveType gimp_curve_get_curve_type (GimpCurve *curve); GimpCurveType gimp_curve_get_curve_type (GimpCurve *curve);
gint gimp_curve_get_n_points (GimpCurve *curve);
gint gimp_curve_get_n_samples (GimpCurve *curve);
gint gimp_curve_get_closest_point (GimpCurve *curve, gint gimp_curve_get_closest_point (GimpCurve *curve,
gdouble x); gdouble x);
@ -88,7 +91,8 @@ gdouble gimp_curve_map (GimpCurve *curve,
gdouble x); gdouble x);
void gimp_curve_get_uchar (GimpCurve *curve, void gimp_curve_get_uchar (GimpCurve *curve,
guchar *dest_array); gint n_samples,
guchar *samples);
#endif /* __GIMP_CURVE_H__ */ #endif /* __GIMP_CURVE_H__ */

View File

@ -80,13 +80,18 @@ gimp_drawable_curves_spline (GimpDrawable *drawable,
gimp_data_freeze (GIMP_DATA (curve)); gimp_data_freeze (GIMP_DATA (curve));
#ifdef __GNUC__
#warning FIXME: create a curves object with the right number of points
#endif
/* unset the last point */ /* unset the last point */
gimp_curve_set_point (curve, GIMP_CURVE_NUM_POINTS - 1, -1, -1); gimp_curve_set_point (curve, curve->n_points - 1, -1, -1);
for (i = 0; i < n_points / 2; i++) n_points = MIN (n_points / 2, curve->n_points);
for (i = 0; i < n_points; i++)
gimp_curve_set_point (curve, i, gimp_curve_set_point (curve, i,
points[i * 2], (gdouble) points[i * 2] / 255.0,
points[i * 2 + 1]); (gdouble) points[i * 2 + 1] / 255.0);
gimp_data_thaw (GIMP_DATA (curve)); gimp_data_thaw (GIMP_DATA (curve));
@ -129,7 +134,7 @@ gimp_drawable_curves_explicit (GimpDrawable *drawable,
for (i = 0; i < 256; i++) for (i = 0; i < 256; i++)
gimp_curve_set_curve (curve, gimp_curve_set_curve (curve,
(gdouble) i / 255.0, (gdouble) i / 255.0,
(gdouble) points[i] / 255.0); (gdouble) points[i] / 255.0);
gimp_data_thaw (GIMP_DATA (curve)); gimp_data_thaw (GIMP_DATA (curve));

View File

@ -580,7 +580,7 @@ gimp_drawable_transform_affine (GimpDrawable *drawable,
new_tiles = gimp_drawable_transform_tiles_affine (drawable, context, new_tiles = gimp_drawable_transform_tiles_affine (drawable, context,
orig_tiles, orig_tiles,
matrix, matrix,
GIMP_TRANSFORM_FORWARD, direction,
interpolation_type, interpolation_type,
recursion_level, recursion_level,
clip_result, clip_result,

View File

@ -81,7 +81,7 @@
#include "gimp-intl.h" #include "gimp-intl.h"
#define DEFAULT_EVENT_SMOOTHING 0.7 #define DEFAULT_EVENT_SMOOTHING 0.98
#define DEFAULT_EVENT_FILTER 0.5 #define DEFAULT_EVENT_FILTER 0.5
/* local function prototypes */ /* local function prototypes */
@ -141,7 +141,8 @@ gimp_display_shell_events (GtkWidget *widget,
if (event->type == GDK_KEY_PRESS) if (event->type == GDK_KEY_PRESS)
{ {
if (kevent->keyval == GDK_space && shell->space_release_pending) if ((kevent->keyval == GDK_space ||
kevent->keyval == GDK_KP_Space) && shell->space_release_pending)
{ {
shell->space_pressed = TRUE; shell->space_pressed = TRUE;
shell->space_release_pending = FALSE; shell->space_release_pending = FALSE;
@ -149,7 +150,8 @@ gimp_display_shell_events (GtkWidget *widget,
} }
else else
{ {
if (kevent->keyval == GDK_space && shell->space_pressed) if ((kevent->keyval == GDK_space ||
kevent->keyval == GDK_KP_Space) && shell->space_pressed)
{ {
shell->space_pressed = FALSE; shell->space_pressed = FALSE;
shell->space_release_pending = TRUE; shell->space_release_pending = TRUE;
@ -164,12 +166,15 @@ gimp_display_shell_events (GtkWidget *widget,
case GDK_Left: case GDK_Right: case GDK_Left: case GDK_Right:
case GDK_Up: case GDK_Down: case GDK_Up: case GDK_Down:
case GDK_space: case GDK_space:
case GDK_KP_Space:
case GDK_Tab: case GDK_Tab:
case GDK_ISO_Left_Tab: case GDK_ISO_Left_Tab:
case GDK_Alt_L: case GDK_Alt_R: case GDK_Alt_L: case GDK_Alt_R:
case GDK_Shift_L: case GDK_Shift_R: case GDK_Shift_L: case GDK_Shift_R:
case GDK_Control_L: case GDK_Control_R: case GDK_Control_L: case GDK_Control_R:
case GDK_Return: case GDK_KP_Enter: case GDK_Return:
case GDK_KP_Enter:
case GDK_ISO_Enter:
case GDK_BackSpace: case GDK_Delete: case GDK_BackSpace: case GDK_Delete:
break; break;
@ -1291,9 +1296,10 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
/* Early removal of useless events saves CPU time. /* Early removal of useless events saves CPU time.
* Smoothing is 0.0 here for coasting. * Smoothing is 0.0 here for coasting.
*/ */
if (gimp_display_shell_eval_event (shell, if (gimp_display_shell_eval_event (shell,
&image_coords, &image_coords,
0.0, 0.0,
DEFAULT_EVENT_FILTER, DEFAULT_EVENT_FILTER,
time)) time))
{ {
@ -1349,6 +1355,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
{ {
case GDK_Return: case GDK_Return:
case GDK_KP_Enter: case GDK_KP_Enter:
case GDK_ISO_Enter:
case GDK_BackSpace: case GDK_BackSpace:
case GDK_Delete: case GDK_Delete:
case GDK_Escape: case GDK_Escape:
@ -1372,6 +1379,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
break; break;
case GDK_space: case GDK_space:
case GDK_KP_Space:
gimp_display_shell_space_pressed (shell, state, time); gimp_display_shell_space_pressed (shell, state, time);
return_val = TRUE; return_val = TRUE;
break; break;
@ -1463,6 +1471,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
switch (kevent->keyval) switch (kevent->keyval)
{ {
case GDK_space: case GDK_space:
case GDK_KP_Space:
gimp_display_shell_space_released (shell, state, time); gimp_display_shell_space_released (shell, state, time);
return_val = TRUE; return_val = TRUE;
break; break;

View File

@ -190,9 +190,8 @@ gimp_display_shell_get_device_state (GimpDisplayShell *shell,
* *
* This function evaluates the event to decide if the change is * This function evaluates the event to decide if the change is
* big enough to need handling and returns FALSE, if change is less * big enough to need handling and returns FALSE, if change is less
* than one image pixel or when smoothed event distance covers less * than set filter level taking a whole lot of load off any draw tools
* than one pixel taking a whole lot of load off any draw tools that * that have no use for these events anyway. If the event is
* have no use for these sub-pixel events anyway. If the event is
* seen fit at first look, it is evaluated for speed and smoothed. * seen fit at first look, it is evaluated for speed and smoothed.
* Due to lousy time resolution of events pretty strong smoothing is * Due to lousy time resolution of events pretty strong smoothing is
* applied to timestamps for sensible speed result. This function is * applied to timestamps for sensible speed result. This function is
@ -216,6 +215,22 @@ gimp_display_shell_eval_event (GimpDisplayShell *shell,
const gdouble smooth_factor = 0.3; const gdouble smooth_factor = 0.3;
guint32 thistime = time; guint32 thistime = time;
gdouble dist; gdouble dist;
gdouble filter;
gdouble inertia;
/* Event filtering & smoothing causes problems with cursor tracking
* when zoomed above screen resolution so we need to supress it.
*/
if (shell->scale_x > 1.0 || shell->scale_y > 1.0)
{
filter = filter_treshhold / (MAX (shell->scale_x, shell->scale_y));
inertia = 0.0;
}
else
{
filter = filter_treshhold;
inertia = inertia_factor;
}
if (shell->last_disp_motion_time == 0) if (shell->last_disp_motion_time == 0)
{ {
@ -234,7 +249,7 @@ gimp_display_shell_eval_event (GimpDisplayShell *shell,
/* Events with distances less than the filter_threshold are not /* Events with distances less than the filter_threshold are not
worth handling. worth handling.
*/ */
if (fabs (dx) < filter_treshhold && fabs (dy) < filter_treshhold) if (fabs (dx) < filter && fabs (dy) < filter)
return FALSE; return FALSE;
coords->delta_time = thistime - shell->last_disp_motion_time; coords->delta_time = thistime - shell->last_disp_motion_time;
@ -261,12 +276,12 @@ gimp_display_shell_eval_event (GimpDisplayShell *shell,
coords->velocity = MIN (coords->velocity, 1.0); coords->velocity = MIN (coords->velocity, 1.0);
} }
if (inertia_factor > 0 && coords->distance > 0) if (inertia > 0 && coords->distance > 0)
{ {
/* Apply smoothing to X and Y. */ /* Apply smoothing to X and Y. */
/* This tells how far from the pointer can stray from the line */ /* This tells how far from the pointer can stray from the line */
gdouble max_deviation = SQR (20 * inertia_factor); gdouble max_deviation = SQR (20 * inertia);
gdouble cur_deviation = max_deviation; gdouble cur_deviation = max_deviation;
gdouble sin_avg; gdouble sin_avg;
gdouble sin_old; gdouble sin_old;
@ -279,13 +294,13 @@ gimp_display_shell_eval_event (GimpDisplayShell *shell,
sin_new = coords->delta_x / coords->distance; sin_new = coords->delta_x / coords->distance;
sin_old = shell->last_coords.delta_x / shell->last_coords.distance; sin_old = shell->last_coords.delta_x / shell->last_coords.distance;
sin_avg = sin (asin (sin_old) * inertia_factor + sin_avg = sin (asin (sin_old) * inertia +
asin (sin_new) * (1 - inertia_factor)); asin (sin_new) * (1 - inertia));
cos_new = coords->delta_y / coords->distance; cos_new = coords->delta_y / coords->distance;
cos_old = shell->last_coords.delta_y / shell->last_coords.distance; cos_old = shell->last_coords.delta_y / shell->last_coords.distance;
cos_avg = cos (acos (cos_old) * inertia_factor + cos_avg = cos (acos (cos_old) * inertia +
acos (cos_new) * (1 - inertia_factor)); acos (cos_new) * (1 - inertia));
coords->delta_x = sin_avg * coords->distance; coords->delta_x = sin_avg * coords->distance;
coords->delta_y = cos_avg * coords->distance; coords->delta_y = cos_avg * coords->distance;
@ -322,7 +337,7 @@ gimp_display_shell_eval_event (GimpDisplayShell *shell,
shell->last_coords.velocity, shell->last_coords.velocity,
coords->pressure, coords->pressure,
coords->distance - dist, coords->distance - dist,
inertia_factor); inertia);
#endif #endif
} }

View File

@ -395,8 +395,7 @@ gimp_display_shell_draw_pen (GimpDisplayShell *shell,
coords = g_new (GdkPoint, MAX (2, num_points)); coords = g_new (GdkPoint, MAX (2, num_points));
gimp_display_shell_transform_points (shell, gimp_display_shell_transform_points (shell,
(const gdouble *) points, coords, points, coords, num_points, FALSE);
num_points, FALSE);
if (num_points == 1) if (num_points == 1)
{ {

View File

@ -276,7 +276,7 @@ gimp_display_shell_untransform_xy_f (GimpDisplayShell *shell,
/** /**
* gimp_display_shell_transform_points: * gimp_display_shell_transform_points:
* @shell: a #GimpDisplayShell * @shell: a #GimpDisplayShell
* @points: array of x, y coordinate pairs * @points: array of GimpVectors2 coordinate pairs
* @coords: returns the corresponding display coordinates * @coords: returns the corresponding display coordinates
* @n_points: number of points * @n_points: number of points
* @use_offsets: if %TRUE, the source coordinates are in the coordinate * @use_offsets: if %TRUE, the source coordinates are in the coordinate
@ -286,11 +286,11 @@ gimp_display_shell_untransform_xy_f (GimpDisplayShell *shell,
* objects can be rendered at the correct points on the display. * objects can be rendered at the correct points on the display.
**/ **/
void void
gimp_display_shell_transform_points (GimpDisplayShell *shell, gimp_display_shell_transform_points (GimpDisplayShell *shell,
const gdouble *points, const GimpVector2 *points,
GdkPoint *coords, GdkPoint *coords,
gint n_points, gint n_points,
gboolean use_offsets) gboolean use_offsets)
{ {
gint offset_x = 0; gint offset_x = 0;
gint offset_y = 0; gint offset_y = 0;
@ -308,8 +308,8 @@ gimp_display_shell_transform_points (GimpDisplayShell *shell,
for (i = 0; i < n_points ; i++) for (i = 0; i < n_points ; i++)
{ {
gdouble x = points[i*2] + offset_x; gdouble x = points[i].x + offset_x;
gdouble y = points[i*2+1] + offset_y; gdouble y = points[i].y + offset_y;
x = x * shell->x_src_dec / shell->x_dest_inc; x = x * shell->x_src_dec / shell->x_dest_inc;
y = y * shell->y_src_dec / shell->y_dest_inc; y = y * shell->y_src_dec / shell->y_dest_inc;

View File

@ -27,54 +27,54 @@ void gimp_display_shell_untransform_coordinate (GimpDisplayShell *shell,
GimpCoords *display_coords, GimpCoords *display_coords,
GimpCoords *image_coords); GimpCoords *image_coords);
void gimp_display_shell_transform_xy (GimpDisplayShell *shell, void gimp_display_shell_transform_xy (GimpDisplayShell *shell,
gdouble x, gdouble x,
gdouble y, gdouble y,
gint *nx, gint *nx,
gint *ny, gint *ny,
gboolean use_offsets); gboolean use_offsets);
void gimp_display_shell_untransform_xy (GimpDisplayShell *shell, void gimp_display_shell_untransform_xy (GimpDisplayShell *shell,
gint x, gint x,
gint y, gint y,
gint *nx, gint *nx,
gint *ny, gint *ny,
gboolean round, gboolean round,
gboolean use_offsets); gboolean use_offsets);
void gimp_display_shell_transform_xy_f (GimpDisplayShell *shell, void gimp_display_shell_transform_xy_f (GimpDisplayShell *shell,
gdouble x, gdouble x,
gdouble y, gdouble y,
gdouble *nx, gdouble *nx,
gdouble *ny, gdouble *ny,
gboolean use_offsets); gboolean use_offsets);
void gimp_display_shell_untransform_xy_f (GimpDisplayShell *shell, void gimp_display_shell_untransform_xy_f (GimpDisplayShell *shell,
gdouble x, gdouble x,
gdouble y, gdouble y,
gdouble *nx, gdouble *nx,
gdouble *ny, gdouble *ny,
gboolean use_offsets); gboolean use_offsets);
void gimp_display_shell_transform_points (GimpDisplayShell *shell, void gimp_display_shell_transform_points (GimpDisplayShell *shell,
const gdouble *points, const GimpVector2 *points,
GdkPoint *coords, GdkPoint *coords,
gint n_points, gint n_points,
gboolean use_offsets); gboolean use_offsets);
void gimp_display_shell_transform_coords (GimpDisplayShell *shell, void gimp_display_shell_transform_coords (GimpDisplayShell *shell,
const GimpCoords *image_coords, const GimpCoords *image_coords,
GdkPoint *disp_coords, GdkPoint *disp_coords,
gint n_coords, gint n_coords,
gboolean use_offsets); gboolean use_offsets);
void gimp_display_shell_transform_segments (GimpDisplayShell *shell, void gimp_display_shell_transform_segments (GimpDisplayShell *shell,
const BoundSeg *src_segs, const BoundSeg *src_segs,
GdkSegment *dest_segs, GdkSegment *dest_segs,
gint n_segs, gint n_segs,
gboolean use_offsets); gboolean use_offsets);
void gimp_display_shell_untransform_viewport (GimpDisplayShell *shell, void gimp_display_shell_untransform_viewport (GimpDisplayShell *shell,
gint *x, gint *x,
gint *y, gint *y,
gint *width, gint *width,
gint *height); gint *height);
#endif /* __GIMP_DISPLAY_SHELL_TRANSFORM_H__ */ #endif /* __GIMP_DISPLAY_SHELL_TRANSFORM_H__ */

View File

@ -201,9 +201,9 @@ gimp_curves_config_set_property (GObject *object,
gimp_config_sync (G_OBJECT (src_curve), G_OBJECT (dest_curve), 0); gimp_config_sync (G_OBJECT (src_curve), G_OBJECT (dest_curve), 0);
memcpy (dest_curve->points, src_curve->points, memcpy (dest_curve->points, src_curve->points,
sizeof (src_curve->points)); sizeof (GimpVector2) * src_curve->n_points);
memcpy (dest_curve->curve, src_curve->curve, memcpy (dest_curve->samples, src_curve->samples,
sizeof (src_curve->curve)); sizeof (gdouble) * src_curve->n_samples);
} }
} }
break; break;
@ -235,9 +235,9 @@ gimp_curves_config_equal (GimpConfig *a,
return FALSE; return FALSE;
if (memcmp (a_curve->points, b_curve->points, if (memcmp (a_curve->points, b_curve->points,
sizeof (b_curve->points)) || sizeof (GimpVector2) * b_curve->n_points) ||
memcmp (a_curve->curve, b_curve->curve, memcmp (a_curve->samples, b_curve->samples,
sizeof (b_curve->curve))) sizeof (gdouble) * b_curve->n_samples))
return FALSE; return FALSE;
} }
else if (a_curve || b_curve) else if (a_curve || b_curve)
@ -288,10 +288,10 @@ gimp_curves_config_copy (GimpConfig *src,
{ {
gimp_config_sync (G_OBJECT (src_curve), G_OBJECT (dest_curve), 0); gimp_config_sync (G_OBJECT (src_curve), G_OBJECT (dest_curve), 0);
memcpy (dest_curve->points, memcpy (dest_curve->points, src_curve->points,
src_curve->points, sizeof (src_curve->points)); sizeof (GimpVector2) * src_curve->n_points);
memcpy (dest_curve->curve, memcpy (dest_curve->samples, src_curve->samples,
src_curve->curve, sizeof (src_curve->curve)); sizeof (gdouble) * src_curve->n_samples);
} }
} }
@ -322,6 +322,8 @@ gimp_curves_config_reset_channel (GimpCurvesConfig *config)
gimp_curve_reset (config->curve[config->channel], TRUE); gimp_curve_reset (config->curve[config->channel], TRUE);
} }
#define GIMP_CURVE_N_CRUFT_POINTS 17
gboolean gboolean
gimp_curves_config_load_cruft (GimpCurvesConfig *config, gimp_curves_config_load_cruft (GimpCurvesConfig *config,
gpointer fp, gpointer fp,
@ -331,8 +333,8 @@ gimp_curves_config_load_cruft (GimpCurvesConfig *config,
gint i, j; gint i, j;
gint fields; gint fields;
gchar buf[50]; gchar buf[50];
gint index[5][GIMP_CURVE_NUM_POINTS]; gint index[5][GIMP_CURVE_N_CRUFT_POINTS];
gint value[5][GIMP_CURVE_NUM_POINTS]; gint value[5][GIMP_CURVE_N_CRUFT_POINTS];
g_return_val_if_fail (GIMP_IS_CURVES_CONFIG (config), FALSE); g_return_val_if_fail (GIMP_IS_CURVES_CONFIG (config), FALSE);
g_return_val_if_fail (file != NULL, FALSE); g_return_val_if_fail (file != NULL, FALSE);
@ -348,7 +350,7 @@ gimp_curves_config_load_cruft (GimpCurvesConfig *config,
for (i = 0; i < 5; i++) for (i = 0; i < 5; i++)
{ {
for (j = 0; j < GIMP_CURVE_NUM_POINTS; j++) for (j = 0; j < GIMP_CURVE_N_CRUFT_POINTS; j++)
{ {
fields = fscanf (file, "%d %d ", &index[i][j], &value[i][j]); fields = fscanf (file, "%d %d ", &index[i][j], &value[i][j]);
if (fields != 2) if (fields != 2)
@ -372,7 +374,7 @@ gimp_curves_config_load_cruft (GimpCurvesConfig *config,
gimp_curve_set_curve_type (curve, GIMP_CURVE_SMOOTH); gimp_curve_set_curve_type (curve, GIMP_CURVE_SMOOTH);
for (j = 0; j < GIMP_CURVE_NUM_POINTS; j++) for (j = 0; j < GIMP_CURVE_N_CRUFT_POINTS; j++)
gimp_curve_set_point (curve, j, gimp_curve_set_point (curve, j,
(gdouble) index[i][j] / 255.0, (gdouble) index[i][j] / 255.0,
(gdouble) value[i][j] / 255.0); (gdouble) value[i][j] / 255.0);
@ -404,27 +406,46 @@ gimp_curves_config_save_cruft (GimpCurvesConfig *config,
if (curve->curve_type == GIMP_CURVE_FREE) if (curve->curve_type == GIMP_CURVE_FREE)
{ {
/* pick representative points from the curve and make them gint n_points;
* control points
*/
for (j = 0; j <= 8; j++)
{
gint32 index = CLAMP0255 (j * 32);
curve->points[j * 2].x = (gdouble) index / 255.0; for (j = 0; j < curve->n_points; j++)
curve->points[j * 2].y = curve->curve[index]; {
curve->points[j].x = -1;
curve->points[j].y = -1;
}
/* pick some points from the curve and make them control
* points
*/
n_points = CLAMP (9, curve->n_points / 2, curve->n_points);
for (j = 0; j < n_points; j++)
{
gint sample = j * (curve->n_samples - 1) / (n_points - 1);
gint point = j * (curve->n_points - 1) / (n_points - 1);
curve->points[point].x = ((gdouble) sample /
(gdouble) (curve->n_samples - 1));
curve->points[point].y = curve->samples[sample];
} }
} }
for (j = 0; j < GIMP_CURVE_NUM_POINTS; j++) for (j = 0; j < curve->n_points; j++)
{ {
gdouble x, y; gdouble x, y;
gimp_curve_get_point (curve, j, &x, &y); gimp_curve_get_point (curve, j, &x, &y);
fprintf (file, "%d %d ", if (x < 0.0 || y < 0.0)
(gint) (x * 255.999), {
(gint) (y * 255.999)); fprintf (file, "%d %d ", -1, -1);
}
else
{
fprintf (file, "%d %d ",
(gint) (x * 255.999),
(gint) (y * 255.999));
}
} }
fprintf (file, "\n"); fprintf (file, "\n");
@ -451,12 +472,14 @@ gimp_curves_config_to_cruft (GimpCurvesConfig *config,
channel++) channel++)
{ {
gimp_curve_get_uchar (config->curve[channel], gimp_curve_get_uchar (config->curve[channel],
sizeof (cruft->curve[channel]),
cruft->curve[channel]); cruft->curve[channel]);
} }
if (! is_color) if (! is_color)
{ {
gimp_curve_get_uchar (config->curve[GIMP_HISTOGRAM_ALPHA], gimp_curve_get_uchar (config->curve[GIMP_HISTOGRAM_ALPHA],
sizeof (cruft->curve[1]),
cruft->curve[1]); cruft->curve[1]);
} }
} }

View File

@ -290,6 +290,8 @@ gui_display_create (GimpImage *image,
image_managers = gimp_ui_managers_from_name ("<Image>"); image_managers = gimp_ui_managers_from_name ("<Image>");
g_return_val_if_fail (image_managers != NULL, NULL);
display = gimp_display_new (image, unit, scale, display = gimp_display_new (image, unit, scale,
global_menu_factory, global_menu_factory,
image_managers->data); image_managers->data);

View File

@ -333,7 +333,7 @@ gui_initialize_after_callback (Gimp *gimp,
g_return_if_fail (GIMP_IS_GIMP (gimp)); g_return_if_fail (GIMP_IS_GIMP (gimp));
if (gimp->be_verbose) if (gimp->be_verbose)
g_print ("INIT: gui_initialize_after_callback\n"); g_print ("INIT: %s\n", G_STRFUNC);
#if defined (GDK_WINDOWING_X11) #if defined (GDK_WINDOWING_X11)
name = "DISPLAY"; name = "DISPLAY";
@ -367,7 +367,7 @@ gui_restore_callback (Gimp *gimp,
GimpGuiConfig *gui_config = GIMP_GUI_CONFIG (gimp->config); GimpGuiConfig *gui_config = GIMP_GUI_CONFIG (gimp->config);
if (gimp->be_verbose) if (gimp->be_verbose)
g_print ("INIT: gui_restore_callback\n"); g_print ("INIT: %s\n", G_STRFUNC);
gui_vtable_init (gimp); gui_vtable_init (gimp);
@ -442,7 +442,7 @@ gui_restore_after_callback (Gimp *gimp,
GimpGuiConfig *gui_config = GIMP_GUI_CONFIG (gimp->config); GimpGuiConfig *gui_config = GIMP_GUI_CONFIG (gimp->config);
if (gimp->be_verbose) if (gimp->be_verbose)
g_print ("INIT: gui_restore_after_callback\n"); g_print ("INIT: %s\n", G_STRFUNC);
gimp->message_handler = GIMP_MESSAGE_BOX; gimp->message_handler = GIMP_MESSAGE_BOX;
@ -535,7 +535,7 @@ gui_exit_callback (Gimp *gimp,
GimpGuiConfig *gui_config = GIMP_GUI_CONFIG (gimp->config); GimpGuiConfig *gui_config = GIMP_GUI_CONFIG (gimp->config);
if (gimp->be_verbose) if (gimp->be_verbose)
g_print ("EXIT: gui_exit_callback\n"); g_print ("EXIT: %s\n", G_STRFUNC);
if (! force && gimp_displays_dirty (gimp)) if (! force && gimp_displays_dirty (gimp))
{ {
@ -586,7 +586,7 @@ gui_exit_after_callback (Gimp *gimp,
gboolean force) gboolean force)
{ {
if (gimp->be_verbose) if (gimp->be_verbose)
g_print ("EXIT: gui_exit_after_callback\n"); g_print ("EXIT: %s\n", G_STRFUNC);
g_signal_handlers_disconnect_by_func (gimp->config, g_signal_handlers_disconnect_by_func (gimp->config,
gui_show_help_button_notify, gui_show_help_button_notify,

View File

@ -1,14 +1,15 @@
/* GTK+ Integration for the Mac OS X Menubar. /* GTK+ Integration for the Mac OS X Menubar.
* *
* Copyright (C) 2007 Pioneer Research Center USA, Inc. * Copyright (C) 2007 Pioneer Research Center USA, Inc.
* Copyright (C) 2007 Imendio AB
* *
* For further information, see: * For further information, see:
* http://developer.imendio.com/projects/gtk-macosx/menubar * http://developer.imendio.com/projects/gtk-macosx/menubar
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; version 2.1
* version 2 of the License, or (at your option) any later version. * of the License.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -28,15 +29,14 @@
#ifdef GDK_WINDOWING_QUARTZ #ifdef GDK_WINDOWING_QUARTZ
#include <gdk/gdkkeysyms.h> #include <gdk/gdkkeysyms.h>
#include <Carbon/Carbon.h> #include <Carbon/Carbon.h>
#include "ige-mac-menu.h" #include "ige-mac-menu.h"
/* TODO /* TODO
* *
* - Sync adding/removing/reordering items * - Adding a standard Window menu (Minimize etc)?
* - Sync reordering items? Does that work now?
* - Create on demand? (can this be done with gtk+? ie fill in menu * - Create on demand? (can this be done with gtk+? ie fill in menu
items when the menu is opened) items when the menu is opened)
* - Figure out what to do per app/window... * - Figure out what to do per app/window...
@ -117,6 +117,7 @@ accel_find_func (GtkAccelKey *key,
typedef struct typedef struct
{ {
MenuRef menu; MenuRef menu;
guint toplevel : 1;
} CarbonMenu; } CarbonMenu;
static GQuark carbon_menu_quark = 0; static GQuark carbon_menu_quark = 0;
@ -141,7 +142,8 @@ carbon_menu_get (GtkWidget *widget)
static void static void
carbon_menu_connect (GtkWidget *menu, carbon_menu_connect (GtkWidget *menu,
MenuRef menuRef) MenuRef menuRef,
gboolean toplevel)
{ {
CarbonMenu *carbon_menu = carbon_menu_get (menu); CarbonMenu *carbon_menu = carbon_menu_get (menu);
@ -154,7 +156,8 @@ carbon_menu_connect (GtkWidget *menu,
(GDestroyNotify) carbon_menu_free); (GDestroyNotify) carbon_menu_free);
} }
carbon_menu->menu = menuRef; carbon_menu->menu = menuRef;
carbon_menu->toplevel = toplevel;
} }
@ -578,6 +581,8 @@ menu_event_handler_func (EventHandlerCallRef event_handler_call_ref,
static void static void
setup_menu_event_handler (void) setup_menu_event_handler (void)
{ {
static gboolean is_setup = FALSE;
EventHandlerUPP menu_event_handler_upp; EventHandlerUPP menu_event_handler_upp;
EventHandlerRef menu_event_handler_ref; EventHandlerRef menu_event_handler_ref;
const EventTypeSpec menu_events[] = { const EventTypeSpec menu_events[] = {
@ -587,6 +592,9 @@ setup_menu_event_handler (void)
{ kEventClassMenu, kEventMenuClosed } { kEventClassMenu, kEventMenuClosed }
}; };
if (is_setup)
return;
/* FIXME: We might have to install one per window? */ /* FIXME: We might have to install one per window? */
menu_event_handler_upp = NewEventHandlerUPP (menu_event_handler_func); menu_event_handler_upp = NewEventHandlerUPP (menu_event_handler_func);
@ -599,6 +607,8 @@ setup_menu_event_handler (void)
RemoveEventHandler(menu_event_handler_ref); RemoveEventHandler(menu_event_handler_ref);
DisposeEventHandlerUPP(menu_event_handler_upp); DisposeEventHandlerUPP(menu_event_handler_upp);
#endif #endif
is_setup = TRUE;
} }
static void static void
@ -614,7 +624,7 @@ sync_menu_shell (GtkMenuShell *menu_shell,
if (debug) if (debug)
g_printerr ("%s: syncing shell %p\n", G_STRFUNC, menu_shell); g_printerr ("%s: syncing shell %p\n", G_STRFUNC, menu_shell);
carbon_menu_connect (GTK_WIDGET (menu_shell), carbon_menu); carbon_menu_connect (GTK_WIDGET (menu_shell), carbon_menu, toplevel);
children = gtk_container_get_children (GTK_CONTAINER (menu_shell)); children = gtk_container_get_children (GTK_CONTAINER (menu_shell));
@ -701,8 +711,8 @@ sync_menu_shell (GtkMenuShell *menu_shell,
g_list_free (children); g_list_free (children);
} }
static gulong emission_hook_id = 0;
static gulong emission_hook_id = 0; static gint emission_hook_count = 0;
static gboolean static gboolean
parent_set_emission_hook (GSignalInvocationHint *ihint, parent_set_emission_hook (GSignalInvocationHint *ihint,
@ -742,7 +752,7 @@ parent_set_emission_hook (GSignalInvocationHint *ihint,
sync_menu_shell (GTK_MENU_SHELL (menu_shell), sync_menu_shell (GTK_MENU_SHELL (menu_shell),
carbon_menu->menu, carbon_menu->menu,
carbon_menu->menu == (MenuRef) data, carbon_menu->toplevel,
FALSE); FALSE);
} }
} }
@ -755,9 +765,15 @@ static void
parent_set_emission_hook_remove (GtkWidget *widget, parent_set_emission_hook_remove (GtkWidget *widget,
gpointer data) gpointer data)
{ {
emission_hook_count--;
if (emission_hook_count > 0)
return;
g_signal_remove_emission_hook (g_signal_lookup ("parent-set", g_signal_remove_emission_hook (g_signal_lookup ("parent-set",
GTK_TYPE_WIDGET), GTK_TYPE_WIDGET),
emission_hook_id); emission_hook_id);
emission_hook_id = 0;
} }
@ -768,8 +784,8 @@ parent_set_emission_hook_remove (GtkWidget *widget,
void void
ige_mac_menu_set_menu_bar (GtkMenuShell *menu_shell) ige_mac_menu_set_menu_bar (GtkMenuShell *menu_shell)
{ {
MenuRef carbon_menubar; CarbonMenu *current_menu;
guint hook_id; MenuRef carbon_menubar;
g_return_if_fail (GTK_IS_MENU_SHELL (menu_shell)); g_return_if_fail (GTK_IS_MENU_SHELL (menu_shell));
@ -779,17 +795,29 @@ ige_mac_menu_set_menu_bar (GtkMenuShell *menu_shell)
if (carbon_menu_item_quark == 0) if (carbon_menu_item_quark == 0)
carbon_menu_item_quark = g_quark_from_static_string ("CarbonMenuItem"); carbon_menu_item_quark = g_quark_from_static_string ("CarbonMenuItem");
current_menu = carbon_menu_get (GTK_WIDGET (menu_shell));
if (current_menu)
{
SetRootMenu (current_menu->menu);
return;
}
CreateNewMenu (0 /*id*/, 0 /*options*/, &carbon_menubar); CreateNewMenu (0 /*id*/, 0 /*options*/, &carbon_menubar);
SetRootMenu (carbon_menubar); SetRootMenu (carbon_menubar);
setup_menu_event_handler (); setup_menu_event_handler ();
emission_hook_id = if (emission_hook_id == 0)
g_signal_add_emission_hook (g_signal_lookup ("parent-set", {
GTK_TYPE_WIDGET), emission_hook_id =
0, g_signal_add_emission_hook (g_signal_lookup ("parent-set",
parent_set_emission_hook, GTK_TYPE_WIDGET),
carbon_menubar, NULL); 0,
parent_set_emission_hook,
NULL, NULL);
}
emission_hook_count++;
g_signal_connect (menu_shell, "destroy", g_signal_connect (menu_shell, "destroy",
G_CALLBACK (parent_set_emission_hook_remove), G_CALLBACK (parent_set_emission_hook_remove),
@ -806,6 +834,8 @@ ige_mac_menu_set_quit_menu_item (GtkMenuItem *menu_item)
g_return_if_fail (GTK_IS_MENU_ITEM (menu_item)); g_return_if_fail (GTK_IS_MENU_ITEM (menu_item));
setup_menu_event_handler ();
if (GetIndMenuItemWithCommandID (NULL, kHICommandQuit, 1, if (GetIndMenuItemWithCommandID (NULL, kHICommandQuit, 1,
&appmenu, &index) == noErr) &appmenu, &index) == noErr)
{ {
@ -849,6 +879,8 @@ ige_mac_menu_add_app_menu_item (IgeMacMenuGroup *group,
g_return_if_fail (group != NULL); g_return_if_fail (group != NULL);
g_return_if_fail (GTK_IS_MENU_ITEM (menu_item)); g_return_if_fail (GTK_IS_MENU_ITEM (menu_item));
setup_menu_event_handler ();
if (GetIndMenuItemWithCommandID (NULL, kHICommandHide, 1, if (GetIndMenuItemWithCommandID (NULL, kHICommandHide, 1,
&appmenu, NULL) != noErr) &appmenu, NULL) != noErr)
{ {

View File

@ -1,14 +1,15 @@
/* GTK+ Integration for the Mac OS X Menubar. /* GTK+ Integration for the Mac OS X Menubar.
* *
* Copyright (C) 2007 Pioneer Research Center USA, Inc. * Copyright (C) 2007 Pioneer Research Center USA, Inc.
* Copyright (C) 2007 Imendio AB
* *
* For further information, see: * For further information, see:
* http://developer.imendio.com/projects/gtk-macosx/menubar * http://developer.imendio.com/projects/gtk-macosx/menubar
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; version 2.1
* version 2 of the License, or (at your option) any later version. * of the License.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of

View File

@ -68,6 +68,7 @@
#include "errors.h" #include "errors.h"
#include "sanity.h" #include "sanity.h"
#include "units.h" #include "units.h"
#include "version.h"
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
#include <windows.h> #include <windows.h>
@ -309,6 +310,20 @@ main (int argc,
g_set_prgname (basename); g_set_prgname (basename);
g_free (basename); g_free (basename);
/* Check argv[] for "--verbose" first */
for (i = 1; i < argc; i++)
{
const gchar *arg = argv[i];
if (arg[0] != '-')
continue;
if ((strcmp (arg, "--verbose") == 0) || (strcmp (arg, "-v") == 0))
{
be_verbose = TRUE;
}
}
/* Check argv[] for "--no-interface" before trying to initialize gtk+. */ /* Check argv[] for "--no-interface" before trying to initialize gtk+. */
for (i = 1; i < argc; i++) for (i = 1; i < argc; i++)
{ {
@ -323,7 +338,6 @@ main (int argc,
} }
else if ((strcmp (arg, "--version") == 0) || (strcmp (arg, "-v") == 0)) else if ((strcmp (arg, "--version") == 0) || (strcmp (arg, "-v") == 0))
{ {
gimp_open_console_window ();
gimp_show_version_and_exit (); gimp_show_version_and_exit ();
} }
#if defined (G_OS_WIN32) && !defined (GIMP_CONSOLE_COMPILATION) #if defined (G_OS_WIN32) && !defined (GIMP_CONSOLE_COMPILATION)
@ -552,18 +566,11 @@ gimp_option_dump_gimprc (const gchar *option_name,
return FALSE; return FALSE;
} }
static void
gimp_show_version (void)
{
gimp_open_console_window ();
g_print (_("%s version %s"), GIMP_NAME, GIMP_VERSION);
g_print ("\n");
}
static void static void
gimp_show_version_and_exit (void) gimp_show_version_and_exit (void)
{ {
gimp_show_version (); gimp_open_console_window ();
gimp_version_show (be_verbose);
app_exit (EXIT_SUCCESS); app_exit (EXIT_SUCCESS);
} }
@ -571,7 +578,8 @@ gimp_show_version_and_exit (void)
static void static void
gimp_show_license_and_exit (void) gimp_show_license_and_exit (void)
{ {
gimp_show_version (); gimp_open_console_window ();
gimp_version_show (be_verbose);
g_print ("\n"); g_print ("\n");
g_print (GIMP_LICENSE); g_print (GIMP_LICENSE);

View File

@ -49,6 +49,7 @@ brushes_refresh_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
gimp_data_factory_data_refresh (gimp->brush_factory); gimp_data_factory_data_refresh (gimp->brush_factory);
return gimp_procedure_get_return_values (procedure, TRUE); return gimp_procedure_get_return_values (procedure, TRUE);
} }

View File

@ -248,6 +248,7 @@ context_set_default_colors_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
gimp_context_set_default_colors (context); gimp_context_set_default_colors (context);
return gimp_procedure_get_return_values (procedure, TRUE); return gimp_procedure_get_return_values (procedure, TRUE);
} }
@ -260,6 +261,7 @@ context_swap_colors_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
gimp_context_swap_colors (context); gimp_context_swap_colors (context);
return gimp_procedure_get_return_values (procedure, TRUE); return gimp_procedure_get_return_values (procedure, TRUE);
} }

View File

@ -84,7 +84,9 @@ display_new_invoker (GimpProcedure *procedure,
g_object_unref (image); g_object_unref (image);
} }
else else
success = FALSE; {
success = FALSE;
}
} }
return_vals = gimp_procedure_get_return_values (procedure, success); return_vals = gimp_procedure_get_return_values (procedure, success);
@ -153,6 +155,7 @@ displays_flush_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
gimp_container_foreach (gimp->images, (GFunc) gimp_image_flush, NULL); gimp_container_foreach (gimp->images, (GFunc) gimp_image_flush, NULL);
return gimp_procedure_get_return_values (procedure, TRUE); return gimp_procedure_get_return_values (procedure, TRUE);
} }

View File

@ -44,6 +44,7 @@ fonts_refresh_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
gimp_fonts_load (gimp); gimp_fonts_load (gimp);
return gimp_procedure_get_return_values (procedure, TRUE); return gimp_procedure_get_return_values (procedure, TRUE);
} }

View File

@ -48,6 +48,7 @@ gradients_refresh_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
gimp_data_factory_data_refresh (gimp->gradient_factory); gimp_data_factory_data_refresh (gimp->gradient_factory);
return gimp_procedure_get_return_values (procedure, TRUE); return gimp_procedure_get_return_values (procedure, TRUE);
} }

View File

@ -50,6 +50,7 @@ palettes_refresh_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
gimp_data_factory_data_refresh (gimp->palette_factory); gimp_data_factory_data_refresh (gimp->palette_factory);
return gimp_procedure_get_return_values (procedure, TRUE); return gimp_procedure_get_return_values (procedure, TRUE);
} }

View File

@ -49,6 +49,7 @@ patterns_refresh_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
gimp_data_factory_data_refresh (gimp->pattern_factory); gimp_data_factory_data_refresh (gimp->pattern_factory);
return gimp_procedure_get_return_values (procedure, TRUE); return gimp_procedure_get_return_values (procedure, TRUE);
} }

View File

@ -637,7 +637,7 @@ gimp_curves_tool_config_notify (GObject *object,
case GIMP_HISTOGRAM_VALUE: case GIMP_HISTOGRAM_VALUE:
case GIMP_HISTOGRAM_ALPHA: case GIMP_HISTOGRAM_ALPHA:
case GIMP_HISTOGRAM_RGB: case GIMP_HISTOGRAM_RGB:
gimp_curve_get_uchar (curve, r); gimp_curve_get_uchar (curve, sizeof (r), r);
gimp_color_bar_set_buffers (GIMP_COLOR_BAR (tool->xrange), gimp_color_bar_set_buffers (GIMP_COLOR_BAR (tool->xrange),
r, r, r); r, r, r);
@ -646,9 +646,12 @@ gimp_curves_tool_config_notify (GObject *object,
case GIMP_HISTOGRAM_RED: case GIMP_HISTOGRAM_RED:
case GIMP_HISTOGRAM_GREEN: case GIMP_HISTOGRAM_GREEN:
case GIMP_HISTOGRAM_BLUE: case GIMP_HISTOGRAM_BLUE:
gimp_curve_get_uchar (config->curve[GIMP_HISTOGRAM_RED], r); gimp_curve_get_uchar (config->curve[GIMP_HISTOGRAM_RED],
gimp_curve_get_uchar (config->curve[GIMP_HISTOGRAM_GREEN], g); sizeof (r), r);
gimp_curve_get_uchar (config->curve[GIMP_HISTOGRAM_BLUE], b); gimp_curve_get_uchar (config->curve[GIMP_HISTOGRAM_GREEN],
sizeof (g), g);
gimp_curve_get_uchar (config->curve[GIMP_HISTOGRAM_BLUE],
sizeof (b), b);
gimp_color_bar_set_buffers (GIMP_COLOR_BAR (tool->xrange), gimp_color_bar_set_buffers (GIMP_COLOR_BAR (tool->xrange),
r, g, b); r, g, b);

View File

@ -1592,18 +1592,18 @@ gimp_draw_tool_on_vectors (GimpDrawTool *draw_tool,
} }
void void
gimp_draw_tool_draw_lines (GimpDrawTool *draw_tool, gimp_draw_tool_draw_lines (GimpDrawTool *draw_tool,
const gdouble *points, const GimpVector2 *points,
gint n_points, gint n_points,
gboolean filled, gboolean filled,
gboolean use_offsets) gboolean use_offsets)
{ {
GimpDisplayShell *shell; GimpDisplayShell *shell;
GdkPoint *coords; GdkPoint *coords;
g_return_if_fail (GIMP_IS_DRAW_TOOL (draw_tool)); g_return_if_fail (GIMP_IS_DRAW_TOOL (draw_tool));
if (n_points == 0) if (points == NULL || n_points == 0)
return; return;
shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell); shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell);

View File

@ -226,7 +226,7 @@ gboolean gimp_draw_tool_on_vectors (GimpDrawTool *draw_tool,
GimpVectors **ret_vectors); GimpVectors **ret_vectors);
void gimp_draw_tool_draw_lines (GimpDrawTool *draw_tool, void gimp_draw_tool_draw_lines (GimpDrawTool *draw_tool,
const gdouble *points, const GimpVector2 *points,
gint n_points, gint n_points,
gboolean filled, gboolean filled,
gboolean use_offsets); gboolean use_offsets);

View File

@ -398,8 +398,9 @@ gimp_foreground_select_tool_key_press (GimpTool *tool,
switch (kevent->keyval) switch (kevent->keyval)
{ {
case GDK_KP_Enter:
case GDK_Return: case GDK_Return:
case GDK_KP_Enter:
case GDK_ISO_Enter:
gimp_foreground_select_tool_apply (fg_select, display); gimp_foreground_select_tool_apply (fg_select, display);
return TRUE; return TRUE;

View File

@ -281,8 +281,7 @@ gimp_free_select_tool_draw (GimpDrawTool *draw_tool)
GimpFreeSelectTool *free_sel = GIMP_FREE_SELECT_TOOL (draw_tool); GimpFreeSelectTool *free_sel = GIMP_FREE_SELECT_TOOL (draw_tool);
gimp_draw_tool_draw_lines (draw_tool, gimp_draw_tool_draw_lines (draw_tool,
(const gdouble *) free_sel->points, free_sel->points, free_sel->num_points,
free_sel->num_points,
FALSE, FALSE); FALSE, FALSE);
} }

View File

@ -278,10 +278,18 @@ gimp_gegl_tool_dialog (GimpImageMapTool *image_map_tool)
gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo); gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo);
/* The options vbox */ /* The options vbox */
tool->options_box = gtk_vbox_new (FALSE, 6); tool->options_frame = gimp_frame_new (_("Operation Settings"));
gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), tool->options_box, gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), tool->options_frame,
FALSE, FALSE, 0); FALSE, FALSE, 0);
gtk_widget_show (tool->options_box); gtk_widget_show (tool->options_frame);
tool->options_table = gtk_label_new ("Select an operation from the list above");
gimp_label_set_attributes (GTK_LABEL (tool->options_table),
PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC,
-1);
gtk_misc_set_padding (GTK_MISC (tool->options_table), 0, 4);
gtk_container_add (GTK_CONTAINER (tool->options_frame), tool->options_table);
gtk_widget_show (tool->options_table);
} }
static void static void
@ -450,11 +458,21 @@ gimp_param_spec_duplicate (GParamSpec *pspec)
return NULL; return NULL;
} }
static GValue *
gimp_gegl_tool_config_value_new (GParamSpec *pspec)
{
GValue *value = g_slice_new0 (GValue);
g_value_init (value, pspec->value_type);
return value;
}
static void static void
gimp_gegl_tool_config_value_free (GValue *value) gimp_gegl_tool_config_value_free (GValue *value)
{ {
g_value_unset (value); g_value_unset (value);
g_free (value); g_slice_free (GValue, value);
} }
static GHashTable * static GHashTable *
@ -476,24 +494,31 @@ gimp_gegl_tool_config_get_properties (GObject *object)
return properties; return properties;
} }
static GValue *
gimp_gegl_tool_config_value_get (GObject *object,
GParamSpec *pspec)
{
GHashTable *properties = gimp_gegl_tool_config_get_properties (object);
GValue *value;
value = g_hash_table_lookup (properties, pspec->name);
if (! value)
{
value = gimp_gegl_tool_config_value_new (pspec);
g_hash_table_insert (properties, g_strdup (pspec->name), value);
}
return value;
}
static void static void
gimp_gegl_tool_config_set_property (GObject *object, gimp_gegl_tool_config_set_property (GObject *object,
guint property_id, guint property_id,
const GValue *value, const GValue *value,
GParamSpec *pspec) GParamSpec *pspec)
{ {
GHashTable *properties = gimp_gegl_tool_config_get_properties (object); GValue *val = gimp_gegl_tool_config_value_get (object, pspec);
GValue *val;
val = g_hash_table_lookup (properties, pspec->name);
if (! val)
{
val = g_new0 (GValue, 1);
g_hash_table_insert (properties, g_strdup (pspec->name), val);
g_value_init (val, pspec->value_type);
}
g_value_copy (value, val); g_value_copy (value, val);
} }
@ -504,19 +529,7 @@ gimp_gegl_tool_config_get_property (GObject *object,
GValue *value, GValue *value,
GParamSpec *pspec) GParamSpec *pspec)
{ {
GHashTable *properties = gimp_gegl_tool_config_get_properties (object); GValue *val = gimp_gegl_tool_config_value_get (object, pspec);
GValue *val;
val = g_hash_table_lookup (properties, pspec->name);
if (! val)
{
val = g_new0 (GValue, 1);
g_hash_table_insert (properties, g_strdup (pspec->name), val);
g_value_init (val, pspec->value_type);
g_param_value_set_default (pspec, val);
}
g_value_copy (val, value); g_value_copy (val, value);
} }
@ -660,7 +673,7 @@ gimp_gegl_tool_operation_changed (GtkWidget *widget,
if (tool->options_table) if (tool->options_table)
{ {
gtk_container_remove (GTK_CONTAINER (tool->options_box), gtk_container_remove (GTK_CONTAINER (tool->options_frame),
tool->options_table); tool->options_table);
tool->options_table = NULL; tool->options_table = NULL;
} }
@ -675,8 +688,8 @@ gimp_gegl_tool_operation_changed (GtkWidget *widget,
gimp_prop_table_new (G_OBJECT (tool->config), gimp_prop_table_new (G_OBJECT (tool->config),
G_TYPE_FROM_INSTANCE (tool->config), G_TYPE_FROM_INSTANCE (tool->config),
GIMP_CONTEXT (GIMP_TOOL_GET_OPTIONS (tool))); GIMP_CONTEXT (GIMP_TOOL_GET_OPTIONS (tool)));
gtk_box_pack_start (GTK_BOX (tool->options_box), tool->options_table, gtk_container_add (GTK_CONTAINER (tool->options_frame),
FALSE, FALSE, 0); tool->options_table);
gtk_widget_show (tool->options_table); gtk_widget_show (tool->options_table);
} }

View File

@ -43,7 +43,7 @@ struct _GimpGeglTool
/* dialog */ /* dialog */
GtkWidget *operation_combo; GtkWidget *operation_combo;
GtkWidget *options_box; GtkWidget *options_frame;
GtkWidget *options_table; GtkWidget *options_table;
}; };

View File

@ -289,9 +289,6 @@ gimp_image_map_tool_initialize (GimpTool *tool,
GimpImageMapToolClass *klass; GimpImageMapToolClass *klass;
GtkWidget *shell; GtkWidget *shell;
GtkWidget *vbox; GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *label;
GtkWidget *combo;
GtkWidget *toggle; GtkWidget *toggle;
const gchar *stock_id; const gchar *stock_id;
@ -324,26 +321,34 @@ gimp_image_map_tool_initialize (GimpTool *tool,
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6); gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (shell)->vbox), vbox); gtk_container_add (GTK_CONTAINER (GTK_DIALOG (shell)->vbox), vbox);
hbox = gtk_hbox_new (FALSE, 4); if (image_map_tool->config)
gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), hbox, {
FALSE, FALSE, 0); GtkWidget *hbox;
gtk_widget_show (hbox); GtkWidget *label;
GtkWidget *combo;
label = gtk_label_new (_("Recent Settings:")); hbox = gtk_hbox_new (FALSE, 4);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), hbox,
gtk_widget_show (label); FALSE, FALSE, 0);
gtk_widget_show (hbox);
combo = gimp_container_combo_box_new (klass->recent_settings, label = gtk_label_new (_("Recent Settings:"));
GIMP_CONTEXT (tool_info->tool_options), gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
16, 0); gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
gtk_widget_show (combo);
gimp_help_set_help_data (combo, _("Pick a setting from the list"), NULL); combo = gimp_container_combo_box_new (klass->recent_settings,
GIMP_CONTEXT (tool_info->tool_options),
16, 0);
gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
gtk_widget_show (combo);
g_signal_connect_after (combo, "select-item", gimp_help_set_help_data (combo, _("Pick a setting from the list"),
G_CALLBACK (gimp_image_map_tool_recent_selected), NULL);
image_map_tool);
g_signal_connect_after (combo, "select-item",
G_CALLBACK (gimp_image_map_tool_recent_selected),
image_map_tool);
}
/* The preview toggle */ /* The preview toggle */
toggle = gimp_prop_check_button_new (G_OBJECT (tool_info->tool_options), toggle = gimp_prop_check_button_new (G_OBJECT (tool_info->tool_options),
@ -476,8 +481,9 @@ gimp_image_map_tool_key_press (GimpTool *tool,
{ {
switch (kevent->keyval) switch (kevent->keyval)
{ {
case GDK_KP_Enter:
case GDK_Return: case GDK_Return:
case GDK_KP_Enter:
case GDK_ISO_Enter:
gimp_image_map_tool_response (NULL, GTK_RESPONSE_OK, image_map_tool); gimp_image_map_tool_response (NULL, GTK_RESPONSE_OK, image_map_tool);
return TRUE; return TRUE;

View File

@ -882,23 +882,23 @@ static void
iscissors_draw_curve (GimpDrawTool *draw_tool, iscissors_draw_curve (GimpDrawTool *draw_tool,
ICurve *curve) ICurve *curve)
{ {
gdouble *points; GimpVector2 *points;
gpointer *point; gpointer *point;
gint i, len; gint i, len;
if (! curve->points) if (! curve->points)
return; return;
len = curve->points->len; len = curve->points->len;
points = g_new (gdouble, 2 * len); points = g_new (GimpVector2, len);
for (i = 0, point = curve->points->pdata; i < len; i++, point++) for (i = 0, point = curve->points->pdata; i < len; i++, point++)
{ {
guint32 coords = GPOINTER_TO_INT (*point); guint32 coords = GPOINTER_TO_INT (*point);
points[i * 2] = (coords & 0x0000ffff); points[i].x = (coords & 0x0000ffff);
points[i * 2 + 1] = (coords >> 16); points[i].y = (coords >> 16);
} }
gimp_draw_tool_draw_lines (draw_tool, points, len, FALSE, FALSE); gimp_draw_tool_draw_lines (draw_tool, points, len, FALSE, FALSE);
@ -1060,8 +1060,9 @@ gimp_iscissors_tool_key_press (GimpTool *tool,
switch (kevent->keyval) switch (kevent->keyval)
{ {
case GDK_KP_Enter:
case GDK_Return: case GDK_Return:
case GDK_KP_Enter:
case GDK_ISO_Enter:
if (iscissors->connected && iscissors->mask) if (iscissors->connected && iscissors->mask)
{ {
gimp_iscissors_tool_apply (iscissors, display); gimp_iscissors_tool_apply (iscissors, display);

View File

@ -49,7 +49,8 @@
#define DEFAULT_MAX_INC 1024 #define DEFAULT_MAX_INC 1024
#define POINT_GRAB_THRESHOLD_SQ 100 #define HANDLE_SIZE 10
#define POINT_GRAB_THRESHOLD_SQ SQR(HANDLE_SIZE / 2)
struct _GimpPolygonSelectTool struct _GimpPolygonSelectTool
@ -74,13 +75,14 @@ struct _GimpPolygonSelectTool
GimpVector2 *points; GimpVector2 *points;
/* The number of points used for the actual selection. */ /* The number of points used for the actual selection. */
gint num_points; gint n_points;
gint max_segs; gint max_segs;
}; };
static void gimp_polygon_select_tool_finalize (GObject *object); static void gimp_polygon_select_tool_finalize (GObject *object);
static void gimp_polygon_select_tool_control (GimpTool *tool, static void gimp_polygon_select_tool_control (GimpTool *tool,
GimpToolAction action, GimpToolAction action,
GimpDisplay *display); GimpDisplay *display);
@ -89,6 +91,10 @@ static void gimp_polygon_select_tool_oper_update (GimpTool
GdkModifierType state, GdkModifierType state,
gboolean proximity, gboolean proximity,
GimpDisplay *display); GimpDisplay *display);
static void gimp_polygon_select_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display);
static void gimp_polygon_select_tool_button_press (GimpTool *tool, static void gimp_polygon_select_tool_button_press (GimpTool *tool,
GimpCoords *coords, GimpCoords *coords,
guint32 time, guint32 time,
@ -124,7 +130,7 @@ static GimpVector2 *gimp_polygon_select_tool_add_point (GimpPolygonSelectTo
gdouble x, gdouble x,
gdouble y); gdouble y);
static void gimp_polygon_select_tool_remove_last (GimpPolygonSelectTool *poly_sel_tool); static void gimp_polygon_select_tool_remove_last (GimpPolygonSelectTool *poly_sel_tool);
static void gimp_polygon_select_tool_select_closet_point static void gimp_polygon_select_tool_select_closest_point
(GimpPolygonSelectTool *poly_sel_tool, (GimpPolygonSelectTool *poly_sel_tool,
GimpDisplay *display, GimpDisplay *display,
GimpCoords *coords); GimpCoords *coords);
@ -136,7 +142,6 @@ static gboolean gimp_polygon_select_tool_should_close (GimpPolygonSelectTo
G_DEFINE_TYPE (GimpPolygonSelectTool, gimp_polygon_select_tool, G_DEFINE_TYPE (GimpPolygonSelectTool, gimp_polygon_select_tool,
GIMP_TYPE_SELECTION_TOOL); GIMP_TYPE_SELECTION_TOOL);
#define parent_class gimp_polygon_select_tool_parent_class #define parent_class gimp_polygon_select_tool_parent_class
@ -168,6 +173,7 @@ gimp_polygon_select_tool_class_init (GimpPolygonSelectToolClass *klass)
tool_class->control = gimp_polygon_select_tool_control; tool_class->control = gimp_polygon_select_tool_control;
tool_class->oper_update = gimp_polygon_select_tool_oper_update; tool_class->oper_update = gimp_polygon_select_tool_oper_update;
tool_class->cursor_update = gimp_polygon_select_tool_cursor_update;
tool_class->button_press = gimp_polygon_select_tool_button_press; tool_class->button_press = gimp_polygon_select_tool_button_press;
tool_class->motion = gimp_polygon_select_tool_motion; tool_class->motion = gimp_polygon_select_tool_motion;
tool_class->button_release = gimp_polygon_select_tool_button_release; tool_class->button_release = gimp_polygon_select_tool_button_release;
@ -186,9 +192,10 @@ gimp_polygon_select_tool_init (GimpPolygonSelectTool *poly_sel_tool)
gimp_tool_control_set_scroll_lock (tool->control, FALSE); gimp_tool_control_set_scroll_lock (tool->control, FALSE);
gimp_tool_control_set_wants_click (tool->control, TRUE); gimp_tool_control_set_wants_click (tool->control, TRUE);
gimp_tool_control_set_tool_cursor (tool->control, gimp_tool_control_set_tool_cursor (tool->control,
GIMP_TOOL_CURSOR_FREE_SELECT); GIMP_TOOL_CURSOR_POLYGON_SELECT);
poly_sel_tool->points = NULL; poly_sel_tool->points = NULL;
poly_sel_tool->n_points = 0;
poly_sel_tool->max_segs = 0; poly_sel_tool->max_segs = 0;
} }
@ -238,9 +245,9 @@ gimp_polygon_select_tool_oper_update (GimpTool *tool,
{ {
gboolean hovering_first_point; gboolean hovering_first_point;
gimp_polygon_select_tool_select_closet_point (poly_sel_tool, gimp_polygon_select_tool_select_closest_point (poly_sel_tool,
display, display,
coords); coords);
hovering_first_point = gimp_polygon_select_tool_should_close (poly_sel_tool, hovering_first_point = gimp_polygon_select_tool_should_close (poly_sel_tool,
display, display,
@ -248,8 +255,8 @@ gimp_polygon_select_tool_oper_update (GimpTool *tool,
gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool)); gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));
if (poly_sel_tool->num_points == 0 || if (poly_sel_tool->n_points == 0 ||
(poly_sel_tool->grabbed_point && !hovering_first_point)) (poly_sel_tool->grabbed_point && ! hovering_first_point))
{ {
poly_sel_tool->show_pending_point = FALSE; poly_sel_tool->show_pending_point = FALSE;
} }
@ -272,6 +279,28 @@ gimp_polygon_select_tool_oper_update (GimpTool *tool,
} }
} }
static void
gimp_polygon_select_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display)
{
GimpPolygonSelectTool *poly_sel_tool = GIMP_POLYGON_SELECT_TOOL (tool);
if (poly_sel_tool->grabbed_point &&
! gimp_polygon_select_tool_should_close (poly_sel_tool, display, coords))
{
gimp_tool_set_cursor (tool, display,
gimp_tool_control_get_cursor (tool->control),
gimp_tool_control_get_tool_cursor (tool->control),
GIMP_CURSOR_MODIFIER_MOVE);
return;
}
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, display);
}
static void static void
gimp_polygon_select_tool_button_press (GimpTool *tool, gimp_polygon_select_tool_button_press (GimpTool *tool,
GimpCoords *coords, GimpCoords *coords,
@ -342,6 +371,8 @@ gimp_polygon_select_tool_button_release (GimpTool *tool,
{ {
GimpPolygonSelectTool *poly_sel_tool = GIMP_POLYGON_SELECT_TOOL (tool); GimpPolygonSelectTool *poly_sel_tool = GIMP_POLYGON_SELECT_TOOL (tool);
gimp_draw_tool_pause (GIMP_DRAW_TOOL (poly_sel_tool));
switch (release_type) switch (release_type)
{ {
case GIMP_BUTTON_RELEASE_CLICK: case GIMP_BUTTON_RELEASE_CLICK:
@ -349,8 +380,7 @@ gimp_polygon_select_tool_button_release (GimpTool *tool,
display, display,
coords)) coords))
{ {
gimp_polygon_select_tool_commit (poly_sel_tool, gimp_polygon_select_tool_commit (poly_sel_tool, display);
display);
break; break;
} }
@ -359,7 +389,8 @@ gimp_polygon_select_tool_button_release (GimpTool *tool,
case GIMP_BUTTON_RELEASE_NORMAL: case GIMP_BUTTON_RELEASE_NORMAL:
if (! poly_sel_tool->grabbed_point) if (! poly_sel_tool->grabbed_point)
{ {
gimp_polygon_select_tool_add_point (poly_sel_tool, coords->x, coords->y); gimp_polygon_select_tool_add_point (poly_sel_tool,
coords->x, coords->y);
} }
else else
{ {
@ -370,16 +401,10 @@ gimp_polygon_select_tool_button_release (GimpTool *tool,
break; break;
case GIMP_BUTTON_RELEASE_CANCEL: case GIMP_BUTTON_RELEASE_CANCEL:
{ if (poly_sel_tool->grabbed_point)
gimp_draw_tool_pause (GIMP_DRAW_TOOL (poly_sel_tool)); {
*poly_sel_tool->grabbed_point = poly_sel_tool->saved_grabbed_point;
if (poly_sel_tool->grabbed_point) }
{
*poly_sel_tool->grabbed_point = poly_sel_tool->saved_grabbed_point;
}
gimp_draw_tool_resume (GIMP_DRAW_TOOL (poly_sel_tool));
}
break; break;
case GIMP_BUTTON_RELEASE_NO_MOTION: case GIMP_BUTTON_RELEASE_NO_MOTION:
@ -395,6 +420,8 @@ gimp_polygon_select_tool_button_release (GimpTool *tool,
} }
break; break;
} }
gimp_draw_tool_resume (GIMP_DRAW_TOOL (poly_sel_tool));
} }
static gboolean static gboolean
@ -403,32 +430,28 @@ gimp_polygon_select_tool_key_press (GimpTool *tool,
GimpDisplay *display) GimpDisplay *display)
{ {
GimpPolygonSelectTool *poly_sel_tool = GIMP_POLYGON_SELECT_TOOL (tool); GimpPolygonSelectTool *poly_sel_tool = GIMP_POLYGON_SELECT_TOOL (tool);
gboolean handled_key = FALSE;
switch (kevent->keyval) switch (kevent->keyval)
{ {
case GDK_BackSpace: case GDK_BackSpace:
gimp_polygon_select_tool_remove_last (poly_sel_tool); gimp_polygon_select_tool_remove_last (poly_sel_tool);
handled_key = TRUE; return TRUE;
break;
case GDK_KP_Enter:
case GDK_Return: case GDK_Return:
case GDK_KP_Enter:
case GDK_ISO_Enter:
gimp_polygon_select_tool_commit (poly_sel_tool, display); gimp_polygon_select_tool_commit (poly_sel_tool, display);
handled_key = TRUE; return TRUE;
break;
case GDK_Escape: case GDK_Escape:
gimp_polygon_select_tool_halt (poly_sel_tool); gimp_polygon_select_tool_halt (poly_sel_tool);
handled_key = TRUE; return TRUE;
break;
default: default:
handled_key = FALSE;
break; break;
} }
return handled_key; return FALSE;
} }
static void static void
@ -444,7 +467,7 @@ gimp_polygon_select_tool_start (GimpPolygonSelectTool *poly_sel_tool,
tool->display = display; tool->display = display;
poly_sel_tool->num_points = 0; poly_sel_tool->n_points = 0;
poly_sel_tool->grabbed_point = NULL; poly_sel_tool->grabbed_point = NULL;
poly_sel_tool->show_pending_point = FALSE; poly_sel_tool->show_pending_point = FALSE;
@ -455,7 +478,7 @@ static void
gimp_polygon_select_tool_commit (GimpPolygonSelectTool *poly_sel_tool, gimp_polygon_select_tool_commit (GimpPolygonSelectTool *poly_sel_tool,
GimpDisplay *display) GimpDisplay *display)
{ {
if (poly_sel_tool->num_points >= 3) if (poly_sel_tool->n_points >= 3)
{ {
gimp_polygon_select_tool_select (poly_sel_tool, display); gimp_polygon_select_tool_select (poly_sel_tool, display);
} }
@ -479,9 +502,9 @@ gimp_polygon_select_tool_halt (GimpPolygonSelectTool *poly_sel_tool)
poly_sel_tool->grabbed_point = NULL; poly_sel_tool->grabbed_point = NULL;
poly_sel_tool->show_pending_point = FALSE; poly_sel_tool->show_pending_point = FALSE;
poly_sel_tool->num_points = 0; poly_sel_tool->n_points = 0;
tool->display = NULL; tool->display = NULL;
} }
static void static void
@ -490,15 +513,25 @@ gimp_polygon_select_tool_draw (GimpDrawTool *draw_tool)
GimpPolygonSelectTool *poly_sel_tool = GIMP_POLYGON_SELECT_TOOL (draw_tool); GimpPolygonSelectTool *poly_sel_tool = GIMP_POLYGON_SELECT_TOOL (draw_tool);
gimp_draw_tool_draw_lines (draw_tool, gimp_draw_tool_draw_lines (draw_tool,
(const gdouble *) poly_sel_tool->points, poly_sel_tool->points, poly_sel_tool->n_points,
poly_sel_tool->num_points,
FALSE, FALSE); FALSE, FALSE);
if (poly_sel_tool->grabbed_point)
{
gimp_draw_tool_draw_handle (draw_tool, GIMP_HANDLE_CIRCLE,
poly_sel_tool->grabbed_point->x,
poly_sel_tool->grabbed_point->y,
HANDLE_SIZE, HANDLE_SIZE,
GTK_ANCHOR_CENTER, FALSE);
}
if (poly_sel_tool->show_pending_point) if (poly_sel_tool->show_pending_point)
{ {
GimpVector2 last = poly_sel_tool->points[poly_sel_tool->n_points - 1];
gimp_draw_tool_draw_line (draw_tool, gimp_draw_tool_draw_line (draw_tool,
poly_sel_tool->points[poly_sel_tool->num_points - 1].x, last.x,
poly_sel_tool->points[poly_sel_tool->num_points - 1].y, last.y,
poly_sel_tool->pending_point.x, poly_sel_tool->pending_point.x,
poly_sel_tool->pending_point.y, poly_sel_tool->pending_point.y,
FALSE); FALSE);
@ -512,10 +545,10 @@ gimp_polygon_select_tool_select (GimpPolygonSelectTool *poly_sel_tool,
g_return_if_fail (GIMP_IS_POLYGON_SELECT_TOOL (poly_sel_tool)); g_return_if_fail (GIMP_IS_POLYGON_SELECT_TOOL (poly_sel_tool));
g_return_if_fail (GIMP_IS_DISPLAY (display)); g_return_if_fail (GIMP_IS_DISPLAY (display));
GIMP_POLYGON_SELECT_TOOL_GET_CLASS (poly_sel_tool)->select (poly_sel_tool, display); GIMP_POLYGON_SELECT_TOOL_GET_CLASS (poly_sel_tool)->select (poly_sel_tool,
display);
} }
static void static void
gimp_polygon_select_tool_real_select (GimpPolygonSelectTool *poly_sel_tool, gimp_polygon_select_tool_real_select (GimpPolygonSelectTool *poly_sel_tool,
GimpDisplay *display) GimpDisplay *display)
@ -524,7 +557,7 @@ gimp_polygon_select_tool_real_select (GimpPolygonSelectTool *poly_sel_tool,
gimp_channel_select_polygon (gimp_image_get_mask (display->image), gimp_channel_select_polygon (gimp_image_get_mask (display->image),
Q_("command|Polygon Select"), Q_("command|Polygon Select"),
poly_sel_tool->num_points, poly_sel_tool->n_points,
poly_sel_tool->points, poly_sel_tool->points,
options->operation, options->operation,
options->antialias, options->antialias,
@ -539,7 +572,7 @@ gimp_polygon_select_tool_add_point (GimpPolygonSelectTool *poly_sel_tool,
gdouble x, gdouble x,
gdouble y) gdouble y)
{ {
if (poly_sel_tool->num_points >= poly_sel_tool->max_segs) if (poly_sel_tool->n_points >= poly_sel_tool->max_segs)
{ {
poly_sel_tool->max_segs += DEFAULT_MAX_INC; poly_sel_tool->max_segs += DEFAULT_MAX_INC;
@ -547,10 +580,10 @@ gimp_polygon_select_tool_add_point (GimpPolygonSelectTool *poly_sel_tool,
sizeof (GimpVector2) * poly_sel_tool->max_segs); sizeof (GimpVector2) * poly_sel_tool->max_segs);
} }
poly_sel_tool->points[poly_sel_tool->num_points].x = x; poly_sel_tool->points[poly_sel_tool->n_points].x = x;
poly_sel_tool->points[poly_sel_tool->num_points].y = y; poly_sel_tool->points[poly_sel_tool->n_points].y = y;
return &poly_sel_tool->points[poly_sel_tool->num_points++]; return &poly_sel_tool->points[poly_sel_tool->n_points++];
} }
static void static void
@ -560,9 +593,9 @@ gimp_polygon_select_tool_remove_last (GimpPolygonSelectTool *poly_sel_tool)
gimp_draw_tool_pause (draw_tool); gimp_draw_tool_pause (draw_tool);
poly_sel_tool->num_points--; poly_sel_tool->n_points--;
if (poly_sel_tool->num_points == 0) if (poly_sel_tool->n_points == 0)
{ {
gimp_polygon_select_tool_halt (poly_sel_tool); gimp_polygon_select_tool_halt (poly_sel_tool);
} }
@ -571,32 +604,40 @@ gimp_polygon_select_tool_remove_last (GimpPolygonSelectTool *poly_sel_tool)
} }
static void static void
gimp_polygon_select_tool_select_closet_point (GimpPolygonSelectTool *poly_sel_tool, gimp_polygon_select_tool_select_closest_point (GimpPolygonSelectTool *poly_sel_tool,
GimpDisplay *display, GimpDisplay *display,
GimpCoords *coords) GimpCoords *coords)
{ {
GimpDrawTool *draw_tool = GIMP_DRAW_TOOL (poly_sel_tool); GimpDrawTool *draw_tool = GIMP_DRAW_TOOL (poly_sel_tool);
gdouble shortest_dist_sq; gdouble shortest_dist = POINT_GRAB_THRESHOLD_SQ;
GimpVector2 *grabbed_point = NULL;
int i; int i;
poly_sel_tool->grabbed_point = NULL; for (i = 0; i < poly_sel_tool->n_points; i++)
shortest_dist_sq = POINT_GRAB_THRESHOLD_SQ;
for (i = 0; i < poly_sel_tool->num_points; i++)
{ {
gdouble dist_sq; gdouble dist;
dist_sq = gimp_draw_tool_calc_distance_square (draw_tool, dist = gimp_draw_tool_calc_distance_square (draw_tool,
display, display,
coords->x, coords->x,
coords->y, coords->y,
poly_sel_tool->points[i].x, poly_sel_tool->points[i].x,
poly_sel_tool->points[i].y); poly_sel_tool->points[i].y);
if (dist_sq < shortest_dist_sq)
if (dist < shortest_dist)
{ {
poly_sel_tool->grabbed_point = &poly_sel_tool->points[i]; grabbed_point = &poly_sel_tool->points[i];
} }
} }
if (grabbed_point != poly_sel_tool->grabbed_point)
{
gimp_draw_tool_pause(draw_tool);
poly_sel_tool->grabbed_point = grabbed_point;
gimp_draw_tool_resume(draw_tool);
}
} }
static gboolean static gboolean
@ -604,19 +645,20 @@ gimp_polygon_select_tool_should_close (GimpPolygonSelectTool *poly_sel_tool,
GimpDisplay *display, GimpDisplay *display,
GimpCoords *coords) GimpCoords *coords)
{ {
gboolean should_close = FALSE; gboolean should_close = FALSE;
if (poly_sel_tool->num_points > 0) if (poly_sel_tool->n_points > 0)
{ {
gdouble dist_sq; gdouble dist;
dist_sq = gimp_draw_tool_calc_distance_square (GIMP_DRAW_TOOL (poly_sel_tool), dist = gimp_draw_tool_calc_distance_square (GIMP_DRAW_TOOL (poly_sel_tool),
display, display,
coords->x, coords->x,
coords->y, coords->y,
poly_sel_tool->points[0].x, poly_sel_tool->points[0].x,
poly_sel_tool->points[0].y); poly_sel_tool->points[0].y);
should_close = dist_sq < POINT_GRAB_THRESHOLD_SQ;
should_close = dist < POINT_GRAB_THRESHOLD_SQ;
} }
return should_close; return should_close;

View File

@ -1350,8 +1350,9 @@ gimp_rectangle_tool_key_press (GimpTool *tool,
dy = 1; dy = 1;
break; break;
case GDK_KP_Enter:
case GDK_Return: case GDK_Return:
case GDK_KP_Enter:
case GDK_ISO_Enter:
if (gimp_rectangle_tool_execute (rect_tool)) if (gimp_rectangle_tool_execute (rect_tool))
gimp_rectangle_tool_halt (rect_tool); gimp_rectangle_tool_halt (rect_tool);
return TRUE; return TRUE;

View File

@ -505,8 +505,9 @@ gimp_transform_tool_key_press (GimpTool *tool,
{ {
switch (kevent->keyval) switch (kevent->keyval)
{ {
case GDK_KP_Enter:
case GDK_Return: case GDK_Return:
case GDK_KP_Enter:
case GDK_ISO_Enter:
gimp_transform_tool_response (NULL, GTK_RESPONSE_OK, trans_tool); gimp_transform_tool_response (NULL, GTK_RESPONSE_OK, trans_tool);
return TRUE; return TRUE;

View File

@ -767,8 +767,9 @@ gimp_vector_tool_key_press (GimpTool *tool,
switch (kevent->keyval) switch (kevent->keyval)
{ {
case GDK_KP_Enter:
case GDK_Return: case GDK_Return:
case GDK_KP_Enter:
case GDK_ISO_Enter:
gimp_vector_tool_to_selection_extended (vector_tool, kevent->state); gimp_vector_tool_to_selection_extended (vector_tool, kevent->state);
break; break;

136
app/version.c Normal file
View File

@ -0,0 +1,136 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* 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 <glib.h>
#include <fontconfig/fontconfig.h>
#include <pango/pango.h>
#include <pango/pangoft2.h>
#include <gegl.h>
#ifndef GIMP_CONSOLE_COMPILATION
#include <gtk/gtk.h>
#endif
#include "libgimpbase/gimpbase.h"
#include "about.h"
#include "version.h"
#include "gimp-intl.h"
static void
gimp_show_library_version (const gchar *package,
gint build_time_major,
gint build_time_minor,
gint build_time_micro,
gint run_time_major,
gint run_time_minor,
gint run_time_micro)
{
gchar *build_time_version;
gchar *run_time_version;
build_time_version = g_strdup_printf ("%d.%d.%d",
build_time_major,
build_time_minor,
build_time_micro);
run_time_version = g_strdup_printf ("%d.%d.%d",
run_time_major,
run_time_minor,
run_time_micro);
/* show versions of libraries used by GIMP */
g_print (_("using %s, "
"compiled against version %s, running against version %s"),
package, build_time_version, run_time_version);
g_print ("\n");
g_free (run_time_version);
g_free (build_time_version);
}
static void
gimp_show_library_versions (void)
{
gint gegl_major_version;
gint gegl_minor_version;
gint gegl_micro_version;
gegl_get_version (&gegl_major_version,
&gegl_minor_version,
&gegl_micro_version);
gimp_show_library_version ("GEGL",
GEGL_MAJOR_VERSION,
GEGL_MINOR_VERSION,
GEGL_MICRO_VERSION,
gegl_major_version,
gegl_minor_version,
gegl_micro_version);
gimp_show_library_version ("GLib",
GLIB_MAJOR_VERSION,
GLIB_MINOR_VERSION,
GLIB_MICRO_VERSION,
glib_major_version,
glib_minor_version,
glib_micro_version);
#ifndef GIMP_CONSOLE_COMPILATION
gimp_show_library_version ("GTK+",
GTK_MAJOR_VERSION,
GTK_MINOR_VERSION,
GTK_MICRO_VERSION,
gtk_major_version,
gtk_minor_version,
gtk_micro_version);
#endif
gimp_show_library_version ("Pango",
PANGO_VERSION_MAJOR,
PANGO_VERSION_MINOR,
PANGO_VERSION_MICRO,
pango_version () / 100 / 100,
pango_version () / 100 % 100,
pango_version () % 100);
gimp_show_library_version ("Fontconfig",
FC_MAJOR, FC_MINOR, FC_REVISION,
FcGetVersion () / 100 / 100,
FcGetVersion () / 100 % 100,
FcGetVersion () % 100);
}
void
gimp_version_show (gboolean be_verbose)
{
g_print (_("%s version %s"), GIMP_NAME, GIMP_VERSION);
g_print ("\n");
if (be_verbose)
{
g_print ("\n");
gimp_show_library_versions ();
}
}

31
app/version.h Normal file
View File

@ -0,0 +1,31 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* 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 __VERSION_H__
#define __VERSION_H__
#ifndef GIMP_APP_GLUE_COMPILATION
#error You must not #include "version.h" from an app/ subdir
#endif
void gimp_version_show (gboolean be_verbose);
#endif /* __VERSION_H__ */

View File

@ -123,8 +123,12 @@ gimp_container_popup_class_init (GimpContainerPopupClass *klass)
"confirm", 0); "confirm", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Enter, 0, gtk_binding_entry_add_signal (binding_set, GDK_KP_Enter, 0,
"confirm", 0); "confirm", 0);
gtk_binding_entry_add_signal (binding_set, GDK_ISO_Enter, 0,
"confirm", 0);
gtk_binding_entry_add_signal (binding_set, GDK_space, 0, gtk_binding_entry_add_signal (binding_set, GDK_space, 0,
"confirm", 0); "confirm", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, 0,
"confirm", 0);
} }
static void static void

View File

@ -66,6 +66,8 @@
#include "cursors/xbm/tool-ellipse-select-mask.xbm" #include "cursors/xbm/tool-ellipse-select-mask.xbm"
#include "cursors/xbm/tool-free-select.xbm" #include "cursors/xbm/tool-free-select.xbm"
#include "cursors/xbm/tool-free-select-mask.xbm" #include "cursors/xbm/tool-free-select-mask.xbm"
#include "cursors/xbm/tool-polygon-select.xbm"
#include "cursors/xbm/tool-polygon-select-mask.xbm"
#include "cursors/xbm/tool-fuzzy-select.xbm" #include "cursors/xbm/tool-fuzzy-select.xbm"
#include "cursors/xbm/tool-fuzzy-select-mask.xbm" #include "cursors/xbm/tool-fuzzy-select-mask.xbm"
#include "cursors/xbm/tool-paths.xbm" #include "cursors/xbm/tool-paths.xbm"
@ -304,6 +306,12 @@ static GimpCursor gimp_tool_cursors[] =
0, 0, 0, 0,
tool_free_select, NULL, NULL, NULL tool_free_select, NULL, NULL, NULL
}, },
{
tool_polygon_select_bits, tool_polygon_select_mask_bits,
tool_polygon_select_width, tool_polygon_select_height,
0, 0,
tool_polygon_select, NULL, NULL, NULL
},
{ {
tool_fuzzy_select_bits, tool_fuzzy_select_mask_bits, tool_fuzzy_select_bits, tool_fuzzy_select_mask_bits,
tool_fuzzy_select_width, tool_fuzzy_select_height, tool_fuzzy_select_width, tool_fuzzy_select_height,

View File

@ -394,7 +394,7 @@ gimp_curve_view_expose (GtkWidget *widget,
gdk_cairo_set_source_color (cr, &style->text[GTK_STATE_NORMAL]); gdk_cairo_set_source_color (cr, &style->text[GTK_STATE_NORMAL]);
/* Draw the unselected points */ /* Draw the unselected points */
for (i = 0; i < GIMP_CURVE_NUM_POINTS; i++) for (i = 0; i < view->curve->n_points; i++)
{ {
if (i == view->selected) if (i == view->selected)
continue; continue;
@ -481,7 +481,7 @@ gimp_curve_view_expose (GtkWidget *widget,
cairo_stroke (cr); cairo_stroke (cr);
g_snprintf (buf, sizeof (buf), "x:%3d y:%3d", g_snprintf (buf, sizeof (buf), "x:%3d y:%3d",
(gint) (view->cursor_x * 255.999), (gint) (view->cursor_x * 255.999),
(gint) ((1.0 - view->cursor_y) * 255.999)); (gint) ((1.0 - view->cursor_y) * 255.999));
pango_layout_set_text (view->cursor_layout, buf, -1); pango_layout_set_text (view->cursor_layout, buf, -1);
@ -567,7 +567,7 @@ gimp_curve_view_button_press (GtkWidget *widget,
} }
view->rightmost = 2.0; view->rightmost = 2.0;
for (i = closest_point + 1; i < GIMP_CURVE_NUM_POINTS; i++) for (i = closest_point + 1; i < curve->n_points; i++)
{ {
gdouble point_x; gdouble point_x;
@ -667,7 +667,9 @@ gimp_curve_view_motion_notify (GtkWidget *widget,
if (x > view->leftmost && x < view->rightmost) if (x > view->leftmost && x < view->rightmost)
{ {
closest_point = ((gint) (x * 255.999) + 8) / 16; gint n_points = gimp_curve_get_n_points (curve);
closest_point = ROUND (x * (gdouble) (n_points - 1));
gimp_curve_get_point (curve, closest_point, &point_x, NULL); gimp_curve_get_point (curve, closest_point, &point_x, NULL);
@ -684,6 +686,7 @@ gimp_curve_view_motion_notify (GtkWidget *widget,
case GIMP_CURVE_FREE: case GIMP_CURVE_FREE:
if (view->grabbed) if (view->grabbed)
{ {
gint n_samples = gimp_curve_get_n_samples (curve);
gdouble x1, x2; gdouble x1, x2;
gdouble y1, y2; gdouble y1, y2;
@ -704,14 +707,19 @@ gimp_curve_view_motion_notify (GtkWidget *widget,
if (x2 != x1) if (x2 != x1)
{ {
gint from = ROUND (x1 * (gdouble) (n_samples - 1));
gint to = ROUND (x2 * (gdouble) (n_samples - 1));
gint i; gint i;
gimp_data_freeze (GIMP_DATA (curve)); gimp_data_freeze (GIMP_DATA (curve));
for (i = (gint) (x1 * 255.999); i <= (gint) (x2 * 255.999); i++) for (i = from; i <= to; i++)
gimp_curve_set_curve (curve, {
(gdouble) i / 255.0, gdouble xpos = (gdouble) i / (gdouble) (n_samples - 1);
1.0 - (y1 + ((y2 - y1) * ((gdouble) i / 255.0 - x1)) / (x2 - x1))); gdouble ypos = (y1 + ((y2 - y1) * (xpos - x1)) / (x2 - x1));
gimp_curve_set_curve (curve, xpos, 1.0 - ypos);
}
gimp_data_thaw (GIMP_DATA (curve)); gimp_data_thaw (GIMP_DATA (curve));
} }
@ -783,7 +791,7 @@ gimp_curve_view_key_press (GtkWidget *widget,
break; break;
case GDK_Right: case GDK_Right:
for (i = i + 1; i < GIMP_CURVE_NUM_POINTS && ! retval; i++) for (i = i + 1; i < curve->n_points && ! retval; i++)
{ {
gimp_curve_get_point (curve, i, &x, NULL); gimp_curve_get_point (curve, i, &x, NULL);

View File

@ -266,9 +266,11 @@ gimp_palette_view_key_press (GtkWidget *widget,
GimpPaletteView *view = GIMP_PALETTE_VIEW (widget); GimpPaletteView *view = GIMP_PALETTE_VIEW (widget);
if (view->selected && if (view->selected &&
(kevent->keyval == GDK_space || (kevent->keyval == GDK_space ||
kevent->keyval == GDK_Return || kevent->keyval == GDK_KP_Space ||
kevent->keyval == GDK_KP_Enter)) kevent->keyval == GDK_Return ||
kevent->keyval == GDK_KP_Enter ||
kevent->keyval == GDK_ISO_Enter))
{ {
g_signal_emit (view, view_signals[ENTRY_CLICKED], 0, g_signal_emit (view, view_signals[ENTRY_CLICKED], 0,
view->selected, kevent->state); view->selected, kevent->state);

View File

@ -229,6 +229,7 @@ typedef enum /*< skip >*/
GIMP_TOOL_CURSOR_RECT_SELECT, GIMP_TOOL_CURSOR_RECT_SELECT,
GIMP_TOOL_CURSOR_ELLIPSE_SELECT, GIMP_TOOL_CURSOR_ELLIPSE_SELECT,
GIMP_TOOL_CURSOR_FREE_SELECT, GIMP_TOOL_CURSOR_FREE_SELECT,
GIMP_TOOL_CURSOR_POLYGON_SELECT,
GIMP_TOOL_CURSOR_FUZZY_SELECT, GIMP_TOOL_CURSOR_FUZZY_SELECT,
GIMP_TOOL_CURSOR_PATHS, GIMP_TOOL_CURSOR_PATHS,
GIMP_TOOL_CURSOR_PATHS_ANCHOR, GIMP_TOOL_CURSOR_PATHS_ANCHOR,

View File

@ -40,7 +40,7 @@ m4_define([gimp_stable],
m4_define([gimp_full_name], [GNU Image Manipulation Program]) m4_define([gimp_full_name], [GNU Image Manipulation Program])
# required versions of other packages # required versions of other packages
m4_define([gegl_required_version], [0.0.15]) m4_define([gegl_required_version], [0.0.16])
m4_define([glib_required_version], [2.14.1]) m4_define([glib_required_version], [2.14.1])
m4_define([gtk_required_version], [2.12.1]) m4_define([gtk_required_version], [2.12.1])
m4_define([gdk_pixbuf_required_version], [gtk_required_version]) m4_define([gdk_pixbuf_required_version], [gtk_required_version])
@ -139,9 +139,11 @@ AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
[The prefix for our gettext translation domains.]) [The prefix for our gettext translation domains.])
# Determine a C compiler to use
AC_PROG_CC
AM_PROG_CC_C_O
# Initialize libtool # Initialize libtool
AC_PROG_CC
AM_DISABLE_STATIC AM_DISABLE_STATIC
AC_LIBTOOL_WIN32_DLL AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL AM_PROG_LIBTOOL
@ -247,7 +249,6 @@ AC_SUBST(WINDRES)
# Checks for programs. # Checks for programs.
AC_ISC_POSIX AC_ISC_POSIX
AM_PROG_CC_STDC
AC_PROG_INSTALL AC_PROG_INSTALL
AC_PROG_MAKE_SET AC_PROG_MAKE_SET
@ -1828,6 +1829,9 @@ AM_CONDITIONAL(STATICLIBS, test "x$enable_static" = xyes)
GIMP_MKENUMS="\$(PERL) \$(top_srcdir)/tools/gimp-mkenums" GIMP_MKENUMS="\$(PERL) \$(top_srcdir)/tools/gimp-mkenums"
AC_SUBST(GIMP_MKENUMS) AC_SUBST(GIMP_MKENUMS)
#Add required trailing ; to list
MIME_TYPES="$MIME_TYPES;"
AC_SUBST(MIME_TYPES) AC_SUBST(MIME_TYPES)

View File

@ -59,6 +59,7 @@ CURSOR_IMAGES = \
tool-paths-segment.png \ tool-paths-segment.png \
tool-pencil.png \ tool-pencil.png \
tool-perspective.png \ tool-perspective.png \
tool-polygon-select.png \
tool-rect-select.png \ tool-rect-select.png \
tool-resize.png \ tool-resize.png \
tool-rotate.png \ tool-rotate.png \
@ -136,6 +137,8 @@ EXTRA_DIST = \
xbm/tool-ellipse-select-mask.xbm \ xbm/tool-ellipse-select-mask.xbm \
xbm/tool-free-select.xbm \ xbm/tool-free-select.xbm \
xbm/tool-free-select-mask.xbm \ xbm/tool-free-select-mask.xbm \
xbm/tool-polygon-select.xbm \
xbm/tool-polygon-select-mask.xbm \
xbm/tool-fuzzy-select.xbm \ xbm/tool-fuzzy-select.xbm \
xbm/tool-fuzzy-select-mask.xbm \ xbm/tool-fuzzy-select-mask.xbm \
xbm/tool-paths-anchor.xbm \ xbm/tool-paths-anchor.xbm \

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

View File

@ -0,0 +1,14 @@
#define tool_polygon_select_mask_width 32
#define tool_polygon_select_mask_height 32
static unsigned char tool_polygon_select_mask_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x1f,
0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0xe3,
0x00, 0x00, 0xc0, 0xe1, 0x00, 0x00, 0xff, 0x71, 0x00, 0x80, 0xff, 0x71,
0x00, 0x00, 0xff, 0x70, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00, 0x0e, 0x70,
0x00, 0x00, 0x3e, 0x38, 0x00, 0x00, 0xfc, 0x3b, 0x00, 0x00, 0xf8, 0x3f,
0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x1c };

View File

@ -0,0 +1,14 @@
#define tool_polygon_select_width 32
#define tool_polygon_select_height 32
static unsigned char tool_polygon_select_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x41,
0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x80, 0x20, 0x00, 0x00, 0xff, 0x20,
0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x04, 0x20,
0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x38, 0x10, 0x00, 0x00, 0xc0, 0x13,
0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00 };

View File

@ -1,3 +1,8 @@
2008-02-25 Sven Neumann <sven@gimp.org>
* parasites.txt: document the "print-settings" and
"print-page-setup" image parasites.
2007-12-29 Michael Natterer <mitch@gimp.org> 2007-12-29 Michael Natterer <mitch@gimp.org>
* app/Makefile.am (GTKDOC_LIBS): link app/gegl/libappgegl.a * app/Makefile.am (GTKDOC_LIBS): link app/gegl/libappgegl.a

View File

@ -194,13 +194,28 @@ Global data follows no strict rules.
for use as a parasite. for use as a parasite.
"decompose-data" (IMAGE, NONPERSISTENT) "decompose-data" (IMAGE, NONPERSISTENT)
Starting with GIMP 2.3, this is added to images produced by Starting with GIMP 2.4, this is added to images produced by
the decompose plug-in, and contains information necessary to the decompose plug-in, and contains information necessary to
recompose the original source RGB layer from the resulting recompose the original source RGB layer from the resulting
grayscale layers. It is ascii; a typical example would be grayscale layers. It is ascii; a typical example would be
"source=2 type=RGBA 4 5 6 7". This means that layer 2 was "source=2 type=RGBA 4 5 6 7". This means that layer 2 was
decomposed in RGBA mode, giving rise to layers 4, 5, 6, and 7. decomposed in RGBA mode, giving rise to layers 4, 5, 6, and 7.
"print-settings" (IMAGE, NONPERSISTENT)
This parasite is stored by the Print plug-in and holds settings
done in the Print dialog. It also has a version field so that
changes to the parasite can be done. GIMP 2.4 used version 0.3.
The format is GKeyFile. A lot of the contents are identical to
what is stored in ~/.gimp-2.x/print-settings but the parasite
has some additional image-related fields.
"print-page-setup" (IMAGE, NONPERSISTENT)
This parasite is stored by the Print plug-in and holds settings
done in the Page Setup dialog. The format is GKeyFile as created
from GtkPageSetup. The content is identical to what is stored in
~/.gimp-2.x/print-page-setup.
------------------------------------------------------------------ ------------------------------------------------------------------
*** KNOWN LAYER/DRAWABLE PARASITES: *** KNOWN LAYER/DRAWABLE PARASITES:

View File

@ -1,4 +1,4 @@
.TH GIMP 1 "Januar 23 2007" "Version @GIMP_VERSION@" "GIMP Manual Pages" .TH GIMP 1 "February 23 2008" "Version @GIMP_VERSION@" "GIMP Manual Pages"
.SH NAME .SH NAME
gimp - an image manipulation and paint program. gimp - an image manipulation and paint program.
@ -61,7 +61,8 @@ Show all command\-line options.
Show GTK+ command\-line options. Show GTK+ command\-line options.
.TP 8 .TP 8
.B \-v, \-\-version .B \-v, \-\-version
Output version information and exit. Output version information and exit. When combined with the \-\-verbose
option, version information about libraries used by GIMP is shown as well.
.TP 8 .TP 8
.B \-\-license .B \-\-license
Output license information and exit. Output license information and exit.

View File

@ -56,11 +56,11 @@ static void gimp_chain_button_get_property (GObject *object,
static void gimp_chain_button_clicked_callback (GtkWidget *widget, static void gimp_chain_button_clicked_callback (GtkWidget *widget,
GimpChainButton *button); GimpChainButton *button);
static gboolean gimp_chain_button_draw_lines (GtkWidget *widget,
GdkEventExpose *eevent,
GimpChainButton *button);
static void gimp_chain_button_update_image (GimpChainButton *button); static void gimp_chain_button_update_image (GimpChainButton *button);
static GtkWidget * gimp_chain_line_new (GimpChainPosition position,
gint which);
G_DEFINE_TYPE (GimpChainButton, gimp_chain_button, GTK_TYPE_TABLE) G_DEFINE_TYPE (GimpChainButton, gimp_chain_button, GTK_TYPE_TABLE)
@ -117,25 +117,16 @@ gimp_chain_button_init (GimpChainButton *button)
{ {
button->position = GIMP_CHAIN_TOP; button->position = GIMP_CHAIN_TOP;
button->active = FALSE; button->active = FALSE;
button->line1 = gtk_drawing_area_new ();
button->line2 = gtk_drawing_area_new ();
button->image = gtk_image_new (); button->image = gtk_image_new ();
button->button = gtk_button_new (); button->button = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (button->button), GTK_RELIEF_NONE); gtk_button_set_relief (GTK_BUTTON (button->button), GTK_RELIEF_NONE);
gtk_container_add (GTK_CONTAINER (button->button), button->image); gtk_container_add (GTK_CONTAINER (button->button), button->image);
gtk_widget_show (button->image);
g_signal_connect (button->button, "clicked", g_signal_connect (button->button, "clicked",
G_CALLBACK (gimp_chain_button_clicked_callback), G_CALLBACK (gimp_chain_button_clicked_callback),
button); button);
g_signal_connect (button->line1, "expose-event",
G_CALLBACK (gimp_chain_button_draw_lines),
button);
g_signal_connect (button->line2, "expose-event",
G_CALLBACK (gimp_chain_button_draw_lines),
button);
} }
static GObject * static GObject *
@ -150,8 +141,10 @@ gimp_chain_button_constructor (GType type,
button = GIMP_CHAIN_BUTTON (object); button = GIMP_CHAIN_BUTTON (object);
button->line1 = gimp_chain_line_new (button->position, 1);
button->line2 = gimp_chain_line_new (button->position, -1);
gimp_chain_button_update_image (button); gimp_chain_button_update_image (button);
gtk_widget_show (button->image);
if (button->position & GIMP_CHAIN_LEFT) /* are we a vertical chainbutton? */ if (button->position & GIMP_CHAIN_LEFT) /* are we a vertical chainbutton? */
{ {
@ -296,103 +289,6 @@ gimp_chain_button_clicked_callback (GtkWidget *widget,
g_signal_emit (button, gimp_chain_button_signals[TOGGLED], 0); g_signal_emit (button, gimp_chain_button_signals[TOGGLED], 0);
} }
static gboolean
gimp_chain_button_draw_lines (GtkWidget *widget,
GdkEventExpose *eevent,
GimpChainButton *button)
{
GdkPoint points[3];
GdkPoint buf;
GtkShadowType shadow;
GimpChainPosition position;
gint which_line;
#define SHORT_LINE 4
/* don't set this too high, there's no check against drawing outside
the widgets bounds yet (and probably never will be) */
g_return_val_if_fail (GIMP_IS_CHAIN_BUTTON (button), FALSE);
points[0].x = widget->allocation.width / 2;
points[0].y = widget->allocation.height / 2;
which_line = (widget == button->line1) ? 1 : -1;
position = button->position;
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
switch (position)
{
case GIMP_CHAIN_LEFT:
position = GIMP_CHAIN_RIGHT;
break;
case GIMP_CHAIN_RIGHT:
position = GIMP_CHAIN_LEFT;
break;
default:
break;
}
switch (position)
{
case GIMP_CHAIN_LEFT:
points[0].x += SHORT_LINE;
points[1].x = points[0].x - SHORT_LINE;
points[1].y = points[0].y;
points[2].x = points[1].x;
points[2].y = (which_line == 1) ? widget->allocation.height - 1 : 0;
shadow = GTK_SHADOW_ETCHED_IN;
break;
case GIMP_CHAIN_RIGHT:
points[0].x -= SHORT_LINE;
points[1].x = points[0].x + SHORT_LINE;
points[1].y = points[0].y;
points[2].x = points[1].x;
points[2].y = (which_line == 1) ? widget->allocation.height - 1 : 0;
shadow = GTK_SHADOW_ETCHED_OUT;
break;
case GIMP_CHAIN_TOP:
points[0].y += SHORT_LINE;
points[1].x = points[0].x;
points[1].y = points[0].y - SHORT_LINE;
points[2].x = (which_line == 1) ? widget->allocation.width - 1 : 0;
points[2].y = points[1].y;
shadow = GTK_SHADOW_ETCHED_OUT;
break;
case GIMP_CHAIN_BOTTOM:
points[0].y -= SHORT_LINE;
points[1].x = points[0].x;
points[1].y = points[0].y + SHORT_LINE;
points[2].x = (which_line == 1) ? widget->allocation.width - 1 : 0;
points[2].y = points[1].y;
shadow = GTK_SHADOW_ETCHED_IN;
break;
default:
return FALSE;
}
if ( ((shadow == GTK_SHADOW_ETCHED_OUT) && (which_line == -1)) ||
((shadow == GTK_SHADOW_ETCHED_IN) && (which_line == 1)) )
{
buf = points[0];
points[0] = points[2];
points[2] = buf;
}
gtk_paint_polygon (widget->style,
widget->window,
GTK_STATE_NORMAL,
shadow,
&eevent->area,
widget,
"chainbutton",
points,
3,
FALSE);
return TRUE;
}
static void static void
gimp_chain_button_update_image (GimpChainButton *button) gimp_chain_button_update_image (GimpChainButton *button)
{ {
@ -404,3 +300,156 @@ gimp_chain_button_update_image (GimpChainButton *button)
gimp_chain_stock_items[i], gimp_chain_stock_items[i],
GTK_ICON_SIZE_BUTTON); GTK_ICON_SIZE_BUTTON);
} }
/* GimpChainLine is a simple no-window widget for drawing the lines.
*
* Originally this used to be a GtkDrawingArea but this turned out to
* be a bad idea. We don't need an extra window to draw on and we also
* don't need any input events.
*/
static GType gimp_chain_line_get_type (void) G_GNUC_CONST;
static gboolean gimp_chain_line_expose_event (GtkWidget *widget,
GdkEventExpose *event);
struct _GimpChainLine
{
GtkWidget parent_instance;
GimpChainPosition position;
gint which;
};
typedef struct _GimpChainLine GimpChainLine;
typedef GtkWidgetClass GimpChainLineClass;
G_DEFINE_TYPE (GimpChainLine, gimp_chain_line, GTK_TYPE_WIDGET)
static void
gimp_chain_line_class_init (GimpChainLineClass *klass)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
widget_class->expose_event = gimp_chain_line_expose_event;
}
static void
gimp_chain_line_init (GimpChainLine *line)
{
GTK_WIDGET_SET_FLAGS (line, GTK_NO_WINDOW);
}
static GtkWidget *
gimp_chain_line_new (GimpChainPosition position,
gint which)
{
GimpChainLine *line = g_object_new (gimp_chain_line_get_type (), NULL);
line->position = position;
line->which = which;
return GTK_WIDGET (line);
}
static gboolean
gimp_chain_line_expose_event (GtkWidget *widget,
GdkEventExpose *event)
{
GimpChainLine *line = ((GimpChainLine *) widget);
GdkPoint points[3];
GdkPoint buf;
GtkShadowType shadow;
GimpChainPosition position;
#define SHORT_LINE 4
points[0].x = widget->allocation.x + widget->allocation.width / 2;
points[0].y = widget->allocation.y + widget->allocation.height / 2;
position = line->position;
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
{
switch (position)
{
case GIMP_CHAIN_TOP:
case GIMP_CHAIN_BOTTOM:
break;
case GIMP_CHAIN_LEFT:
position = GIMP_CHAIN_RIGHT;
break;
case GIMP_CHAIN_RIGHT:
position = GIMP_CHAIN_LEFT;
break;
}
}
switch (position)
{
case GIMP_CHAIN_LEFT:
points[0].x += SHORT_LINE;
points[1].x = points[0].x - SHORT_LINE;
points[1].y = points[0].y;
points[2].x = points[1].x;
points[2].y = (line->which == 1 ?
widget->allocation.y + widget->allocation.height - 1 :
widget->allocation.y);
shadow = GTK_SHADOW_ETCHED_IN;
break;
case GIMP_CHAIN_RIGHT:
points[0].x -= SHORT_LINE;
points[1].x = points[0].x + SHORT_LINE;
points[1].y = points[0].y;
points[2].x = points[1].x;
points[2].y = (line->which == 1 ?
widget->allocation.y + widget->allocation.height - 1 :
widget->allocation.y);
shadow = GTK_SHADOW_ETCHED_OUT;
break;
case GIMP_CHAIN_TOP:
points[0].y += SHORT_LINE;
points[1].x = points[0].x;
points[1].y = points[0].y - SHORT_LINE;
points[2].x = (line->which == 1 ?
widget->allocation.x + widget->allocation.width - 1 :
widget->allocation.x);
points[2].y = points[1].y;
shadow = GTK_SHADOW_ETCHED_OUT;
break;
case GIMP_CHAIN_BOTTOM:
points[0].y -= SHORT_LINE;
points[1].x = points[0].x;
points[1].y = points[0].y + SHORT_LINE;
points[2].x = (line->which == 1 ?
widget->allocation.x + widget->allocation.width - 1 :
widget->allocation.x);
points[2].y = points[1].y;
shadow = GTK_SHADOW_ETCHED_IN;
break;
default:
return FALSE;
}
if ( ((shadow == GTK_SHADOW_ETCHED_OUT) && (line->which == -1)) ||
((shadow == GTK_SHADOW_ETCHED_IN) && (line->which == 1)) )
{
buf = points[0];
points[0] = points[2];
points[2] = buf;
}
gtk_paint_polygon (widget->style, widget->window, GTK_STATE_NORMAL,
shadow,
&event->area,
widget,
"chainbutton",
points, 3,
FALSE);
return TRUE;
}

View File

@ -216,39 +216,48 @@ gimp_color_hex_entry_events (GtkWidget *widget,
GdkEvent *event) GdkEvent *event)
{ {
GimpColorHexEntry *entry = GIMP_COLOR_HEX_ENTRY (widget); GimpColorHexEntry *entry = GIMP_COLOR_HEX_ENTRY (widget);
const gchar *text;
gchar buffer[8];
guchar r, g, b;
switch (event->type) switch (event->type)
{ {
case GDK_KEY_PRESS: case GDK_KEY_PRESS:
if (((GdkEventKey *) event)->keyval != GDK_Return) {
break; GdkEventKey *kevent = (GdkEventKey *) event;
/* else fall through */
if (kevent->keyval != GDK_Return &&
kevent->keyval != GDK_KP_Enter &&
kevent->keyval != GDK_ISO_Enter)
break;
/* else fall through */
}
case GDK_FOCUS_CHANGE: case GDK_FOCUS_CHANGE:
text = gtk_entry_get_text (GTK_ENTRY (widget)); {
const gchar *text;
gchar buffer[8];
guchar r, g, b;
gimp_rgb_get_uchar (&entry->color, &r, &g, &b); text = gtk_entry_get_text (GTK_ENTRY (widget));
g_snprintf (buffer, sizeof (buffer), "%.2x%.2x%.2x", r, g, b);
if (g_ascii_strcasecmp (buffer, text) != 0) gimp_rgb_get_uchar (&entry->color, &r, &g, &b);
{ g_snprintf (buffer, sizeof (buffer), "%.2x%.2x%.2x", r, g, b);
GimpRGB color;
gsize len = strlen (text);
if (len > 0 && if (g_ascii_strcasecmp (buffer, text) != 0)
(gimp_rgb_parse_hex (&color, text, len) || {
gimp_rgb_parse_name (&color, text, -1))) GimpRGB color;
{ gsize len = strlen (text);
gimp_color_hex_entry_set_color (entry, &color);
} if (len > 0 &&
else (gimp_rgb_parse_hex (&color, text, len) ||
{ gimp_rgb_parse_name (&color, text, -1)))
gtk_entry_set_text (GTK_ENTRY (entry), buffer); {
} gimp_color_hex_entry_set_color (entry, &color);
} }
else
{
gtk_entry_set_text (GTK_ENTRY (entry), buffer);
}
}
}
break; break;
default: default:

View File

@ -818,7 +818,9 @@ gimp_number_pair_entry_events (GtkWidget *widget,
{ {
GdkEventKey *kevent = (GdkEventKey *) event; GdkEventKey *kevent = (GdkEventKey *) event;
if (kevent->keyval != GDK_Return) if (kevent->keyval != GDK_Return &&
kevent->keyval != GDK_KP_Enter &&
kevent->keyval != GDK_ISO_Enter)
break; break;
/* If parsing was done due to widgets focus being lost, we only change /* If parsing was done due to widgets focus being lost, we only change

View File

@ -1374,15 +1374,13 @@ strucpi (GimpDrawable *drawable,
* faster, since fewer pixels need to be operated on). * faster, since fewer pixels need to be operated on).
*/ */
if (! gimp_drawable_mask_intersect (drawable->drawable_id, if (! gimp_drawable_mask_intersect (drawable->drawable_id,
&x1, &y1, &x2, &y2)) &x1, &y1, &width, &height))
return; return;
/* Get the size of the input image. (This will/must be the same x2 = x1 + width;
* as the size of the output image. y2 = y1 + height;
*/
width = x2 - x1;
height = y2 - y1;
} }
bytes = drawable->bpp; bytes = drawable->bpp;
/* allocate row buffers */ /* allocate row buffers */

View File

@ -257,14 +257,15 @@ run (const gchar *name,
has_alpha = gimp_drawable_has_alpha (tileitdrawable->drawable_id); has_alpha = gimp_drawable_has_alpha (tileitdrawable->drawable_id);
if (! gimp_drawable_mask_intersect (drawable->drawable_id, if (! gimp_drawable_mask_intersect (drawable->drawable_id,
&sel_x1, &sel_y1, &sel_x2, &sel_y2)) &sel_x1, &sel_y1,
&sel_width, &sel_height))
{ {
g_message (_("Region selected for filter is empty.")); g_message (_("Region selected for filter is empty."));
return; return;
} }
sel_width = sel_x2 - sel_x1; sel_x2 = sel_x1 + sel_width;
sel_height = sel_y2 - sel_y1; sel_y2 = sel_y1 + sel_height;
/* Calculate preview size */ /* Calculate preview size */

View File

@ -310,18 +310,20 @@ render_blast (GimpDrawable *drawable,
else else
{ {
if (gimp_drawable_mask_intersect (drawable->drawable_id, if (gimp_drawable_mask_intersect (drawable->drawable_id,
&x1, &y1, &x2, &y2)) &x1, &y1, &width, &height))
{ {
gimp_progress_init (_("Rendering blast")); gimp_progress_init (_("Rendering blast"));
width = x2 - x1; x2 = x1 + width;
height = y2 - y1; y2 = y1 + height;
gimp_pixel_rgn_init (&dest_region, drawable, gimp_pixel_rgn_init (&dest_region, drawable,
x1, y1, width, height, TRUE, TRUE); x1, y1, width, height, TRUE, TRUE);
} }
else else
return; {
return;
}
} }
gimp_pixel_rgn_init (&src_region, drawable, gimp_pixel_rgn_init (&src_region, drawable,
@ -356,7 +358,9 @@ render_blast (GimpDrawable *drawable,
else else
{ {
gimp_pixel_rgn_set_row (&dest_region, buffer, x1, row, width); gimp_pixel_rgn_set_row (&dest_region, buffer, x1, row, width);
gimp_progress_update ((double) (row - y1)/ (double) (height));
if (row % 8 == 0)
gimp_progress_update ((double) (row - y1)/ (double) (height));
} }
if (marker) if (marker)
@ -437,18 +441,21 @@ render_wind (GimpDrawable *drawable,
} }
else else
{ {
if (gimp_drawable_mask_intersect (drawable->drawable_id, &x1, &y1, &x2, &y2)) if (gimp_drawable_mask_intersect (drawable->drawable_id,
&x1, &y1, &width, &height))
{ {
gimp_progress_init (_("Rendering wind")); gimp_progress_init (_("Rendering wind"));
width = x2 - x1; x2 = x1 + width;
height = y2 - y1; y2 = y1 + height;
gimp_pixel_rgn_init (&dest_region, drawable, gimp_pixel_rgn_init (&dest_region, drawable,
x1, y1, width, height, TRUE, TRUE); x1, y1, width, height, TRUE, TRUE);
} }
else else
return; {
return;
}
} }
gimp_pixel_rgn_init (&src_region, drawable, gimp_pixel_rgn_init (&src_region, drawable,
@ -478,7 +485,9 @@ render_wind (GimpDrawable *drawable,
else else
{ {
gimp_pixel_rgn_set_row (&dest_region, sb, x1, row, width); gimp_pixel_rgn_set_row (&dest_region, sb, x1, row, width);
gimp_progress_update ((double) (row - y1)/ (double) (height));
if (row % 8 == 0)
gimp_progress_update ((double) (row - y1)/ (double) (height));
} }
} }

View File

@ -152,13 +152,13 @@ jpeg_setup_exif_for_save (ExifData *exif_data,
} }
/* set the width and height */ /* set the width and height */
if ((entry = exif_content_get_entry (exif_data->ifd[EXIF_IFD_0], if ((entry = exif_content_get_entry (exif_data->ifd[EXIF_IFD_EXIF],
EXIF_TAG_PIXEL_X_DIMENSION))) EXIF_TAG_PIXEL_X_DIMENSION)))
{ {
exif_set_long (entry->data, byte_order, exif_set_long (entry->data, byte_order,
(ExifLong) gimp_image_width (image_ID)); (ExifLong) gimp_image_width (image_ID));
} }
if ((entry = exif_content_get_entry (exif_data->ifd[EXIF_IFD_0], if ((entry = exif_content_get_entry (exif_data->ifd[EXIF_IFD_EXIF],
EXIF_TAG_PIXEL_Y_DIMENSION))) EXIF_TAG_PIXEL_Y_DIMENSION)))
{ {
exif_set_long (entry->data, byte_order, exif_set_long (entry->data, byte_order,

View File

@ -49,4 +49,6 @@ print_SOURCES = \
print-preview.c \ print-preview.c \
print-preview.h \ print-preview.h \
print-settings.c \ print-settings.c \
print-settings.h print-settings.h \
print-utils.c \
print-utils.h

View File

@ -27,139 +27,179 @@
#include "libgimp/stdplugins-intl.h" #include "libgimp/stdplugins-intl.h"
#define EPSILON 0.0001 static cairo_surface_t * print_cairo_surface_from_drawable (gint32 drawable_ID);
#define INT_MULT(a,b,t) ((t) = (a) * (b) + 0x80, ((((t) >> 8) + (t)) >> 8)) static inline void convert_from_gray (const guchar *src,
#define INT_BLEND(a,b,alpha,tmp) (INT_MULT((a) - (b), alpha, tmp) + (b)) guchar *dest,
gint pixels);
static inline void convert_from_graya (const guchar *src,
static void convert_from_rgb (guchar *pixels, guchar *dest,
gint width); gint pixels);
static void convert_from_rgba (guchar *pixels, static inline void convert_from_rgb (const guchar *src,
gint width); guchar *dest,
gint pixels);
static inline void convert_from_rgba (const guchar *src,
guchar *dest,
gint pixels);
gboolean gboolean
draw_page_cairo (GtkPrintContext *context, print_draw_page (GtkPrintContext *context,
PrintData *data) PrintData *data)
{ {
GimpDrawable *drawable = gimp_drawable_get (data->drawable_id);
GimpPixelRgn region;
cairo_t *cr; cairo_t *cr;
cairo_surface_t *surface; cairo_surface_t *surface;
guchar *pixels;
gdouble cr_width; gdouble cr_width;
gdouble cr_height; gdouble cr_height;
gdouble cr_dpi_x; gdouble cr_dpi_x;
gdouble cr_dpi_y; gdouble cr_dpi_y;
gint width;
gint height;
gint stride;
gint y;
gdouble scale_x;
gdouble scale_y;
width = drawable->width;
height = drawable->height;
gimp_tile_cache_ntiles (width / gimp_tile_width () + 1);
cr = gtk_print_context_get_cairo_context (context); cr = gtk_print_context_get_cairo_context (context);
surface = print_cairo_surface_from_drawable (data->drawable_id);
cr_width = gtk_print_context_get_width (context); cr_width = gtk_print_context_get_width (context);
cr_height = gtk_print_context_get_height (context); cr_height = gtk_print_context_get_height (context);
cr_dpi_x = gtk_print_context_get_dpi_x (context); cr_dpi_x = gtk_print_context_get_dpi_x (context);
cr_dpi_y = gtk_print_context_get_dpi_y (context); cr_dpi_y = gtk_print_context_get_dpi_y (context);
scale_x = cr_dpi_x / data->xres;
scale_y = cr_dpi_y / data->yres;
cairo_translate (cr, cairo_translate (cr,
data->offset_x / cr_dpi_x * 72.0, data->offset_x / cr_dpi_x * 72.0,
data->offset_y / cr_dpi_y * 72.0); data->offset_y / cr_dpi_y * 72.0);
cairo_scale (cr, scale_x, scale_y); cairo_scale (cr,
cr_dpi_x / data->xres, cr_dpi_y / data->yres);
gimp_pixel_rgn_init (&region, drawable, 0, 0, width, height, FALSE, FALSE);
surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, height);
pixels = cairo_image_surface_get_data (surface);
stride = cairo_image_surface_get_stride (surface);
for (y = 0; y < height; y++, pixels += stride)
{
gimp_pixel_rgn_get_row (&region, pixels, 0, y, width);
switch (drawable->bpp)
{
case 3:
convert_from_rgb (pixels, width);
break;
case 4:
convert_from_rgba (pixels, width);
break;
}
if (y % 16 == 0)
gimp_progress_update ((gdouble) y / (gdouble) height);
}
cairo_rectangle (cr,
0, 0,
cairo_image_surface_get_width (surface),
cairo_image_surface_get_height (surface));
cairo_set_source_surface (cr, surface, 0, 0); cairo_set_source_surface (cr, surface, 0, 0);
cairo_rectangle (cr, 0, 0, width, height);
cairo_fill (cr); cairo_fill (cr);
cairo_surface_destroy (surface); cairo_surface_destroy (surface);
gimp_progress_update (1.0);
gimp_drawable_detach (drawable);
return TRUE; return TRUE;
} }
static void static cairo_surface_t *
convert_from_rgb (guchar *pixels, print_cairo_surface_from_drawable (gint32 drawable_ID)
gint width)
{ {
guint32 *cairo_data = (guint32 *) pixels; GimpDrawable *drawable = gimp_drawable_get (drawable_ID);
guchar *p; GimpPixelRgn region;
gint i; cairo_surface_t *surface;
const gint width = drawable->width;
const gint height = drawable->height;
guchar *pixels;
gint stride;
guint count = 0;
guint done = 0;
gpointer pr;
for (i = width - 1, p = pixels + 3 * width - 1; i >= 0; i--) surface = cairo_image_surface_create (gimp_drawable_has_alpha (drawable_ID) ?
CAIRO_FORMAT_ARGB32 :
CAIRO_FORMAT_RGB24,
width, height);
pixels = cairo_image_surface_get_data (surface);
stride = cairo_image_surface_get_stride (surface);
gimp_pixel_rgn_init (&region, drawable, 0, 0, width, height, FALSE, FALSE);
for (pr = gimp_pixel_rgns_register (1, &region);
pr != NULL;
pr = gimp_pixel_rgns_process (pr))
{ {
guint32 b = *p--; const guchar *src = region.data;
guint32 g = *p--; guchar *dest = pixels + region.y * stride + region.x * 4;
guint32 r = *p--; gint y;
cairo_data[i] = 0xFF000000 | (r << 16) | (g << 8) | b; for (y = 0; y < region.h; y++)
}
}
static void
convert_from_rgba (guchar *pixels,
gint width)
{
guint32 *cairo_data = (guint32 *) pixels;
guchar *p;
gint i;
for (i = 0, p = pixels; i < width; i++)
{
guint32 r = *p++;
guint32 g = *p++;
guint32 b = *p++;
guint32 a = *p++;
if (a != 255)
{ {
guint32 tmp; switch (region.bpp)
{
case 1:
convert_from_gray (src, dest, region.w);
break;
/* composite on a white background */ case 2:
convert_from_graya (src, dest, region.w);
break;
r = INT_BLEND (r, 255, a, tmp); case 3:
g = INT_BLEND (g, 255, a, tmp); convert_from_rgb (src, dest, region.w);
b = INT_BLEND (b, 255, a, tmp); break;
case 4:
convert_from_rgba (src, dest, region.w);
break;
}
src += region.rowstride;
dest += stride;
} }
cairo_data[i] = 0xFF000000 | (r << 16) | (g << 8) | b; done += region.h * region.w;
if (count++ % 16 == 0)
gimp_progress_update ((gdouble) done / (width * height));
}
gimp_drawable_detach (drawable);
return surface;
}
static inline void
convert_from_gray (const guchar *src,
guchar *dest,
gint pixels)
{
while (pixels--)
{
GIMP_CAIRO_RGB24_SET_PIXEL (dest, src[0], src[0], src[0]);
src += 1;
dest += 4;
}
}
static inline void
convert_from_graya (const guchar *src,
guchar *dest,
gint pixels)
{
while (pixels--)
{
GIMP_CAIRO_ARGB32_SET_PIXEL (dest, src[0], src[0], src[0], src[1]);
src += 2;
dest += 4;
}
}
static inline void
convert_from_rgb (const guchar *src,
guchar *dest,
gint pixels)
{
while (pixels--)
{
GIMP_CAIRO_RGB24_SET_PIXEL (dest, src[0], src[1], src[2]);
src += 3;
dest += 4;
}
}
static inline void
convert_from_rgba (const guchar *src,
guchar *dest,
gint pixels)
{
while (pixels--)
{
GIMP_CAIRO_ARGB32_SET_PIXEL (dest, src[0], src[1], src[2], src[3]);
src += 4;
dest += 4;
} }
} }

View File

@ -16,5 +16,5 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
gboolean draw_page_cairo (GtkPrintContext *context, gboolean print_draw_page (GtkPrintContext *context,
PrintData *data); PrintData *data);

View File

@ -58,7 +58,7 @@ enum
}; };
static void print_page_setup_notify (GtkPrintOperation *operation); static void print_page_setup_notify (GtkPrintOperation *operation);
static GtkWidget * print_size_frame (PrintData *data, static GtkWidget * print_size_frame (PrintData *data,
GtkSizeGroup *label_group, GtkSizeGroup *label_group,
@ -94,15 +94,12 @@ static PrintSizeInfo info;
GtkWidget * GtkWidget *
print_page_layout_gui (PrintData *data) print_page_layout_gui (PrintData *data,
const gchar *help_id)
{ {
GtkWidget *layout;
GtkWidget *main_hbox; GtkWidget *main_hbox;
GtkWidget *main_vbox; GtkWidget *main_vbox;
GtkWidget *hbox;
GtkWidget *vbox;
GtkWidget *button; GtkWidget *button;
GtkWidget *label;
GtkWidget *frame; GtkWidget *frame;
GtkPageSetup *setup; GtkPageSetup *setup;
GtkSizeGroup *label_group; GtkSizeGroup *label_group;
@ -121,43 +118,15 @@ print_page_layout_gui (PrintData *data)
gtk_print_operation_set_default_page_setup (data->operation, setup); gtk_print_operation_set_default_page_setup (data->operation, setup);
} }
layout = gtk_vbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (layout), 12);
hbox = gtk_hbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (layout), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
/* label for the printable area */
label = gtk_label_new (_("Printable area:"));
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
label = gtk_label_new (NULL);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gimp_label_set_attributes (GTK_LABEL (label),
PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC,
-1);
info.area_label = label;
gtk_box_pack_start (GTK_BOX (hbox), info.area_label, TRUE, TRUE, 0);
gtk_widget_show (info.area_label);
/* main hbox */ /* main hbox */
main_hbox = gtk_hbox_new (FALSE, 12); main_hbox = gtk_hbox_new (FALSE, 12);
gtk_box_pack_start (GTK_BOX (layout), main_hbox, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (main_hbox), 12);
gtk_widget_show (main_hbox);
/* main vbox */ /* main vbox */
main_vbox = gtk_vbox_new (FALSE, 12); main_vbox = gtk_vbox_new (FALSE, 12);
gtk_box_pack_start (GTK_BOX (main_hbox), main_vbox, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (main_hbox), main_vbox, FALSE, FALSE, 0);
gtk_widget_show (main_vbox); gtk_widget_show (main_vbox);
vbox = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (main_vbox), vbox, FALSE, FALSE, 0);
gtk_widget_show (vbox);
label_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); label_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
entry_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); entry_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
@ -186,10 +155,15 @@ print_page_layout_gui (PrintData *data)
NULL); NULL);
gtk_widget_show (button); gtk_widget_show (button);
info.preview = gimp_print_preview_new (setup, data->drawable_id); /* preview */
gimp_print_preview_set_use_full_page (GIMP_PRINT_PREVIEW(info.preview), frame = gimp_frame_new (_("Preview"));
data->use_full_page); gtk_box_pack_start (GTK_BOX (main_hbox), frame, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (main_hbox), info.preview, TRUE, TRUE, 0); gtk_widget_show (frame);
info.preview = print_preview_new (setup, data->drawable_id);
print_preview_set_use_full_page (PRINT_PREVIEW (info.preview),
data->use_full_page);
gtk_container_add (GTK_CONTAINER (frame), info.preview);
gtk_widget_show (info.preview); gtk_widget_show (info.preview);
g_signal_connect (info.preview, "offsets-changed", g_signal_connect (info.preview, "offsets-changed",
@ -200,13 +174,13 @@ print_page_layout_gui (PrintData *data)
g_signal_connect_object (data->operation, "notify::default-page-setup", g_signal_connect_object (data->operation, "notify::default-page-setup",
G_CALLBACK (print_page_setup_notify), G_CALLBACK (print_page_setup_notify),
layout, 0); main_hbox, 0);
return layout; gimp_help_connect (main_hbox, gimp_standard_help_func, help_id, NULL);
return main_hbox;
} }
#define SB_WIDTH 8
static void static void
print_page_setup_notify (GtkPrintOperation *operation) print_page_setup_notify (GtkPrintOperation *operation)
{ {
@ -214,13 +188,13 @@ print_page_setup_notify (GtkPrintOperation *operation)
setup = gtk_print_operation_get_default_page_setup (operation); setup = gtk_print_operation_get_default_page_setup (operation);
gimp_print_preview_set_page_setup (GIMP_PRINT_PREVIEW (info.preview),
setup);
print_size_info_set_page_setup (&info); print_size_info_set_page_setup (&info);
print_preview_set_page_setup (PRINT_PREVIEW (info.preview), setup);
} }
#define SB_WIDTH 8
static GtkWidget * static GtkWidget *
print_size_frame (PrintData *data, print_size_frame (PrintData *data,
GtkSizeGroup *label_group, GtkSizeGroup *label_group,
@ -639,9 +613,9 @@ print_size_info_center_changed (GtkWidget *combo)
print_size_info_update_offsets (); print_size_info_update_offsets ();
if (info.preview) if (info.preview)
gimp_print_preview_set_image_offsets (GIMP_PRINT_PREVIEW (info.preview), print_preview_set_image_offsets (PRINT_PREVIEW (info.preview),
info.data->offset_x, info.data->offset_x,
info.data->offset_y); info.data->offset_y);
} }
} }
@ -704,9 +678,9 @@ print_size_info_size_changed (GtkWidget *widget)
info.data->offset_x = gimp_size_entry_get_refval (info.size_entry, LEFT); info.data->offset_x = gimp_size_entry_get_refval (info.size_entry, LEFT);
info.data->offset_y = gimp_size_entry_get_refval (info.size_entry, TOP); info.data->offset_y = gimp_size_entry_get_refval (info.size_entry, TOP);
gimp_print_preview_set_image_offsets (GIMP_PRINT_PREVIEW (info.preview), print_preview_set_image_offsets (PRINT_PREVIEW (info.preview),
info.data->offset_x, info.data->offset_x,
info.data->offset_y); info.data->offset_y);
} }
static void static void
@ -747,8 +721,7 @@ print_size_info_use_full_page_toggled (GtkWidget *widget)
print_size_info_set_page_setup (&info); print_size_info_set_page_setup (&info);
gimp_print_preview_set_use_full_page (GIMP_PRINT_PREVIEW(info.preview), print_preview_set_use_full_page (PRINT_PREVIEW(info.preview), active);
active);
} }
static void static void
@ -820,12 +793,12 @@ print_size_info_set_resolution (PrintSizeInfo *info,
print_size_info_update_offsets (); print_size_info_update_offsets ();
gimp_print_preview_set_image_dpi (GIMP_PRINT_PREVIEW (info->preview), print_preview_set_image_dpi (PRINT_PREVIEW (info->preview),
data->xres, data->yres); data->xres, data->yres);
gimp_print_preview_set_image_offsets (GIMP_PRINT_PREVIEW (info->preview), print_preview_set_image_offsets (PRINT_PREVIEW (info->preview),
data->offset_x, data->offset_y); data->offset_x, data->offset_y);
gimp_print_preview_set_image_offsets_max (GIMP_PRINT_PREVIEW (info->preview), print_preview_set_image_offsets_max (PRINT_PREVIEW (info->preview),
offset_x_max, offset_y_max); offset_x_max, offset_y_max);
} }
static void static void
@ -833,8 +806,6 @@ print_size_info_set_page_setup (PrintSizeInfo *info)
{ {
GtkPageSetup *setup; GtkPageSetup *setup;
PrintData *data = info->data; PrintData *data = info->data;
gchar *format;
gchar *text;
gdouble page_width; gdouble page_width;
gdouble page_height; gdouble page_height;
gdouble x; gdouble x;
@ -849,15 +820,21 @@ print_size_info_set_page_setup (PrintSizeInfo *info)
page_width *= gimp_unit_get_factor (data->unit); page_width *= gimp_unit_get_factor (data->unit);
page_height *= gimp_unit_get_factor (data->unit); page_height *= gimp_unit_get_factor (data->unit);
format = g_strdup_printf ("%%.%df x %%.%df %s", if (info->area_label)
gimp_unit_get_digits (data->unit), {
gimp_unit_get_digits (data->unit), gchar *format;
gimp_unit_get_plural (data->unit)); gchar *text;
text = g_strdup_printf (format, page_width, page_height);
g_free (format);
gtk_label_set_text (GTK_LABEL (info->area_label), text); format = g_strdup_printf ("%%.%df x %%.%df %s",
g_free (text); gimp_unit_get_digits (data->unit),
gimp_unit_get_digits (data->unit),
gimp_unit_get_plural (data->unit));
text = g_strdup_printf (format, page_width, page_height);
g_free (format);
gtk_label_set_text (GTK_LABEL (info->area_label), text);
g_free (text);
}
x = page_width; x = page_width;
y = page_height; y = page_height;
@ -870,17 +847,19 @@ print_size_info_set_page_setup (PrintSizeInfo *info)
if (ratio_x < ratio_y) if (ratio_x < ratio_y)
y = (gdouble) info->image_height * ratio_x; y = (gdouble) info->image_height * ratio_x;
else else
x = (gdouble) info->image_width * ratio_y; x = (gdouble) info->image_width * ratio_y;
} }
gimp_size_entry_set_value_boundaries (info->size_entry, WIDTH, 0.0, x); gimp_size_entry_set_value_boundaries (info->size_entry, WIDTH,
gimp_size_entry_set_value_boundaries (info->size_entry, HEIGHT, 0.0, y); page_width / 100.0, x);
gimp_size_entry_set_value_boundaries (info->size_entry, HEIGHT,
page_height / 100.0, y);
print_size_info_get_page_dimensions (info, print_size_info_get_page_dimensions (info,
&page_width, &page_height, &page_width, &page_height,
GTK_UNIT_POINTS); GTK_UNIT_POINTS);
x = (gdouble) info->image_width / page_width * 72.0; x = (gdouble) info->image_width / page_width * 72.0;
y = (gdouble) info->image_height / page_height * 72.0; y = (gdouble) info->image_height / page_height * 72.0;
if (info->chain && gimp_chain_button_get_active (info->chain)) if (info->chain && gimp_chain_button_get_active (info->chain))
@ -894,7 +873,4 @@ print_size_info_set_page_setup (PrintSizeInfo *info)
x, GIMP_MAX_RESOLUTION); x, GIMP_MAX_RESOLUTION);
gimp_size_entry_set_refval_boundaries (info->resolution_entry, 1, gimp_size_entry_set_refval_boundaries (info->resolution_entry, 1,
y, GIMP_MAX_RESOLUTION); y, GIMP_MAX_RESOLUTION);
/* FIXME: is this still needed at all? */
data->orientation = gtk_page_setup_get_orientation (setup);
} }

View File

@ -16,5 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
GtkWidget * print_page_layout_gui (PrintData *data); GtkWidget * print_page_layout_gui (PrintData *data,
const gchar *help_id);

View File

@ -22,6 +22,9 @@
#include <libgimp/gimpui.h> #include <libgimp/gimpui.h>
#include "print-page-setup.h" #include "print-page-setup.h"
#include "print-utils.h"
#define PRINT_PAGE_SETUP_NAME "print-page-setup"
void void
@ -41,49 +44,56 @@ print_page_setup_dialog (GtkPrintOperation *operation)
gtk_print_operation_set_default_page_setup (operation, setup); gtk_print_operation_set_default_page_setup (operation, setup);
} }
gboolean void
print_page_setup_load (GtkPrintOperation *operation, print_page_setup_load (GtkPrintOperation *operation,
gint32 image_ID) gint32 image_ID)
{ {
GtkPageSetup *setup; GKeyFile *key_file;
gchar *filename;
filename = g_build_filename (gimp_directory (), "print-page-setup", NULL); g_return_if_fail (GTK_IS_PRINT_OPERATION (operation));
setup = gtk_page_setup_new_from_file (filename, NULL); key_file = print_utils_key_file_load_from_parasite (image_ID,
PRINT_PAGE_SETUP_NAME);
g_free (filename); if (! key_file)
key_file = print_utils_key_file_load_from_rcfile (PRINT_PAGE_SETUP_NAME);
if (setup) if (key_file)
{ {
gtk_print_operation_set_default_page_setup (operation, setup); GtkPageSetup *setup;
g_object_unref (setup);
return TRUE; setup = gtk_page_setup_new_from_key_file (key_file,
PRINT_PAGE_SETUP_NAME, NULL);
if (setup)
{
gtk_print_operation_set_default_page_setup (operation, setup);
g_object_unref (setup);
}
g_key_file_free (key_file);
} }
return FALSE;
} }
void void
print_page_setup_save (GtkPrintOperation *operation) print_page_setup_save (GtkPrintOperation *operation,
gint32 image_ID)
{ {
GtkPageSetup *setup; GtkPageSetup *setup;
gchar *filename; GKeyFile *key_file;
GError *error = NULL;
g_return_if_fail (GTK_IS_PRINT_OPERATION (operation));
key_file = g_key_file_new ();
setup = gtk_print_operation_get_default_page_setup (operation); setup = gtk_print_operation_get_default_page_setup (operation);
filename = g_build_filename (gimp_directory (), "print-page-setup", NULL); gtk_page_setup_to_key_file (setup, key_file, PRINT_PAGE_SETUP_NAME);
gtk_page_setup_to_file (setup, filename, &error); print_utils_key_file_save_as_parasite (key_file,
image_ID, PRINT_PAGE_SETUP_NAME);
print_utils_key_file_save_as_rcfile (key_file,
PRINT_PAGE_SETUP_NAME);
if (error) g_key_file_free (key_file);
{
g_message ("Error saving page setup as resource file: %s",
error->message);
g_error_free (error);
}
g_free (filename);
} }

View File

@ -17,9 +17,10 @@
*/ */
void print_page_setup_dialog (GtkPrintOperation *operation); void print_page_setup_dialog (GtkPrintOperation *operation);
gboolean print_page_setup_load (GtkPrintOperation *operation, void print_page_setup_load (GtkPrintOperation *operation,
gint32 image_ID); gint32 image_ID);
void print_page_setup_save (GtkPrintOperation *operation); void print_page_setup_save (GtkPrintOperation *operation,
gint32 image_ID);

File diff suppressed because it is too large Load Diff

View File

@ -16,76 +16,46 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#ifndef __GIMP_PRINT_PREVIEW_H__ #ifndef __PRINT_PREVIEW_H__
#define __GIMP_PRINT_PREVIEW_H__ #define __PRINT_PREVIEW_H__
G_BEGIN_DECLS G_BEGIN_DECLS
#define GIMP_TYPE_PRINT_PREVIEW (gimp_print_preview_get_type ()) #define PRINT_TYPE_PREVIEW (print_preview_get_type ())
#define GIMP_PRINT_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PRINT_PREVIEW, GimpPrintPreview)) #define PRINT_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRINT_TYPE_PREVIEW, PrintPreview))
#define GIMP_PRINT_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PRINT_PREVIEW, GimpPrintPreviewClass)) #define PRINT_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRINT_TYPE_PREVIEW, PrintPreviewClass))
#define GIMP_IS_PRINT_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PRINT_PREVIEW)) #define PRINT_IS_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRINT_TYPE_PREVIEW))
#define GIMP_IS_PRINT_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PRINT_PREVIEW)) #define PRINT_IS_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRINT_TYPE_PREVIEW))
#define GIMP_PRINT_PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PRINT_PREVIEW, GimpPrintPreviewClass)) #define PRINT_PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRINT_TYPE_PREVIEW, PrintPreviewClass))
typedef struct _GimpPrintPreview GimpPrintPreview; typedef struct _PrintPreview PrintPreview;
typedef struct _GimpPrintPreviewClass GimpPrintPreviewClass; typedef struct _PrintPreviewClass PrintPreviewClass;
struct _GimpPrintPreview
{
GtkAspectFrame parent_instance;
GtkWidget *area;
GtkPageSetup *page;
GdkPixbuf *pixbuf;
gboolean dragging;
GimpDrawable *drawable;
gdouble image_offset_x;
gdouble image_offset_y;
gdouble image_offset_x_max;
gdouble image_offset_y_max;
gdouble image_xres;
gdouble image_yres;
gboolean use_full_page;
};
struct _GimpPrintPreviewClass
{
GtkAspectFrameClass parent_class;
void (* offsets_changed) (GimpPrintPreview *print_preview,
gint offset_x,
gint offset_y);
};
GType gimp_print_preview_get_type (void) G_GNUC_CONST; GType print_preview_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_print_preview_new (GtkPageSetup *page, GtkWidget * print_preview_new (GtkPageSetup *page,
gint32 drawable_id); gint32 drawable_id);
void gimp_print_preview_set_image_dpi (GimpPrintPreview *preview, void print_preview_set_image_dpi (PrintPreview *preview,
gdouble xres, gdouble xres,
gdouble yres); gdouble yres);
void gimp_print_preview_set_page_setup (GimpPrintPreview *preview, void print_preview_set_page_setup (PrintPreview *preview,
GtkPageSetup *page); GtkPageSetup *page);
void gimp_print_preview_set_image_offsets (GimpPrintPreview *preview, void print_preview_set_image_offsets (PrintPreview *preview,
gdouble offset_x, gdouble offset_x,
gdouble offset_y); gdouble offset_y);
void gimp_print_preview_set_image_offsets_max (GimpPrintPreview *preview, void print_preview_set_image_offsets_max (PrintPreview *preview,
gdouble offset_x_max, gdouble offset_x_max,
gdouble offset_y_max); gdouble offset_y_max);
void gimp_print_preview_set_use_full_page (GimpPrintPreview *preview, void print_preview_set_use_full_page (PrintPreview *preview,
gboolean full_page); gboolean full_page);
G_END_DECLS G_END_DECLS
#endif /* __GIMP_PRINT_PREVIEW_H__ */ #endif /* __PRINT_PREVIEW_H__ */

View File

@ -23,20 +23,18 @@
#include "print.h" #include "print.h"
#include "print-settings.h" #include "print-settings.h"
#include "print-utils.h"
#define PRINT_SETTINGS_MAJOR_VERSION 0 #define PRINT_SETTINGS_MAJOR_VERSION 0
#define PRINT_SETTINGS_MINOR_VERSION 4 #define PRINT_SETTINGS_MINOR_VERSION 4
#define PRINT_SETTINGS_NAME "print-settings"
static GKeyFile * print_settings_key_file_from_settings (PrintData *data); static GKeyFile * print_settings_key_file_from_settings (PrintData *data);
static void save_print_settings_resource_file (GKeyFile *settings_key_file); static void print_settings_add_to_key_file (const gchar *key,
static void save_print_settings_as_parasite (GKeyFile *settings_key_file,
gint32 image_ID);
static void add_print_setting_to_key_file (const gchar *key,
const gchar *value, const gchar *value,
gpointer data); gpointer data);
@ -44,10 +42,10 @@ static GKeyFile * print_settings_key_file_from_resource_file (void);
static GKeyFile * print_settings_key_file_from_parasite (gint32 image_ID); static GKeyFile * print_settings_key_file_from_parasite (gint32 image_ID);
static gboolean load_print_settings_from_key_file (PrintData *data, static gboolean print_settings_load_from_key_file (PrintData *data,
GKeyFile *key_file); GKeyFile *key_file);
static GKeyFile * check_version (GKeyFile *key_file); static gboolean print_settings_check_version (GKeyFile *key_file);
/* /*
* set GtkPrintSettings from the contents of a "print-settings" * set GtkPrintSettings from the contents of a "print-settings"
@ -55,7 +53,7 @@ static GKeyFile * check_version (GKeyFile
* file of the same name * file of the same name
*/ */
gboolean gboolean
load_print_settings (PrintData *data) print_settings_load (PrintData *data)
{ {
GKeyFile *key_file = print_settings_key_file_from_parasite (data->image_id); GKeyFile *key_file = print_settings_key_file_from_parasite (data->image_id);
@ -64,7 +62,7 @@ load_print_settings (PrintData *data)
if (key_file) if (key_file)
{ {
load_print_settings_from_key_file (data, key_file); print_settings_load_from_key_file (data, key_file);
g_key_file_free (key_file); g_key_file_free (key_file);
return TRUE; return TRUE;
} }
@ -77,13 +75,11 @@ load_print_settings (PrintData *data)
* and as an image parasite * and as an image parasite
*/ */
void void
save_print_settings (PrintData *data) print_settings_save (PrintData *data)
{ {
GKeyFile *key_file; GKeyFile *key_file = print_settings_key_file_from_settings (data);
key_file = print_settings_key_file_from_settings (data); print_utils_key_file_save_as_rcfile (key_file, PRINT_SETTINGS_NAME);
save_print_settings_resource_file (key_file);
/* image setup */ /* image setup */
if (gimp_image_is_valid (data->image_id)) if (gimp_image_is_valid (data->image_id))
@ -103,7 +99,9 @@ save_print_settings (PrintData *data)
g_key_file_set_boolean (key_file, "image-setup", g_key_file_set_boolean (key_file, "image-setup",
"use-full-page", data->use_full_page); "use-full-page", data->use_full_page);
save_print_settings_as_parasite (key_file, data->image_id); print_utils_key_file_save_as_parasite (key_file,
data->image_id,
PRINT_SETTINGS_NAME);
} }
g_key_file_free (key_file); g_key_file_free (key_file);
@ -119,8 +117,6 @@ print_settings_key_file_from_settings (PrintData *data)
GtkPrintSettings *settings; GtkPrintSettings *settings;
GKeyFile *key_file = g_key_file_new (); GKeyFile *key_file = g_key_file_new ();
g_key_file_set_list_separator (key_file, '=');
/* put version information into the file */ /* put version information into the file */
g_key_file_set_integer (key_file, "meta", "major-version", g_key_file_set_integer (key_file, "meta", "major-version",
PRINT_SETTINGS_MAJOR_VERSION); PRINT_SETTINGS_MAJOR_VERSION);
@ -129,83 +125,25 @@ print_settings_key_file_from_settings (PrintData *data)
/* save the contents of the GtkPrintSettings for the operation */ /* save the contents of the GtkPrintSettings for the operation */
settings = gtk_print_operation_get_print_settings (operation); settings = gtk_print_operation_get_print_settings (operation);
if (settings) if (settings)
gtk_print_settings_foreach (settings, add_print_setting_to_key_file, gtk_print_settings_foreach (settings,
key_file); print_settings_add_to_key_file, key_file);
return key_file; return key_file;
} }
/*
* create a resource file from a GKeyFile holding the settings
*/
static void
save_print_settings_resource_file (GKeyFile *settings_key_file)
{
gchar *filename;
gchar *contents;
gsize length;
GError *error = NULL;
contents = g_key_file_to_data (settings_key_file, &length, &error);
if (error)
{
g_warning ("Unable to get contents of settings key file: %s",
error->message);
g_error_free (error);
return;
}
filename = g_build_filename (gimp_directory (), "print-settings", NULL);
if (! g_file_set_contents (filename, contents, length, &error))
{
g_warning ("Unable to write print settings to '%s': %s",
gimp_filename_to_utf8 (filename), error->message);
g_error_free (error);
}
g_free (filename);
g_free (contents);
}
/*
* create an image parasite called "print-settings" from a GKeyFile
* holding the print settings
*/
static void
save_print_settings_as_parasite (GKeyFile *settings_key_file,
gint32 image_ID)
{
gchar *contents;
gsize length;
GError *error = NULL;
contents = g_key_file_to_data (settings_key_file, &length, &error);
if (! contents)
{
g_warning ("Unable to get contents of settings key file: %s",
error->message);
g_error_free (error);
return;
}
gimp_image_attach_new_parasite (image_ID, "print-settings",
0, length, contents);
g_free (contents);
}
/* /*
* callback used in gtk_print_settings_foreach loop * callback used in gtk_print_settings_foreach loop
*/ */
static void static void
add_print_setting_to_key_file (const gchar *key, print_settings_add_to_key_file (const gchar *key,
const gchar *value, const gchar *value,
gpointer data) gpointer data)
{ {
GKeyFile *key_file = data; GKeyFile *key_file = data;
g_key_file_set_value (key_file, "print-settings", key, value); g_key_file_set_value (key_file, PRINT_SETTINGS_NAME, key, value);
} }
/* /*
@ -214,22 +152,17 @@ add_print_setting_to_key_file (const gchar *key,
static GKeyFile * static GKeyFile *
print_settings_key_file_from_resource_file (void) print_settings_key_file_from_resource_file (void)
{ {
GKeyFile *key_file = g_key_file_new (); GKeyFile *key_file;
gchar *filename;
g_key_file_set_list_separator (key_file, '='); key_file = print_utils_key_file_load_from_rcfile (PRINT_SETTINGS_NAME);
filename = g_build_filename (gimp_directory (), "print-settings", NULL); if (key_file && ! print_settings_check_version (key_file))
if (! g_key_file_load_from_file (key_file, filename, G_KEY_FILE_NONE, NULL))
{ {
g_key_file_free (key_file); g_key_file_free (key_file);
key_file = NULL; return NULL;
} }
g_free (filename); return key_file;
return check_version (key_file);
} }
/* load information from an image parasite called "print-settings" /* load information from an image parasite called "print-settings"
@ -239,34 +172,22 @@ print_settings_key_file_from_resource_file (void)
static GKeyFile * static GKeyFile *
print_settings_key_file_from_parasite (gint32 image_ID) print_settings_key_file_from_parasite (gint32 image_ID)
{ {
GimpParasite *parasite; GKeyFile *key_file;
GKeyFile *key_file;
parasite = gimp_image_parasite_find (image_ID, "print-settings"); key_file = print_utils_key_file_load_from_parasite (image_ID,
PRINT_SETTINGS_NAME);
if (! parasite) if (key_file && ! print_settings_check_version (key_file))
return NULL;
key_file = g_key_file_new ();
g_key_file_set_list_separator (key_file, '=');
if (! g_key_file_load_from_data (key_file,
gimp_parasite_data (parasite),
gimp_parasite_data_size (parasite),
G_KEY_FILE_NONE, NULL))
{ {
g_key_file_free (key_file); g_key_file_free (key_file);
key_file = NULL;; return FALSE;
} }
gimp_parasite_free (parasite); return key_file;
return check_version (key_file);
} }
static gboolean static gboolean
load_print_settings_from_key_file (PrintData *data, print_settings_load_from_key_file (PrintData *data,
GKeyFile *key_file) GKeyFile *key_file)
{ {
GtkPrintOperation *operation = data->operation; GtkPrintOperation *operation = data->operation;
@ -279,7 +200,7 @@ load_print_settings_from_key_file (PrintData *data,
if (! settings) if (! settings)
settings = gtk_print_settings_new (); settings = gtk_print_settings_new ();
keys = g_key_file_get_keys (key_file, "print-settings", &n_keys, NULL); keys = g_key_file_get_keys (key_file, PRINT_SETTINGS_NAME, &n_keys, NULL);
if (! keys) if (! keys)
return FALSE; return FALSE;
@ -288,7 +209,8 @@ load_print_settings_from_key_file (PrintData *data,
{ {
gchar *value; gchar *value;
value = g_key_file_get_value (key_file, "print-settings", keys[i], NULL); value = g_key_file_get_value (key_file,
PRINT_SETTINGS_NAME, keys[i], NULL);
if (value) if (value)
{ {
@ -340,26 +262,26 @@ load_print_settings_from_key_file (PrintData *data,
return TRUE; return TRUE;
} }
static GKeyFile * static gboolean
check_version (GKeyFile *key_file) print_settings_check_version (GKeyFile *key_file)
{ {
gint major_version; gint major_version;
gint minor_version; gint minor_version;
if (! key_file || ! g_key_file_has_group (key_file, "meta")) if (! g_key_file_has_group (key_file, "meta"))
return NULL; return FALSE;
major_version = g_key_file_get_integer (key_file, major_version = g_key_file_get_integer (key_file,
"meta", "major-version", NULL); "meta", "major-version", NULL);
if (major_version != PRINT_SETTINGS_MAJOR_VERSION) if (major_version != PRINT_SETTINGS_MAJOR_VERSION)
return NULL; return FALSE;
minor_version = g_key_file_get_integer (key_file, minor_version = g_key_file_get_integer (key_file,
"meta", "minor-version", NULL); "meta", "minor-version", NULL);
if (minor_version != PRINT_SETTINGS_MINOR_VERSION) if (minor_version != PRINT_SETTINGS_MINOR_VERSION)
return NULL; return FALSE;
return key_file; return TRUE;
} }

View File

@ -16,5 +16,5 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
gboolean load_print_settings (PrintData *data); gboolean print_settings_load (PrintData *data);
void save_print_settings (PrintData *data); void print_settings_save (PrintData *data);

View File

@ -0,0 +1,142 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* 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 <libgimp/gimp.h>
#include "print-utils.h"
GKeyFile *
print_utils_key_file_load_from_rcfile (const gchar *basename)
{
GKeyFile *key_file;
gchar *filename;
g_return_val_if_fail (basename != NULL, NULL);
filename = g_build_filename (gimp_directory (), basename, NULL);
key_file = g_key_file_new ();
if (! g_key_file_load_from_file (key_file, filename, G_KEY_FILE_NONE, NULL))
{
g_key_file_free (key_file);
key_file = NULL;
}
g_free (filename);
return key_file;
}
GKeyFile *
print_utils_key_file_load_from_parasite (gint32 image_ID,
const gchar *parasite_name)
{
GimpParasite *parasite;
GKeyFile *key_file;
GError *error = NULL;
g_return_val_if_fail (parasite_name != NULL, NULL);
parasite = gimp_image_parasite_find (image_ID, parasite_name);
if (! parasite)
return NULL;
key_file = g_key_file_new ();
if (! g_key_file_load_from_data (key_file,
gimp_parasite_data (parasite),
gimp_parasite_data_size (parasite),
G_KEY_FILE_NONE, &error))
{
g_key_file_free (key_file);
gimp_parasite_free (parasite);
g_warning ("Unable to create key file from image parasite '%s': %s",
parasite_name, error->message);
g_error_free (error);
return NULL;
}
gimp_parasite_free (parasite);
return key_file;
}
void
print_utils_key_file_save_as_rcfile (GKeyFile *key_file,
const gchar *basename)
{
gchar *filename;
gchar *contents;
gsize length;
GError *error = NULL;
g_return_if_fail (basename != NULL);
contents = g_key_file_to_data (key_file, &length, &error);
if (! contents)
{
g_warning ("Unable to get contents of key file for '%s': %s",
basename, error->message);
g_error_free (error);
return;
}
filename = g_build_filename (gimp_directory (), basename, NULL);
if (! g_file_set_contents (filename, contents, length, &error))
{
g_warning ("Unable to write settings to '%s': %s",
gimp_filename_to_utf8 (filename), error->message);
g_error_free (error);
}
g_free (filename);
g_free (contents);
}
void
print_utils_key_file_save_as_parasite (GKeyFile *key_file,
gint32 image_ID,
const gchar *parasite_name)
{
gchar *contents;
gsize length;
GError *error = NULL;
g_return_if_fail (parasite_name != NULL);
contents = g_key_file_to_data (key_file, &length, &error);
if (! contents)
{
g_warning ("Unable to get contents of key file for parasite '%s': %s",
parasite_name, error->message);
g_error_free (error);
return;
}
gimp_image_attach_new_parasite (image_ID, parasite_name, 0, length, contents);
g_free (contents);
}

View File

@ -0,0 +1,27 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* 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.
*/
GKeyFile * print_utils_key_file_load_from_rcfile (const gchar *basename);
GKeyFile * print_utils_key_file_load_from_parasite (gint32 image_ID,
const gchar *parasite_name);
void print_utils_key_file_save_as_rcfile (GKeyFile *key_file,
const gchar *basename);
void print_utils_key_file_save_as_parasite (GKeyFile *key_file,
gint32 image_ID,
const gchar *parasite_name);

View File

@ -128,6 +128,11 @@ query (void)
print_args, NULL); print_args, NULL);
gimp_plugin_menu_register (PAGE_SETUP_PROC_NAME, "<Image>/File/Send"); gimp_plugin_menu_register (PAGE_SETUP_PROC_NAME, "<Image>/File/Send");
#if GTK_CHECK_VERSION(2,13,0)
gimp_plugin_icon_register (PAGE_SETUP_PROC_NAME, GIMP_ICON_TYPE_STOCK_ID,
(const guint8 *) GTK_STOCK_PAGE_SETUP);
#endif
} }
static void static void
@ -194,6 +199,7 @@ print_image (gint32 image_ID,
/* export the image */ /* export the image */
export = gimp_export_image (&image_ID, &drawable_ID, NULL, export = gimp_export_image (&image_ID, &drawable_ID, NULL,
GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_ALPHA); GIMP_EXPORT_CAN_HANDLE_ALPHA);
if (export == GIMP_EXPORT_CANCEL) if (export == GIMP_EXPORT_CANCEL)
@ -219,11 +225,13 @@ print_image (gint32 image_ID,
gimp_image_get_resolution (image_ID, &data.xres, &data.yres); gimp_image_get_resolution (image_ID, &data.xres, &data.yres);
load_print_settings (&data); print_settings_load (&data);
if (export != GIMP_EXPORT_EXPORT) if (export != GIMP_EXPORT_EXPORT)
image_ID = -1; image_ID = -1;
gtk_print_operation_set_unit (operation, GTK_UNIT_POINTS);
g_signal_connect (operation, "begin-print", g_signal_connect (operation, "begin-print",
G_CALLBACK (begin_print), G_CALLBACK (begin_print),
&data); &data);
@ -243,7 +251,7 @@ print_image (gint32 image_ID,
gimp_ui_init (PLUG_IN_BINARY, FALSE); gimp_ui_init (PLUG_IN_BINARY, FALSE);
g_signal_connect_swapped (operation, "end-print", g_signal_connect_swapped (operation, "end-print",
G_CALLBACK (save_print_settings), G_CALLBACK (print_settings_save),
&data); &data);
g_signal_connect (operation, "create-custom-widget", g_signal_connect (operation, "create-custom-widget",
@ -293,7 +301,7 @@ page_setup (gint32 image_ID)
print_page_setup_load (operation, image_ID); print_page_setup_load (operation, image_ID);
print_page_setup_dialog (operation); print_page_setup_dialog (operation);
print_page_setup_save (operation); print_page_setup_save (operation, image_ID);
g_object_unref (operation); g_object_unref (operation);
@ -378,7 +386,7 @@ end_print (GtkPrintOperation *operation,
gimp_progress_end (); gimp_progress_end ();
/* generate events to solve the problems described in bug #466928 */ /* generate events to solve the problems described in bug #466928 */
g_timeout_add (1000, (GSourceFunc) gtk_true, NULL); g_timeout_add_seconds (1, (GSourceFunc) gtk_true, NULL);
} }
static void static void
@ -387,7 +395,9 @@ draw_page (GtkPrintOperation *operation,
gint page_nr, gint page_nr,
PrintData *data) PrintData *data)
{ {
draw_page_cairo (context, data); print_draw_page (context, data);
gimp_progress_update (1.0);
} }
/* /*
@ -398,7 +408,7 @@ static GtkWidget *
create_custom_widget (GtkPrintOperation *operation, create_custom_widget (GtkPrintOperation *operation,
PrintData *data) PrintData *data)
{ {
return print_page_layout_gui (data); return print_page_layout_gui (data, PRINT_PROC_NAME);
} }
static void static void

View File

@ -38,6 +38,5 @@ typedef struct
PrintCenterMode center; PrintCenterMode center;
gboolean use_full_page; gboolean use_full_page;
GtkPrintOperation *operation; GtkPrintOperation *operation;
GtkPageOrientation orientation;
} PrintData; } PrintData;

View File

@ -274,6 +274,34 @@ pygimp_message(PyObject *self, PyObject *args)
return Py_None; return Py_None;
} }
static PyObject *
pygimp_exit(PyObject *self, PyObject *args, PyObject *kwargs)
{
gboolean force = FALSE;
int nreturn_vals;
GimpParam *return_vals;
static char *kwlist[] = { "force", NULL };
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:exit", kwlist, &force))
return NULL;
return_vals = gimp_run_procedure("gimp-quit",
&nreturn_vals,
GIMP_PDB_INT32, force,
GIMP_PDB_END);
if (return_vals[0].data.d_status != GIMP_PDB_SUCCESS) {
PyErr_SetString(pygimp_error, "error while exiting");
return NULL;
}
gimp_destroy_params(return_vals, nreturn_vals);
Py_INCREF(Py_None);
return Py_None;
}
static PyObject * static PyObject *
pygimp_set_data(PyObject *self, PyObject *args) pygimp_set_data(PyObject *self, PyObject *args)
{ {
@ -1659,6 +1687,7 @@ static struct PyMethodDef gimp_methods[] = {
{"main", (PyCFunction)pygimp_main, METH_VARARGS}, {"main", (PyCFunction)pygimp_main, METH_VARARGS},
{"quit", (PyCFunction)pygimp_quit, METH_NOARGS}, {"quit", (PyCFunction)pygimp_quit, METH_NOARGS},
{"message", (PyCFunction)pygimp_message, METH_VARARGS}, {"message", (PyCFunction)pygimp_message, METH_VARARGS},
{"exit", (PyCFunction)pygimp_exit, METH_VARARGS | METH_KEYWORDS},
{"set_data", (PyCFunction)pygimp_set_data, METH_VARARGS}, {"set_data", (PyCFunction)pygimp_set_data, METH_VARARGS},
{"get_data", (PyCFunction)pygimp_get_data, METH_VARARGS}, {"get_data", (PyCFunction)pygimp_get_data, METH_VARARGS},
{"progress_init", (PyCFunction)pygimp_progress_init, METH_VARARGS}, {"progress_init", (PyCFunction)pygimp_progress_init, METH_VARARGS},

View File

@ -564,6 +564,8 @@ script_fu_cc_key_function (GtkWidget *widget,
switch (event->keyval) switch (event->keyval)
{ {
case GDK_Return: case GDK_Return:
case GDK_KP_Enter:
case GDK_ISO_Enter:
if (script_fu_cc_is_empty (console)) if (script_fu_cc_is_empty (console))
return TRUE; return TRUE;

View File

@ -10,7 +10,8 @@
(border (/ size 5)) (border (/ size 5))
(width (+ (car (gimp-drawable-width logo-layer)) border)) (width (+ (car (gimp-drawable-width logo-layer)) border))
(height (+ (car (gimp-drawable-height logo-layer)) border)) (height (+ (car (gimp-drawable-height logo-layer)) border))
(logo-layer-mask (car (gimp-layer-create-mask logo-layer ADD-BLACK-MASK))) (logo-layer-mask (car (gimp-layer-create-mask logo-layer
ADD-BLACK-MASK)))
(sparkle-layer (car (gimp-layer-new img width height RGBA-IMAGE (sparkle-layer (car (gimp-layer-new img width height RGBA-IMAGE
"Sparkle" 100 NORMAL-MODE))) "Sparkle" 100 NORMAL-MODE)))
(matte-layer (car (gimp-layer-new img width height RGBA-IMAGE (matte-layer (car (gimp-layer-new img width height RGBA-IMAGE
@ -30,7 +31,6 @@
(gimp-image-add-layer img matte-layer 3) (gimp-image-add-layer img matte-layer 3)
(gimp-image-add-layer img shadow-layer 4) (gimp-image-add-layer img shadow-layer 4)
(gimp-image-add-layer img bg-layer 5) (gimp-image-add-layer img bg-layer 5)
(gimp-layer-translate logo-layer border border)
(gimp-selection-none img) (gimp-selection-none img)
(gimp-edit-clear sparkle-layer) (gimp-edit-clear sparkle-layer)
(gimp-edit-clear matte-layer) (gimp-edit-clear matte-layer)
@ -59,7 +59,6 @@
(gimp-edit-fill bg-layer BACKGROUND-FILL) (gimp-edit-fill bg-layer BACKGROUND-FILL)
(gimp-context-set-background '(0 0 0)) (gimp-context-set-background '(0 0 0))
(gimp-edit-fill logo-layer BACKGROUND-FILL) (gimp-edit-fill logo-layer BACKGROUND-FILL)
; (gimp-layer-add-mask logo-layer logo-layer-mask)
(gimp-selection-load selection) (gimp-selection-load selection)
(gimp-context-set-background '(255 255 255)) (gimp-context-set-background '(255 255 255))
(gimp-edit-fill logo-layer-mask BACKGROUND-FILL) (gimp-edit-fill logo-layer-mask BACKGROUND-FILL)
@ -78,7 +77,6 @@
(for-each (lambda (the-layer) (for-each (lambda (the-layer)
(gimp-layer-resize the-layer (- width border) (- height border) (gimp-layer-resize the-layer (- width border) (- height border)
(- border) (- border)) (- border) (- border))
; (gimp-layer-translate the-layer border border)
) )
(list sparkle-layer matte-layer bg-layer) (list sparkle-layer matte-layer bg-layer)
) )
@ -88,6 +86,8 @@
(script-fu-util-image-resize-from-layer img logo-layer) (script-fu-util-image-resize-from-layer img logo-layer)
(gimp-layer-translate bg-layer (- 0 border) (- 0 border))
(gimp-context-pop) (gimp-context-pop)
) )
) )
@ -96,9 +96,45 @@
logo-layer logo-layer
size size
bg-color) bg-color)
(begin
(let* (
(position (- (car(gimp-image-get-layer-position img logo-layer)) 1))
(duplicate (car (gimp-layer-new-from-drawable logo-layer img)))
(name (car (gimp-layer-get-name logo-layer)))
(select (cons-array 4 'byte))
(crop 0)
(temp 0)
)
(gimp-image-undo-group-start img) (gimp-image-undo-group-start img)
(apply-frosty-logo-effect img logo-layer size bg-color)
(gimp-selection-layer-alpha logo-layer)
(gimp-image-add-layer img duplicate -1)
(gimp-layer-resize-to-image-size duplicate)
(gimp-selection-none img)
(apply-frosty-logo-effect img duplicate size bg-color)
(set! crop (aref (cadr (gimp-image-get-layers img)) (+ position 6)))
(set! temp (aref (cadr (gimp-image-get-layers img)) (+ position 3)))
(gimp-selection-layer-alpha temp)
(aset select 0 (cadr (gimp-selection-bounds img)))
(aset select 1 (caddr (gimp-selection-bounds img)))
(aset select 2 (cadddr (gimp-selection-bounds img)))
(aset select 3 (cadddr (cdr(gimp-selection-bounds img))))
(gimp-layer-resize crop
(+ 20 (- (aref select 2) (aref select 0)))
(+ 20 (- (aref select 3) (aref select 1)))
(- 0 (+ 0 (aref select 0)))
(- 0 (+ 0 (aref select 1))))
(gimp-layer-resize duplicate
(car (gimp-drawable-width logo-layer))
(car (gimp-drawable-height logo-layer))
(- 0 (car (gimp-drawable-offsets logo-layer)))
(- 0 (cadr (gimp-drawable-offsets logo-layer))))
(gimp-image-remove-layer img logo-layer)
(gimp-layer-set-name duplicate name)
(gimp-selection-none img)
(gimp-image-undo-group-end img) (gimp-image-undo-group-end img)
(gimp-displays-flush) (gimp-displays-flush)
) )

View File

@ -74,7 +74,6 @@
(gimp-context-set-pattern pattern-text) (gimp-context-set-pattern pattern-text)
(gimp-edit-bucket-fill logo-layer (gimp-edit-bucket-fill logo-layer
PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0) PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
(gimp-context-set-pattern old-patterns)
) )
) )
@ -106,7 +105,6 @@
(gimp-edit-bucket-fill grow-me (gimp-edit-bucket-fill grow-me
PATTERN-BUCKET-FILL NORMAL-MODE 100 PATTERN-BUCKET-FILL NORMAL-MODE 100
0 FALSE 0 0) 0 FALSE 0 0)
(gimp-context-set-pattern old-patterns)
) )
) )
@ -124,7 +122,10 @@
(gimp-selection-none img) (gimp-selection-none img)
(plug-in-bump-map RUN-NONINTERACTIVE img grow-me logo-layer (plug-in-bump-map (if (= noninteractive TRUE)
RUN-NONINTERACTIVE
RUN-INTERACTIVE)
img grow-me logo-layer
110.0 45.0 3 0 0 0 0 TRUE FALSE 0) 110.0 45.0 3 0 0 0 0 TRUE FALSE 0)
(gimp-layer-set-mode logo-layer SCREEN-MODE) (gimp-layer-set-mode logo-layer SCREEN-MODE)
@ -134,7 +135,6 @@
(gimp-context-set-pattern pattern-overlay) (gimp-context-set-pattern pattern-overlay)
(gimp-edit-bucket-fill grow-me PATTERN-BUCKET-FILL (gimp-edit-bucket-fill grow-me PATTERN-BUCKET-FILL
OVERLAY-MODE 100 0 FALSE 0 0) OVERLAY-MODE 100 0 FALSE 0 0)
(gimp-context-set-pattern old-patterns)
(gimp-selection-none img) (gimp-selection-none img)
) )
) )

View File

@ -1,3 +1,19 @@
2008-03-03 Vincent van Adrighem <adrighem@gnome.org>
* nl.po: Translation updated by Filip Vervloesem.
2008-02-28 Alexandre Prokoudine <alexandre.prokoudine@gmail.com>
* ru.po: Updated Russian translation.
2008-02-18 Kjartan Maraas <kmaraas@gnome.org>
* nb.po: Updated Norwegian bokmål translation.
2008-02-17 Marco Ciampa <ciampix@libero.it>
* it.po: small fix to it translation thanks to A. Falappa
2008-02-12 Stéphane Raimbault <stephane.raimbault@gmail.com> 2008-02-12 Stéphane Raimbault <stephane.raimbault@gmail.com>
* fr.po: Fixed French translation. * fr.po: Fixed French translation.

View File

@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gimp 2.3\n" "Project-Id-Version: gimp 2.3\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-01-01 01:59+0100\n" "POT-Creation-Date: 2008-02-17 22:11+0100\n"
"PO-Revision-Date: 2008-01-01 02:02+0100\n" "PO-Revision-Date: 2008-02-17 22:11+0100\n"
"Last-Translator: Marco Ciampa <ciampix@libero.it>\n" "Last-Translator: Marco Ciampa <ciampix@libero.it>\n"
"Language-Team: gimp.linux.it\n" "Language-Team: gimp.linux.it\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -25,7 +25,7 @@ msgstr "Selezione pennello"
#: ../libgimp/gimpbrushselectbutton.c:913 #: ../libgimp/gimpbrushselectbutton.c:913
#: ../libgimp/gimppatternselectbutton.c:714 #: ../libgimp/gimppatternselectbutton.c:714
msgid "_Browse..." msgid "_Browse..."
msgstr "_Naviga..." msgstr "_Scorri..."
#: ../libgimp/gimpexport.c:217 ../libgimp/gimpexport.c:253 #: ../libgimp/gimpexport.c:217 ../libgimp/gimpexport.c:253
#, c-format #, c-format
@ -622,7 +622,7 @@ msgstr "Costante"
msgid "Incremental" msgid "Incremental"
msgstr "Incrementale" msgstr "Incrementale"
#: ../libgimpbase/gimpbaseenums.c:624 ../modules/cdisplay_lcms.c:220 #: ../libgimpbase/gimpbaseenums.c:624 ../modules/cdisplay_lcms.c:195
msgid "None" msgid "None"
msgstr "Nessuno" msgstr "Nessuno"
@ -759,8 +759,8 @@ msgid "%d GB"
msgstr "%d GB" msgstr "%d GB"
#: ../libgimpbase/gimputils.c:170 ../libgimpbase/gimputils.c:175 #: ../libgimpbase/gimputils.c:170 ../libgimpbase/gimputils.c:175
#: ../modules/cdisplay_lcms.c:212 ../modules/colorsel_cmyk_lcms.c:408 #: ../modules/cdisplay_lcms.c:187 ../modules/colorsel_cmyk_lcms.c:411
#: ../modules/colorsel_cmyk_lcms.c:414 #: ../modules/colorsel_cmyk_lcms.c:417
msgid "(invalid UTF-8 string)" msgid "(invalid UTF-8 string)"
msgstr "(stringa UTF-8 non valida)" msgstr "(stringa UTF-8 non valida)"
@ -875,8 +875,8 @@ msgstr "valore non valido \"%ld\" per il token %s"
msgid "while parsing token '%s': %s" msgid "while parsing token '%s': %s"
msgstr "durante l'analisi del token \"%s\": %s" msgstr "durante l'analisi del token \"%s\": %s"
#: ../libgimpconfig/gimpconfig-iface.c:454 #: ../libgimpconfig/gimpconfig-iface.c:474
#: ../libgimpconfig/gimpconfig-iface.c:467 ../libgimpconfig/gimpscanner.c:498 #: ../libgimpconfig/gimpconfig-iface.c:487 ../libgimpconfig/gimpscanner.c:498
#: ../libgimpconfig/gimpscanner.c:579 #: ../libgimpconfig/gimpscanner.c:579
#: ../libgimpwidgets/gimpcolorprofilestore.c:654 #: ../libgimpwidgets/gimpcolorprofilestore.c:654
msgid "fatal parse error" msgid "fatal parse error"
@ -1066,7 +1066,7 @@ msgstr "Gigabyte"
#. Count label #. Count label
#: ../libgimpwidgets/gimppageselector.c:269 #: ../libgimpwidgets/gimppageselector.c:269
#: ../libgimpwidgets/gimppageselector.c:1167 #: ../libgimpwidgets/gimppageselector.c:1166
msgid "Nothing selected" msgid "Nothing selected"
msgstr "Selezione nulla" msgstr "Selezione nulla"
@ -1087,17 +1087,17 @@ msgid "Page 000"
msgstr "Pagina 000" msgstr "Pagina 000"
#: ../libgimpwidgets/gimppageselector.c:508 #: ../libgimpwidgets/gimppageselector.c:508
#: ../libgimpwidgets/gimppageselector.c:745 #: ../libgimpwidgets/gimppageselector.c:744
#, c-format #, c-format
msgid "Page %d" msgid "Page %d"
msgstr "Pagina %d" msgstr "Pagina %d"
#: ../libgimpwidgets/gimppageselector.c:1172 #: ../libgimpwidgets/gimppageselector.c:1171
msgid "One page selected" msgid "One page selected"
msgstr "Una pagina selezionata" msgstr "Una pagina selezionata"
#: ../libgimpwidgets/gimppageselector.c:1179 #: ../libgimpwidgets/gimppageselector.c:1178
#: ../libgimpwidgets/gimppageselector.c:1183 #: ../libgimpwidgets/gimppageselector.c:1182
#, c-format #, c-format
msgid "%d page selected" msgid "%d page selected"
msgid_plural "All %d pages selected" msgid_plural "All %d pages selected"
@ -1197,23 +1197,23 @@ msgstr "Spaziatura r_ighe"
msgid "_Resize" msgid "_Resize"
msgstr "_Ridimensiona" msgstr "_Ridimensiona"
#: ../libgimpwidgets/gimpstock.c:191 ../libgimpwidgets/gimpstock.c:319 #: ../libgimpwidgets/gimpstock.c:191 ../libgimpwidgets/gimpstock.c:321
msgid "_Scale" msgid "_Scale"
msgstr "_Scala" msgstr "_Scala"
#: ../libgimpwidgets/gimpstock.c:295 #: ../libgimpwidgets/gimpstock.c:296
msgid "Cr_op" msgid "Cr_op"
msgstr "Rita_glia" msgstr "Rita_glia"
#: ../libgimpwidgets/gimpstock.c:314 #: ../libgimpwidgets/gimpstock.c:315
msgid "_Transform" msgid "_Transform"
msgstr "_Trasforma" msgstr "_Trasforma"
#: ../libgimpwidgets/gimpstock.c:318 #: ../libgimpwidgets/gimpstock.c:320
msgid "_Rotate" msgid "_Rotate"
msgstr "_Ruota" msgstr "_Ruota"
#: ../libgimpwidgets/gimpstock.c:320 #: ../libgimpwidgets/gimpstock.c:322
msgid "_Shear" msgid "_Shear"
msgstr "_Inclina" msgstr "_Inclina"
@ -1233,7 +1233,7 @@ msgstr "Unità"
msgid "Factor" msgid "Factor"
msgstr "Fattore" msgstr "Fattore"
#: ../libgimpwidgets/gimpwidgets.c:1005 #: ../libgimpwidgets/gimpwidgets.c:511
msgid "" msgid ""
"Use this value for random number generator seed - this allows you to repeat " "Use this value for random number generator seed - this allows you to repeat "
"a given \"random\" operation" "a given \"random\" operation"
@ -1242,15 +1242,15 @@ msgstr ""
"permette \n" "permette \n"
"di ripetere una data operazione \"casuale\"" "di ripetere una data operazione \"casuale\""
#: ../libgimpwidgets/gimpwidgets.c:1009 #: ../libgimpwidgets/gimpwidgets.c:515
msgid "_New Seed" msgid "_New Seed"
msgstr "_Nuovo seme" msgstr "_Nuovo seme"
#: ../libgimpwidgets/gimpwidgets.c:1022 #: ../libgimpwidgets/gimpwidgets.c:528
msgid "Seed random number generator with a generated random number" msgid "Seed random number generator with a generated random number"
msgstr "Generatore del seme di casualità con un numero generato casualmente" msgstr "Generatore del seme di casualità con un numero generato casualmente"
#: ../libgimpwidgets/gimpwidgets.c:1026 #: ../libgimpwidgets/gimpwidgets.c:532
msgid "_Randomize" msgid "_Randomize"
msgstr "_Casualizza" msgstr "_Casualizza"
@ -1330,52 +1330,52 @@ msgstr "Deuteranopia (insensibilità al verde)"
msgid "Tritanopia (insensitivity to blue)" msgid "Tritanopia (insensitivity to blue)"
msgstr "Tritanopia (insensibilità al blu)" msgstr "Tritanopia (insensibilità al blu)"
#: ../modules/cdisplay_colorblind.c:200 #: ../modules/cdisplay_colorblind.c:198
msgid "Color deficit simulation filter (Brettel-Vienot-Mollon algorithm)" msgid "Color deficit simulation filter (Brettel-Vienot-Mollon algorithm)"
msgstr "Filtro di simulazione deficit colore (algoritmo Brettel-Vienot-Mollon)" msgstr "Filtro di simulazione deficit colore (algoritmo Brettel-Vienot-Mollon)"
#: ../modules/cdisplay_colorblind.c:292 #: ../modules/cdisplay_colorblind.c:261
msgid "Color Deficient Vision" msgid "Color Deficient Vision"
msgstr "Visione con deficit di colore" msgstr "Visione con deficit di colore"
#: ../modules/cdisplay_colorblind.c:507 #: ../modules/cdisplay_colorblind.c:483
msgid "Color _deficiency type:" msgid "Color _deficiency type:"
msgstr "Tipo di _deficit di colore:" msgstr "Tipo di _deficit di colore:"
#: ../modules/cdisplay_gamma.c:91 #: ../modules/cdisplay_gamma.c:90
msgid "Gamma color display filter" msgid "Gamma color display filter"
msgstr "Filtro di visualizzazione gamma dei colori" msgstr "Filtro di visualizzazione gamma dei colori"
#: ../modules/cdisplay_gamma.c:160 #: ../modules/cdisplay_gamma.c:129
msgid "Gamma" msgid "Gamma"
msgstr "Gamma" msgstr "Gamma"
#: ../modules/cdisplay_gamma.c:253 #: ../modules/cdisplay_gamma.c:232
msgid "_Gamma:" msgid "_Gamma:"
msgstr "_Gamma:" msgstr "_Gamma:"
#: ../modules/cdisplay_highcontrast.c:91 #: ../modules/cdisplay_highcontrast.c:90
msgid "High Contrast color display filter" msgid "High Contrast color display filter"
msgstr "Filtro di visualizzazione colore ad alto contrasto" msgstr "Filtro di visualizzazione colore ad alto contrasto"
#: ../modules/cdisplay_highcontrast.c:160 #: ../modules/cdisplay_highcontrast.c:129
msgid "Contrast" msgid "Contrast"
msgstr "Contrasto" msgstr "Contrasto"
#: ../modules/cdisplay_highcontrast.c:253 #: ../modules/cdisplay_highcontrast.c:232
msgid "Contrast c_ycles:" msgid "Contrast c_ycles:"
msgstr "_Cicli di contrasto:" msgstr "_Cicli di contrasto:"
#: ../modules/cdisplay_lcms.c:107 #: ../modules/cdisplay_lcms.c:106
msgid "Color management display filter using ICC color profiles" msgid "Color management display filter using ICC color profiles"
msgstr "" msgstr ""
"Il filtro di gestione del colore del display usa i profili di colore ICC" "Il filtro di gestione del colore del display usa i profili di colore ICC"
#: ../modules/cdisplay_lcms.c:168 #: ../modules/cdisplay_lcms.c:138
msgid "Color Management" msgid "Color Management"
msgstr "Gestione del colore" msgstr "Gestione del colore"
#: ../modules/cdisplay_lcms.c:241 #: ../modules/cdisplay_lcms.c:216
msgid "" msgid ""
"This filter takes its configuration from the Color Management section in the " "This filter takes its configuration from the Color Management section in the "
"Preferences dialog." "Preferences dialog."
@ -1383,103 +1383,103 @@ msgstr ""
"Questo filtro prende la sua configurazione dalla sezione gestione del colore " "Questo filtro prende la sua configurazione dalla sezione gestione del colore "
"nella finestra delle preferenze." "nella finestra delle preferenze."
#: ../modules/cdisplay_lcms.c:255 #: ../modules/cdisplay_lcms.c:230
msgid "Mode of operation:" msgid "Mode of operation:"
msgstr "Modalità di operazione:" msgstr "Modalità di operazione:"
#: ../modules/cdisplay_lcms.c:262 #: ../modules/cdisplay_lcms.c:237
msgid "Image profile:" msgid "Image profile:"
msgstr "Profilo immagine:" msgstr "Profilo immagine:"
#: ../modules/cdisplay_lcms.c:270 #: ../modules/cdisplay_lcms.c:245
msgid "Monitor profile:" msgid "Monitor profile:"
msgstr "Profilo del monitor:" msgstr "Profilo del monitor:"
#: ../modules/cdisplay_lcms.c:278 #: ../modules/cdisplay_lcms.c:253
msgid "Print simulation profile:" msgid "Print simulation profile:"
msgstr "Profilo di simulazione di stampa:" msgstr "Profilo di simulazione di stampa:"
#: ../modules/cdisplay_proof.c:103 #: ../modules/cdisplay_proof.c:101
msgid "Color proof filter using ICC color profile" msgid "Color proof filter using ICC color profile"
msgstr "Fitro a prova di colore usando i profili di colore ICC" msgstr "Fitro a prova di colore usando i profili di colore ICC"
#: ../modules/cdisplay_proof.c:180 #: ../modules/cdisplay_proof.c:149
msgid "Color Proof" msgid "Color Proof"
msgstr "Prova di colore" msgstr "Prova di colore"
#: ../modules/cdisplay_proof.c:340 #: ../modules/cdisplay_proof.c:315
msgid "Choose an ICC Color Profile" msgid "Choose an ICC Color Profile"
msgstr "Scegli un profilo di colore ICC" msgstr "Scegli un profilo di colore ICC"
#: ../modules/cdisplay_proof.c:367 #: ../modules/cdisplay_proof.c:342
msgid "All files (*.*)" msgid "All files (*.*)"
msgstr "Tutti i file (*.*)" msgstr "Tutti i file (*.*)"
#: ../modules/cdisplay_proof.c:372 #: ../modules/cdisplay_proof.c:347
msgid "ICC color profile (*.icc, *.icm)" msgid "ICC color profile (*.icc, *.icm)"
msgstr "Profilo colore ICC (*.icc, *.icm)" msgstr "Profilo colore ICC (*.icc, *.icm)"
#: ../modules/cdisplay_proof.c:430 #: ../modules/cdisplay_proof.c:405
msgid "_Profile:" msgid "_Profile:"
msgstr "_Profilo:" msgstr "_Profilo:"
#: ../modules/cdisplay_proof.c:436 #: ../modules/cdisplay_proof.c:411
msgid "_Intent:" msgid "_Intent:"
msgstr "_Intento:" msgstr "_Intento:"
#: ../modules/cdisplay_proof.c:441 #: ../modules/cdisplay_proof.c:416
msgid "_Black Point Compensation" msgid "_Black Point Compensation"
msgstr "Compensazione del punto _nero" msgstr "Compensazione del punto _nero"
#: ../modules/colorsel_cmyk.c:73 #: ../modules/colorsel_cmyk.c:71
msgid "CMYK color selector" msgid "CMYK color selector"
msgstr "Selettore colore CMYK" msgstr "Selettore colore CMYK"
#: ../modules/colorsel_cmyk.c:130 ../modules/colorsel_cmyk_lcms.c:154 #: ../modules/colorsel_cmyk.c:102 ../modules/colorsel_cmyk_lcms.c:154
msgid "CMYK" msgid "CMYK"
msgstr "CMYK" msgstr "CMYK"
#. Cyan #. Cyan
#: ../modules/colorsel_cmyk.c:148 ../modules/colorsel_cmyk_lcms.c:171 #: ../modules/colorsel_cmyk.c:125 ../modules/colorsel_cmyk_lcms.c:173
msgid "_C" msgid "_C"
msgstr "_C" msgstr "_C"
#. Magenta #. Magenta
#: ../modules/colorsel_cmyk.c:150 ../modules/colorsel_cmyk_lcms.c:173 #: ../modules/colorsel_cmyk.c:127 ../modules/colorsel_cmyk_lcms.c:175
msgid "_M" msgid "_M"
msgstr "_M" msgstr "_M"
#. Yellow #. Yellow
#: ../modules/colorsel_cmyk.c:152 ../modules/colorsel_cmyk_lcms.c:175 #: ../modules/colorsel_cmyk.c:129 ../modules/colorsel_cmyk_lcms.c:177
msgid "_Y" msgid "_Y"
msgstr "_Y" msgstr "_Y"
#. Key (Black) #. Key (Black)
#: ../modules/colorsel_cmyk.c:154 ../modules/colorsel_cmyk_lcms.c:177 #: ../modules/colorsel_cmyk.c:131 ../modules/colorsel_cmyk_lcms.c:179
msgid "_K" msgid "_K"
msgstr "_K" msgstr "_K"
#: ../modules/colorsel_cmyk.c:158 ../modules/colorsel_cmyk_lcms.c:181 #: ../modules/colorsel_cmyk.c:135 ../modules/colorsel_cmyk_lcms.c:183
msgid "Cyan" msgid "Cyan"
msgstr "Ciano" msgstr "Ciano"
#: ../modules/colorsel_cmyk.c:159 ../modules/colorsel_cmyk_lcms.c:182 #: ../modules/colorsel_cmyk.c:136 ../modules/colorsel_cmyk_lcms.c:184
msgid "Magenta" msgid "Magenta"
msgstr "Magenta" msgstr "Magenta"
#: ../modules/colorsel_cmyk.c:160 ../modules/colorsel_cmyk_lcms.c:183 #: ../modules/colorsel_cmyk.c:137 ../modules/colorsel_cmyk_lcms.c:185
msgid "Yellow" msgid "Yellow"
msgstr "Giallo" msgstr "Giallo"
#: ../modules/colorsel_cmyk.c:161 ../modules/colorsel_cmyk_lcms.c:184 #: ../modules/colorsel_cmyk.c:138 ../modules/colorsel_cmyk_lcms.c:186
msgid "Black" msgid "Black"
msgstr "Nero" msgstr "Nero"
#: ../modules/colorsel_cmyk.c:195 #: ../modules/colorsel_cmyk.c:172
msgid "Black _pullout:" msgid "Black _pullout:"
msgstr "Estra_zione del nero:" msgstr "Estra_zione del nero:"
#: ../modules/colorsel_cmyk.c:212 #: ../modules/colorsel_cmyk.c:189
msgid "The percentage of black to pull out of the colored inks." msgid "The percentage of black to pull out of the colored inks."
msgstr "La percentuale di estrazione del nero dagli inchiostri colorati." msgstr "La percentuale di estrazione del nero dagli inchiostri colorati."
@ -1487,32 +1487,32 @@ msgstr "La percentuale di estrazione del nero dagli inchiostri colorati."
msgid "CMYK color selector (using color profile)" msgid "CMYK color selector (using color profile)"
msgstr "Selettore colore CMYK (che usa i profili di colore)" msgstr "Selettore colore CMYK (che usa i profili di colore)"
#: ../modules/colorsel_cmyk_lcms.c:397 #: ../modules/colorsel_cmyk_lcms.c:399
msgid "Profile: (none)" msgid "Profile: (none)"
msgstr "Profilo: (nessuno)" msgstr "Profilo: (nessuno)"
#: ../modules/colorsel_cmyk_lcms.c:417 #: ../modules/colorsel_cmyk_lcms.c:420
#, c-format #, c-format
msgid "Profile: %s" msgid "Profile: %s"
msgstr "Profilo: %s" msgstr "Profilo: %s"
#: ../modules/colorsel_triangle.c:104 #: ../modules/colorsel_triangle.c:102
msgid "Painter-style triangle color selector" msgid "Painter-style triangle color selector"
msgstr "Selettore colori a triangolo stile pittore" msgstr "Selettore colori a triangolo stile pittore"
#: ../modules/colorsel_triangle.c:170 #: ../modules/colorsel_triangle.c:138
msgid "Triangle" msgid "Triangle"
msgstr "Triangolo" msgstr "Triangolo"
#: ../modules/colorsel_water.c:84 #: ../modules/colorsel_water.c:82
msgid "Watercolor style color selector" msgid "Watercolor style color selector"
msgstr "Selettore colori stile acquerelli" msgstr "Selettore colori stile acquerelli"
#: ../modules/colorsel_water.c:150 #: ../modules/colorsel_water.c:118
msgid "Watercolor" msgid "Watercolor"
msgstr "Acquerelli" msgstr "Acquerelli"
#: ../modules/colorsel_water.c:213 #: ../modules/colorsel_water.c:186
msgid "Pressure" msgid "Pressure"
msgstr "Pressione" msgstr "Pressione"
@ -1605,12 +1605,12 @@ msgid "Button Gear Up"
msgstr "Pulsante rotella su" msgstr "Pulsante rotella su"
#: ../modules/controller_linux_input.c:90 #: ../modules/controller_linux_input.c:90
#: ../modules/controller_dx_dinput.c:469 #: ../modules/controller_dx_dinput.c:443
msgid "X Move Left" msgid "X Move Left"
msgstr "A sinistra spostamento X" msgstr "A sinistra spostamento X"
#: ../modules/controller_linux_input.c:91 #: ../modules/controller_linux_input.c:91
#: ../modules/controller_dx_dinput.c:472 #: ../modules/controller_dx_dinput.c:446
msgid "X Move Right" msgid "X Move Right"
msgstr "A destra Spostamento X" msgstr "A destra Spostamento X"
@ -1623,12 +1623,12 @@ msgid "Y Move Back"
msgstr "Spostamento indietro in Y" msgstr "Spostamento indietro in Y"
#: ../modules/controller_linux_input.c:94 #: ../modules/controller_linux_input.c:94
#: ../modules/controller_dx_dinput.c:487 #: ../modules/controller_dx_dinput.c:461
msgid "Z Move Up" msgid "Z Move Up"
msgstr "In alto spostamento Z" msgstr "In alto spostamento Z"
#: ../modules/controller_linux_input.c:95 #: ../modules/controller_linux_input.c:95
#: ../modules/controller_dx_dinput.c:490 #: ../modules/controller_dx_dinput.c:464
msgid "Z Move Down" msgid "Z Move Down"
msgstr "In basso spostamento Z" msgstr "In basso spostamento Z"
@ -1641,22 +1641,22 @@ msgid "X Axis Tilt Back"
msgstr "Inclinazione asse X indietro" msgstr "Inclinazione asse X indietro"
#: ../modules/controller_linux_input.c:99 #: ../modules/controller_linux_input.c:99
#: ../modules/controller_dx_dinput.c:505 #: ../modules/controller_dx_dinput.c:479
msgid "Y Axis Tilt Right" msgid "Y Axis Tilt Right"
msgstr "Inclinazione asse Y a destra" msgstr "Inclinazione asse Y a destra"
#: ../modules/controller_linux_input.c:100 #: ../modules/controller_linux_input.c:100
#: ../modules/controller_dx_dinput.c:508 #: ../modules/controller_dx_dinput.c:482
msgid "Y Axis Tilt Left" msgid "Y Axis Tilt Left"
msgstr "Inclinazione asse Y a sinistra" msgstr "Inclinazione asse Y a sinistra"
#: ../modules/controller_linux_input.c:101 #: ../modules/controller_linux_input.c:101
#: ../modules/controller_dx_dinput.c:514 #: ../modules/controller_dx_dinput.c:488
msgid "Z Axis Turn Left" msgid "Z Axis Turn Left"
msgstr "Giro a sinistra asse Z" msgstr "Giro a sinistra asse Z"
#: ../modules/controller_linux_input.c:102 #: ../modules/controller_linux_input.c:102
#: ../modules/controller_dx_dinput.c:517 #: ../modules/controller_dx_dinput.c:491
msgid "Z Axis Turn Right" msgid "Z Axis Turn Right"
msgstr "Giro a destra asse Z" msgstr "Giro a destra asse Z"
@ -1684,143 +1684,143 @@ msgstr "Rotella a sinistra"
msgid "Wheel Turn Right" msgid "Wheel Turn Right"
msgstr "Rotella a destra" msgstr "Rotella a destra"
#: ../modules/controller_linux_input.c:179 #: ../modules/controller_linux_input.c:178
msgid "Linux input event controller" msgid "Linux input event controller"
msgstr "Controllore eventi in ingresso di Linux" msgstr "Controllore eventi in ingresso di Linux"
#: ../modules/controller_linux_input.c:249 #: ../modules/controller_linux_input.c:218
#: ../modules/controller_dx_dinput.c:227 ../modules/controller_midi.c:245 #: ../modules/controller_dx_dinput.c:196 ../modules/controller_midi.c:212
msgid "Device:" msgid "Device:"
msgstr "Dispositivo:" msgstr "Dispositivo:"
#: ../modules/controller_linux_input.c:250 #: ../modules/controller_linux_input.c:219
msgid "The name of the device to read Linux Input events from." msgid "The name of the device to read Linux Input events from."
msgstr "Il nome del dispositivo da cui leggere gli eventi Linux in ingresso." msgstr "Il nome del dispositivo da cui leggere gli eventi Linux in ingresso."
#: ../modules/controller_linux_input.c:261 #: ../modules/controller_linux_input.c:230
msgid "Linux Input" msgid "Linux Input"
msgstr "Ingresso Linux" msgstr "Ingresso Linux"
#: ../modules/controller_linux_input.c:539 #: ../modules/controller_linux_input.c:513
msgid "Linux Input Events" msgid "Linux Input Events"
msgstr "Eventi Linux in ingresso" msgstr "Eventi Linux in ingresso"
#: ../modules/controller_linux_input.c:551 #: ../modules/controller_linux_input.c:525
#: ../modules/controller_dx_dinput.c:1122 ../modules/controller_midi.c:533 #: ../modules/controller_dx_dinput.c:1095 ../modules/controller_midi.c:505
msgid "No device configured" msgid "No device configured"
msgstr "Nessun dispositivo configurato" msgstr "Nessun dispositivo configurato"
#: ../modules/controller_linux_input.c:577 ../modules/controller_midi.c:482 #: ../modules/controller_linux_input.c:551 ../modules/controller_midi.c:454
#: ../modules/controller_midi.c:508 #: ../modules/controller_midi.c:480
#, c-format #, c-format
msgid "Reading from %s" msgid "Reading from %s"
msgstr "Lettura da %s" msgstr "Lettura da %s"
#: ../modules/controller_linux_input.c:595 #: ../modules/controller_linux_input.c:569
#: ../modules/controller_linux_input.c:649 ../modules/controller_midi.c:464 #: ../modules/controller_linux_input.c:623 ../modules/controller_midi.c:436
#: ../modules/controller_midi.c:525 ../modules/controller_midi.c:596 #: ../modules/controller_midi.c:497 ../modules/controller_midi.c:568
#, c-format #, c-format
msgid "Device not available: %s" msgid "Device not available: %s"
msgstr "Dispositivo non disponibile: %s" msgstr "Dispositivo non disponibile: %s"
#: ../modules/controller_linux_input.c:614 #: ../modules/controller_linux_input.c:588
#: ../modules/controller_dx_dinput.c:1147 #: ../modules/controller_dx_dinput.c:1120
msgid "Device not available" msgid "Device not available"
msgstr "Dispositivo non disponibile" msgstr "Dispositivo non disponibile"
#: ../modules/controller_linux_input.c:658 ../modules/controller_midi.c:605 #: ../modules/controller_linux_input.c:632 ../modules/controller_midi.c:577
msgid "End of file" msgid "End of file"
msgstr "Fine del file" msgstr "Fine del file"
#: ../modules/controller_dx_dinput.c:157 #: ../modules/controller_dx_dinput.c:156
msgid "DirectX DirectInput event controller" msgid "DirectX DirectInput event controller"
msgstr "Controllore eventi DirectInput DirectX" msgstr "Controllore eventi DirectInput DirectX"
#: ../modules/controller_dx_dinput.c:228 #: ../modules/controller_dx_dinput.c:197
msgid "The device to read DirectInput events from." msgid "The device to read DirectInput events from."
msgstr "Il dispositivo da cui leggere gli eventi DirectInput." msgstr "Il dispositivo da cui leggere gli eventi DirectInput."
#: ../modules/controller_dx_dinput.c:237 #: ../modules/controller_dx_dinput.c:206
msgid "DirectX DirectInput" msgid "DirectX DirectInput"
msgstr "DirectInput DirectX" msgstr "DirectInput DirectX"
#: ../modules/controller_dx_dinput.c:446 #: ../modules/controller_dx_dinput.c:420
#, c-format #, c-format
msgid "Button %d" msgid "Button %d"
msgstr "Pulsante %d" msgstr "Pulsante %d"
#: ../modules/controller_dx_dinput.c:449 #: ../modules/controller_dx_dinput.c:423
#, c-format #, c-format
msgid "Button %d Press" msgid "Button %d Press"
msgstr "Pressione pulsante %d" msgstr "Pressione pulsante %d"
#: ../modules/controller_dx_dinput.c:452 #: ../modules/controller_dx_dinput.c:426
#, c-format #, c-format
msgid "Button %d Release" msgid "Button %d Release"
msgstr "Rilascio pulsante %d" msgstr "Rilascio pulsante %d"
#: ../modules/controller_dx_dinput.c:478 #: ../modules/controller_dx_dinput.c:452
msgid "Y Move Away" msgid "Y Move Away"
msgstr "Allontanamento in Y" msgstr "Allontanamento in Y"
#: ../modules/controller_dx_dinput.c:481 #: ../modules/controller_dx_dinput.c:455
msgid "Y Move Near" msgid "Y Move Near"
msgstr "Avvicinamento in Y" msgstr "Avvicinamento in Y"
#: ../modules/controller_dx_dinput.c:496 #: ../modules/controller_dx_dinput.c:470
msgid "X Axis Tilt Away" msgid "X Axis Tilt Away"
msgstr "Inclinazione asse X lontana" msgstr "Inclinazione asse X lontana"
#: ../modules/controller_dx_dinput.c:499 #: ../modules/controller_dx_dinput.c:473
msgid "X Axis Tilt Near" msgid "X Axis Tilt Near"
msgstr "Inclinazione asse X vicina" msgstr "Inclinazione asse X vicina"
#: ../modules/controller_dx_dinput.c:528 #: ../modules/controller_dx_dinput.c:502
#, c-format #, c-format
msgid "Slider %d Increase" msgid "Slider %d Increase"
msgstr "Incremento cursore %d" msgstr "Incremento cursore %d"
#: ../modules/controller_dx_dinput.c:531 #: ../modules/controller_dx_dinput.c:505
#, c-format #, c-format
msgid "Slider %d Decrease" msgid "Slider %d Decrease"
msgstr "Decremento cursore %d" msgstr "Decremento cursore %d"
#: ../modules/controller_dx_dinput.c:541 #: ../modules/controller_dx_dinput.c:515
#, c-format #, c-format
msgid "POV %d X View" msgid "POV %d X View"
msgstr "Vista X POV %d" msgstr "Vista X POV %d"
#: ../modules/controller_dx_dinput.c:544 #: ../modules/controller_dx_dinput.c:518
#, c-format #, c-format
msgid "POV %d Y View" msgid "POV %d Y View"
msgstr "Vista Y POV %d" msgstr "Vista Y POV %d"
#: ../modules/controller_dx_dinput.c:547 #: ../modules/controller_dx_dinput.c:521
#, c-format #, c-format
msgid "POV %d Return" msgid "POV %d Return"
msgstr "Invio POV %d" msgstr "Invio POV %d"
#: ../modules/controller_dx_dinput.c:1111 #: ../modules/controller_dx_dinput.c:1084
msgid "DirectInput Events" msgid "DirectInput Events"
msgstr "Eventi DirectInput" msgstr "Eventi DirectInput"
#: ../modules/controller_midi.c:167 #: ../modules/controller_midi.c:164
msgid "MIDI event controller" msgid "MIDI event controller"
msgstr "Controllore eventi MIDI" msgstr "Controllore eventi MIDI"
#: ../modules/controller_midi.c:236 #: ../modules/controller_midi.c:203
msgid "The name of the device to read MIDI events from." msgid "The name of the device to read MIDI events from."
msgstr "Il nome del dispositivo da cui leggere gli eventi MIDI." msgstr "Il nome del dispositivo da cui leggere gli eventi MIDI."
#: ../modules/controller_midi.c:239 #: ../modules/controller_midi.c:206
msgid "Enter 'alsa' to use the ALSA sequencer." msgid "Enter 'alsa' to use the ALSA sequencer."
msgstr "Immettere 'alsa' per usare il sequencer ALSA." msgstr "Immettere 'alsa' per usare il sequencer ALSA."
#: ../modules/controller_midi.c:254 #: ../modules/controller_midi.c:221
msgid "Channel:" msgid "Channel:"
msgstr "Canale:" msgstr "Canale:"
#: ../modules/controller_midi.c:255 #: ../modules/controller_midi.c:222
msgid "" msgid ""
"The MIDI channel to read events from. Set to -1 for reading from all MIDI " "The MIDI channel to read events from. Set to -1 for reading from all MIDI "
"channels." "channels."
@ -1828,33 +1828,33 @@ msgstr ""
"Il canale MIDI da cui leggere gli eventi. Impostare a -1 per leggere gli " "Il canale MIDI da cui leggere gli eventi. Impostare a -1 per leggere gli "
"eventi MIDI da tutti i canali." "eventi MIDI da tutti i canali."
#: ../modules/controller_midi.c:259 #: ../modules/controller_midi.c:226
msgid "MIDI" msgid "MIDI"
msgstr "MIDI" msgstr "MIDI"
#: ../modules/controller_midi.c:383 #: ../modules/controller_midi.c:355
#, c-format #, c-format
msgid "Note %02x on" msgid "Note %02x on"
msgstr "Nota %02x on" msgstr "Nota %02x on"
#: ../modules/controller_midi.c:386 #: ../modules/controller_midi.c:358
#, c-format #, c-format
msgid "Note %02x off" msgid "Note %02x off"
msgstr "Nota %02x off" msgstr "Nota %02x off"
#: ../modules/controller_midi.c:389 #: ../modules/controller_midi.c:361
#, c-format #, c-format
msgid "Controller %03d" msgid "Controller %03d"
msgstr "Controllore %03d" msgstr "Controllore %03d"
#: ../modules/controller_midi.c:436 #: ../modules/controller_midi.c:408
msgid "MIDI Events" msgid "MIDI Events"
msgstr "Eventi MIDI" msgstr "Eventi MIDI"
#: ../modules/controller_midi.c:454 #: ../modules/controller_midi.c:426
msgid "GIMP" msgid "GIMP"
msgstr "GIMP" msgstr "GIMP"
#: ../modules/controller_midi.c:456 #: ../modules/controller_midi.c:428
msgid "GIMP MIDI Input Controller" msgid "GIMP MIDI Input Controller"
msgstr "Controllore di ingresso MIDI di GIMP" msgstr "Controllore di ingresso MIDI di GIMP"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: oc\n" "Project-Id-Version: oc\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-12-27 13:20+0100\n" "POT-Creation-Date: 2008-02-19 20:21+0100\n"
"PO-Revision-Date: 2007-12-27 15:11+0100\n" "PO-Revision-Date: 2007-12-27 15:11+0100\n"
"Last-Translator: Yannig Marchegay (Kokoyaya) <yannig@marchegay.org>\n" "Last-Translator: Yannig Marchegay (Kokoyaya) <yannig@marchegay.org>\n"
"Language-Team: Occitan <ubuntu-l10n-oci@lists.ubuntu.com>\n" "Language-Team: Occitan <ubuntu-l10n-oci@lists.ubuntu.com>\n"
@ -270,7 +270,9 @@ msgstr ""
#: ../libgimp/gimpprocbrowserdialog.c:454 #: ../libgimp/gimpprocbrowserdialog.c:454
#, c-format #, c-format
msgid "%d procedure" msgid "%d procedure"
msgstr "" msgid_plural "%d procedures"
msgstr[0] ""
msgstr[1] ""
#: ../libgimp/gimpprocbrowserdialog.c:463 #: ../libgimp/gimpprocbrowserdialog.c:463
msgid "No matches for your query" msgid "No matches for your query"
@ -279,7 +281,9 @@ msgstr ""
#: ../libgimp/gimpprocbrowserdialog.c:467 #: ../libgimp/gimpprocbrowserdialog.c:467
#, c-format #, c-format
msgid "%d procedure matches your query" msgid "%d procedure matches your query"
msgstr "" msgid_plural "%d procedures match your query"
msgstr[0] ""
msgstr[1] ""
#. count label #. count label
#: ../libgimp/gimpprocbrowserdialog.c:516 ../libgimpwidgets/gimpbrowser.c:114 #: ../libgimp/gimpprocbrowserdialog.c:516 ../libgimpwidgets/gimpbrowser.c:114
@ -602,7 +606,7 @@ msgstr "Contrast"
msgid "Incremental" msgid "Incremental"
msgstr "" msgstr ""
#: ../libgimpbase/gimpbaseenums.c:624 ../modules/cdisplay_lcms.c:220 #: ../libgimpbase/gimpbaseenums.c:624 ../modules/cdisplay_lcms.c:195
msgid "None" msgid "None"
msgstr "Pas cap" msgstr "Pas cap"
@ -739,8 +743,8 @@ msgid "%d GB"
msgstr "%d Go" msgstr "%d Go"
#: ../libgimpbase/gimputils.c:170 ../libgimpbase/gimputils.c:175 #: ../libgimpbase/gimputils.c:170 ../libgimpbase/gimputils.c:175
#: ../modules/cdisplay_lcms.c:212 ../modules/colorsel_cmyk_lcms.c:408 #: ../modules/cdisplay_lcms.c:187 ../modules/colorsel_cmyk_lcms.c:411
#: ../modules/colorsel_cmyk_lcms.c:414 #: ../modules/colorsel_cmyk_lcms.c:417
msgid "(invalid UTF-8 string)" msgid "(invalid UTF-8 string)"
msgstr "" msgstr ""
@ -845,8 +849,8 @@ msgstr ""
msgid "while parsing token '%s': %s" msgid "while parsing token '%s': %s"
msgstr "" msgstr ""
#: ../libgimpconfig/gimpconfig-iface.c:454 #: ../libgimpconfig/gimpconfig-iface.c:474
#: ../libgimpconfig/gimpconfig-iface.c:467 ../libgimpconfig/gimpscanner.c:498 #: ../libgimpconfig/gimpconfig-iface.c:487 ../libgimpconfig/gimpscanner.c:498
#: ../libgimpconfig/gimpscanner.c:579 #: ../libgimpconfig/gimpscanner.c:579
#: ../libgimpwidgets/gimpcolorprofilestore.c:654 #: ../libgimpwidgets/gimpcolorprofilestore.c:654
msgid "fatal parse error" msgid "fatal parse error"
@ -1027,7 +1031,7 @@ msgstr "Gigaoctets"
#. Count label #. Count label
#: ../libgimpwidgets/gimppageselector.c:269 #: ../libgimpwidgets/gimppageselector.c:269
#: ../libgimpwidgets/gimppageselector.c:1167 #: ../libgimpwidgets/gimppageselector.c:1166
msgid "Nothing selected" msgid "Nothing selected"
msgstr "" msgstr ""
@ -1048,20 +1052,22 @@ msgid "Page 000"
msgstr "" msgstr ""
#: ../libgimpwidgets/gimppageselector.c:508 #: ../libgimpwidgets/gimppageselector.c:508
#: ../libgimpwidgets/gimppageselector.c:745 #: ../libgimpwidgets/gimppageselector.c:744
#, c-format #, c-format
msgid "Page %d" msgid "Page %d"
msgstr "Pagina %d" msgstr "Pagina %d"
#: ../libgimpwidgets/gimppageselector.c:1172 #: ../libgimpwidgets/gimppageselector.c:1171
msgid "One page selected" msgid "One page selected"
msgstr "" msgstr ""
#: ../libgimpwidgets/gimppageselector.c:1179 #: ../libgimpwidgets/gimppageselector.c:1178
#: ../libgimpwidgets/gimppageselector.c:1183 #: ../libgimpwidgets/gimppageselector.c:1182
#, c-format #, c-format
msgid "%d page selected" msgid "%d page selected"
msgstr "" msgid_plural "All %d pages selected"
msgstr[0] ""
msgstr[1] ""
#: ../libgimpwidgets/gimppatheditor.c:214 #: ../libgimpwidgets/gimppatheditor.c:214
msgid "Writable" msgid "Writable"
@ -1093,7 +1099,9 @@ msgstr "_Previsualizacion"
#: ../libgimpwidgets/gimppropwidgets.c:1859 #: ../libgimpwidgets/gimppropwidgets.c:1859
#, c-format #, c-format
msgid "This text input field is limited to %d character." msgid "This text input field is limited to %d character."
msgstr "" msgid_plural "This text input field is limited to %d characters."
msgstr[0] ""
msgstr[1] ""
#: ../libgimpwidgets/gimpstock.c:113 #: ../libgimpwidgets/gimpstock.c:113
msgid "Anchor" msgid "Anchor"
@ -1147,23 +1155,23 @@ msgstr ""
msgid "_Resize" msgid "_Resize"
msgstr "" msgstr ""
#: ../libgimpwidgets/gimpstock.c:191 ../libgimpwidgets/gimpstock.c:319 #: ../libgimpwidgets/gimpstock.c:191 ../libgimpwidgets/gimpstock.c:321
msgid "_Scale" msgid "_Scale"
msgstr "_Escala" msgstr "_Escala"
#: ../libgimpwidgets/gimpstock.c:295 #: ../libgimpwidgets/gimpstock.c:296
msgid "Cr_op" msgid "Cr_op"
msgstr "R_osegar" msgstr "R_osegar"
#: ../libgimpwidgets/gimpstock.c:314 #: ../libgimpwidgets/gimpstock.c:315
msgid "_Transform" msgid "_Transform"
msgstr "" msgstr ""
#: ../libgimpwidgets/gimpstock.c:318 #: ../libgimpwidgets/gimpstock.c:320
msgid "_Rotate" msgid "_Rotate"
msgstr "" msgstr ""
#: ../libgimpwidgets/gimpstock.c:320 #: ../libgimpwidgets/gimpstock.c:322
msgid "_Shear" msgid "_Shear"
msgstr "" msgstr ""
@ -1183,21 +1191,21 @@ msgstr "Unitat"
msgid "Factor" msgid "Factor"
msgstr "Factor" msgstr "Factor"
#: ../libgimpwidgets/gimpwidgets.c:1005 #: ../libgimpwidgets/gimpwidgets.c:511
msgid "" msgid ""
"Use this value for random number generator seed - this allows you to repeat " "Use this value for random number generator seed - this allows you to repeat "
"a given \"random\" operation" "a given \"random\" operation"
msgstr "" msgstr ""
#: ../libgimpwidgets/gimpwidgets.c:1009 #: ../libgimpwidgets/gimpwidgets.c:515
msgid "_New Seed" msgid "_New Seed"
msgstr "" msgstr ""
#: ../libgimpwidgets/gimpwidgets.c:1022 #: ../libgimpwidgets/gimpwidgets.c:528
msgid "Seed random number generator with a generated random number" msgid "Seed random number generator with a generated random number"
msgstr "" msgstr ""
#: ../libgimpwidgets/gimpwidgets.c:1026 #: ../libgimpwidgets/gimpwidgets.c:532
msgid "_Randomize" msgid "_Randomize"
msgstr "" msgstr ""
@ -1277,153 +1285,153 @@ msgstr ""
msgid "Tritanopia (insensitivity to blue)" msgid "Tritanopia (insensitivity to blue)"
msgstr "" msgstr ""
#: ../modules/cdisplay_colorblind.c:200 #: ../modules/cdisplay_colorblind.c:198
msgid "Color deficit simulation filter (Brettel-Vienot-Mollon algorithm)" msgid "Color deficit simulation filter (Brettel-Vienot-Mollon algorithm)"
msgstr "" msgstr ""
#: ../modules/cdisplay_colorblind.c:292 #: ../modules/cdisplay_colorblind.c:261
msgid "Color Deficient Vision" msgid "Color Deficient Vision"
msgstr "" msgstr ""
#: ../modules/cdisplay_colorblind.c:507 #: ../modules/cdisplay_colorblind.c:483
msgid "Color _deficiency type:" msgid "Color _deficiency type:"
msgstr "" msgstr ""
#: ../modules/cdisplay_gamma.c:91 #: ../modules/cdisplay_gamma.c:90
msgid "Gamma color display filter" msgid "Gamma color display filter"
msgstr "" msgstr ""
#: ../modules/cdisplay_gamma.c:160 #: ../modules/cdisplay_gamma.c:129
msgid "Gamma" msgid "Gamma"
msgstr "Gammà" msgstr "Gammà"
#: ../modules/cdisplay_gamma.c:253 #: ../modules/cdisplay_gamma.c:232
msgid "_Gamma:" msgid "_Gamma:"
msgstr "" msgstr ""
#: ../modules/cdisplay_highcontrast.c:91 #: ../modules/cdisplay_highcontrast.c:90
msgid "High Contrast color display filter" msgid "High Contrast color display filter"
msgstr "" msgstr ""
#: ../modules/cdisplay_highcontrast.c:160 #: ../modules/cdisplay_highcontrast.c:129
msgid "Contrast" msgid "Contrast"
msgstr "Contrast" msgstr "Contrast"
#: ../modules/cdisplay_highcontrast.c:253 #: ../modules/cdisplay_highcontrast.c:232
msgid "Contrast c_ycles:" msgid "Contrast c_ycles:"
msgstr "" msgstr ""
#: ../modules/cdisplay_lcms.c:107 #: ../modules/cdisplay_lcms.c:106
msgid "Color management display filter using ICC color profiles" msgid "Color management display filter using ICC color profiles"
msgstr "" msgstr ""
#: ../modules/cdisplay_lcms.c:168 #: ../modules/cdisplay_lcms.c:138
msgid "Color Management" msgid "Color Management"
msgstr "" msgstr ""
#: ../modules/cdisplay_lcms.c:241 #: ../modules/cdisplay_lcms.c:216
msgid "" msgid ""
"This filter takes its configuration from the Color Management section in the " "This filter takes its configuration from the Color Management section in the "
"Preferences dialog." "Preferences dialog."
msgstr "" msgstr ""
#: ../modules/cdisplay_lcms.c:255 #: ../modules/cdisplay_lcms.c:230
msgid "Mode of operation:" msgid "Mode of operation:"
msgstr "" msgstr ""
#: ../modules/cdisplay_lcms.c:262 #: ../modules/cdisplay_lcms.c:237
msgid "Image profile:" msgid "Image profile:"
msgstr "Fichièr imatge" msgstr "Fichièr imatge"
#: ../modules/cdisplay_lcms.c:270 #: ../modules/cdisplay_lcms.c:245
msgid "Monitor profile:" msgid "Monitor profile:"
msgstr "" msgstr ""
#: ../modules/cdisplay_lcms.c:278 #: ../modules/cdisplay_lcms.c:253
msgid "Print simulation profile:" msgid "Print simulation profile:"
msgstr "" msgstr ""
#: ../modules/cdisplay_proof.c:103 #: ../modules/cdisplay_proof.c:101
msgid "Color proof filter using ICC color profile" msgid "Color proof filter using ICC color profile"
msgstr "" msgstr ""
#: ../modules/cdisplay_proof.c:180 #: ../modules/cdisplay_proof.c:149
msgid "Color Proof" msgid "Color Proof"
msgstr "" msgstr ""
#: ../modules/cdisplay_proof.c:340 #: ../modules/cdisplay_proof.c:315
msgid "Choose an ICC Color Profile" msgid "Choose an ICC Color Profile"
msgstr "" msgstr ""
#: ../modules/cdisplay_proof.c:367 #: ../modules/cdisplay_proof.c:342
msgid "All files (*.*)" msgid "All files (*.*)"
msgstr "Totes los fichièrs (*.*)" msgstr "Totes los fichièrs (*.*)"
#: ../modules/cdisplay_proof.c:372 #: ../modules/cdisplay_proof.c:347
msgid "ICC color profile (*.icc, *.icm)" msgid "ICC color profile (*.icc, *.icm)"
msgstr "" msgstr ""
#: ../modules/cdisplay_proof.c:430 #: ../modules/cdisplay_proof.c:405
msgid "_Profile:" msgid "_Profile:"
msgstr "_Perfil :" msgstr "_Perfil :"
#: ../modules/cdisplay_proof.c:436 #: ../modules/cdisplay_proof.c:411
msgid "_Intent:" msgid "_Intent:"
msgstr "" msgstr ""
#: ../modules/cdisplay_proof.c:441 #: ../modules/cdisplay_proof.c:416
msgid "_Black Point Compensation" msgid "_Black Point Compensation"
msgstr "" msgstr ""
#: ../modules/colorsel_cmyk.c:73 #: ../modules/colorsel_cmyk.c:71
msgid "CMYK color selector" msgid "CMYK color selector"
msgstr "" msgstr ""
#: ../modules/colorsel_cmyk.c:130 ../modules/colorsel_cmyk_lcms.c:154 #: ../modules/colorsel_cmyk.c:102 ../modules/colorsel_cmyk_lcms.c:154
msgid "CMYK" msgid "CMYK"
msgstr "" msgstr ""
#. Cyan #. Cyan
#: ../modules/colorsel_cmyk.c:148 ../modules/colorsel_cmyk_lcms.c:171 #: ../modules/colorsel_cmyk.c:125 ../modules/colorsel_cmyk_lcms.c:173
msgid "_C" msgid "_C"
msgstr "_C" msgstr "_C"
#. Magenta #. Magenta
#: ../modules/colorsel_cmyk.c:150 ../modules/colorsel_cmyk_lcms.c:173 #: ../modules/colorsel_cmyk.c:127 ../modules/colorsel_cmyk_lcms.c:175
msgid "_M" msgid "_M"
msgstr "_M" msgstr "_M"
#. Yellow #. Yellow
#: ../modules/colorsel_cmyk.c:152 ../modules/colorsel_cmyk_lcms.c:175 #: ../modules/colorsel_cmyk.c:129 ../modules/colorsel_cmyk_lcms.c:177
msgid "_Y" msgid "_Y"
msgstr "_Y" msgstr "_Y"
#. Key (Black) #. Key (Black)
#: ../modules/colorsel_cmyk.c:154 ../modules/colorsel_cmyk_lcms.c:177 #: ../modules/colorsel_cmyk.c:131 ../modules/colorsel_cmyk_lcms.c:179
msgid "_K" msgid "_K"
msgstr "_K" msgstr "_K"
#: ../modules/colorsel_cmyk.c:158 ../modules/colorsel_cmyk_lcms.c:181 #: ../modules/colorsel_cmyk.c:135 ../modules/colorsel_cmyk_lcms.c:183
msgid "Cyan" msgid "Cyan"
msgstr "" msgstr ""
#: ../modules/colorsel_cmyk.c:159 ../modules/colorsel_cmyk_lcms.c:182 #: ../modules/colorsel_cmyk.c:136 ../modules/colorsel_cmyk_lcms.c:184
msgid "Magenta" msgid "Magenta"
msgstr "" msgstr ""
#: ../modules/colorsel_cmyk.c:160 ../modules/colorsel_cmyk_lcms.c:183 #: ../modules/colorsel_cmyk.c:137 ../modules/colorsel_cmyk_lcms.c:185
msgid "Yellow" msgid "Yellow"
msgstr "Rossèl" msgstr "Rossèl"
#: ../modules/colorsel_cmyk.c:161 ../modules/colorsel_cmyk_lcms.c:184 #: ../modules/colorsel_cmyk.c:138 ../modules/colorsel_cmyk_lcms.c:186
msgid "Black" msgid "Black"
msgstr "Negre" msgstr "Negre"
#: ../modules/colorsel_cmyk.c:195 #: ../modules/colorsel_cmyk.c:172
msgid "Black _pullout:" msgid "Black _pullout:"
msgstr "" msgstr ""
#: ../modules/colorsel_cmyk.c:212 #: ../modules/colorsel_cmyk.c:189
msgid "The percentage of black to pull out of the colored inks." msgid "The percentage of black to pull out of the colored inks."
msgstr "" msgstr ""
@ -1431,32 +1439,32 @@ msgstr ""
msgid "CMYK color selector (using color profile)" msgid "CMYK color selector (using color profile)"
msgstr "" msgstr ""
#: ../modules/colorsel_cmyk_lcms.c:397 #: ../modules/colorsel_cmyk_lcms.c:399
msgid "Profile: (none)" msgid "Profile: (none)"
msgstr "Perfil : (pas cap)" msgstr "Perfil : (pas cap)"
#: ../modules/colorsel_cmyk_lcms.c:417 #: ../modules/colorsel_cmyk_lcms.c:420
#, c-format #, c-format
msgid "Profile: %s" msgid "Profile: %s"
msgstr "Perfil : %s" msgstr "Perfil : %s"
#: ../modules/colorsel_triangle.c:104 #: ../modules/colorsel_triangle.c:102
msgid "Painter-style triangle color selector" msgid "Painter-style triangle color selector"
msgstr "" msgstr ""
#: ../modules/colorsel_triangle.c:170 #: ../modules/colorsel_triangle.c:138
msgid "Triangle" msgid "Triangle"
msgstr "Triangle" msgstr "Triangle"
#: ../modules/colorsel_water.c:84 #: ../modules/colorsel_water.c:82
msgid "Watercolor style color selector" msgid "Watercolor style color selector"
msgstr "" msgstr ""
#: ../modules/colorsel_water.c:150 #: ../modules/colorsel_water.c:118
msgid "Watercolor" msgid "Watercolor"
msgstr "" msgstr ""
#: ../modules/colorsel_water.c:213 #: ../modules/colorsel_water.c:186
msgid "Pressure" msgid "Pressure"
msgstr "Pression" msgstr "Pression"
@ -1549,12 +1557,12 @@ msgid "Button Gear Up"
msgstr "" msgstr ""
#: ../modules/controller_linux_input.c:90 #: ../modules/controller_linux_input.c:90
#: ../modules/controller_dx_dinput.c:469 #: ../modules/controller_dx_dinput.c:443
msgid "X Move Left" msgid "X Move Left"
msgstr "" msgstr ""
#: ../modules/controller_linux_input.c:91 #: ../modules/controller_linux_input.c:91
#: ../modules/controller_dx_dinput.c:472 #: ../modules/controller_dx_dinput.c:446
msgid "X Move Right" msgid "X Move Right"
msgstr "" msgstr ""
@ -1567,12 +1575,12 @@ msgid "Y Move Back"
msgstr "" msgstr ""
#: ../modules/controller_linux_input.c:94 #: ../modules/controller_linux_input.c:94
#: ../modules/controller_dx_dinput.c:487 #: ../modules/controller_dx_dinput.c:461
msgid "Z Move Up" msgid "Z Move Up"
msgstr "" msgstr ""
#: ../modules/controller_linux_input.c:95 #: ../modules/controller_linux_input.c:95
#: ../modules/controller_dx_dinput.c:490 #: ../modules/controller_dx_dinput.c:464
msgid "Z Move Down" msgid "Z Move Down"
msgstr "" msgstr ""
@ -1585,22 +1593,22 @@ msgid "X Axis Tilt Back"
msgstr "" msgstr ""
#: ../modules/controller_linux_input.c:99 #: ../modules/controller_linux_input.c:99
#: ../modules/controller_dx_dinput.c:505 #: ../modules/controller_dx_dinput.c:479
msgid "Y Axis Tilt Right" msgid "Y Axis Tilt Right"
msgstr "" msgstr ""
#: ../modules/controller_linux_input.c:100 #: ../modules/controller_linux_input.c:100
#: ../modules/controller_dx_dinput.c:508 #: ../modules/controller_dx_dinput.c:482
msgid "Y Axis Tilt Left" msgid "Y Axis Tilt Left"
msgstr "" msgstr ""
#: ../modules/controller_linux_input.c:101 #: ../modules/controller_linux_input.c:101
#: ../modules/controller_dx_dinput.c:514 #: ../modules/controller_dx_dinput.c:488
msgid "Z Axis Turn Left" msgid "Z Axis Turn Left"
msgstr "" msgstr ""
#: ../modules/controller_linux_input.c:102 #: ../modules/controller_linux_input.c:102
#: ../modules/controller_dx_dinput.c:517 #: ../modules/controller_dx_dinput.c:491
msgid "Z Axis Turn Right" msgid "Z Axis Turn Right"
msgstr "" msgstr ""
@ -1628,176 +1636,175 @@ msgstr ""
msgid "Wheel Turn Right" msgid "Wheel Turn Right"
msgstr "" msgstr ""
#: ../modules/controller_linux_input.c:179 #: ../modules/controller_linux_input.c:178
msgid "Linux input event controller" msgid "Linux input event controller"
msgstr "" msgstr ""
#: ../modules/controller_linux_input.c:249 #: ../modules/controller_linux_input.c:218
#: ../modules/controller_dx_dinput.c:227 ../modules/controller_midi.c:245 #: ../modules/controller_dx_dinput.c:196 ../modules/controller_midi.c:212
msgid "Device:" msgid "Device:"
msgstr "Periferic :" msgstr "Periferic :"
#: ../modules/controller_linux_input.c:250 #: ../modules/controller_linux_input.c:219
msgid "The name of the device to read Linux Input events from." msgid "The name of the device to read Linux Input events from."
msgstr "" msgstr ""
#: ../modules/controller_linux_input.c:261 #: ../modules/controller_linux_input.c:230
msgid "Linux Input" msgid "Linux Input"
msgstr "" msgstr ""
#: ../modules/controller_linux_input.c:539 #: ../modules/controller_linux_input.c:513
msgid "Linux Input Events" msgid "Linux Input Events"
msgstr "" msgstr ""
#: ../modules/controller_linux_input.c:551 #: ../modules/controller_linux_input.c:525
#: ../modules/controller_dx_dinput.c:1122 ../modules/controller_midi.c:533 #: ../modules/controller_dx_dinput.c:1095 ../modules/controller_midi.c:505
msgid "No device configured" msgid "No device configured"
msgstr "" msgstr ""
#: ../modules/controller_linux_input.c:577 ../modules/controller_midi.c:482 #: ../modules/controller_linux_input.c:551 ../modules/controller_midi.c:454
#: ../modules/controller_midi.c:508 #: ../modules/controller_midi.c:480
#, c-format #, c-format
msgid "Reading from %s" msgid "Reading from %s"
msgstr "" msgstr ""
#: ../modules/controller_linux_input.c:595 #: ../modules/controller_linux_input.c:569
#: ../modules/controller_linux_input.c:649 ../modules/controller_midi.c:464 #: ../modules/controller_linux_input.c:623 ../modules/controller_midi.c:436
#: ../modules/controller_midi.c:525 ../modules/controller_midi.c:596 #: ../modules/controller_midi.c:497 ../modules/controller_midi.c:568
#, c-format #, c-format
msgid "Device not available: %s" msgid "Device not available: %s"
msgstr "" msgstr ""
#: ../modules/controller_linux_input.c:614 #: ../modules/controller_linux_input.c:588
#: ../modules/controller_dx_dinput.c:1147 #: ../modules/controller_dx_dinput.c:1120
msgid "Device not available" msgid "Device not available"
msgstr "" msgstr ""
#: ../modules/controller_linux_input.c:658 ../modules/controller_midi.c:605 #: ../modules/controller_linux_input.c:632 ../modules/controller_midi.c:577
msgid "End of file" msgid "End of file"
msgstr "Fin de fichièr" msgstr "Fin de fichièr"
#: ../modules/controller_dx_dinput.c:157 #: ../modules/controller_dx_dinput.c:156
msgid "DirectX DirectInput event controller" msgid "DirectX DirectInput event controller"
msgstr "" msgstr ""
#: ../modules/controller_dx_dinput.c:228 #: ../modules/controller_dx_dinput.c:197
msgid "The device to read DirectInput events from." msgid "The device to read DirectInput events from."
msgstr "" msgstr ""
#: ../modules/controller_dx_dinput.c:237 #: ../modules/controller_dx_dinput.c:206
msgid "DirectX DirectInput" msgid "DirectX DirectInput"
msgstr "" msgstr ""
#: ../modules/controller_dx_dinput.c:446 #: ../modules/controller_dx_dinput.c:420
#, c-format #, c-format
msgid "Button %d" msgid "Button %d"
msgstr "" msgstr ""
#: ../modules/controller_dx_dinput.c:449 #: ../modules/controller_dx_dinput.c:423
#, c-format #, c-format
msgid "Button %d Press" msgid "Button %d Press"
msgstr "" msgstr ""
#: ../modules/controller_dx_dinput.c:452 #: ../modules/controller_dx_dinput.c:426
#, c-format #, c-format
msgid "Button %d Release" msgid "Button %d Release"
msgstr "" msgstr ""
#: ../modules/controller_dx_dinput.c:478 #: ../modules/controller_dx_dinput.c:452
msgid "Y Move Away" msgid "Y Move Away"
msgstr "" msgstr ""
#: ../modules/controller_dx_dinput.c:481 #: ../modules/controller_dx_dinput.c:455
msgid "Y Move Near" msgid "Y Move Near"
msgstr "" msgstr ""
#: ../modules/controller_dx_dinput.c:496 #: ../modules/controller_dx_dinput.c:470
msgid "X Axis Tilt Away" msgid "X Axis Tilt Away"
msgstr "" msgstr ""
#: ../modules/controller_dx_dinput.c:499 #: ../modules/controller_dx_dinput.c:473
msgid "X Axis Tilt Near" msgid "X Axis Tilt Near"
msgstr "" msgstr ""
#: ../modules/controller_dx_dinput.c:528 #: ../modules/controller_dx_dinput.c:502
#, c-format #, c-format
msgid "Slider %d Increase" msgid "Slider %d Increase"
msgstr "" msgstr ""
#: ../modules/controller_dx_dinput.c:531 #: ../modules/controller_dx_dinput.c:505
#, c-format #, c-format
msgid "Slider %d Decrease" msgid "Slider %d Decrease"
msgstr "" msgstr ""
#: ../modules/controller_dx_dinput.c:541 #: ../modules/controller_dx_dinput.c:515
#, c-format #, c-format
msgid "POV %d X View" msgid "POV %d X View"
msgstr "" msgstr ""
#: ../modules/controller_dx_dinput.c:544 #: ../modules/controller_dx_dinput.c:518
#, c-format #, c-format
msgid "POV %d Y View" msgid "POV %d Y View"
msgstr "" msgstr ""
#: ../modules/controller_dx_dinput.c:547 #: ../modules/controller_dx_dinput.c:521
#, c-format #, c-format
msgid "POV %d Return" msgid "POV %d Return"
msgstr "" msgstr ""
#: ../modules/controller_dx_dinput.c:1111 #: ../modules/controller_dx_dinput.c:1084
msgid "DirectInput Events" msgid "DirectInput Events"
msgstr "" msgstr ""
#: ../modules/controller_midi.c:167 #: ../modules/controller_midi.c:164
msgid "MIDI event controller" msgid "MIDI event controller"
msgstr "" msgstr ""
#: ../modules/controller_midi.c:236 #: ../modules/controller_midi.c:203
msgid "The name of the device to read MIDI events from." msgid "The name of the device to read MIDI events from."
msgstr "" msgstr ""
#: ../modules/controller_midi.c:239 #: ../modules/controller_midi.c:206
msgid "Enter 'alsa' to use the ALSA sequencer." msgid "Enter 'alsa' to use the ALSA sequencer."
msgstr "" msgstr ""
#: ../modules/controller_midi.c:254 #: ../modules/controller_midi.c:221
msgid "Channel:" msgid "Channel:"
msgstr "Canal :" msgstr "Canal :"
#: ../modules/controller_midi.c:255 #: ../modules/controller_midi.c:222
msgid "" msgid ""
"The MIDI channel to read events from. Set to -1 for reading from all MIDI " "The MIDI channel to read events from. Set to -1 for reading from all MIDI "
"channels." "channels."
msgstr "" msgstr ""
#: ../modules/controller_midi.c:259 #: ../modules/controller_midi.c:226
msgid "MIDI" msgid "MIDI"
msgstr "MIDI" msgstr "MIDI"
#: ../modules/controller_midi.c:383 #: ../modules/controller_midi.c:355
#, c-format #, c-format
msgid "Note %02x on" msgid "Note %02x on"
msgstr "" msgstr ""
#: ../modules/controller_midi.c:386 #: ../modules/controller_midi.c:358
#, c-format #, c-format
msgid "Note %02x off" msgid "Note %02x off"
msgstr "" msgstr ""
#: ../modules/controller_midi.c:389 #: ../modules/controller_midi.c:361
#, c-format #, c-format
msgid "Controller %03d" msgid "Controller %03d"
msgstr "" msgstr ""
#: ../modules/controller_midi.c:436 #: ../modules/controller_midi.c:408
msgid "MIDI Events" msgid "MIDI Events"
msgstr "" msgstr ""
#: ../modules/controller_midi.c:454 #: ../modules/controller_midi.c:426
msgid "GIMP" msgid "GIMP"
msgstr "GIMP" msgstr "GIMP"
#: ../modules/controller_midi.c:456 #: ../modules/controller_midi.c:428
msgid "GIMP MIDI Input Controller" msgid "GIMP MIDI Input Controller"
msgstr "" msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,20 @@
2008-02-28 Alexandre Prokoudine <alexandre.prokoudine@gmail.com>
* ru.po: Updated Russian translation.
2008-02-23 Gabor Kelemen <kelemeng@gnome.hu>
* hu.po: Translation updated
2008-02-22 Ilkka Tuohela <hile@iki.fi>
* fi.po: Updated Finnish translation, including fix for
bug #514362.
2008-02-19 Kjartan Maraas <kmaraas@gnome.org>
* nb.po: Updated Norwegian bokmål translation.
2008-02-10 Daniel Nylander <po@danielnylander.se> 2008-02-10 Daniel Nylander <po@danielnylander.se>
* sv.po: Updated Swedish translation. * sv.po: Updated Swedish translation.

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,20 @@
# Hungarian translation of gimp-plug-ins. # Hungarian translation of gimp-plug-ins.
# Copyright (C) 2000, 2001, 2003, 2004, 2007 Free Software Foundation, Inc. # Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
# This file is distributed under the same license as the gimp-plug-ins package. # This file is distributed under the same license as the gimp-plug-ins package.
# #
# Andras Timar <timar@gnome.hu>, 2000, 2001, 2003. # Andras Timar <timar@gnome.hu>, 2000, 2001, 2003.
# Emese Kovacs <emese@gnome.hu>, 2001. # Emese Kovacs <emese@gnome.hu>, 2001.
# Laszlo Dvornik <dvornik@gnome.hu>, 2004. # Laszlo Dvornik <dvornik@gnome.hu>, 2004.
# Arpad Biro <biro_arpad@yahoo.com>, 2004, 2007. # Arpad Biro <biro_arpad@yahoo.com>, 2004, 2007.
# Gabor Kelemen <kelemeng@gnome.hu>, 2008.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gimp-plug-ins.HEAD\n" "Project-Id-Version: gimp-plug-ins.HEAD\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-10-12 10:11+0100\n" "POT-Creation-Date: 2007-10-12 10:11+0100\n"
"PO-Revision-Date: 2007-10-14 22:43+0200\n" "PO-Revision-Date: 2008-02-23 23:13+0100\n"
"Last-Translator: Arpad Biro <biro_arpad@yahoo.com>\n" "Last-Translator: Gabor Kelemen <kelemeng@gnome.hu>\n"
"Language-Team: Hungarian\n" "Language-Team: Hungarian <gnome@fsf.hu>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
@ -7232,9 +7233,7 @@ msgstr "Félig-lapítás"
#: ../plug-ins/common/sharpen.c:113 #: ../plug-ins/common/sharpen.c:113
msgid "Make image sharper (less powerful than Unsharp Mask)" msgid "Make image sharper (less powerful than Unsharp Mask)"
msgstr "" msgstr "A kép élesebbé tétele (nem ad olyan jó eredményt, mint az \"Életlen maszk\")"
"A kép élesebbé tevése (nem ad olyan jó eredményt, mint a \"Maszk életlenítése"
"\")"
#: ../plug-ins/common/sharpen.c:120 #: ../plug-ins/common/sharpen.c:120
msgid "_Sharpen..." msgid "_Sharpen..."
@ -8393,7 +8392,7 @@ msgstr "Az egyik legjobb képélesítési módszer"
#: ../plug-ins/common/unsharp.c:138 #: ../plug-ins/common/unsharp.c:138
msgid "_Unsharp Mask..." msgid "_Unsharp Mask..."
msgstr "_Maszk életlenítése..." msgstr "Életlen _maszk..."
#: ../plug-ins/common/unsharp.c:475 #: ../plug-ins/common/unsharp.c:475
msgid "Merging" msgid "Merging"
@ -8401,7 +8400,7 @@ msgstr "Összefésülés"
#: ../plug-ins/common/unsharp.c:642 #: ../plug-ins/common/unsharp.c:642
msgid "Unsharp Mask" msgid "Unsharp Mask"
msgstr "Maszk életlenítése" msgstr "Életlen maszk"
#: ../plug-ins/common/video.c:41 #: ../plug-ins/common/video.c:41
msgid "_Staggered" msgid "_Staggered"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,19 @@
2008-03-03 Vincent van Adrighem <adrighem@gnome.org>
* nl.po: Translation updated by Filip Vervloesem.
2008-02-28 Alexandre Prokoudine <alexandre.prokoudine@gmail.com>
* ru.po: Updated Russian translation.
2008-02-19 Kjartan Maraas <kmaraas@gnome.org>
* nb.po: Updated Norwegian bokmål translation.
2008-02-17 Marco Ciampa <ciampix@libero.it>
* it.po: small fix to it translation thanks to A. Falappa
2008-02-10 Daniel Nylander <po@danielnylander.se> 2008-02-10 Daniel Nylander <po@danielnylander.se>
* sv.po: Updated Swedish translation. * sv.po: Updated Swedish translation.
@ -6,10 +22,11 @@
* uk.po: Updated Ukrainian translation. * uk.po: Updated Ukrainian translation.
2007-12-31 Yannig Marchegay <yannig@marchegay.org> 2007-12-31 Yannig Marchegay <yannig@marchegay.org>
* oc.po: Updated Occitan translation. * oc.po: Updated Occitan translation.
2007-11-11 Duarte Loreto <happyguy_pt@hotmail.com>
2007-11-11 Duarte Loreto <happyguy_pt@hotmail.com>
* pt.po: Updated Portuguese translation by Filipe Gomes * pt.po: Updated Portuguese translation by Filipe Gomes
<filipefgomes@gmail.com>. <filipefgomes@gmail.com>.

View File

@ -1,13 +1,13 @@
# This is the Italian catalog for The GIMP. # This is the Italian catalog for The GIMP.
# Copyright (C) 1999 Free Software Foundation, Inc. # Copyright (C) 1999 Free Software Foundation, Inc.
# Daniele Medri <madrid@linux.it>, 2000, 2001, 2002 # Daniele Medri <madrid@linux.it>, 2000-2002
# Marco Ciampa <ciampix@libero.it>, 2003, 2004, 2005, 2006, 2007 # Marco Ciampa <ciampix@libero.it>, 2003-2008
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gimp 2.0\n" "Project-Id-Version: gimp 2.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-06-18 22:19+0200\n" "POT-Creation-Date: 2007-06-18 22:19+0200\n"
"PO-Revision-Date: 2007-03-25 15:29+0200\n" "PO-Revision-Date: 2008-02-17 22:13+0100\n"
"Last-Translator: Marco Ciampa <ciampix@libero.it>\n" "Last-Translator: Marco Ciampa <ciampix@libero.it>\n"
"Language-Team: gimp.linux.it\n" "Language-Team: gimp.linux.it\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -99,7 +99,7 @@ msgstr "Console Python"
#: ../plug-ins/pygimp/plug-ins/gimpcons.py:50 #: ../plug-ins/pygimp/plug-ins/gimpcons.py:50
msgid "_Browse..." msgid "_Browse..."
msgstr "_Naviga..." msgstr "_Scorri..."
#: ../plug-ins/pygimp/plug-ins/gimpcons.py:132 #: ../plug-ins/pygimp/plug-ins/gimpcons.py:132
msgid "Python Procedure Browser" msgid "Python Procedure Browser"

Some files were not shown because too many files have changed in this diff Show More