[Xfce4-commits] [panel-plugins/xfce4-clipman-plugin] 20/28: fixed Strip white spaces for preview

noreply at xfce.org noreply at xfce.org
Thu May 19 20:06:22 CEST 2016


This is an automated email from the git hooks/post-receive script.

ochosi pushed a commit to branch master
in repository panel-plugins/xfce4-clipman-plugin.

commit 6e251605ca1debc224ff2f20e2ccb736b57a04ff
Author: Florian Schüller <florian.schueller at gmail.com>
Date:   Sat May 14 20:38:53 2016 +0200

    fixed Strip white spaces for preview
---
 panel-plugin/history.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/panel-plugin/history.c b/panel-plugin/history.c
index eb545e6..abec3bc 100644
--- a/panel-plugin/history.c
+++ b/panel-plugin/history.c
@@ -273,12 +273,13 @@ clipman_history_add_text (ClipmanHistory *history,
   item->content.text = g_strdup (text);
 
   /* Strip white spaces for preview */
-  tmp1 = g_strstrip (g_strdup (text));
-  while (g_strstr_len (tmp1, preview_length, "  "))
+  tmp1 = g_strchomp (g_strdup (text));
+
+  tmp2 = tmp1;
+  while (tmp2)
     {
-      tmp2 = g_strjoinv(" ", g_strsplit(tmp1, " ", -1));
-      g_free (tmp1);
-      tmp1 = tmp2;
+      tmp2 = g_strchug(++tmp2);
+      tmp2 = g_strstr_len (tmp1, preview_length, "  ");
     }
 
   /* Shorten preview */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list