[gimp] libgimp: remove gimp_plugin_icon_register()



commit 1bfa52b6922dc98f7e6c3f911177777cb9ca9983
Author: Michael Natterer <mitch gimp org>
Date:   Thu Aug 15 12:51:40 2019 +0200

    libgimp: remove gimp_plugin_icon_register()

 libgimp/gimp.def     |  1 -
 libgimp/gimplegacy.c | 68 ----------------------------------------------------
 libgimp/gimplegacy.h |  3 ---
 3 files changed, 72 deletions(-)
---
diff --git a/libgimp/gimp.def b/libgimp/gimp.def
index a7f9583c2e..b47a340c90 100644
--- a/libgimp/gimp.def
+++ b/libgimp/gimp.def
@@ -652,7 +652,6 @@ EXPORTS
        gimp_plug_in_set_help_domain
        gimp_plug_in_set_pdb_error_handler
        gimp_plug_in_set_translation_domain
-       gimp_plugin_icon_register
        gimp_plugin_menu_register
        gimp_procedure_add_argument
        gimp_procedure_add_argument_from_property
diff --git a/libgimp/gimplegacy.c b/libgimp/gimplegacy.c
index d6d556425d..ffb48095c9 100644
--- a/libgimp/gimplegacy.c
+++ b/libgimp/gimplegacy.c
@@ -447,74 +447,6 @@ gimp_plugin_menu_register (const gchar *procedure_name,
   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:
  * @procedure_name: The name of the procedure to be used for loading.
diff --git a/libgimp/gimplegacy.h b/libgimp/gimplegacy.h
index 2318133c63..9030764336 100644
--- a/libgimp/gimplegacy.h
+++ b/libgimp/gimplegacy.h
@@ -269,9 +269,6 @@ const gchar    * gimp_get_pdb_error  (void);
 
 gboolean   gimp_plugin_menu_register        (const gchar   *procedure_name,
                                              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
  */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]