mirror of https://github.com/GNOME/gimp.git
changed enum PlugInImageType to GimpPlugInImageType.
2006-05-08 Michael Natterer <mitch@gimp.org> * app/plug-in/plug-in-enums.[ch]: changed enum PlugInImageType to GimpPlugInImageType. * app/pdb/gimppluginprocedure.[ch]: changed accordingly.
This commit is contained in:
parent
a108ac9967
commit
cfe5e9b137
|
@ -1,3 +1,10 @@
|
|||
2006-05-08 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/plug-in/plug-in-enums.[ch]: changed enum PlugInImageType
|
||||
to GimpPlugInImageType.
|
||||
|
||||
* app/pdb/gimppluginprocedure.[ch]: changed accordingly.
|
||||
|
||||
2006-05-08 Simon Budig <simon@gimp.org>
|
||||
|
||||
* plug-ins/common/postscript.c: improve the error message when
|
||||
|
|
|
@ -604,22 +604,22 @@ gimp_plug_in_procedure_get_sensitive (const GimpPlugInProcedure *proc,
|
|||
switch (image_type)
|
||||
{
|
||||
case GIMP_RGB_IMAGE:
|
||||
sensitive = proc->image_types_val & PLUG_IN_RGB_IMAGE;
|
||||
sensitive = proc->image_types_val & GIMP_PLUG_IN_RGB_IMAGE;
|
||||
break;
|
||||
case GIMP_RGBA_IMAGE:
|
||||
sensitive = proc->image_types_val & PLUG_IN_RGBA_IMAGE;
|
||||
sensitive = proc->image_types_val & GIMP_PLUG_IN_RGBA_IMAGE;
|
||||
break;
|
||||
case GIMP_GRAY_IMAGE:
|
||||
sensitive = proc->image_types_val & PLUG_IN_GRAY_IMAGE;
|
||||
sensitive = proc->image_types_val & GIMP_PLUG_IN_GRAY_IMAGE;
|
||||
break;
|
||||
case GIMP_GRAYA_IMAGE:
|
||||
sensitive = proc->image_types_val & PLUG_IN_GRAYA_IMAGE;
|
||||
sensitive = proc->image_types_val & GIMP_PLUG_IN_GRAYA_IMAGE;
|
||||
break;
|
||||
case GIMP_INDEXED_IMAGE:
|
||||
sensitive = proc->image_types_val & PLUG_IN_INDEXED_IMAGE;
|
||||
sensitive = proc->image_types_val & GIMP_PLUG_IN_INDEXED_IMAGE;
|
||||
break;
|
||||
case GIMP_INDEXEDA_IMAGE:
|
||||
sensitive = proc->image_types_val & PLUG_IN_INDEXEDA_IMAGE;
|
||||
sensitive = proc->image_types_val & GIMP_PLUG_IN_INDEXEDA_IMAGE;
|
||||
break;
|
||||
default:
|
||||
sensitive = FALSE;
|
||||
|
@ -629,11 +629,11 @@ gimp_plug_in_procedure_get_sensitive (const GimpPlugInProcedure *proc,
|
|||
return sensitive ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
static PlugInImageType
|
||||
static GimpPlugInImageType
|
||||
image_types_parse (const gchar *image_types)
|
||||
{
|
||||
const gchar *type_spec = image_types;
|
||||
PlugInImageType types = 0;
|
||||
const gchar *type_spec = image_types;
|
||||
GimpPlugInImageType types = 0;
|
||||
|
||||
/* If the plug_in registers with image_type == NULL or "", return 0
|
||||
* By doing so it won't be touched by plug_in_set_menu_sensitivity()
|
||||
|
@ -653,54 +653,54 @@ image_types_parse (const gchar *image_types)
|
|||
{
|
||||
if (strncmp (image_types, "RGBA", 4) == 0)
|
||||
{
|
||||
types |= PLUG_IN_RGBA_IMAGE;
|
||||
types |= GIMP_PLUG_IN_RGBA_IMAGE;
|
||||
image_types += 4;
|
||||
}
|
||||
else if (strncmp (image_types, "RGB*", 4) == 0)
|
||||
{
|
||||
types |= PLUG_IN_RGB_IMAGE | PLUG_IN_RGBA_IMAGE;
|
||||
types |= GIMP_PLUG_IN_RGB_IMAGE | GIMP_PLUG_IN_RGBA_IMAGE;
|
||||
image_types += 4;
|
||||
}
|
||||
else if (strncmp (image_types, "RGB", 3) == 0)
|
||||
{
|
||||
types |= PLUG_IN_RGB_IMAGE;
|
||||
types |= GIMP_PLUG_IN_RGB_IMAGE;
|
||||
image_types += 3;
|
||||
}
|
||||
else if (strncmp (image_types, "GRAYA", 5) == 0)
|
||||
{
|
||||
types |= PLUG_IN_GRAYA_IMAGE;
|
||||
types |= GIMP_PLUG_IN_GRAYA_IMAGE;
|
||||
image_types += 5;
|
||||
}
|
||||
else if (strncmp (image_types, "GRAY*", 5) == 0)
|
||||
{
|
||||
types |= PLUG_IN_GRAY_IMAGE | PLUG_IN_GRAYA_IMAGE;
|
||||
types |= GIMP_PLUG_IN_GRAY_IMAGE | GIMP_PLUG_IN_GRAYA_IMAGE;
|
||||
image_types += 5;
|
||||
}
|
||||
else if (strncmp (image_types, "GRAY", 4) == 0)
|
||||
{
|
||||
types |= PLUG_IN_GRAY_IMAGE;
|
||||
types |= GIMP_PLUG_IN_GRAY_IMAGE;
|
||||
image_types += 4;
|
||||
}
|
||||
else if (strncmp (image_types, "INDEXEDA", 8) == 0)
|
||||
{
|
||||
types |= PLUG_IN_INDEXEDA_IMAGE;
|
||||
types |= GIMP_PLUG_IN_INDEXEDA_IMAGE;
|
||||
image_types += 8;
|
||||
}
|
||||
else if (strncmp (image_types, "INDEXED*", 8) == 0)
|
||||
{
|
||||
types |= PLUG_IN_INDEXED_IMAGE | PLUG_IN_INDEXEDA_IMAGE;
|
||||
types |= GIMP_PLUG_IN_INDEXED_IMAGE | GIMP_PLUG_IN_INDEXEDA_IMAGE;
|
||||
image_types += 8;
|
||||
}
|
||||
else if (strncmp (image_types, "INDEXED", 7) == 0)
|
||||
{
|
||||
types |= PLUG_IN_INDEXED_IMAGE;
|
||||
types |= GIMP_PLUG_IN_INDEXED_IMAGE;
|
||||
image_types += 7;
|
||||
}
|
||||
else if (strncmp (image_types, "*", 1) == 0)
|
||||
{
|
||||
types |= PLUG_IN_RGB_IMAGE | PLUG_IN_RGBA_IMAGE
|
||||
| PLUG_IN_GRAY_IMAGE | PLUG_IN_GRAYA_IMAGE
|
||||
| PLUG_IN_INDEXED_IMAGE | PLUG_IN_INDEXEDA_IMAGE;
|
||||
types |= (GIMP_PLUG_IN_RGB_IMAGE | GIMP_PLUG_IN_RGBA_IMAGE |
|
||||
GIMP_PLUG_IN_GRAY_IMAGE | GIMP_PLUG_IN_GRAYA_IMAGE |
|
||||
GIMP_PLUG_IN_INDEXED_IMAGE | GIMP_PLUG_IN_INDEXEDA_IMAGE);
|
||||
image_types += 1;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -40,30 +40,30 @@ typedef struct _GimpPlugInProcedureClass GimpPlugInProcedureClass;
|
|||
|
||||
struct _GimpPlugInProcedure
|
||||
{
|
||||
GimpProcedure parent_instance;
|
||||
GimpProcedure parent_instance;
|
||||
|
||||
/* common members */
|
||||
gchar *prog;
|
||||
gchar *menu_label;
|
||||
GList *menu_paths;
|
||||
GimpIconType icon_type;
|
||||
gint icon_data_length;
|
||||
guint8 *icon_data;
|
||||
gchar *image_types;
|
||||
PlugInImageType image_types_val;
|
||||
time_t mtime;
|
||||
gboolean installed_during_init;
|
||||
gchar *prog;
|
||||
gchar *menu_label;
|
||||
GList *menu_paths;
|
||||
GimpIconType icon_type;
|
||||
gint icon_data_length;
|
||||
guint8 *icon_data;
|
||||
gchar *image_types;
|
||||
GimpPlugInImageType image_types_val;
|
||||
time_t mtime;
|
||||
gboolean installed_during_init;
|
||||
|
||||
/* file proc specific members */
|
||||
gboolean file_proc;
|
||||
gchar *extensions;
|
||||
gchar *prefixes;
|
||||
gchar *magics;
|
||||
gchar *mime_type;
|
||||
GSList *extensions_list;
|
||||
GSList *prefixes_list;
|
||||
GSList *magics_list;
|
||||
gchar *thumb_loader;
|
||||
gboolean file_proc;
|
||||
gchar *extensions;
|
||||
gchar *prefixes;
|
||||
gchar *magics;
|
||||
gchar *mime_type;
|
||||
GSList *extensions_list;
|
||||
GSList *prefixes_list;
|
||||
GSList *magics_list;
|
||||
gchar *thumb_loader;
|
||||
};
|
||||
|
||||
struct _GimpPlugInProcedureClass
|
||||
|
|
|
@ -604,22 +604,22 @@ gimp_plug_in_procedure_get_sensitive (const GimpPlugInProcedure *proc,
|
|||
switch (image_type)
|
||||
{
|
||||
case GIMP_RGB_IMAGE:
|
||||
sensitive = proc->image_types_val & PLUG_IN_RGB_IMAGE;
|
||||
sensitive = proc->image_types_val & GIMP_PLUG_IN_RGB_IMAGE;
|
||||
break;
|
||||
case GIMP_RGBA_IMAGE:
|
||||
sensitive = proc->image_types_val & PLUG_IN_RGBA_IMAGE;
|
||||
sensitive = proc->image_types_val & GIMP_PLUG_IN_RGBA_IMAGE;
|
||||
break;
|
||||
case GIMP_GRAY_IMAGE:
|
||||
sensitive = proc->image_types_val & PLUG_IN_GRAY_IMAGE;
|
||||
sensitive = proc->image_types_val & GIMP_PLUG_IN_GRAY_IMAGE;
|
||||
break;
|
||||
case GIMP_GRAYA_IMAGE:
|
||||
sensitive = proc->image_types_val & PLUG_IN_GRAYA_IMAGE;
|
||||
sensitive = proc->image_types_val & GIMP_PLUG_IN_GRAYA_IMAGE;
|
||||
break;
|
||||
case GIMP_INDEXED_IMAGE:
|
||||
sensitive = proc->image_types_val & PLUG_IN_INDEXED_IMAGE;
|
||||
sensitive = proc->image_types_val & GIMP_PLUG_IN_INDEXED_IMAGE;
|
||||
break;
|
||||
case GIMP_INDEXEDA_IMAGE:
|
||||
sensitive = proc->image_types_val & PLUG_IN_INDEXEDA_IMAGE;
|
||||
sensitive = proc->image_types_val & GIMP_PLUG_IN_INDEXEDA_IMAGE;
|
||||
break;
|
||||
default:
|
||||
sensitive = FALSE;
|
||||
|
@ -629,11 +629,11 @@ gimp_plug_in_procedure_get_sensitive (const GimpPlugInProcedure *proc,
|
|||
return sensitive ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
static PlugInImageType
|
||||
static GimpPlugInImageType
|
||||
image_types_parse (const gchar *image_types)
|
||||
{
|
||||
const gchar *type_spec = image_types;
|
||||
PlugInImageType types = 0;
|
||||
const gchar *type_spec = image_types;
|
||||
GimpPlugInImageType types = 0;
|
||||
|
||||
/* If the plug_in registers with image_type == NULL or "", return 0
|
||||
* By doing so it won't be touched by plug_in_set_menu_sensitivity()
|
||||
|
@ -653,54 +653,54 @@ image_types_parse (const gchar *image_types)
|
|||
{
|
||||
if (strncmp (image_types, "RGBA", 4) == 0)
|
||||
{
|
||||
types |= PLUG_IN_RGBA_IMAGE;
|
||||
types |= GIMP_PLUG_IN_RGBA_IMAGE;
|
||||
image_types += 4;
|
||||
}
|
||||
else if (strncmp (image_types, "RGB*", 4) == 0)
|
||||
{
|
||||
types |= PLUG_IN_RGB_IMAGE | PLUG_IN_RGBA_IMAGE;
|
||||
types |= GIMP_PLUG_IN_RGB_IMAGE | GIMP_PLUG_IN_RGBA_IMAGE;
|
||||
image_types += 4;
|
||||
}
|
||||
else if (strncmp (image_types, "RGB", 3) == 0)
|
||||
{
|
||||
types |= PLUG_IN_RGB_IMAGE;
|
||||
types |= GIMP_PLUG_IN_RGB_IMAGE;
|
||||
image_types += 3;
|
||||
}
|
||||
else if (strncmp (image_types, "GRAYA", 5) == 0)
|
||||
{
|
||||
types |= PLUG_IN_GRAYA_IMAGE;
|
||||
types |= GIMP_PLUG_IN_GRAYA_IMAGE;
|
||||
image_types += 5;
|
||||
}
|
||||
else if (strncmp (image_types, "GRAY*", 5) == 0)
|
||||
{
|
||||
types |= PLUG_IN_GRAY_IMAGE | PLUG_IN_GRAYA_IMAGE;
|
||||
types |= GIMP_PLUG_IN_GRAY_IMAGE | GIMP_PLUG_IN_GRAYA_IMAGE;
|
||||
image_types += 5;
|
||||
}
|
||||
else if (strncmp (image_types, "GRAY", 4) == 0)
|
||||
{
|
||||
types |= PLUG_IN_GRAY_IMAGE;
|
||||
types |= GIMP_PLUG_IN_GRAY_IMAGE;
|
||||
image_types += 4;
|
||||
}
|
||||
else if (strncmp (image_types, "INDEXEDA", 8) == 0)
|
||||
{
|
||||
types |= PLUG_IN_INDEXEDA_IMAGE;
|
||||
types |= GIMP_PLUG_IN_INDEXEDA_IMAGE;
|
||||
image_types += 8;
|
||||
}
|
||||
else if (strncmp (image_types, "INDEXED*", 8) == 0)
|
||||
{
|
||||
types |= PLUG_IN_INDEXED_IMAGE | PLUG_IN_INDEXEDA_IMAGE;
|
||||
types |= GIMP_PLUG_IN_INDEXED_IMAGE | GIMP_PLUG_IN_INDEXEDA_IMAGE;
|
||||
image_types += 8;
|
||||
}
|
||||
else if (strncmp (image_types, "INDEXED", 7) == 0)
|
||||
{
|
||||
types |= PLUG_IN_INDEXED_IMAGE;
|
||||
types |= GIMP_PLUG_IN_INDEXED_IMAGE;
|
||||
image_types += 7;
|
||||
}
|
||||
else if (strncmp (image_types, "*", 1) == 0)
|
||||
{
|
||||
types |= PLUG_IN_RGB_IMAGE | PLUG_IN_RGBA_IMAGE
|
||||
| PLUG_IN_GRAY_IMAGE | PLUG_IN_GRAYA_IMAGE
|
||||
| PLUG_IN_INDEXED_IMAGE | PLUG_IN_INDEXEDA_IMAGE;
|
||||
types |= (GIMP_PLUG_IN_RGB_IMAGE | GIMP_PLUG_IN_RGBA_IMAGE |
|
||||
GIMP_PLUG_IN_GRAY_IMAGE | GIMP_PLUG_IN_GRAYA_IMAGE |
|
||||
GIMP_PLUG_IN_INDEXED_IMAGE | GIMP_PLUG_IN_INDEXEDA_IMAGE);
|
||||
image_types += 1;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -40,30 +40,30 @@ typedef struct _GimpPlugInProcedureClass GimpPlugInProcedureClass;
|
|||
|
||||
struct _GimpPlugInProcedure
|
||||
{
|
||||
GimpProcedure parent_instance;
|
||||
GimpProcedure parent_instance;
|
||||
|
||||
/* common members */
|
||||
gchar *prog;
|
||||
gchar *menu_label;
|
||||
GList *menu_paths;
|
||||
GimpIconType icon_type;
|
||||
gint icon_data_length;
|
||||
guint8 *icon_data;
|
||||
gchar *image_types;
|
||||
PlugInImageType image_types_val;
|
||||
time_t mtime;
|
||||
gboolean installed_during_init;
|
||||
gchar *prog;
|
||||
gchar *menu_label;
|
||||
GList *menu_paths;
|
||||
GimpIconType icon_type;
|
||||
gint icon_data_length;
|
||||
guint8 *icon_data;
|
||||
gchar *image_types;
|
||||
GimpPlugInImageType image_types_val;
|
||||
time_t mtime;
|
||||
gboolean installed_during_init;
|
||||
|
||||
/* file proc specific members */
|
||||
gboolean file_proc;
|
||||
gchar *extensions;
|
||||
gchar *prefixes;
|
||||
gchar *magics;
|
||||
gchar *mime_type;
|
||||
GSList *extensions_list;
|
||||
GSList *prefixes_list;
|
||||
GSList *magics_list;
|
||||
gchar *thumb_loader;
|
||||
gboolean file_proc;
|
||||
gchar *extensions;
|
||||
gchar *prefixes;
|
||||
gchar *magics;
|
||||
gchar *mime_type;
|
||||
GSList *extensions_list;
|
||||
GSList *prefixes_list;
|
||||
GSList *magics_list;
|
||||
gchar *thumb_loader;
|
||||
};
|
||||
|
||||
struct _GimpPlugInProcedureClass
|
||||
|
|
|
@ -9,27 +9,27 @@
|
|||
|
||||
/* enumerations from "./plug-in-enums.h" */
|
||||
GType
|
||||
plug_in_image_type_get_type (void)
|
||||
gimp_plug_in_image_type_get_type (void)
|
||||
{
|
||||
static const GFlagsValue values[] =
|
||||
{
|
||||
{ PLUG_IN_RGB_IMAGE, "PLUG_IN_RGB_IMAGE", "rgb-image" },
|
||||
{ PLUG_IN_GRAY_IMAGE, "PLUG_IN_GRAY_IMAGE", "gray-image" },
|
||||
{ PLUG_IN_INDEXED_IMAGE, "PLUG_IN_INDEXED_IMAGE", "indexed-image" },
|
||||
{ PLUG_IN_RGBA_IMAGE, "PLUG_IN_RGBA_IMAGE", "rgba-image" },
|
||||
{ PLUG_IN_GRAYA_IMAGE, "PLUG_IN_GRAYA_IMAGE", "graya-image" },
|
||||
{ PLUG_IN_INDEXEDA_IMAGE, "PLUG_IN_INDEXEDA_IMAGE", "indexeda-image" },
|
||||
{ GIMP_PLUG_IN_RGB_IMAGE, "GIMP_PLUG_IN_RGB_IMAGE", "rgb-image" },
|
||||
{ GIMP_PLUG_IN_GRAY_IMAGE, "GIMP_PLUG_IN_GRAY_IMAGE", "gray-image" },
|
||||
{ GIMP_PLUG_IN_INDEXED_IMAGE, "GIMP_PLUG_IN_INDEXED_IMAGE", "indexed-image" },
|
||||
{ GIMP_PLUG_IN_RGBA_IMAGE, "GIMP_PLUG_IN_RGBA_IMAGE", "rgba-image" },
|
||||
{ GIMP_PLUG_IN_GRAYA_IMAGE, "GIMP_PLUG_IN_GRAYA_IMAGE", "graya-image" },
|
||||
{ GIMP_PLUG_IN_INDEXEDA_IMAGE, "GIMP_PLUG_IN_INDEXEDA_IMAGE", "indexeda-image" },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
static const GimpFlagsDesc descs[] =
|
||||
{
|
||||
{ PLUG_IN_RGB_IMAGE, "PLUG_IN_RGB_IMAGE", NULL },
|
||||
{ PLUG_IN_GRAY_IMAGE, "PLUG_IN_GRAY_IMAGE", NULL },
|
||||
{ PLUG_IN_INDEXED_IMAGE, "PLUG_IN_INDEXED_IMAGE", NULL },
|
||||
{ PLUG_IN_RGBA_IMAGE, "PLUG_IN_RGBA_IMAGE", NULL },
|
||||
{ PLUG_IN_GRAYA_IMAGE, "PLUG_IN_GRAYA_IMAGE", NULL },
|
||||
{ PLUG_IN_INDEXEDA_IMAGE, "PLUG_IN_INDEXEDA_IMAGE", NULL },
|
||||
{ GIMP_PLUG_IN_RGB_IMAGE, "GIMP_PLUG_IN_RGB_IMAGE", NULL },
|
||||
{ GIMP_PLUG_IN_GRAY_IMAGE, "GIMP_PLUG_IN_GRAY_IMAGE", NULL },
|
||||
{ GIMP_PLUG_IN_INDEXED_IMAGE, "GIMP_PLUG_IN_INDEXED_IMAGE", NULL },
|
||||
{ GIMP_PLUG_IN_RGBA_IMAGE, "GIMP_PLUG_IN_RGBA_IMAGE", NULL },
|
||||
{ GIMP_PLUG_IN_GRAYA_IMAGE, "GIMP_PLUG_IN_GRAYA_IMAGE", NULL },
|
||||
{ GIMP_PLUG_IN_INDEXEDA_IMAGE, "GIMP_PLUG_IN_INDEXEDA_IMAGE", NULL },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
|
@ -37,7 +37,7 @@ plug_in_image_type_get_type (void)
|
|||
|
||||
if (! type)
|
||||
{
|
||||
type = g_flags_register_static ("PlugInImageType", values);
|
||||
type = g_flags_register_static ("GimpPlugInImageType", values);
|
||||
gimp_flags_set_value_descriptions (type, descs);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,13 +22,13 @@
|
|||
|
||||
typedef enum /*< pdb-skip >*/
|
||||
{
|
||||
PLUG_IN_RGB_IMAGE = 1 << 0,
|
||||
PLUG_IN_GRAY_IMAGE = 1 << 1,
|
||||
PLUG_IN_INDEXED_IMAGE = 1 << 2,
|
||||
PLUG_IN_RGBA_IMAGE = 1 << 3,
|
||||
PLUG_IN_GRAYA_IMAGE = 1 << 4,
|
||||
PLUG_IN_INDEXEDA_IMAGE = 1 << 5
|
||||
} PlugInImageType;
|
||||
GIMP_PLUG_IN_RGB_IMAGE = 1 << 0,
|
||||
GIMP_PLUG_IN_GRAY_IMAGE = 1 << 1,
|
||||
GIMP_PLUG_IN_INDEXED_IMAGE = 1 << 2,
|
||||
GIMP_PLUG_IN_RGBA_IMAGE = 1 << 3,
|
||||
GIMP_PLUG_IN_GRAYA_IMAGE = 1 << 4,
|
||||
GIMP_PLUG_IN_INDEXEDA_IMAGE = 1 << 5
|
||||
} GimpPlugInImageType;
|
||||
|
||||
typedef enum /*< pdb-skip >*/
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue