[Goodies-commits] r1854 - xfce4-clipman-plugin/trunk/panel-plugin
Nick Schermer
nick at xfce.org
Mon Aug 7 00:01:47 CEST 2006
Author: nick
Date: 2006-08-06 22:01:47 +0000 (Sun, 06 Aug 2006)
New Revision: 1854
Modified:
xfce4-clipman-plugin/trunk/panel-plugin/clipman.c
Log:
* Cut string to MenuCharacters*8, this could same some size
and time when *huge* amounts of data are copied.
Modified: xfce4-clipman-plugin/trunk/panel-plugin/clipman.c
===================================================================
--- xfce4-clipman-plugin/trunk/panel-plugin/clipman.c 2006-08-06 21:56:59 UTC (rev 1853)
+++ xfce4-clipman-plugin/trunk/panel-plugin/clipman.c 2006-08-06 22:01:47 UTC (rev 1854)
@@ -112,11 +112,12 @@
}
static gchar *
-clipman_create_title (gchar *txt)
+clipman_create_title (gchar *txt,
+ gint length)
{
gchar *s, *t, *u;
- s = g_strdup (txt);
+ s = g_strndup (txt, length*8);
if (!g_utf8_validate (s, -1, NULL))
{
@@ -177,7 +178,8 @@
{
new_clip = g_new0 (ClipmanClip, 1);
- new_clip->title = clipman_create_title (txt);
+ new_clip->title = clipman_create_title (txt,
+ clipman->MenuCharacters);
/* No valid title could be created, drop it... */
if (new_clip->title == NULL)
More information about the Goodies-commits
mailing list