don't do lazy binding on GIMP modules. We can't recover from missing

2003-11-18  Sven Neumann  <sven@gimp.org>

	* libgimpmodule/gimpmodule.c (gimp_module_open): don't do lazy
	binding on GIMP modules. We can't recover from missing symbols
	later.

	* libgimpwidgets/gimpquerybox.[ch]: renamed "help_page" parameter
	to "help_id" and changed the docs accordingly.

	* libgimpwidgets/gimpcolordisplay.[ch]
	* libgimpwidgets/gimpcolorselector.[ch]: renamed the "help_page"
	struct members of GimpColorDisplay and GimpColorSelector to
	"help_id".

	* app/gui/color-notebook.c
	* app/widgets/gimpcoloreditor.c
	* libgimpwidgets/gimpcolorbutton.c
	* libgimpwidgets/gimpcolornotebook.c
	* libgimpwidgets/gimpcolorscales.c
	* libgimpwidgets/gimpcolorselect.c
	* modules/*.c: changed accordingly. Specify a help id instead of
	a HTML page.
This commit is contained in:
Sven Neumann 2003-11-18 23:44:35 +00:00 committed by Sven Neumann
parent 2fda21f6f3
commit 4f82e87d62
22 changed files with 121 additions and 99 deletions

View File

@ -1,3 +1,26 @@
2003-11-18 Sven Neumann <sven@gimp.org>
* libgimpmodule/gimpmodule.c (gimp_module_open): don't do lazy
binding on GIMP modules. We can't recover from missing symbols
later.
* libgimpwidgets/gimpquerybox.[ch]: renamed "help_page" parameter
to "help_id" and changed the docs accordingly.
* libgimpwidgets/gimpcolordisplay.[ch]
* libgimpwidgets/gimpcolorselector.[ch]: renamed the "help_page"
struct members of GimpColorDisplay and GimpColorSelector to
"help_id".
* app/gui/color-notebook.c
* app/widgets/gimpcoloreditor.c
* libgimpwidgets/gimpcolorbutton.c
* libgimpwidgets/gimpcolornotebook.c
* libgimpwidgets/gimpcolorscales.c
* libgimpwidgets/gimpcolorselect.c
* modules/*.c: changed accordingly. Specify a help id instead of
a HTML page.
2003-11-18 Sven Neumann <sven@gimp.org>
* plug-ins/common/png.c (load_image): inform the user when a PNG

View File

@ -338,7 +338,7 @@ color_notebook_help_func (const gchar *help_id,
notebook =
GIMP_COLOR_NOTEBOOK (GIMP_COLOR_SELECTION (cnp->selection)->notebook);
help_id = GIMP_COLOR_SELECTOR_GET_CLASS (notebook->cur_page)->help_page;
help_id = GIMP_COLOR_SELECTOR_GET_CLASS (notebook->cur_page)->help_id;
gimp_standard_help_func (help_id, NULL);
}

View File

@ -338,7 +338,7 @@ color_notebook_help_func (const gchar *help_id,
notebook =
GIMP_COLOR_NOTEBOOK (GIMP_COLOR_SELECTION (cnp->selection)->notebook);
help_id = GIMP_COLOR_SELECTOR_GET_CLASS (notebook->cur_page)->help_page;
help_id = GIMP_COLOR_SELECTOR_GET_CLASS (notebook->cur_page)->help_id;
gimp_standard_help_func (help_id, NULL);
}

View File

@ -338,7 +338,7 @@ color_notebook_help_func (const gchar *help_id,
notebook =
GIMP_COLOR_NOTEBOOK (GIMP_COLOR_SELECTION (cnp->selection)->notebook);
help_id = GIMP_COLOR_SELECTOR_GET_CLASS (notebook->cur_page)->help_page;
help_id = GIMP_COLOR_SELECTOR_GET_CLASS (notebook->cur_page)->help_id;
gimp_standard_help_func (help_id, NULL);
}

View File

@ -209,8 +209,7 @@ gimp_color_editor_init (GimpColorEditor *editor)
gtk_widget_show (image);
gimp_help_set_help_data (button,
selector_class->name,
selector_class->help_page);
selector_class->name, selector_class->help_id);
g_object_set_data (G_OBJECT (button), "selector", selector);
g_object_set_data (G_OBJECT (selector), "button", button);

View File

@ -423,7 +423,7 @@ gimp_module_state_name (GimpModuleState state)
static gboolean
gimp_module_open (GimpModule *module)
{
module->module = g_module_open (module->filename, G_MODULE_BIND_LAZY);
module->module = g_module_open (module->filename, 0);
if (! module->module)
{

View File

@ -631,7 +631,7 @@ gimp_color_button_help_func (const gchar *help_id,
notebook = GIMP_COLOR_NOTEBOOK (selection->notebook);
help_id = GIMP_COLOR_SELECTOR_GET_CLASS (notebook->cur_page)->help_page;
help_id = GIMP_COLOR_SELECTOR_GET_CLASS (notebook->cur_page)->help_id;
gimp_standard_help_func (help_id, NULL);
}

View File

@ -1,4 +1,4 @@
/* LIBGIMP - The GIMP Library
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpcolordisplay.c
@ -67,7 +67,7 @@ gimp_color_display_get_type (void)
};
display_type = g_type_register_static (G_TYPE_OBJECT,
"GimpColorDisplay",
"GimpColorDisplay",
&display_info, 0);
}
@ -88,8 +88,8 @@ gimp_color_display_class_init (GimpColorDisplayClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
klass->name = "EEK";
klass->help_page = "help_yourself.html";
klass->name = "Unnamed";
klass->help_id = NULL;
klass->clone = NULL;
klass->convert = NULL;

View File

@ -43,8 +43,8 @@ struct _GimpColorDisplayClass
{
GObjectClass parent_class;
const gchar *name;
const gchar *help_page;
const gchar *name;
const gchar *help_id;
/* virtual functions */
GimpColorDisplay * (* clone) (GimpColorDisplay *display);

