mirror of https://github.com/GNOME/gimp.git
app: fix generated tool-enums.c and deactivate Paint Select tool…
… checkbox in Preferences when GEGL operation "gegl:paint-select" is missing. Otherwise the tool won't appear and you don't understand why.
This commit is contained in:
parent
3fb2ff1b9d
commit
9f6fbe8aca
|
@ -1651,6 +1651,18 @@ prefs_dialog_new (Gimp *gimp,
|
|||
button = prefs_check_button_add (object, "playground-paint-select-tool",
|
||||
_("_Paint Select tool"),
|
||||
GTK_BOX (vbox2));
|
||||
if (! gegl_has_operation ("gegl:paint-select"))
|
||||
{
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), FALSE);
|
||||
gtk_widget_set_sensitive (button, FALSE);
|
||||
/* The tooltip is not translated on purpose. By the time it
|
||||
* hits stable release, I sure hope this won't be considered
|
||||
* an optional operation anymore. The info is still useful for
|
||||
* dev-release testers, but no need to bother translators with
|
||||
* a temporary string otherwise.
|
||||
*/
|
||||
gimp_help_set_help_data (button, "Missing GEGL operation 'gegl:paint-select'.", NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -352,7 +352,19 @@ gimp_paint_select_mode_get_type (void)
|
|||
{ GIMP_PAINT_SELECT_MODE_ADD, NC_("paint-select-mode", "Add to selection"), NULL },
|
||||
{ GIMP_PAINT_SELECT_MODE_SUBTRACT, NC_("paint-select-mode", "Subtract from selection"), NULL },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
};
|
||||
|
||||
static GType type = 0;
|
||||
|
||||
if (G_UNLIKELY (! type))
|
||||
{
|
||||
type = g_enum_register_static ("GimpPaintSelectMode", values);
|
||||
gimp_type_set_translation_context (type, "paint-select-mode");
|
||||
gimp_enum_set_value_descriptions (type, descs);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
|
||||
/* Generated data ends here */
|
||||
|
|
Loading…
Reference in New Issue