[gimp/soc-2011-seamless-clone2] app: strip the ellipsis from the GEGL filter dialog labels



commit ee5cffd0a3dae92a3facb9f1890235053f38bd15
Author: Michael Natterer <mitch gimp org>
Date:   Sat Mar 9 20:19:32 2013 +0100

    app: strip the ellipsis from the GEGL filter dialog labels
    
    We recycle the menu item's label, and ellipsis are just wrong in a
    dialog title.

 app/actions/filters-commands.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/app/actions/filters-commands.c b/app/actions/filters-commands.c
index e570bad..7337e0b 100644
--- a/app/actions/filters-commands.c
+++ b/app/actions/filters-commands.c
@@ -71,7 +71,19 @@ filters_filter_cmd_callback (GtkAction   *action,
 
   if (GIMP_IS_OPERATION_TOOL (active_tool))
     {
-      gchar *label = gimp_strip_uline (gtk_action_get_label (action));
+      gchar       *label    = gimp_strip_uline (gtk_action_get_label (action));
+      const gchar *ellipsis = _("...");
+      gint         label_len;
+      gint         ellipsis_len;
+
+      label_len    = strlen (label);
+      ellipsis_len = strlen (ellipsis);
+
+      if (label_len > ellipsis_len &&
+          strcmp (label + label_len - ellipsis_len, ellipsis) == 0)
+        {
+          label[label_len - ellipsis_len] = '\0';
+        }
 
       gimp_operation_tool_set_operation (GIMP_OPERATION_TOOL (active_tool),
                                          operation, label);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]