mirror of https://github.com/GNOME/gimp.git
app: add small hack to make the generic operation tool always invisible
so it can't be added to the toolbox. It's entirely useless when activated on its own.
This commit is contained in:
parent
b95bb99e05
commit
895c0f558f
|
@ -151,7 +151,7 @@ gimp_tool_info_set_property (GObject *object,
|
|||
switch (property_id)
|
||||
{
|
||||
case PROP_VISIBLE:
|
||||
tool_info->visible = g_value_get_boolean (value);
|
||||
tool_info->visible = (g_value_get_boolean (value) && ! tool_info->hidden);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
|
|
|
@ -51,6 +51,7 @@ struct _GimpToolInfo
|
|||
gchar *help_domain;
|
||||
gchar *help_id;
|
||||
|
||||
gboolean hidden; /* can't be made visible */
|
||||
gboolean visible;
|
||||
GimpToolOptions *tool_options;
|
||||
GimpPaintInfo *paint_info;
|
||||
|
|
|
@ -586,6 +586,11 @@ gimp_tools_register (GType tool_type,
|
|||
visible = (! g_type_is_a (tool_type, GIMP_TYPE_FILTER_TOOL));
|
||||
|
||||
g_object_set (tool_info, "visible", visible, NULL);
|
||||
|
||||
/* hack to make the operation tools always invisible */
|
||||
if (tool_type == GIMP_TYPE_OPERATION_TOOL)
|
||||
tool_info->hidden = TRUE;
|
||||
|
||||
g_object_set_data (G_OBJECT (tool_info), "gimp-tool-default-visible",
|
||||
GINT_TO_POINTER (visible));
|
||||
|
||||
|
|
Loading…
Reference in New Issue