libgimp: remove gimp_plugin_icon_register()

This commit is contained in:
Michael Natterer 2019-08-15 12:51:40 +02:00
parent b3a05a9f1d
commit 1bfa52b692
3 changed files with 0 additions and 72 deletions

View File

@ -652,7 +652,6 @@ EXPORTS
gimp_plug_in_set_help_domain gimp_plug_in_set_help_domain
gimp_plug_in_set_pdb_error_handler gimp_plug_in_set_pdb_error_handler
gimp_plug_in_set_translation_domain gimp_plug_in_set_translation_domain
gimp_plugin_icon_register
gimp_plugin_menu_register gimp_plugin_menu_register
gimp_procedure_add_argument gimp_procedure_add_argument
gimp_procedure_add_argument_from_property gimp_procedure_add_argument_from_property

View File

@ -447,74 +447,6 @@ gimp_plugin_menu_register (const gchar *procedure_name,
return _gimp_plugin_menu_register (procedure_name, menu_path); return _gimp_plugin_menu_register (procedure_name, menu_path);
} }
/**
* gimp_plugin_icon_register:
* @procedure_name: The procedure for which to install the icon.
* @icon_type: The type of the icon.
* @icon_data: The procedure's icon. The format depends on @icon_type.
*
* Register an icon for a plug-in procedure.
*
* This procedure installs an icon for the given procedure.
*
* Returns: TRUE on success.
*
* Since: 2.2
**/
gboolean
gimp_plugin_icon_register (const gchar *procedure_name,
GimpIconType icon_type,
gconstpointer icon_data)
{
guint8 *data;
gsize data_length;
gboolean success;
g_return_val_if_fail (procedure_name != NULL, FALSE);
g_return_val_if_fail (icon_data != NULL, FALSE);
ASSERT_NO_PLUG_IN_EXISTS (G_STRFUNC);
switch (icon_type)
{
case GIMP_ICON_TYPE_ICON_NAME:
data = (guint8 *) icon_data;
data_length = strlen (icon_data) + 1;
break;
case GIMP_ICON_TYPE_PIXBUF:
if (! gdk_pixbuf_save_to_buffer ((GdkPixbuf *) icon_data,
(gchar **) &data, &data_length,
"png", NULL, NULL))
return FALSE;
break;
case GIMP_ICON_TYPE_IMAGE_FILE:
data = (guint8 *) g_file_get_uri ((GFile *) icon_data);
data_length = strlen (icon_data) + 1;
break;
default:
g_return_val_if_reached (FALSE);
}
success = _gimp_plugin_icon_register (procedure_name,
icon_type, data_length, data);
switch (icon_type)
{
case GIMP_ICON_TYPE_ICON_NAME:
break;
case GIMP_ICON_TYPE_PIXBUF:
case GIMP_ICON_TYPE_IMAGE_FILE:
g_free (data);
break;
}
return success;
}
/** /**
* gimp_register_magic_load_handler: * gimp_register_magic_load_handler:
* @procedure_name: The name of the procedure to be used for loading. * @procedure_name: The name of the procedure to be used for loading.

View File

@ -269,9 +269,6 @@ const gchar * gimp_get_pdb_error (void);
gboolean gimp_plugin_menu_register (const gchar *procedure_name, gboolean gimp_plugin_menu_register (const gchar *procedure_name,
const gchar *menu_path); const gchar *menu_path);
gboolean gimp_plugin_icon_register (const gchar *procedure_name,
GimpIconType icon_type,
gconstpointer icon_data);
/* gimp_fileops API that should now be done by using GimpFileProcedure /* gimp_fileops API that should now be done by using GimpFileProcedure
*/ */