mirror of https://github.com/GNOME/gimp.git
allow to access (read-only) the current color management configuration
2005-06-26 Sven Neumann <sven@gimp.org> * tools/pdbgen/pdb/gimprc.pdb: allow to access (read-only) the current color management configuration through the PDB. * libgimp/gimpgimprc_pdb.[ch] * app/pdb/gimprc_cmds.c * app/pdb/internal_procs.c: regenerated. * libgimp/Makefile.am * libgimp/gimp.h * libgimp/gimpgimprc.[ch]: wrap the new PDB function to make it easier to use from plug-ins. This change adds a dependency on libgimpconfig to libgimp. * gimp.pc.in: changed accordingly. * plug-ins/FractalExplorer/Dialogs.c * plug-ins/gfig/gfig-dialog.c * plug-ins/gflare/gflare.c: no need to include gimpconfig.h explicitely any longer. * libgimp/gimpfontselectbutton.c: fixed gtk-doc comments.
This commit is contained in:
parent
017af36f1e
commit
b10218ce5a
24
ChangeLog
24
ChangeLog
|
@ -1,3 +1,27 @@
|
||||||
|
2005-06-26 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* tools/pdbgen/pdb/gimprc.pdb: allow to access (read-only) the
|
||||||
|
current color management configuration through the PDB.
|
||||||
|
|
||||||
|
* libgimp/gimpgimprc_pdb.[ch]
|
||||||
|
* app/pdb/gimprc_cmds.c
|
||||||
|
* app/pdb/internal_procs.c: regenerated.
|
||||||
|
|
||||||
|
* libgimp/Makefile.am
|
||||||
|
* libgimp/gimp.h
|
||||||
|
* libgimp/gimpgimprc.[ch]: wrap the new PDB function to make it
|
||||||
|
easier to use from plug-ins. This change adds a dependency on
|
||||||
|
libgimpconfig to libgimp.
|
||||||
|
|
||||||
|
* gimp.pc.in: changed accordingly.
|
||||||
|
|
||||||
|
* plug-ins/FractalExplorer/Dialogs.c
|
||||||
|
* plug-ins/gfig/gfig-dialog.c
|
||||||
|
* plug-ins/gflare/gflare.c: no need to include gimpconfig.h
|
||||||
|
explicitely any longer.
|
||||||
|
|
||||||
|
* libgimp/gimpfontselectbutton.c: fixed gtk-doc comments.
|
||||||
|
|
||||||
2005-06-26 Sven Neumann <sven@gimp.org>
|
2005-06-26 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* modules/cdisplay_lcms.c: also use bold, right-aligned labels here.
|
* modules/cdisplay_lcms.c: also use bold, right-aligned labels here.
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
|
||||||
|
#include "libgimpconfig/gimpconfig.h"
|
||||||
#include "libgimpmodule/gimpmodule.h"
|
#include "libgimpmodule/gimpmodule.h"
|
||||||
|
|
||||||
#include "pdb-types.h"
|
#include "pdb-types.h"
|
||||||
|
@ -40,6 +41,7 @@ static ProcRecord gimprc_set_proc;
|
||||||
static ProcRecord get_default_comment_proc;
|
static ProcRecord get_default_comment_proc;
|
||||||
static ProcRecord get_monitor_resolution_proc;
|
static ProcRecord get_monitor_resolution_proc;
|
||||||
static ProcRecord get_theme_dir_proc;
|
static ProcRecord get_theme_dir_proc;
|
||||||
|
static ProcRecord get_color_configuration_proc;
|
||||||
static ProcRecord get_module_load_inhibit_proc;
|
static ProcRecord get_module_load_inhibit_proc;
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -50,6 +52,7 @@ register_gimprc_procs (Gimp *gimp)
|
||||||
procedural_db_register (gimp, &get_default_comment_proc);
|
procedural_db_register (gimp, &get_default_comment_proc);
|
||||||
procedural_db_register (gimp, &get_monitor_resolution_proc);
|
procedural_db_register (gimp, &get_monitor_resolution_proc);
|
||||||
procedural_db_register (gimp, &get_theme_dir_proc);
|
procedural_db_register (gimp, &get_theme_dir_proc);
|
||||||
|
procedural_db_register (gimp, &get_color_configuration_proc);
|
||||||
procedural_db_register (gimp, &get_module_load_inhibit_proc);
|
procedural_db_register (gimp, &get_module_load_inhibit_proc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,6 +326,49 @@ static ProcRecord get_theme_dir_proc =
|
||||||
{ { get_theme_dir_invoker } }
|
{ { get_theme_dir_invoker } }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static Argument *
|
||||||
|
get_color_configuration_invoker (Gimp *gimp,
|
||||||
|
GimpContext *context,
|
||||||
|
GimpProgress *progress,
|
||||||
|
Argument *args)
|
||||||
|
{
|
||||||
|
Argument *return_args;
|
||||||
|
gchar *config;
|
||||||
|
|
||||||
|
config = gimp_config_serialize_to_string (GIMP_CONFIG (gimp->config->color_management), NULL);
|
||||||
|
|
||||||
|
return_args = procedural_db_return_args (&get_color_configuration_proc, TRUE);
|
||||||
|
return_args[1].value.pdb_pointer = config;
|
||||||
|
|
||||||
|
return return_args;
|
||||||
|
}
|
||||||
|
|
||||||
|
static ProcArg get_color_configuration_outargs[] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
GIMP_PDB_STRING,
|
||||||
|
"config",
|
||||||
|
"Serialized color management configuration"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
static ProcRecord get_color_configuration_proc =
|
||||||
|
{
|
||||||
|
"gimp_get_color_configuration",
|
||||||
|
"Get a serialized version of the color management configuration.",
|
||||||
|
"Returns a string that can be deserialized into a GimpColorConfig object representing the current color management configuration.",
|
||||||
|
"Sven Neumann",
|
||||||
|
"Sven Neumann",
|
||||||
|
"2005",
|
||||||
|
NULL,
|
||||||
|
GIMP_INTERNAL,
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
|
1,
|
||||||
|
get_color_configuration_outargs,
|
||||||
|
{ { get_color_configuration_invoker } }
|
||||||
|
};
|
||||||
|
|
||||||
static Argument *
|
static Argument *
|
||||||
get_module_load_inhibit_invoker (Gimp *gimp,
|
get_module_load_inhibit_invoker (Gimp *gimp,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
|
|
|
@ -75,7 +75,7 @@ void register_undo_procs (Gimp *gimp);
|
||||||
void register_unit_procs (Gimp *gimp);
|
void register_unit_procs (Gimp *gimp);
|
||||||
void register_vectors_procs (Gimp *gimp);
|
void register_vectors_procs (Gimp *gimp);
|
||||||
|
|
||||||
/* 462 procedures registered total */
|
/* 463 procedures registered total */
|
||||||
|
|
||||||
void
|
void
|
||||||
internal_procs_init (Gimp *gimp,
|
internal_procs_init (Gimp *gimp,
|
||||||
|
@ -111,13 +111,13 @@ internal_procs_init (Gimp *gimp,
|
||||||
(* status_callback) (NULL, _("Drawable procedures"), 0.186);
|
(* status_callback) (NULL, _("Drawable procedures"), 0.186);
|
||||||
register_drawable_procs (gimp);
|
register_drawable_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Transformation procedures"), 0.26);
|
(* status_callback) (NULL, _("Transformation procedures"), 0.259);
|
||||||
register_drawable_transform_procs (gimp);
|
register_drawable_transform_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Edit procedures"), 0.294);
|
(* status_callback) (NULL, _("Edit procedures"), 0.294);
|
||||||
register_edit_procs (gimp);
|
register_edit_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("File Operations"), 0.314);
|
(* status_callback) (NULL, _("File Operations"), 0.313);
|
||||||
register_fileops_procs (gimp);
|
register_fileops_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Floating selections"), 0.335);
|
(* status_callback) (NULL, _("Floating selections"), 0.335);
|
||||||
|
@ -126,70 +126,70 @@ internal_procs_init (Gimp *gimp,
|
||||||
(* status_callback) (NULL, _("Font UI"), 0.348);
|
(* status_callback) (NULL, _("Font UI"), 0.348);
|
||||||
register_font_select_procs (gimp);
|
register_font_select_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Fonts"), 0.355);
|
(* status_callback) (NULL, _("Fonts"), 0.354);
|
||||||
register_fonts_procs (gimp);
|
register_fonts_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Gimprc procedures"), 0.359);
|
(* status_callback) (NULL, _("Gimprc procedures"), 0.359);
|
||||||
register_gimprc_procs (gimp);
|
register_gimprc_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Gradient"), 0.372);
|
(* status_callback) (NULL, _("Gradient"), 0.374);
|
||||||
register_gradient_procs (gimp);
|
register_gradient_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Gradient UI"), 0.437);
|
(* status_callback) (NULL, _("Gradient UI"), 0.438);
|
||||||
register_gradient_select_procs (gimp);
|
register_gradient_select_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Gradients"), 0.444);
|
(* status_callback) (NULL, _("Gradients"), 0.445);
|
||||||
register_gradients_procs (gimp);
|
register_gradients_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Guide procedures"), 0.455);
|
(* status_callback) (NULL, _("Guide procedures"), 0.456);
|
||||||
register_guides_procs (gimp);
|
register_guides_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Help procedures"), 0.468);
|
(* status_callback) (NULL, _("Help procedures"), 0.469);
|
||||||
register_help_procs (gimp);
|
register_help_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Image"), 0.47);
|
(* status_callback) (NULL, _("Image"), 0.471);
|
||||||
register_image_procs (gimp);
|
register_image_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Layer"), 0.606);
|
(* status_callback) (NULL, _("Layer"), 0.607);
|
||||||
register_layer_procs (gimp);
|
register_layer_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Message procedures"), 0.665);
|
(* status_callback) (NULL, _("Message procedures"), 0.665);
|
||||||
register_message_procs (gimp);
|
register_message_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Miscellaneous"), 0.671);
|
(* status_callback) (NULL, _("Miscellaneous"), 0.672);
|
||||||
register_misc_procs (gimp);
|
register_misc_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Paint Tool procedures"), 0.675);
|
(* status_callback) (NULL, _("Paint Tool procedures"), 0.676);
|
||||||
register_paint_tools_procs (gimp);
|
register_paint_tools_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Palette"), 0.708);
|
(* status_callback) (NULL, _("Palette"), 0.708);
|
||||||
register_palette_procs (gimp);
|
register_palette_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Palette UI"), 0.738);
|
(* status_callback) (NULL, _("Palette UI"), 0.739);
|
||||||
register_palette_select_procs (gimp);
|
register_palette_select_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Palettes"), 0.745);
|
(* status_callback) (NULL, _("Palettes"), 0.745);
|
||||||
register_palettes_procs (gimp);
|
register_palettes_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Parasite procedures"), 0.753);
|
(* status_callback) (NULL, _("Parasite procedures"), 0.754);
|
||||||
register_parasite_procs (gimp);
|
register_parasite_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Paths"), 0.779);
|
(* status_callback) (NULL, _("Paths"), 0.78);
|
||||||
register_paths_procs (gimp);
|
register_paths_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Pattern"), 0.814);
|
(* status_callback) (NULL, _("Pattern"), 0.814);
|
||||||
register_pattern_procs (gimp);
|
register_pattern_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Pattern UI"), 0.818);
|
(* status_callback) (NULL, _("Pattern UI"), 0.819);
|
||||||
register_pattern_select_procs (gimp);
|
register_pattern_select_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Patterns"), 0.825);
|
(* status_callback) (NULL, _("Patterns"), 0.825);
|
||||||
register_patterns_procs (gimp);
|
register_patterns_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Plug-in"), 0.833);
|
(* status_callback) (NULL, _("Plug-in"), 0.834);
|
||||||
register_plug_in_procs (gimp);
|
register_plug_in_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Procedural database"), 0.846);
|
(* status_callback) (NULL, _("Procedural database"), 0.847);
|
||||||
register_procedural_db_procs (gimp);
|
register_procedural_db_procs (gimp);
|
||||||
|
|
||||||
(* status_callback) (NULL, _("Progress"), 0.866);
|
(* status_callback) (NULL, _("Progress"), 0.866);
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
2005-06-26 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* libgimp/libgimp-docs.sgml
|
||||||
|
* libgimp/libgimp-sections.txt
|
||||||
|
* libgimp/libgimp.types: updated.
|
||||||
|
|
||||||
|
* libgimp/tmpl/gimpfontselectbutton.sgml: added new file.
|
||||||
|
|
||||||
|
* libgimp/tmpl/gimpgimprc.sgml: regenerated.
|
||||||
|
|
||||||
2005-06-25 Sven Neumann <sven@gimp.org>
|
2005-06-25 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* libgimpwidgets/libgimpwidgets-docs.sgml
|
* libgimpwidgets/libgimpwidgets-docs.sgml
|
||||||
|
|
|
@ -81,6 +81,7 @@
|
||||||
<chapter id="libgimp-selectors">
|
<chapter id="libgimp-selectors">
|
||||||
<title>Controlling the Core's Selection Dialogs</title>
|
<title>Controlling the Core's Selection Dialogs</title>
|
||||||
<xi:include href="xml/gimpbrushselect.xml" />
|
<xi:include href="xml/gimpbrushselect.xml" />
|
||||||
|
<xi:include href="xml/gimpfontselectbutton.xml" />
|
||||||
<xi:include href="xml/gimpfontselect.xml" />
|
<xi:include href="xml/gimpfontselect.xml" />
|
||||||
<xi:include href="xml/gimpgradientselect.xml" />
|
<xi:include href="xml/gimpgradientselect.xml" />
|
||||||
<xi:include href="xml/gimppaletteselect.xml" />
|
<xi:include href="xml/gimppaletteselect.xml" />
|
||||||
|
|
|
@ -374,6 +374,7 @@ gimp_fonts_set_popup
|
||||||
<FILE>gimpgimprc</FILE>
|
<FILE>gimpgimprc</FILE>
|
||||||
gimp_gimprc_query
|
gimp_gimprc_query
|
||||||
gimp_gimprc_set
|
gimp_gimprc_set
|
||||||
|
gimp_get_color_configuration
|
||||||
gimp_get_default_comment
|
gimp_get_default_comment
|
||||||
gimp_get_module_load_inhibit
|
gimp_get_module_load_inhibit
|
||||||
gimp_get_monitor_resolution
|
gimp_get_monitor_resolution
|
||||||
|
@ -918,6 +919,26 @@ GIMP_IS_PROGRESS_BAR_CLASS
|
||||||
GIMP_PROGRESS_BAR_GET_CLASS
|
GIMP_PROGRESS_BAR_GET_CLASS
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
|
<SECTION>
|
||||||
|
<FILE>gimpfontselectbutton</FILE>
|
||||||
|
<TITLE>GimpFontSelectButton</TITLE>
|
||||||
|
GimpFontSelectButton
|
||||||
|
gimp_font_select_button_new
|
||||||
|
gimp_font_select_button_get_font_name
|
||||||
|
gimp_font_select_button_set_font_name
|
||||||
|
gimp_font_select_button_close_popup
|
||||||
|
<SUBSECTION Standard>
|
||||||
|
GimpFontSelectButtonPrivate
|
||||||
|
GimpFontSelectButtonClass
|
||||||
|
GIMP_FONT_SELECT_BUTTON
|
||||||
|
GIMP_IS_FONT_SELECT_BUTTON
|
||||||
|
GIMP_TYPE_FONT_SELECT_BUTTON
|
||||||
|
gimp_font_select_button_get_type
|
||||||
|
GIMP_FONT_SELECT_BUTTON_CLASS
|
||||||
|
GIMP_IS_FONT_SELECT_BUTTON_CLASS
|
||||||
|
GIMP_FONT_SELECT_BUTTON_GET_CLASS
|
||||||
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>gimpmenu</FILE>
|
<FILE>gimpmenu</FILE>
|
||||||
GimpConstraintFunc
|
GimpConstraintFunc
|
||||||
|
|
|
@ -6,6 +6,7 @@ gimp_aspect_preview_get_type
|
||||||
gimp_channel_combo_box_get_type
|
gimp_channel_combo_box_get_type
|
||||||
gimp_drawable_combo_box_get_type
|
gimp_drawable_combo_box_get_type
|
||||||
gimp_drawable_preview_get_type
|
gimp_drawable_preview_get_type
|
||||||
|
gimp_font_select_button_get_type
|
||||||
gimp_image_combo_box_get_type
|
gimp_image_combo_box_get_type
|
||||||
gimp_layer_combo_box_get_type
|
gimp_layer_combo_box_get_type
|
||||||
gimp_progress_bar_get_type
|
gimp_progress_bar_get_type
|
||||||
|
|
|
@ -0,0 +1,77 @@
|
||||||
|
<!-- ##### SECTION Title ##### -->
|
||||||
|
GimpFontSelectButton
|
||||||
|
|
||||||
|
<!-- ##### SECTION Short_Description ##### -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### SECTION Long_Description ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<!-- ##### SECTION See_Also ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<!-- ##### STRUCT GimpFontSelectButton ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GimpFontSelectButton::font-set ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gimpfontselectbutton: the object which received the signal.
|
||||||
|
@arg1:
|
||||||
|
@arg2:
|
||||||
|
|
||||||
|
<!-- ##### ARG GimpFontSelectButton:font-name ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<!-- ##### ARG GimpFontSelectButton:title ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION gimp_font_select_button_new ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@title:
|
||||||
|
@font_name:
|
||||||
|
@Returns:
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION gimp_font_select_button_get_font_name ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@button:
|
||||||
|
@Returns:
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION gimp_font_select_button_set_font_name ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@button:
|
||||||
|
@font_name:
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION gimp_font_select_button_close_popup ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@button:
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,14 @@ Interactions with settings from .gimprc.
|
||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION gimp_get_color_configuration ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@Returns:
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gimp_get_default_comment ##### -->
|
<!-- ##### FUNCTION gimp_get_default_comment ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
|
|
@ -12,5 +12,5 @@ Name: GIMP
|
||||||
Description: GIMP Library
|
Description: GIMP Library
|
||||||
Version: @GIMP_REAL_VERSION@
|
Version: @GIMP_REAL_VERSION@
|
||||||
Requires: glib-2.0
|
Requires: glib-2.0
|
||||||
Libs: -L${libdir} -lgimp-@GIMP_API_VERSION@ -lgimpmath-@GIMP_API_VERSION@ -lgimpcolor-@GIMP_API_VERSION@ -lgimpbase-@GIMP_API_VERSION@ @RT_LIBS@
|
Libs: -L${libdir} -lgimp-@GIMP_API_VERSION@ -lgimpmath-@GIMP_API_VERSION@ -lgimpconfig-@GIMP_API_VERSION@ -lgimpcolor-@GIMP_API_VERSION@ -lgimpbase-@GIMP_API_VERSION@ @RT_LIBS@
|
||||||
Cflags: -I${includedir}/gimp-@GIMP_API_VERSION@
|
Cflags: -I${includedir}/gimp-@GIMP_API_VERSION@
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
|
libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
|
||||||
libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la
|
libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la
|
||||||
|
libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la
|
||||||
libgimpmodule = $(top_builddir)/libgimpmodule/libgimpmodule-$(GIMP_API_VERSION).la
|
libgimpmodule = $(top_builddir)/libgimpmodule/libgimpmodule-$(GIMP_API_VERSION).la
|
||||||
libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la
|
libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la
|
||||||
libgimp = ./libgimp-$(GIMP_API_VERSION).la
|
libgimp = ./libgimp-$(GIMP_API_VERSION).la
|
||||||
|
@ -178,6 +179,8 @@ libgimp_2_0_la_sources = \
|
||||||
gimpdrawable.h \
|
gimpdrawable.h \
|
||||||
gimpfontselect.c \
|
gimpfontselect.c \
|
||||||
gimpfontselect.h \
|
gimpfontselect.h \
|
||||||
|
gimpgimprc.c \
|
||||||
|
gimpgimprc.h \
|
||||||
gimpgradients.c \
|
gimpgradients.c \
|
||||||
gimpgradients.h \
|
gimpgradients.h \
|
||||||
gimpgradientselect.c \
|
gimpgradientselect.c \
|
||||||
|
@ -280,6 +283,7 @@ gimpinclude_HEADERS = \
|
||||||
gimpchannel.h \
|
gimpchannel.h \
|
||||||
gimpdrawable.h \
|
gimpdrawable.h \
|
||||||
gimpfontselect.h \
|
gimpfontselect.h \
|
||||||
|
gimpgimprc.h \
|
||||||
gimpgradients.h \
|
gimpgradients.h \
|
||||||
gimpgradientselect.h \
|
gimpgradientselect.h \
|
||||||
gimpimage.h \
|
gimpimage.h \
|
||||||
|
@ -320,9 +324,9 @@ libgimp_2_0_la_LDFLAGS = \
|
||||||
$(no_undefined) \
|
$(no_undefined) \
|
||||||
$(libgimp_export_symbols)
|
$(libgimp_export_symbols)
|
||||||
|
|
||||||
libgimp_2_0_la_LIBADD = $(libgimpcolor) $(libgimpbase) $(GLIB_LIBS) $(RT_LIBS)
|
libgimp_2_0_la_LIBADD = $(libgimpconfig) $(libgimpcolor) $(libgimpbase) $(GLIB_LIBS) $(RT_LIBS)
|
||||||
|
|
||||||
libgimp_2_0_la_DEPENDENCIES = $(gimp_def) $(libgimpcolor) $(libgimpbase)
|
libgimp_2_0_la_DEPENDENCIES = $(gimp_def) $(libgimpconfig) $(libgimpcolor) $(libgimpbase)
|
||||||
|
|
||||||
libgimpui_2_0_la_LDFLAGS = \
|
libgimpui_2_0_la_LDFLAGS = \
|
||||||
-version-info $(LT_VERSION_INFO) \
|
-version-info $(LT_VERSION_INFO) \
|
||||||
|
|
|
@ -24,9 +24,10 @@
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
|
||||||
#include <libgimpcolor/gimpcolor.h>
|
|
||||||
#include <libgimpmath/gimpmath.h>
|
|
||||||
#include <libgimpbase/gimpbase.h>
|
#include <libgimpbase/gimpbase.h>
|
||||||
|
#include <libgimpcolor/gimpcolor.h>
|
||||||
|
#include <libgimpconfig/gimpconfig.h>
|
||||||
|
#include <libgimpmath/gimpmath.h>
|
||||||
|
|
||||||
#include <libgimp/gimpenums.h>
|
#include <libgimp/gimpenums.h>
|
||||||
#include <libgimp/gimptypes.h>
|
#include <libgimp/gimptypes.h>
|
||||||
|
@ -36,6 +37,7 @@
|
||||||
#include <libgimp/gimpchannel.h>
|
#include <libgimp/gimpchannel.h>
|
||||||
#include <libgimp/gimpdrawable.h>
|
#include <libgimp/gimpdrawable.h>
|
||||||
#include <libgimp/gimpfontselect.h>
|
#include <libgimp/gimpfontselect.h>
|
||||||
|
#include <libgimp/gimpgimprc.h>
|
||||||
#include <libgimp/gimpgradients.h>
|
#include <libgimp/gimpgradients.h>
|
||||||
#include <libgimp/gimpgradientselect.h>
|
#include <libgimp/gimpgradientselect.h>
|
||||||
#include <libgimp/gimpimage.h>
|
#include <libgimp/gimpimage.h>
|
||||||
|
@ -325,7 +327,6 @@ gint gimp_monitor_number (void) G_GNUC_CONST;
|
||||||
|
|
||||||
const gchar * gimp_get_progname (void) G_GNUC_CONST;
|
const gchar * gimp_get_progname (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
|
||||||
gboolean gimp_attach_new_parasite (const gchar *name,
|
gboolean gimp_attach_new_parasite (const gchar *name,
|
||||||
gint flags,
|
gint flags,
|
||||||
gint size,
|
gint size,
|
||||||
|
|
|
@ -81,7 +81,7 @@ static void gimp_font_select_drag_data_received (GtkWidget *widget,
|
||||||
guint info,
|
guint info,
|
||||||
guint time);
|
guint time);
|
||||||
|
|
||||||
static GtkWidget * gimp_font_select_button_create_inside (GimpFontSelectButton *font_button);
|
static GtkWidget * gimp_font_select_button_create_inside (GimpFontSelectButton *button);
|
||||||
|
|
||||||
|
|
||||||
static const GtkTargetEntry target = { "application/x-gimp-font-name", 0 };
|
static const GtkTargetEntry target = { "application/x-gimp-font-name", 0 };
|
||||||
|
@ -97,9 +97,9 @@ static void
|
||||||
gimp_font_select_button_class_init (GimpFontSelectButtonClass *klass)
|
gimp_font_select_button_class_init (GimpFontSelectButtonClass *klass)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||||
GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
|
GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
|
||||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||||
GtkButtonClass *button_class = GTK_BUTTON_CLASS (klass);
|
GtkButtonClass *button_class = GTK_BUTTON_CLASS (klass);
|
||||||
|
|
||||||
gobject_class->set_property = gimp_font_select_button_set_property;
|
gobject_class->set_property = gimp_font_select_button_set_property;
|
||||||
gobject_class->get_property = gimp_font_select_button_get_property;
|
gobject_class->get_property = gimp_font_select_button_get_property;
|
||||||
|
@ -162,19 +162,18 @@ gimp_font_select_button_class_init (GimpFontSelectButtonClass *klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_font_select_button_init (GimpFontSelectButton *font_button)
|
gimp_font_select_button_init (GimpFontSelectButton *button)
|
||||||
{
|
{
|
||||||
font_button->priv = GIMP_FONT_SELECT_BUTTON_GET_PRIVATE (font_button);
|
button->priv = GIMP_FONT_SELECT_BUTTON_GET_PRIVATE (button);
|
||||||
|
|
||||||
font_button->priv->title = g_strdup(_("Font Selection"));
|
button->priv->title = g_strdup(_("Font Selection"));
|
||||||
font_button->priv->font_name = g_strdup(_("Sans"));
|
button->priv->font_name = g_strdup(_("Sans"));
|
||||||
font_button->priv->temp_font_callback = NULL;
|
button->priv->temp_font_callback = NULL;
|
||||||
|
|
||||||
font_button->priv->inside =
|
button->priv->inside = gimp_font_select_button_create_inside (button);
|
||||||
gimp_font_select_button_create_inside (font_button);
|
gtk_container_add (GTK_CONTAINER (button), button->priv->inside);
|
||||||
gtk_container_add (GTK_CONTAINER (font_button), font_button->priv->inside);
|
|
||||||
|
|
||||||
gtk_drag_dest_set (GTK_WIDGET (font_button),
|
gtk_drag_dest_set (GTK_WIDGET (button),
|
||||||
GTK_DEST_DEFAULT_HIGHLIGHT |
|
GTK_DEST_DEFAULT_HIGHLIGHT |
|
||||||
GTK_DEST_DEFAULT_MOTION |
|
GTK_DEST_DEFAULT_MOTION |
|
||||||
GTK_DEST_DEFAULT_DROP,
|
GTK_DEST_DEFAULT_DROP,
|
||||||
|
@ -187,8 +186,6 @@ gimp_font_select_button_init (GimpFontSelectButton *font_button)
|
||||||
* @title: Title of the dialog to use or %NULL means to use the default
|
* @title: Title of the dialog to use or %NULL means to use the default
|
||||||
* title.
|
* title.
|
||||||
* @font_name: Initial font name.
|
* @font_name: Initial font name.
|
||||||
* @callback: A function to call when the selected font changes.
|
|
||||||
* @data: A pointer to arbitary data to be used in the call to @callback.
|
|
||||||
*
|
*
|
||||||
* Creates a new #GtkWidget that completely controls the selection of
|
* Creates a new #GtkWidget that completely controls the selection of
|
||||||
* a font. This widget is suitable for placement in a table in a
|
* a font. This widget is suitable for placement in a table in a
|
||||||
|
@ -200,42 +197,42 @@ GtkWidget *
|
||||||
gimp_font_select_button_new (const gchar *title,
|
gimp_font_select_button_new (const gchar *title,
|
||||||
const gchar *font_name)
|
const gchar *font_name)
|
||||||
{
|
{
|
||||||
GtkWidget *font_button;
|
GtkWidget *button;
|
||||||
|
|
||||||
if (title)
|
if (title)
|
||||||
font_button = g_object_new (GIMP_TYPE_FONT_SELECT_BUTTON,
|
button = g_object_new (GIMP_TYPE_FONT_SELECT_BUTTON,
|
||||||
"title", title,
|
"title", title,
|
||||||
"font-name", font_name,
|
"font-name", font_name,
|
||||||
NULL);
|
NULL);
|
||||||
else
|
else
|
||||||
font_button = g_object_new (GIMP_TYPE_FONT_SELECT_BUTTON,
|
button = g_object_new (GIMP_TYPE_FONT_SELECT_BUTTON,
|
||||||
"font-name", font_name,
|
"font-name", font_name,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
return font_button;
|
return button;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gimp_font_select_button_close_popup:
|
* gimp_font_select_button_close_popup:
|
||||||
* @font_button: A #GimpFontSelectButton
|
* @button: A #GimpFontSelectButton
|
||||||
*
|
*
|
||||||
* Closes the popup window associated with @font_button.
|
* Closes the popup window associated with @button.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gimp_font_select_button_close_popup (GimpFontSelectButton *font_button)
|
gimp_font_select_button_close_popup (GimpFontSelectButton *button)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GIMP_IS_FONT_SELECT_BUTTON (font_button));
|
g_return_if_fail (GIMP_IS_FONT_SELECT_BUTTON (button));
|
||||||
|
|
||||||
if (font_button->priv->temp_font_callback)
|
if (button->priv->temp_font_callback)
|
||||||
{
|
{
|
||||||
gimp_font_select_destroy (font_button->priv->temp_font_callback);
|
gimp_font_select_destroy (button->priv->temp_font_callback);
|
||||||
font_button->priv->temp_font_callback = NULL;
|
button->priv->temp_font_callback = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gimp_font_select_button_get_font_name:
|
* gimp_font_select_button_get_font_name:
|
||||||
* @font_button: A #GimpFontSelectButton
|
* @button: A #GimpFontSelectButton
|
||||||
*
|
*
|
||||||
* Retrieves the name of currently selected font.
|
* Retrieves the name of currently selected font.
|
||||||
*
|
*
|
||||||
|
@ -244,16 +241,16 @@ gimp_font_select_button_close_popup (GimpFontSelectButton *font_button)
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
*/
|
*/
|
||||||
G_CONST_RETURN gchar *
|
G_CONST_RETURN gchar *
|
||||||
gimp_font_select_button_get_font_name (GimpFontSelectButton *font_button)
|
gimp_font_select_button_get_font_name (GimpFontSelectButton *button)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GIMP_IS_FONT_SELECT_BUTTON (font_button), NULL);
|
g_return_val_if_fail (GIMP_IS_FONT_SELECT_BUTTON (button), NULL);
|
||||||
|
|
||||||
return font_button->priv->font_name;
|
return button->priv->font_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gimp_font_select_button_set_font_name:
|
* gimp_font_select_button_set_font_name:
|
||||||
* @font_button: A #GimpFontSelectButton
|
* @button: A #GimpFontSelectButton
|
||||||
* @font_name: Font name to set; %NULL means no change.
|
* @font_name: Font name to set; %NULL means no change.
|
||||||
*
|
*
|
||||||
* Sets the current font for the font select button.
|
* Sets the current font for the font select button.
|
||||||
|
@ -261,15 +258,15 @@ gimp_font_select_button_get_font_name (GimpFontSelectButton *font_button)
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gimp_font_select_button_set_font_name (GimpFontSelectButton *font_button,
|
gimp_font_select_button_set_font_name (GimpFontSelectButton *button,
|
||||||
const gchar *font_name)
|
const gchar *font_name)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GIMP_IS_FONT_SELECT_BUTTON (font_button));
|
g_return_if_fail (GIMP_IS_FONT_SELECT_BUTTON (button));
|
||||||
|
|
||||||
if (font_button->priv->temp_font_callback)
|
if (button->priv->temp_font_callback)
|
||||||
gimp_fonts_set_popup (font_button->priv->temp_font_callback, font_name);
|
gimp_fonts_set_popup (button->priv->temp_font_callback, font_name);
|
||||||
else
|
else
|
||||||
gimp_font_select_button_callback (font_name, FALSE, font_button);
|
gimp_font_select_button_callback (font_name, FALSE, button);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -281,19 +278,21 @@ gimp_font_select_button_set_property (GObject *object,
|
||||||
const GValue *value,
|
const GValue *value,
|
||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GimpFontSelectButton *font_button = GIMP_FONT_SELECT_BUTTON (object);
|
GimpFontSelectButton *button = GIMP_FONT_SELECT_BUTTON (object);
|
||||||
|
|
||||||
switch (property_id)
|
switch (property_id)
|
||||||
{
|
{
|
||||||
case PROP_TITLE:
|
case PROP_TITLE:
|
||||||
g_free (font_button->priv->title);
|
g_free (button->priv->title);
|
||||||
font_button->priv->title = g_value_dup_string (value);
|
button->priv->title = g_value_dup_string (value);
|
||||||
g_object_notify (object, "title");
|
g_object_notify (object, "title");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_FONT_NAME:
|
case PROP_FONT_NAME:
|
||||||
gimp_font_select_button_set_font_name (font_button,
|
gimp_font_select_button_set_font_name (button,
|
||||||
g_value_get_string (value));
|
g_value_get_string (value));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
@ -306,16 +305,18 @@ gimp_font_select_button_get_property (GObject *object,
|
||||||
GValue *value,
|
GValue *value,
|
||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GimpFontSelectButton *font_button = GIMP_FONT_SELECT_BUTTON (object);
|
GimpFontSelectButton *button = GIMP_FONT_SELECT_BUTTON (object);
|
||||||
|
|
||||||
switch (property_id)
|
switch (property_id)
|
||||||
{
|
{
|
||||||
case PROP_TITLE:
|
case PROP_TITLE:
|
||||||
g_value_set_string (value, font_button->priv->title);
|
g_value_set_string (value, button->priv->title);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_FONT_NAME:
|
case PROP_FONT_NAME:
|
||||||
g_value_set_string (value, font_button->priv->font_name);
|
g_value_set_string (value, button->priv->font_name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
@ -327,18 +328,18 @@ gimp_font_select_button_callback (const gchar *name,
|
||||||
gboolean closing,
|
gboolean closing,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GimpFontSelectButton *font_button = GIMP_FONT_SELECT_BUTTON (data);
|
GimpFontSelectButton *button = GIMP_FONT_SELECT_BUTTON (data);
|
||||||
|
|
||||||
g_free (font_button->priv->font_name);
|
g_free (button->priv->font_name);
|
||||||
font_button->priv->font_name = g_strdup (name);
|
button->priv->font_name = g_strdup (name);
|
||||||
|
|
||||||
gtk_label_set_text (GTK_LABEL (font_button->priv->label), name);
|
gtk_label_set_text (GTK_LABEL (button->priv->label), name);
|
||||||
|
|
||||||
if (closing)
|
if (closing)
|
||||||
font_button->priv->temp_font_callback = NULL;
|
button->priv->temp_font_callback = NULL;
|
||||||
|
|
||||||
g_signal_emit (font_button, font_button_signals[FONT_SET], 0, name, closing);
|
g_signal_emit (button, font_button_signals[FONT_SET], 0, name, closing);
|
||||||
g_object_notify (G_OBJECT (font_button), "font-name");
|
g_object_notify (G_OBJECT (button), "font-name");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -358,26 +359,26 @@ gimp_font_select_button_clicked (GtkButton *button)
|
||||||
gimp_font_select_new (font_button->priv->title,
|
gimp_font_select_new (font_button->priv->title,
|
||||||
font_button->priv->font_name,
|
font_button->priv->font_name,
|
||||||
gimp_font_select_button_callback,
|
gimp_font_select_button_callback,
|
||||||
font_button);
|
button);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_font_select_button_destroy (GtkObject *object)
|
gimp_font_select_button_destroy (GtkObject *object)
|
||||||
{
|
{
|
||||||
GimpFontSelectButton *font_button = GIMP_FONT_SELECT_BUTTON (object);
|
GimpFontSelectButton *button = GIMP_FONT_SELECT_BUTTON (object);
|
||||||
|
|
||||||
if (font_button->priv->temp_font_callback)
|
if (button->priv->temp_font_callback)
|
||||||
{
|
{
|
||||||
gimp_font_select_destroy (font_button->priv->temp_font_callback);
|
gimp_font_select_destroy (button->priv->temp_font_callback);
|
||||||
font_button->priv->temp_font_callback = NULL;
|
button->priv->temp_font_callback = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (font_button->priv->title);
|
g_free (button->priv->title);
|
||||||
font_button->priv->title = NULL;
|
button->priv->title = NULL;
|
||||||
|
|
||||||
g_free (font_button->priv->font_name);
|
g_free (button->priv->font_name);
|
||||||
font_button->priv->font_name = NULL;
|
button->priv->font_name = NULL;
|
||||||
|
|
||||||
GTK_OBJECT_CLASS (gimp_font_select_button_parent_class)->destroy (object);
|
GTK_OBJECT_CLASS (gimp_font_select_button_parent_class)->destroy (object);
|
||||||
}
|
}
|
||||||
|
@ -409,7 +410,7 @@ gimp_font_select_drag_data_received (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
gimp_font_select_button_create_inside (GimpFontSelectButton *font_button)
|
gimp_font_select_button_create_inside (GimpFontSelectButton *button)
|
||||||
{
|
{
|
||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkWidget *image;
|
GtkWidget *image;
|
||||||
|
@ -421,8 +422,8 @@ gimp_font_select_button_create_inside (GimpFontSelectButton *font_button)
|
||||||
image = gtk_image_new_from_stock (GIMP_STOCK_FONT, GTK_ICON_SIZE_BUTTON);
|
image = gtk_image_new_from_stock (GIMP_STOCK_FONT, GTK_ICON_SIZE_BUTTON);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
|
||||||
|
|
||||||
font_button->priv->label = gtk_label_new (font_button->priv->font_name);
|
button->priv->label = gtk_label_new (button->priv->font_name);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), font_button->priv->label, TRUE, TRUE, 4);
|
gtk_box_pack_start (GTK_BOX (hbox), button->priv->label, TRUE, TRUE, 4);
|
||||||
|
|
||||||
gtk_widget_show_all (hbox);
|
gtk_widget_show_all (hbox);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
/* LIBGIMP - The GIMP Library
|
||||||
|
* Copyright (C) 1995-2005 Peter Mattis and Spencer Kimball
|
||||||
|
*
|
||||||
|
* gimpgimprc.c
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* 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
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#include "gimp.h"
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gimp_get_color_configuration:
|
||||||
|
*
|
||||||
|
* Retrieve a copy of the current color management configuration.
|
||||||
|
*
|
||||||
|
* Returns: A copy of the core's #GimpColorConfig. You should unref
|
||||||
|
* this copy if you don't need it any longer.
|
||||||
|
*
|
||||||
|
* Since: GIMP 2.4
|
||||||
|
*/
|
||||||
|
GimpColorConfig *
|
||||||
|
gimp_get_color_configuration (void)
|
||||||
|
{
|
||||||
|
GimpColorConfig *config;
|
||||||
|
gchar *text;
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
|
text = _gimp_get_color_configuration ();
|
||||||
|
|
||||||
|
g_return_val_if_fail (text != NULL, NULL);
|
||||||
|
|
||||||
|
config = g_object_new (GIMP_TYPE_COLOR_CONFIG, NULL);
|
||||||
|
|
||||||
|
if (! gimp_config_deserialize_string (config, text, -1, NULL, &error))
|
||||||
|
{
|
||||||
|
g_warning ("failed to deserialize color configuration: %s",
|
||||||
|
error->message);
|
||||||
|
g_error_free (error);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_free (text);
|
||||||
|
|
||||||
|
return config;
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
/* LIBGIMP - The GIMP Library
|
||||||
|
* Copyright (C) 1995-2005 Peter Mattis and Spencer Kimball
|
||||||
|
*
|
||||||
|
* gimpgimprc.h
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* 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
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the
|
||||||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __GIMP_GIMPRC_H__
|
||||||
|
#define __GIMP_GIMPRC_H__
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
/* For information look into the C source or the html documentation */
|
||||||
|
|
||||||
|
|
||||||
|
GimpColorConfig * gimp_get_color_configuration (void);
|
||||||
|
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif /* __GIMP_GIMPRC_H__ */
|
|
@ -197,6 +197,37 @@ gimp_get_theme_dir (void)
|
||||||
return theme_dir;
|
return theme_dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* _gimp_get_color_configuration:
|
||||||
|
*
|
||||||
|
* Get a serialized version of the color management configuration.
|
||||||
|
*
|
||||||
|
* Returns a string that can be deserialized into a GimpColorConfig
|
||||||
|
* object representing the current color management configuration.
|
||||||
|
*
|
||||||
|
* Returns: Serialized color management configuration.
|
||||||
|
*
|
||||||
|
* Since: GIMP 2.4
|
||||||
|
*/
|
||||||
|
gchar *
|
||||||
|
_gimp_get_color_configuration (void)
|
||||||
|
{
|
||||||
|
GimpParam *return_vals;
|
||||||
|
gint nreturn_vals;
|
||||||
|
gchar *config = NULL;
|
||||||
|
|
||||||
|
return_vals = gimp_run_procedure ("gimp_get_color_configuration",
|
||||||
|
&nreturn_vals,
|
||||||
|
GIMP_PDB_END);
|
||||||
|
|
||||||
|
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
||||||
|
config = g_strdup (return_vals[1].data.d_string);
|
||||||
|
|
||||||
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
|
||||||
|
return config;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gimp_get_module_load_inhibit:
|
* gimp_get_module_load_inhibit:
|
||||||
*
|
*
|
||||||
|
|
|
@ -29,14 +29,15 @@ G_BEGIN_DECLS
|
||||||
/* For information look into the C source or the html documentation */
|
/* For information look into the C source or the html documentation */
|
||||||
|
|
||||||
|
|
||||||
gchar* gimp_gimprc_query (const gchar *token);
|
gchar* gimp_gimprc_query (const gchar *token);
|
||||||
gboolean gimp_gimprc_set (const gchar *token,
|
gboolean gimp_gimprc_set (const gchar *token,
|
||||||
const gchar *value);
|
const gchar *value);
|
||||||
gchar* gimp_get_default_comment (void);
|
gchar* gimp_get_default_comment (void);
|
||||||
gboolean gimp_get_monitor_resolution (gdouble *xres,
|
gboolean gimp_get_monitor_resolution (gdouble *xres,
|
||||||
gdouble *yres);
|
gdouble *yres);
|
||||||
gchar* gimp_get_theme_dir (void);
|
gchar* gimp_get_theme_dir (void);
|
||||||
gchar* gimp_get_module_load_inhibit (void);
|
gchar* _gimp_get_color_configuration (void);
|
||||||
|
gchar* gimp_get_module_load_inhibit (void);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
|
@ -28,8 +28,6 @@
|
||||||
#include <libgimp/gimp.h>
|
#include <libgimp/gimp.h>
|
||||||
#include <libgimp/gimpui.h>
|
#include <libgimp/gimpui.h>
|
||||||
|
|
||||||
#include <libgimpconfig/gimpconfig.h>
|
|
||||||
|
|
||||||
#include "FractalExplorer.h"
|
#include "FractalExplorer.h"
|
||||||
#include "Dialogs.h"
|
#include "Dialogs.h"
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,6 @@
|
||||||
#include <libgimp/gimp.h>
|
#include <libgimp/gimp.h>
|
||||||
#include <libgimp/gimpui.h>
|
#include <libgimp/gimpui.h>
|
||||||
|
|
||||||
#include <libgimpconfig/gimpconfig.h>
|
|
||||||
|
|
||||||
#include "libgimp/stdplugins-intl.h"
|
#include "libgimp/stdplugins-intl.h"
|
||||||
|
|
||||||
#include "gfig.h"
|
#include "gfig.h"
|
||||||
|
|
|
@ -45,9 +45,6 @@
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
|
||||||
#include <libgimpcolor/gimpcolor.h>
|
|
||||||
#include <libgimpconfig/gimpconfig.h>
|
|
||||||
|
|
||||||
#include <libgimp/gimp.h>
|
#include <libgimp/gimp.h>
|
||||||
#include <libgimp/gimpui.h>
|
#include <libgimp/gimpui.h>
|
||||||
|
|
||||||
|
|
|
@ -182,6 +182,32 @@ CODE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub get_color_configuration {
|
||||||
|
$blurb = 'Get a serialized version of the color management configuration.';
|
||||||
|
$help = 'Returns a string that can be deserialized into a GimpColorConfig object representing the current color management configuration.';
|
||||||
|
|
||||||
|
$author = $copyright = 'Sven Neumann';
|
||||||
|
$date = '2005';
|
||||||
|
$since = '2.4';
|
||||||
|
|
||||||
|
@inargs = ( );
|
||||||
|
|
||||||
|
@outargs = (
|
||||||
|
{ name => 'config', type => 'string',
|
||||||
|
desc => 'Serialized color management configuration',
|
||||||
|
wrap => 1 }
|
||||||
|
);
|
||||||
|
|
||||||
|
%invoke = (
|
||||||
|
headers => [ qw("libgimpconfig/gimpconfig.h" "config/gimpcoreconfig.h") ],
|
||||||
|
code => <<'CODE'
|
||||||
|
{
|
||||||
|
config = gimp_config_serialize_to_string (GIMP_CONFIG (gimp->config->color_management), NULL);
|
||||||
|
}
|
||||||
|
CODE
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
sub get_module_load_inhibit {
|
sub get_module_load_inhibit {
|
||||||
$blurb = 'Get the list of modules which should not be loaded.';
|
$blurb = 'Get the list of modules which should not be loaded.';
|
||||||
|
|
||||||
|
@ -210,7 +236,7 @@ CODE
|
||||||
|
|
||||||
@procs = qw(gimprc_query gimprc_set
|
@procs = qw(gimprc_query gimprc_set
|
||||||
get_default_comment get_monitor_resolution get_theme_dir
|
get_default_comment get_monitor_resolution get_theme_dir
|
||||||
get_module_load_inhibit);
|
get_color_configuration get_module_load_inhibit);
|
||||||
%exports = (app => [@procs], lib => [@procs]);
|
%exports = (app => [@procs], lib => [@procs]);
|
||||||
|
|
||||||
$desc = 'Gimprc procedures';
|
$desc = 'Gimprc procedures';
|
||||||
|
|
Loading…
Reference in New Issue