libgimpwidgets: arrange color models in tabs in GimpColorScales.
This allows to have a smaller and cleaner color dock instead of just
listing all possible channels (which may only grow up as we may add more
color spaces).
The API gimp_color_scales_(set|get)_show_hsv() are removed in favor of
more generic gimp_color_selector_(set|get)_model(). I assume this is
ok since they have only been available in the dev version (commit
6258d525ae
, a month ago).
This commit is contained in:
@ -152,6 +152,38 @@ gimp_color_selector_channel_get_type (void)
|
||||
return type;
|
||||
}
|
||||
|
||||
GType
|
||||
gimp_color_selector_model_get_type (void)
|
||||
{
|
||||
static const GEnumValue values[] =
|
||||
{
|
||||
{ GIMP_COLOR_SELECTOR_RGB, "GIMP_COLOR_SELECTOR_RGB", "rgb" },
|
||||
{ GIMP_COLOR_SELECTOR_LCH, "GIMP_COLOR_SELECTOR_LCH", "lch" },
|
||||
{ GIMP_COLOR_SELECTOR_HSV, "GIMP_COLOR_SELECTOR_HSV", "hsv" },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
static const GimpEnumDesc descs[] =
|
||||
{
|
||||
{ GIMP_COLOR_SELECTOR_RGB, NC_("color-selector-model", "RGB"), N_("RGB color model") },
|
||||
{ GIMP_COLOR_SELECTOR_LCH, NC_("color-selector-model", "LCH"), N_("CIELCh color model") },
|
||||
{ GIMP_COLOR_SELECTOR_HSV, NC_("color-selector-model", "HSV"), N_("HSV color model") },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
static GType type = 0;
|
||||
|
||||
if (G_UNLIKELY (! type))
|
||||
{
|
||||
type = g_enum_register_static ("GimpColorSelectorModel", values);
|
||||
gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
|
||||
gimp_type_set_translation_context (type, "color-selector-model");
|
||||
gimp_enum_set_value_descriptions (type, descs);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
GType
|
||||
gimp_page_selector_target_get_type (void)
|
||||
{
|
||||
|
Reference in New Issue
Block a user