[gimp] app: rename GimpToolInfo's "blurb" and "help" members
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: rename GimpToolInfo's "blurb" and "help" members
- Date: Tue, 4 Jul 2017 19:59:13 +0000 (UTC)
commit e21be2f3d96f5a1c90ade05a858cbb64652e51c5
Author: Michael Natterer <mitch gimp org>
Date: Tue Jul 4 21:58:11 2017 +0200
app: rename GimpToolInfo's "blurb" and "help" members
to "label" and "tooltip". More standard names, less confusion.
app/actions/tool-preset-editor-commands.c | 4 +-
app/actions/tool-presets-commands.c | 4 +-
app/actions/tools-actions.c | 2 +-
app/core/gimptoolinfo.c | 46 +++++++++-------------------
app/core/gimptoolinfo.h | 8 ++--
app/core/gimptoolpreset.c | 2 +-
app/display/gimptooldialog.c | 4 +-
app/display/gimptoolgui.c | 8 ++--
app/tools/gimpfiltertool.c | 2 +-
app/tools/gimpiscissorstool.c | 2 +-
app/tools/gimptool.c | 2 +-
app/widgets/gimpoverlaydialog.c | 2 +-
app/widgets/gimptooloptionseditor.c | 2 +-
app/widgets/gimptoolpalette.c | 2 +-
app/widgets/gimptoolpreseteditor.c | 2 +-
15 files changed, 38 insertions(+), 54 deletions(-)
---
diff --git a/app/actions/tool-preset-editor-commands.c b/app/actions/tool-preset-editor-commands.c
index bee1ad4..20adb94 100644
--- a/app/actions/tool-preset-editor-commands.c
+++ b/app/actions/tool-preset-editor-commands.c
@@ -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;
}
diff --git a/app/actions/tool-presets-commands.c b/app/actions/tool-presets-commands.c
index bc7d647..525cc1e 100644
--- a/app/actions/tool-presets-commands.c
+++ b/app/actions/tool-presets-commands.c
@@ -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;
}
diff --git a/app/actions/tools-actions.c b/app/actions/tools-actions.c
index cc9763f..9459c2f 100644
--- a/app/actions/tools-actions.c
+++ b/app/actions/tools-actions.c
@@ -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;
diff --git a/app/core/gimptoolinfo.c b/app/core/gimptoolinfo.c
index d521600..23e041b 100644
--- a/app/core/gimptoolinfo.c
+++ b/app/core/gimptoolinfo.c
@@ -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);
diff --git a/app/core/gimptoolinfo.h b/app/core/gimptoolinfo.h
index b2fdc55..167bdc8 100644
--- a/app/core/gimptoolinfo.h
+++ b/app/core/gimptoolinfo.h
@@ -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,
diff --git a/app/core/gimptoolpreset.c b/app/core/gimptoolpreset.c
index 6649b2f..42d02c0 100644
--- a/app/core/gimptoolpreset.c
+++ b/app/core/gimptoolpreset.c
@@ -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,
diff --git a/app/display/gimptooldialog.c b/app/display/gimptooldialog.c
index 96768a3..b8d5232 100644
--- a/app/display/gimptooldialog.c
+++ b/app/display/gimptooldialog.c
@@ -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;
diff --git a/app/display/gimptoolgui.c b/app/display/gimptoolgui.c
index e0e9395..a8bd141 100644
--- a/app/display/gimptoolgui.c
+++ b/app/display/gimptoolgui.c
@@ -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)
{
diff --git a/app/tools/gimpfiltertool.c b/app/tools/gimpfiltertool.c
index 9062fef..bc544cb 100644
--- a/app/tools/gimpfiltertool.c
+++ b/app/tools/gimpfiltertool.c
@@ -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);
diff --git a/app/tools/gimpiscissorstool.c b/app/tools/gimpiscissorstool.c
index 178e374..ab479e0 100644
--- a/app/tools/gimpiscissorstool.c
+++ b/app/tools/gimpiscissorstool.c
@@ -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,
diff --git a/app/tools/gimptool.c b/app/tools/gimptool.c
index 9ba1b51..fe21fc0 100644
--- a/app/tools/gimptool.c
+++ b/app/tools/gimptool.c
@@ -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
diff --git a/app/widgets/gimpoverlaydialog.c b/app/widgets/gimpoverlaydialog.c
index fe7d4a6..2fe3ac7 100644
--- a/app/widgets/gimpoverlaydialog.c
+++ b/app/widgets/gimpoverlaydialog.c
@@ -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);
diff --git a/app/widgets/gimptooloptionseditor.c b/app/widgets/gimptooloptionseditor.c
index 4a22d56..8395bea 100644
--- a/app/widgets/gimptooloptionseditor.c
+++ b/app/widgets/gimptooloptionseditor.c
@@ -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
diff --git a/app/widgets/gimptoolpalette.c b/app/widgets/gimptoolpalette.c
index bcc567c..cab8ffa 100644
--- a/app/widgets/gimptoolpalette.c
+++ b/app/widgets/gimptoolpalette.c
@@ -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
diff --git a/app/widgets/gimptoolpreseteditor.c b/app/widgets/gimptoolpreseteditor.c
index d8082ff..93ccbe2 100644
--- a/app/widgets/gimptoolpreseteditor.c
+++ b/app/widgets/gimptoolpreseteditor.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]