mirror of https://github.com/GNOME/gimp.git
app: rename GimpToolInfo's "blurb" and "help" members
to "label" and "tooltip". More standard names, less confusion.
This commit is contained in:
parent
1f42d65e21
commit
e21be2f3d9
|
@ -63,8 +63,8 @@ tool_preset_editor_save_cmd_callback (GtkAction *action,
|
|||
G_OBJECT (editor), GIMP_MESSAGE_WARNING,
|
||||
_("Can't save '%s' tool options to an "
|
||||
"existing '%s' tool preset."),
|
||||
tool_info->blurb,
|
||||
preset_tool->blurb);
|
||||
tool_info->label,
|
||||
preset_tool->label);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -66,8 +66,8 @@ tool_presets_save_cmd_callback (GtkAction *action,
|
|||
G_OBJECT (editor), GIMP_MESSAGE_WARNING,
|
||||
_("Can't save '%s' tool options to an "
|
||||
"existing '%s' tool preset."),
|
||||
tool_info->blurb,
|
||||
preset_tool->blurb);
|
||||
tool_info->label,
|
||||
preset_tool->label);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -778,7 +778,7 @@ tools_actions_setup (GimpActionGroup *group)
|
|||
entry.icon_name = icon_name;
|
||||
entry.label = tool_info->menu_label;
|
||||
entry.accelerator = tool_info->menu_accel;
|
||||
entry.tooltip = tool_info->help;
|
||||
entry.tooltip = tool_info->tooltip;
|
||||
entry.help_id = tool_info->help_id;
|
||||
entry.value = identifier;
|
||||
|
||||
|
|
|
@ -88,24 +88,6 @@ gimp_tool_info_class_init (GimpToolInfoClass *klass)
|
|||
static void
|
||||
gimp_tool_info_init (GimpToolInfo *tool_info)
|
||||
{
|
||||
tool_info->gimp = NULL;
|
||||
|
||||
tool_info->tool_type = G_TYPE_NONE;
|
||||
tool_info->tool_options_type = G_TYPE_NONE;
|
||||
tool_info->context_props = 0;
|
||||
|
||||
tool_info->blurb = NULL;
|
||||
tool_info->help = NULL;
|
||||
|
||||
tool_info->menu_label = NULL;
|
||||
tool_info->menu_accel = NULL;
|
||||
|
||||
tool_info->help_domain = NULL;
|
||||
tool_info->help_id = NULL;
|
||||
|
||||
tool_info->visible = TRUE;
|
||||
tool_info->tool_options = NULL;
|
||||
tool_info->paint_info = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -134,15 +116,15 @@ gimp_tool_info_finalize (GObject *object)
|
|||
{
|
||||
GimpToolInfo *tool_info = GIMP_TOOL_INFO (object);
|
||||
|
||||
if (tool_info->blurb)
|
||||
if (tool_info->label)
|
||||
{
|
||||
g_free (tool_info->blurb);
|
||||
tool_info->blurb = NULL;
|
||||
g_free (tool_info->label);
|
||||
tool_info->label = NULL;
|
||||
}
|
||||
if (tool_info->help)
|
||||
if (tool_info->tooltip)
|
||||
{
|
||||
g_free (tool_info->help);
|
||||
tool_info->help = NULL;
|
||||
g_free (tool_info->tooltip);
|
||||
tool_info->tooltip = NULL;
|
||||
}
|
||||
|
||||
if (tool_info->menu_label)
|
||||
|
@ -214,7 +196,9 @@ gimp_tool_info_get_description (GimpViewable *viewable,
|
|||
{
|
||||
GimpToolInfo *tool_info = GIMP_TOOL_INFO (viewable);
|
||||
|
||||
return g_strdup (tool_info->blurb);
|
||||
*tooltip = g_strdup (tool_info->tooltip);
|
||||
|
||||
return g_strdup (tool_info->label);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -233,8 +217,8 @@ gimp_tool_info_new (Gimp *gimp,
|
|||
GType tool_options_type,
|
||||
GimpContextPropMask context_props,
|
||||
const gchar *identifier,
|
||||
const gchar *blurb,
|
||||
const gchar *help,
|
||||
const gchar *label,
|
||||
const gchar *tooltip,
|
||||
const gchar *menu_label,
|
||||
const gchar *menu_accel,
|
||||
const gchar *help_domain,
|
||||
|
@ -247,8 +231,8 @@ gimp_tool_info_new (Gimp *gimp,
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (identifier != NULL, NULL);
|
||||
g_return_val_if_fail (blurb != NULL, NULL);
|
||||
g_return_val_if_fail (help != NULL, NULL);
|
||||
g_return_val_if_fail (label != NULL, NULL);
|
||||
g_return_val_if_fail (tooltip != NULL, NULL);
|
||||
g_return_val_if_fail (menu_label != NULL, NULL);
|
||||
g_return_val_if_fail (help_id != NULL, NULL);
|
||||
g_return_val_if_fail (paint_core_name != NULL, NULL);
|
||||
|
@ -269,8 +253,8 @@ gimp_tool_info_new (Gimp *gimp,
|
|||
tool_info->tool_options_type = tool_options_type;
|
||||
tool_info->context_props = context_props;
|
||||
|
||||
tool_info->blurb = g_strdup (blurb);
|
||||
tool_info->help = g_strdup (help);
|
||||
tool_info->label = g_strdup (label);
|
||||
tool_info->tooltip = g_strdup (tooltip);
|
||||
|
||||
tool_info->menu_label = g_strdup (menu_label);
|
||||
tool_info->menu_accel = g_strdup (menu_accel);
|
||||
|
|
|
@ -42,8 +42,8 @@ struct _GimpToolInfo
|
|||
GType tool_options_type;
|
||||
GimpContextPropMask context_props;
|
||||
|
||||
gchar *blurb;
|
||||
gchar *help;
|
||||
gchar *label;
|
||||
gchar *tooltip;
|
||||
|
||||
gchar *menu_label;
|
||||
gchar *menu_accel;
|
||||
|
@ -71,8 +71,8 @@ GimpToolInfo * gimp_tool_info_new (Gimp *gimp,
|
|||
GType tool_options_type,
|
||||
GimpContextPropMask context_props,
|
||||
const gchar *identifier,
|
||||
const gchar *blurb,
|
||||
const gchar *help,
|
||||
const gchar *label,
|
||||
const gchar *tooltip,
|
||||
const gchar *menu_label,
|
||||
const gchar *menu_accel,
|
||||
const gchar *help_domain,
|
||||
|
|
|
@ -616,7 +616,7 @@ gimp_tool_preset_new (GimpContext *context,
|
|||
icon_name = gimp_viewable_get_icon_name (GIMP_VIEWABLE (tool_info));
|
||||
|
||||
return g_object_new (GIMP_TYPE_TOOL_PRESET,
|
||||
"name", tool_info->blurb,
|
||||
"name", tool_info->label,
|
||||
"icon-name", icon_name,
|
||||
"gimp", context->gimp,
|
||||
"tool-options", tool_info->tool_options,
|
||||
|
|
|
@ -119,10 +119,10 @@ gimp_tool_dialog_new (GimpToolInfo *tool_info,
|
|||
g_return_val_if_fail (GIMP_IS_TOOL_INFO (tool_info), NULL);
|
||||
|
||||
if (! title)
|
||||
title = tool_info->blurb;
|
||||
title = tool_info->label;
|
||||
|
||||
if (! description)
|
||||
description = tool_info->help;
|
||||
description = tool_info->tooltip;
|
||||
|
||||
if (! help_id)
|
||||
help_id = tool_info->help_id;
|
||||
|
|
|
@ -262,10 +262,10 @@ gimp_tool_gui_new (GimpToolInfo *tool_info,
|
|||
private = GET_PRIVATE (gui);
|
||||
|
||||
if (! title)
|
||||
title = tool_info->blurb;
|
||||
title = tool_info->label;
|
||||
|
||||
if (! description)
|
||||
description = tool_info->blurb;
|
||||
description = tool_info->label;
|
||||
|
||||
if (! icon_name)
|
||||
icon_name = gimp_viewable_get_icon_name (GIMP_VIEWABLE (tool_info));
|
||||
|
@ -317,7 +317,7 @@ gimp_tool_gui_set_title (GimpToolGui *gui,
|
|||
private->title = g_strdup (title);
|
||||
|
||||
if (! title)
|
||||
title = private->tool_info->blurb;
|
||||
title = private->tool_info->label;
|
||||
|
||||
g_object_set (private->dialog, "title", title, NULL);
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ gimp_tool_gui_set_description (GimpToolGui *gui,
|
|||
private->description = g_strdup (description);
|
||||
|
||||
if (! description)
|
||||
description = private->tool_info->help;
|
||||
description = private->tool_info->tooltip;
|
||||
|
||||
if (private->overlay)
|
||||
{
|
||||
|
|
|
@ -1367,7 +1367,7 @@ gimp_filter_tool_get_operation (GimpFilterTool *filter_tool)
|
|||
operation_name = g_strdup ("gegl:nop");
|
||||
|
||||
if (! filter_tool->title)
|
||||
filter_tool->title = g_strdup (tool->tool_info->blurb);
|
||||
filter_tool->title = g_strdup (tool->tool_info->label);
|
||||
|
||||
if (! filter_tool->description)
|
||||
filter_tool->description = g_strdup (filter_tool->title);
|
||||
|
|
|
@ -1295,7 +1295,7 @@ gimp_iscissors_tool_commit (GimpIscissorsTool *iscissors,
|
|||
if (iscissors->curve->closed && iscissors->mask)
|
||||
{
|
||||
gimp_channel_select_channel (gimp_image_get_mask (image),
|
||||
tool->tool_info->blurb,
|
||||
gimp_tool_get_undo_desc (tool),
|
||||
iscissors->mask,
|
||||
0, 0,
|
||||
options->operation,
|
||||
|
|
|
@ -528,7 +528,7 @@ gimp_tool_get_undo_desc (GimpTool *tool)
|
|||
if (tool->undo_desc)
|
||||
return tool->undo_desc;
|
||||
|
||||
return tool->tool_info->blurb;
|
||||
return tool->tool_info->label;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -484,7 +484,7 @@ gimp_overlay_dialog_new (GimpToolInfo *tool_info,
|
|||
icon_name = gimp_viewable_get_icon_name (GIMP_VIEWABLE (tool_info));
|
||||
|
||||
dialog = g_object_new (GIMP_TYPE_OVERLAY_DIALOG,
|
||||
"title", tool_info->blurb,
|
||||
"title", tool_info->label,
|
||||
"icon-name", icon_name,
|
||||
NULL);
|
||||
|
||||
|
|
|
@ -340,7 +340,7 @@ gimp_tool_options_editor_get_title (GimpDocked *docked)
|
|||
|
||||
tool_info = gimp_context_get_tool (context);
|
||||
|
||||
return tool_info ? g_strdup (tool_info->blurb) : NULL;
|
||||
return tool_info ? g_strdup (tool_info->label) : NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -279,7 +279,7 @@ gimp_tool_palette_hierarchy_changed (GtkWidget *widget,
|
|||
gimp_widget_set_accel_help (GTK_WIDGET (item), action);
|
||||
else
|
||||
gimp_help_set_help_data (GTK_WIDGET (item),
|
||||
tool_info->help, tool_info->help_id);
|
||||
tool_info->tooltip, tool_info->help_id);
|
||||
|
||||
/* Make sure the toolbox buttons won't grab focus, which has
|
||||
* nearly no practical use, and prevents various actions until
|
||||
|
|
|
@ -296,7 +296,7 @@ gimp_tool_preset_editor_sync_data (GimpToolPresetEditor *editor)
|
|||
tool_info = priv->tool_preset_model->tool_options->tool_info;
|
||||
|
||||
icon_name = gimp_viewable_get_icon_name (GIMP_VIEWABLE (tool_info));
|
||||
label = g_strdup_printf (_("%s Preset"), tool_info->blurb);
|
||||
label = g_strdup_printf (_("%s Preset"), tool_info->label);
|
||||
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (priv->tool_icon),
|
||||
icon_name, GTK_ICON_SIZE_MENU);
|
||||
|
|
Loading…
Reference in New Issue