when cutting away ellipsis, also look for U+2026 HORIZONTAL ELLIPSIS.

2006-06-16  Sven Neumann  <neumann@jpk.com>

	* app/pdb/gimppluginprocedure.c (gimp_plug_in_procedure_get_label):
	* plug-ins/script-fu/script-fu-interface.c (script_fu_interface):
	when cutting away ellipsis, also look for U+2026 HORIZONTAL ELLIPSIS.
This commit is contained in:
Sven Neumann 2006-06-16 12:25:02 +00:00 committed by Sven Neumann
parent b12f1abb5f
commit bee8fb744c
4 changed files with 35 additions and 18 deletions

View File

@ -1,3 +1,9 @@
2006-06-16 Sven Neumann <neumann@jpk.com>
* app/pdb/gimppluginprocedure.c (gimp_plug_in_procedure_get_label):
* plug-ins/script-fu/script-fu-interface.c (script_fu_interface):
when cutting away ellipsis, also look for U+2026 HORIZONTAL ELLIPSIS.
2006-06-16 Sven Neumann <sven@gimp.org>
* plug-ins/common/psd_save.c: improved error message.

View File

@ -466,11 +466,11 @@ gimp_plug_in_procedure_add_menu_path (GimpPlugInProcedure *proc,
gchar *
gimp_plug_in_procedure_get_label (const GimpPlugInProcedure *proc,
const gchar *locale_domain)
const gchar *locale_domain)
{
const gchar *path;
gchar *stripped;
gchar *ellipses;
gchar *ellipsis;
gchar *label;
g_return_val_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (proc), NULL);
@ -491,19 +491,22 @@ gimp_plug_in_procedure_get_label (const GimpPlugInProcedure *proc,
g_free (stripped);
ellipses = strstr (label, "...");
ellipsis = strstr (label, "...");
if (ellipses && ellipses == (label + strlen (label) - 3))
*ellipses = '\0';
if (! ellipsis)
ellipsis = strstr (label, "\342\200\246" /* U+2026 HORIZONTAL ELLIPSIS */);
if (ellipsis && ellipsis == (label + strlen (label) - 3))
*ellipsis = '\0';
return label;
}
void
gimp_plug_in_procedure_set_icon (GimpPlugInProcedure *proc,
GimpIconType icon_type,
const guint8 *icon_data,
gint icon_data_length)
GimpIconType icon_type,
const guint8 *icon_data,
gint icon_data_length)
{
g_return_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (proc));
g_return_if_fail (icon_type == -1 || icon_data != NULL);

View File

@ -466,11 +466,11 @@ gimp_plug_in_procedure_add_menu_path (GimpPlugInProcedure *proc,
gchar *
gimp_plug_in_procedure_get_label (const GimpPlugInProcedure *proc,
const gchar *locale_domain)
const gchar *locale_domain)
{
const gchar *path;
gchar *stripped;
gchar *ellipses;
gchar *ellipsis;
gchar *label;
g_return_val_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (proc), NULL);
@ -491,19 +491,22 @@ gimp_plug_in_procedure_get_label (const GimpPlugInProcedure *proc,
g_free (stripped);
ellipses = strstr (label, "...");
ellipsis = strstr (label, "...");
if (ellipses && ellipses == (label + strlen (label) - 3))
*ellipses = '\0';
if (! ellipsis)
ellipsis = strstr (label, "\342\200\246" /* U+2026 HORIZONTAL ELLIPSIS */);
if (ellipsis && ellipsis == (label + strlen (label) - 3))
*ellipsis = '\0';
return label;
}
void
gimp_plug_in_procedure_set_icon (GimpPlugInProcedure *proc,
GimpIconType icon_type,
const guint8 *icon_data,
gint icon_data_length)
GimpIconType icon_type,
const guint8 *icon_data,
gint icon_data_length)
{
g_return_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (proc));
g_return_if_fail (icon_type == -1 || icon_data != NULL);

View File

@ -211,8 +211,13 @@ script_fu_interface (SFScript *script)
g_free (sf_interface->title);
sf_interface->title = tmp;
tmp = strstr (sf_interface->title, "...");
if (tmp)
/* cut off ellipsis */
tmp = (strstr (sf_interface->title, "..."));
if (! tmp)
/* U+2026 HORIZONTAL ELLIPSIS */
tmp = strstr (sf_interface->title, "\342\200\246");
if (tmp && tmp == (sf_interface->title + strlen (sf_interface->title) - 3))
*tmp = '\0';
title = g_strdup_printf (_("Script-Fu: %s"), sf_interface->title);