View File

@ -127,7 +127,7 @@ gimp_color_notebook_class_init (GimpColorNotebookClass *klass)
widget_class->style_set = gimp_color_notebook_style_set;
selector_class->name = "Notebook";
selector_class->help_page = "notebook.html";
selector_class->help_id = "gimp-colorselector-notebook";
selector_class->set_toggles_visible = gimp_color_notebook_togg_visible;
selector_class->set_toggles_sensitive = gimp_color_notebook_togg_sensitive;
selector_class->set_show_alpha = gimp_color_notebook_set_show_alpha;

View File

@ -1,5 +1,5 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpcolorscales.c
* Copyright (C) 2002 Michael Natterer <mitch@gimp.org>
@ -11,10 +11,10 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
@ -119,7 +119,7 @@ gimp_color_scales_get_type (void)
};
scales_type = g_type_register_static (GIMP_TYPE_COLOR_SELECTOR,
"GimpColorScales",
"GimpColorScales",
&scales_info, 0);
}
@ -140,7 +140,7 @@ gimp_color_scales_class_init (GimpColorScalesClass *klass)
object_class->finalize = gimp_color_scales_finalize;
selector_class->name = _("Scales");
selector_class->help_page = "scales.html";
selector_class->help_id = "gimp-colorselector-scales";
selector_class->stock_id = GIMP_STOCK_TOOL_OPTIONS;
selector_class->set_toggles_visible = gimp_color_scales_togg_visible;
selector_class->set_toggles_sensitive = gimp_color_scales_togg_sensitive;
@ -159,8 +159,8 @@ gimp_color_scales_init (GimpColorScales *scales)
GSList *group;
gint i;
static const gchar *toggle_titles[] =
{
static const gchar *toggle_titles[] =
{
N_("_H"),
N_("_S"),
N_("_V"),
@ -169,7 +169,7 @@ gimp_color_scales_init (GimpColorScales *scales)
N_("_B"),
N_("_A")
};
static const gchar *slider_tips[7] =
static const gchar *slider_tips[7] =
{
N_("Hue"),
N_("Saturation"),
@ -226,7 +226,7 @@ gimp_color_scales_init (GimpColorScales *scales)
scales->slider_data[i] =
gimp_color_scale_entry_new (GTK_TABLE (table), 1, i,
gettext (toggle_titles[i]),
gettext (toggle_titles[i]),
80, -1,
slider_initial_vals[i],
0.0, slider_max_vals[i],
@ -537,7 +537,7 @@ gimp_color_scales_hex_events (GtkWidget *widget,
if ((sscanf (hex_color, "%x", &hex_rgb) == 1) &&
(hex_rgb < (1 << 24)))
{
gimp_rgb_set_uchar (&selector->rgb,
gimp_rgb_set_uchar (&selector->rgb,
(hex_rgb & 0xff0000) >> 16,
(hex_rgb & 0x00ff00) >> 8,
(hex_rgb & 0x0000ff));

View File

@ -261,7 +261,7 @@ gimp_color_select_class_init (GimpColorSelectClass *klass)
object_class->finalize = gimp_color_select_finalize;
selector_class->name = "GIMP";
selector_class->help_page = "built_in.html";
selector_class->help_id = "gimp-colorselector-gimp";
selector_class->stock_id = GIMP_STOCK_WILBER;
selector_class->set_toggles_visible = gimp_color_select_togg_visible;
selector_class->set_toggles_sensitive = gimp_color_select_togg_sensitive;

View File

@ -1,4 +1,4 @@
/* LIBGIMP - The GIMP Library
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpcolorselector.c
@ -73,7 +73,7 @@ gimp_color_selector_get_type (void)
};
selector_type = g_type_register_static (GTK_TYPE_VBOX,
"GimpColorSelector",
"GimpColorSelector",
&selector_info, 0);
}
@ -106,8 +106,8 @@ gimp_color_selector_class_init (GimpColorSelectorClass *klass)
G_TYPE_NONE, 1,
G_TYPE_INT);
klass->name = "EEK";
klass->help_page = "help_yourself.html";
klass->name = "Unnamed";
klass->help_id = NULL;
klass->stock_id = GTK_STOCK_SELECT_COLOR;
klass->set_toggles_visible = NULL;

View File

@ -1,4 +1,4 @@
/* LIBGIMP - The GIMP Library
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpcolorselector.h
@ -31,8 +31,8 @@ G_BEGIN_DECLS
/* For information look at the html documentation */
#define GIMP_COLOR_SELECTOR_SIZE 150
#define GIMP_COLOR_SELECTOR_BAR_SIZE 15
#define GIMP_COLOR_SELECTOR_SIZE 150
#define GIMP_COLOR_SELECTOR_BAR_SIZE 15
#define GIMP_TYPE_COLOR_SELECTOR (gimp_color_selector_get_type ())
@ -64,7 +64,7 @@ struct _GimpColorSelectorClass
GtkVBoxClass parent_class;
const gchar *name;
const gchar *help_page;
const gchar *help_id;
const gchar *stock_id;
/* virtual functions */

View File

@ -57,7 +57,7 @@ struct _QueryBox
static QueryBox * create_query_box (const gchar *title,
GtkWidget *parent,
GimpHelpFunc help_func,
const gchar *help_data,
const gchar *help_id,
GCallback response_callback,
const gchar *stock_id,
const gchar *message,
@ -96,7 +96,7 @@ static QueryBox *
create_query_box (const gchar *title,
GtkWidget *parent,
GimpHelpFunc help_func,
const gchar *help_data,
const gchar *help_id,
GCallback response_callback,
const gchar *stock_id,
const gchar *message,
@ -121,7 +121,7 @@ create_query_box (const gchar *title,
query_box->qbox = gimp_dialog_new (title, "gimp-query-box",
parent, 0,
help_func, help_data,
help_func, help_id,
cancel_button, GTK_RESPONSE_CANCEL,
ok_button, GTK_RESPONSE_OK,
@ -205,7 +205,7 @@ create_query_box (const gchar *title,
* @title: The query box dialog's title.
* @parent: The dialog's parent widget.
* @help_func: The help function to show this dialog's help page.
* @help_data: A string pointing to this dialog's html help page.
* @help_id: A string identifying this dialog's help page.
* @message: A string which will be shown above the dialog's entry widget.
* @initial: The initial value.
* @object: The object this query box is associated with.
@ -221,7 +221,7 @@ GtkWidget *
gimp_query_string_box (const gchar *title,
GtkWidget *parent,
GimpHelpFunc help_func,
const gchar *help_data,
const gchar *help_id,
const gchar *message,
const gchar *initial,
GObject *object,
@ -232,7 +232,7 @@ gimp_query_string_box (const gchar *title,
QueryBox *query_box;
GtkWidget *entry;
query_box = create_query_box (title, parent, help_func, help_data,
query_box = create_query_box (title, parent, help_func, help_id,
G_CALLBACK (string_query_box_response),
GTK_STOCK_DIALOG_QUESTION,
message,
@ -260,7 +260,7 @@ gimp_query_string_box (const gchar *title,
* @title: The query box dialog's title.
* @parent: The dialog's parent widget.
* @help_func: The help function to show this dialog's help page.
* @help_data: A string pointing to this dialog's html help page.
* @help_id: A string identifying this dialog's help page.
* @message: A string which will be shown above the dialog's entry widget.
* @initial: The initial value.
* @lower: The lower boundary of the range of possible values.
@ -278,7 +278,7 @@ GtkWidget *
gimp_query_int_box (const gchar *title,
GtkWidget *parent,
GimpHelpFunc help_func,
const gchar *help_data,
const gchar *help_id,
const gchar *message,
gint initial,
gint lower,
@ -292,7 +292,7 @@ gimp_query_int_box (const gchar *title,
GtkWidget *spinbutton;
GtkObject *adjustment;
query_box = create_query_box (title, parent, help_func, help_data,
query_box = create_query_box (title, parent, help_func, help_id,
G_CALLBACK (int_query_box_response),
GTK_STOCK_DIALOG_QUESTION,
message,
@ -320,7 +320,7 @@ gimp_query_int_box (const gchar *title,
* @title: The query box dialog's title.
* @parent: The dialog's parent widget.
* @help_func: The help function to show this dialog's help page.
* @help_data: A string pointing to this dialog's html help page.
* @help_id: A string identifying this dialog's help page.
* @message: A string which will be shown above the dialog's entry widget.
* @initial: The initial value.
* @lower: The lower boundary of the range of possible values.
@ -339,7 +339,7 @@ GtkWidget *
gimp_query_double_box (const gchar *title,
GtkWidget *parent,
GimpHelpFunc help_func,
const gchar *help_data,
const gchar *help_id,
const gchar *message,
gdouble initial,
gdouble lower,
@ -354,7 +354,7 @@ gimp_query_double_box (const gchar *title,
GtkWidget *spinbutton;
GtkObject *adjustment;
query_box = create_query_box (title, parent, help_func, help_data,
query_box = create_query_box (title, parent, help_func, help_id,
G_CALLBACK (double_query_box_response),
GTK_STOCK_DIALOG_QUESTION,
message,
@ -382,7 +382,7 @@ gimp_query_double_box (const gchar *title,
* @title: The query box dialog's title.
* @parent: The dialog's parent widget.
* @help_func: The help function to show this dialog's help page.
* @help_data: A string pointing to this dialog's html help page.
* @help_id: A string identifying this dialog's help page.
* @message: A string which will be shown above the dialog's entry widget.
* @initial: The initial value.
* @lower: The lower boundary of the range of possible values.
@ -408,7 +408,7 @@ GtkWidget *
gimp_query_size_box (const gchar *title,
GtkWidget *parent,
GimpHelpFunc help_func,
const gchar *help_data,
const gchar *help_id,
const gchar *message,
gdouble initial,
gdouble lower,
@ -425,7 +425,7 @@ gimp_query_size_box (const gchar *title,
QueryBox *query_box;
GtkWidget *sizeentry;
query_box = create_query_box (title, parent, help_func, help_data,
query_box = create_query_box (title, parent, help_func, help_id,
G_CALLBACK (size_query_box_response),
GTK_STOCK_DIALOG_QUESTION,
message,
@ -461,7 +461,7 @@ gimp_query_size_box (const gchar *title,
* @title: The query box dialog's title.
* @parent: The dialog's parent widget.
* @help_func: The help function to show this dialog's help page.
* @help_data: A string pointing to this dialog's html help page.
* @help_id: A string identifying this dialog's help page.
* @stock_id: A stock_id to specify an icon to appear on the left
* on the dialog's message.
* @message: A string which will be shown in the query box.
@ -482,7 +482,7 @@ GtkWidget *
gimp_query_boolean_box (const gchar *title,
GtkWidget *parent,
GimpHelpFunc help_func,
const gchar *help_data,
const gchar *help_id,
const gchar *stock_id,
const gchar *message,
const gchar *true_button,
@ -494,7 +494,7 @@ gimp_query_boolean_box (const gchar *title,
{
QueryBox *query_box;
query_box = create_query_box (title, parent, help_func, help_data,
query_box = create_query_box (title, parent, help_func, help_id,
G_CALLBACK (boolean_query_box_response),
stock_id,
message,

View File

@ -59,7 +59,7 @@ typedef void (* GimpQueryBooleanCallback) (GtkWidget *query_box,
GtkWidget * gimp_query_string_box (const gchar *title,
GtkWidget *parent,
GimpHelpFunc help_func,
const gchar *help_data,
const gchar *help_id,
const gchar *message,
const gchar *initial,
GObject *object,
@ -70,7 +70,7 @@ GtkWidget * gimp_query_string_box (const gchar *title,
GtkWidget * gimp_query_int_box (const gchar *title,
GtkWidget *parent,
GimpHelpFunc help_func,
const gchar *help_data,
const gchar *help_id,
const gchar *message,
gint initial,
gint lower,
@ -83,7 +83,7 @@ GtkWidget * gimp_query_int_box (const gchar *title,
GtkWidget * gimp_query_double_box (const gchar *title,
GtkWidget *parent,
GimpHelpFunc help_func,
const gchar *help_data,
const gchar *help_id,
const gchar *message,
gdouble initial,
gdouble lower,
@ -97,7 +97,7 @@ GtkWidget * gimp_query_double_box (const gchar *title,
GtkWidget * gimp_query_size_box (const gchar *title,
GtkWidget *parent,
GimpHelpFunc help_func,
const gchar *help_data,
const gchar *help_id,
const gchar *message,
gdouble initial,
gdouble lower,
@ -114,7 +114,7 @@ GtkWidget * gimp_query_size_box (const gchar *title,
GtkWidget * gimp_query_boolean_box (const gchar *title,
GtkWidget *parent,
GimpHelpFunc help_func,
const gchar *help_data,
const gchar *help_id,
const gchar *stock_id,
const gchar *message,
const gchar *true_button,

View File

@ -7,8 +7,8 @@
* Robert Dougherty <bob@vischeck.com> and
* Alex Wade <alex@vischeck.com>
*
* This code is an implementation of an algorithm described by Hans Brettel,
* Francoise Vienot and John Mollon in the Journal of the Optical Society of
* This code is an implementation of an algorithm described by Hans Brettel,
* Francoise Vienot and John Mollon in the Journal of the Optical Society of
* America V14(10), pg 2647. (See http://vischeck.com/ for more info.)
*
* This program is free software; you can redistribute it and/or modify
@ -116,7 +116,7 @@ static void colorblind_deficiency_callback (GtkWidget *widget
CdisplayColorblind *colorblind);
static const GimpModuleInfo cdisplay_colorblind_info =
static const GimpModuleInfo cdisplay_colorblind_info =
{
GIMP_MODULE_ABI_VERSION,
N_("Color deficit simulation filter (Brettel-Vienot-Mollon algorithm)"),
@ -186,7 +186,7 @@ cdisplay_colorblind_class_init (CdisplayColorblindClass *klass)
object_class->finalize = cdisplay_colorblind_finalize;
display_class->name = _("Color Deficient Vision");
display_class->help_page = "modules/colorblind.html";
display_class->help_id = "gimp-colordisplay-colorblind";
display_class->clone = cdisplay_colorblind_clone;
display_class->convert = cdisplay_colorblind_convert;
display_class->load_state = cdisplay_colorblind_load_state;
@ -325,7 +325,7 @@ cdisplay_colorblind_convert (GimpColorDisplay *display,
if (colorblind->cache[2 * index] == pixel)
{
pixel = colorblind->cache[2 * index + 1];
b[2] = pixel & 0xFF; pixel >>= 8;
b[1] = pixel & 0xFF; pixel >>= 8;
b[0] = pixel & 0xFF;
@ -341,18 +341,18 @@ cdisplay_colorblind_convert (GimpColorDisplay *display,
red = pow (red, 1.0 / colorblind->gammaRGB[0]);
green = pow (green, 1.0 / colorblind->gammaRGB[1]);
blue = pow (blue, 1.0 / colorblind->gammaRGB[2]);
/* Convert to LMS (dot product with transform matrix) */
redOld = red;
greenOld = green;
red = redOld * rgb2lms[0] + greenOld * rgb2lms[1] + blue * rgb2lms[2];
green = redOld * rgb2lms[3] + greenOld * rgb2lms[4] + blue * rgb2lms[5];
blue = redOld * rgb2lms[6] + greenOld * rgb2lms[7] + blue * rgb2lms[8];
switch (colorblind->deficiency)
{
case COLORBLIND_DEFICIENCY_DEUTERANOPIA:
case COLORBLIND_DEFICIENCY_DEUTERANOPIA:
tmp = blue / red;
/* See which side of the inflection line we fall... */
if (tmp < colorblind->inflection)
@ -361,7 +361,7 @@ cdisplay_colorblind_convert (GimpColorDisplay *display,
green = -(a2 * red + c2 * blue) / b2;
break;
case COLORBLIND_DEFICIENCY_PROTANOPIA:
case COLORBLIND_DEFICIENCY_PROTANOPIA:
tmp = blue / green;
/* See which side of the inflection line we fall... */
if (tmp < colorblind->inflection)
@ -369,7 +369,7 @@ cdisplay_colorblind_convert (GimpColorDisplay *display,
else
red = -(b2 * green + c2 * blue) / a2;
break;
case COLORBLIND_DEFICIENCY_TRITANOPIA:
tmp = green / red;
/* See which side of the inflection line we fall... */
@ -386,27 +386,27 @@ cdisplay_colorblind_convert (GimpColorDisplay *display,
/* Convert back to RGB (cross product with transform matrix) */
redOld = red;
greenOld = green;
red = redOld * lms2rgb[0] + greenOld * lms2rgb[1] + blue * lms2rgb[2];
green = redOld * lms2rgb[3] + greenOld * lms2rgb[4] + blue * lms2rgb[5];
blue = redOld * lms2rgb[6] + greenOld * lms2rgb[7] + blue * lms2rgb[8];
/* Apply gamma to go back to non-linear intensities */
red = pow (red, colorblind->gammaRGB[0]);
green = pow (green, colorblind->gammaRGB[1]);
blue = pow (blue, colorblind->gammaRGB[2]);
/* Ensure that we stay within the RGB gamut */
/* *** FIX THIS: it would be better to desaturate than blindly clip. */
red = CLAMP (red, 0, 255);
green = CLAMP (green, 0, 255);
blue = CLAMP (blue, 0, 255);
/* Stuff result back into buffer */
b[0] = (guchar) red;
b[1] = (guchar) green;
b[2] = (guchar) blue;
/* Put the result into our cache */
colorblind->cache[2 * index] = pixel;
colorblind->cache[2 * index + 1] = b[0] << 16 | b[1] << 8 | b[2];
@ -504,7 +504,7 @@ static void
cdisplay_colorblind_configure_reset (GimpColorDisplay *display)
{
CdisplayColorblind *colorblind;
colorblind = CDISPLAY_COLORBLIND (display);
if (colorblind->optionmenu)
@ -530,7 +530,7 @@ cdisplay_colorblind_changed (GimpColorDisplay *display)
colorblind = CDISPLAY_COLORBLIND (display);
/* Performs protan, deutan or tritan color image simulation based on
/* Performs protan, deutan or tritan color image simulation based on
* Brettel, Vienot and Mollon JOSA 14/10 1997
* L,M,S for lambda=475,485,575,660
*
@ -541,8 +541,8 @@ cdisplay_colorblind_changed (GimpColorDisplay *display)
anchor[0] = 0.08008; anchor[1] = 0.1579; anchor[2] = 0.5897;
anchor[3] = 0.1284; anchor[4] = 0.2237; anchor[5] = 0.3636;
anchor[6] = 0.9856; anchor[7] = 0.7325; anchor[8] = 0.001079;
anchor[9] = 0.0914; anchor[10] = 0.007009; anchor[11] = 0.0;
anchor[9] = 0.0914; anchor[10] = 0.007009; anchor[11] = 0.0;
/* We also need LMS for RGB=(1,1,1)- the equal-energy point (one of
* our anchors) (we can just peel this out of the rgb2lms transform
* matrix)

View File

@ -154,7 +154,7 @@ cdisplay_gamma_class_init (CdisplayGammaClass *klass)
object_class->finalize = cdisplay_gamma_finalize;
display_class->name = _("Gamma");
display_class->help_page = "modules/gamma.html";
display_class->help_id = "gimp-colordisplay-gamma";
display_class->clone = cdisplay_gamma_clone;
display_class->convert = cdisplay_gamma_convert;
display_class->load_state = cdisplay_gamma_load_state;

View File

@ -84,7 +84,7 @@ static void contrast_configure_adj_callback (GtkAdjustment *adj,
CdisplayContrast *contrast);
static const GimpModuleInfo cdisplay_contrast_info =
static const GimpModuleInfo cdisplay_contrast_info =
{
GIMP_MODULE_ABI_VERSION,
N_("High Contrast color display filter"),
@ -154,7 +154,7 @@ cdisplay_contrast_class_init (CdisplayContrastClass *klass)
object_class->finalize = cdisplay_contrast_finalize;
display_class->name = _("Contrast");
display_class->help_page = "modules/contrast.html";
display_class->help_id = "gimp-colordisplay-contrast";
display_class->clone = cdisplay_contrast_clone;
display_class->convert = cdisplay_contrast_convert;
display_class->load_state = cdisplay_contrast_load_state;
@ -203,7 +203,7 @@ cdisplay_contrast_clone (GimpColorDisplay *display)
copy = CDISPLAY_CONTRAST (gimp_color_display_new (G_TYPE_FROM_INSTANCE (contrast)));
copy->contrast = contrast->contrast;
memcpy (copy->lookup, contrast->lookup, sizeof (guchar) * 256);
return GIMP_COLOR_DISPLAY (copy);
@ -222,7 +222,7 @@ cdisplay_contrast_convert (GimpColorDisplay *display,
contrast = CDISPLAY_CONTRAST (display);
/* You will not be using the entire buffer most of the time.
/* You will not be using the entire buffer most of the time.
* Hence, the simplistic code for this is as follows:
*
* for (j = 0; j < height; j++)
@ -337,7 +337,7 @@ static void
cdisplay_contrast_configure_reset (GimpColorDisplay *display)
{
CdisplayContrast *contrast;
contrast = CDISPLAY_CONTRAST (display);
if (contrast->adjustment)

View File

@ -129,10 +129,10 @@ colorsel_cmyk_class_init (ColorselCmykClass *klass)
selector_class = GIMP_COLOR_SELECTOR_CLASS (klass);
selector_class->name = _("CMYK");
selector_class->help_page = "cmyk.html";
selector_class->stock_id = GTK_STOCK_PRINT; /* FIXME */
selector_class->set_color = colorsel_cmyk_set_color;
selector_class->name = _("CMYK");
selector_class->help_id = "gimp-colorselector-cmyk";
selector_class->stock_id = GTK_STOCK_PRINT; /* FIXME */
selector_class->set_color = colorsel_cmyk_set_color;
}
static void

View File

@ -177,12 +177,12 @@ colorsel_triangle_class_init (ColorselTriangleClass *klass)
parent_class = g_type_class_peek_parent (klass);
object_class->finalize = colorsel_triangle_finalize;
object_class->finalize = colorsel_triangle_finalize;
selector_class->name = _("Triangle");
selector_class->help_page = "triangle.html";
selector_class->stock_id = GIMP_STOCK_COLOR_TRIANGLE;
selector_class->set_color = colorsel_triangle_set_color;
selector_class->name = _("Triangle");
selector_class->help_id = "gimp-colorselector-triangle";
selector_class->stock_id = GIMP_STOCK_COLOR_TRIANGLE;
selector_class->set_color = colorsel_triangle_set_color;
}
static void

View File

@ -171,12 +171,12 @@ colorsel_water_class_init (ColorselWaterClass *klass)
parent_class = g_type_class_peek_parent (klass);
object_class->finalize = colorsel_water_finalize;
object_class->finalize = colorsel_water_finalize;
selector_class->name = _("Watercolor");
selector_class->help_page = "watercolor.html";
selector_class->stock_id = GIMP_STOCK_TOOL_PAINTBRUSH;
selector_class->set_color = colorsel_water_set_color;
selector_class->name = _("Watercolor");
selector_class->help_id = "gimp-colorselector-watercolor";
selector_class->stock_id = GIMP_STOCK_TOOL_PAINTBRUSH;
selector_class->set_color = colorsel_water_set_color;
}
static void