mirror of https://github.com/GNOME/gimp.git
pdb: remove gimp_get_theme_dir() and gimp_get_icon_theme_dir()
This commit is contained in:
parent
53aa2bb211
commit
ce55cfa7b2
|
@ -173,50 +173,6 @@ get_monitor_resolution_invoker (GimpProcedure *procedure,
|
|||
return return_vals;
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
get_theme_dir_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
GimpValueArray *return_vals;
|
||||
gchar *theme_dir = NULL;
|
||||
|
||||
GFile *file = gimp_get_theme_dir (gimp);
|
||||
|
||||
if (file)
|
||||
theme_dir = g_file_get_path (file);
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
|
||||
g_value_take_string (gimp_value_array_index (return_vals, 1), theme_dir);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
get_icon_theme_dir_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
GimpValueArray *return_vals;
|
||||
gchar *icon_theme_dir = NULL;
|
||||
|
||||
GFile *file = gimp_get_icon_theme_dir (gimp);
|
||||
|
||||
if (file)
|
||||
icon_theme_dir = g_file_get_path (file);
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
|
||||
g_value_take_string (gimp_value_array_index (return_vals, 1), icon_theme_dir);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
get_color_configuration_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
|
@ -400,54 +356,6 @@ register_gimprc_procs (GimpPDB *pdb)
|
|||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-get-theme-dir
|
||||
*/
|
||||
procedure = gimp_procedure_new (get_theme_dir_invoker);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-get-theme-dir");
|
||||
gimp_procedure_set_static_strings (procedure,
|
||||
"gimp-get-theme-dir",
|
||||
"Get the directory of the current GUI theme.",
|
||||
"Returns a copy of the current GUI theme dir.",
|
||||
"Spencer Kimball & Peter Mattis",
|
||||
"Spencer Kimball & Peter Mattis",
|
||||
"1995-1996",
|
||||
NULL);
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_string ("theme-dir",
|
||||
"theme dir",
|
||||
"The GUI theme dir",
|
||||
FALSE, FALSE, FALSE,
|
||||
NULL,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-get-icon-theme-dir
|
||||
*/
|
||||
procedure = gimp_procedure_new (get_icon_theme_dir_invoker);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-get-icon-theme-dir");
|
||||
gimp_procedure_set_static_strings (procedure,
|
||||
"gimp-get-icon-theme-dir",
|
||||
"Get the directory of the current icon theme.",
|
||||
"Returns a copy of the current icon theme dir.",
|
||||
"Michael Natterer <mitch@gimp.org>",
|
||||
"Michael Natterer",
|
||||
"2015",
|
||||
NULL);
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_string ("icon-theme-dir",
|
||||
"icon theme dir",
|
||||
"The icon theme dir",
|
||||
FALSE, FALSE, FALSE,
|
||||
NULL,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-get-color-configuration
|
||||
*/
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "internal-procs.h"
|
||||
|
||||
|
||||
/* 736 procedures registered total */
|
||||
/* 734 procedures registered total */
|
||||
|
||||
void
|
||||
internal_procs_init (GimpPDB *pdb)
|
||||
|
|
|
@ -279,7 +279,6 @@ EXPORTS
|
|||
gimp_get_color_configuration
|
||||
gimp_get_default_comment
|
||||
gimp_get_default_unit
|
||||
gimp_get_icon_theme_dir
|
||||
gimp_get_module_load_inhibit
|
||||
gimp_get_monitor_resolution
|
||||
gimp_get_parasite
|
||||
|
@ -287,7 +286,6 @@ EXPORTS
|
|||
gimp_get_pdb_error
|
||||
gimp_get_pdb_status
|
||||
gimp_get_progname
|
||||
gimp_get_theme_dir
|
||||
gimp_getpid
|
||||
gimp_gimprc_query
|
||||
gimp_gimprc_set
|
||||
|
|
|
@ -208,64 +208,6 @@ gimp_get_monitor_resolution (gdouble *xres,
|
|||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_get_theme_dir:
|
||||
*
|
||||
* Get the directory of the current GUI theme.
|
||||
*
|
||||
* Returns a copy of the current GUI theme dir.
|
||||
*
|
||||
* Returns: The GUI theme dir.
|
||||
**/
|
||||
gchar *
|
||||
gimp_get_theme_dir (void)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
gchar *theme_dir = NULL;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp-get-theme-dir",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_END);
|
||||
|
||||
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
||||
theme_dir = g_strdup (return_vals[1].data.d_string);
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
return theme_dir;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_get_icon_theme_dir:
|
||||
*
|
||||
* Get the directory of the current icon theme.
|
||||
*
|
||||
* Returns a copy of the current icon theme dir.
|
||||
*
|
||||
* Returns: The icon theme dir.
|
||||
*
|
||||
* Since: 2.10
|
||||
**/
|
||||
gchar *
|
||||
gimp_get_icon_theme_dir (void)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
gchar *icon_theme_dir = NULL;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp-get-icon-theme-dir",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_END);
|
||||
|
||||
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
||||
icon_theme_dir = g_strdup (return_vals[1].data.d_string);
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
return icon_theme_dir;
|
||||
}
|
||||
|
||||
/**
|
||||
* _gimp_get_color_configuration:
|
||||
*
|
||||
|
|
|
@ -39,8 +39,6 @@ gchar* gimp_get_default_comment (void);
|
|||
GimpUnit gimp_get_default_unit (void);
|
||||
gboolean gimp_get_monitor_resolution (gdouble *xres,
|
||||
gdouble *yres);
|
||||
gchar* gimp_get_theme_dir (void);
|
||||
gchar* gimp_get_icon_theme_dir (void);
|
||||
G_GNUC_INTERNAL gchar* _gimp_get_color_configuration (void);
|
||||
gchar* gimp_get_module_load_inhibit (void);
|
||||
|
||||
|
|
|
@ -170,52 +170,6 @@ CODE
|
|||
);
|
||||
}
|
||||
|
||||
sub get_theme_dir {
|
||||
$blurb = 'Get the directory of the current GUI theme.';
|
||||
$help = 'Returns a copy of the current GUI theme dir.';
|
||||
|
||||
&std_pdb_misc;
|
||||
|
||||
@outargs = (
|
||||
{ name => 'theme_dir', type => 'string',
|
||||
desc => 'The GUI theme dir' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
GFile *file = gimp_get_theme_dir (gimp);
|
||||
|
||||
if (file)
|
||||
theme_dir = g_file_get_path (file);
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub get_icon_theme_dir {
|
||||
$blurb = 'Get the directory of the current icon theme.';
|
||||
$help = 'Returns a copy of the current icon theme dir.';
|
||||
|
||||
&mitch_pdb_misc('2015', '2.10');
|
||||
|
||||
@outargs = (
|
||||
{ name => 'icon_theme_dir', type => 'string',
|
||||
desc => 'The icon theme dir' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
GFile *file = gimp_get_icon_theme_dir (gimp);
|
||||
|
||||
if (file)
|
||||
icon_theme_dir = g_file_get_path (file);
|
||||
}
|
||||
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.';
|
||||
|
@ -269,8 +223,6 @@ CODE
|
|||
get_default_comment
|
||||
get_default_unit
|
||||
get_monitor_resolution
|
||||
get_theme_dir
|
||||
get_icon_theme_dir
|
||||
get_color_configuration
|
||||
get_module_load_inhibit);
|
||||
|
||||
|
|
Loading…
Reference in New Issue