diff options
author | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-08-15 11:25:44 -0300 |
---|---|---|
committer | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-08-15 11:25:44 -0300 |
commit | d3a18c96784861f4671d9575d71cb96041bc4fab (patch) | |
tree | 27e73dccc79fb400f2bd2a855fd523dd8e704db8 /community/parcellite | |
parent | 1b8314826a584ddba121a6cb764efd44c784c53e (diff) | |
parent | 4784cc8068c68b6fc23c2bd0ee8158b2a924f5f4 (diff) |
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts:
community/dopewars/PKGBUILD
community/flightgear/PKGBUILD
extra/bmp/PKGBUILD
extra/qemu/PKGBUILD
extra/sbcl/PKGBUILD
Diffstat (limited to 'community/parcellite')
-rw-r--r-- | community/parcellite/PKGBUILD | 11 | ||||
-rw-r--r-- | community/parcellite/history_menu_crash_patch | 39 |
2 files changed, 46 insertions, 4 deletions
diff --git a/community/parcellite/PKGBUILD b/community/parcellite/PKGBUILD index f19c3c1be..5ca5b140c 100644 --- a/community/parcellite/PKGBUILD +++ b/community/parcellite/PKGBUILD @@ -1,21 +1,24 @@ -# $Id: PKGBUILD 53903 2011-08-09 19:26:51Z spupykin $ +# $Id: PKGBUILD 54009 2011-08-11 18:03:17Z spupykin $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Maintainer: Alexander Fehr <pizzapunk gmail com> pkgname=parcellite pkgver=1.0.2rc3 -pkgrel=1 +pkgrel=2 pkgdesc="Lightweight GTK+ clipboard manager" arch=('i686' 'x86_64' 'mips64el') url="http://parcellite.sourceforge.net/" license=('GPL3') depends=('gtk2') makedepends=('intltool') -source=(http://downloads.sourceforge.net/parcellite/parcellite-$pkgver.tar.gz) -md5sums=('3fe1196cc2bb3f34d57d0e34e10449b3') +source=(http://downloads.sourceforge.net/parcellite/parcellite-$pkgver.tar.gz + history_menu_crash_patch) +md5sums=('3fe1196cc2bb3f34d57d0e34e10449b3' + '8fd6e07fa907865ca4db7b3e13441ce6') build() { cd "$srcdir/parcellite-$pkgver" + (cd src && patch -p0 <$srcdir/history_menu_crash_patch) ./configure --prefix=/usr --sysconfdir=/etc make make DESTDIR="$pkgdir" install diff --git a/community/parcellite/history_menu_crash_patch b/community/parcellite/history_menu_crash_patch new file mode 100644 index 000000000..961106839 --- /dev/null +++ b/community/parcellite/history_menu_crash_patch @@ -0,0 +1,39 @@ +Index: main.c +=================================================================== +--- main.c (revision 232) ++++ main.c (working copy) +@@ -1199,24 +1199,28 @@ + { + GString* string = g_string_new((gchar*)element->data); + /* Ellipsize text */ +- if (string->len > prefs.item_length) ++ glong len = g_utf8_strlen(string->str, string->len); ++ if (len > prefs.item_length) + { + switch (prefs.ellipsize) + { + case PANGO_ELLIPSIZE_START: +- string = g_string_erase(string, 0, string->len-(prefs.item_length)); ++ string = g_string_erase(string, 0, g_utf8_offset_to_pointer(string->str, len - prefs.item_length) - string->str); + string = g_string_prepend(string, "..."); + break; + case PANGO_ELLIPSIZE_MIDDLE: +- string = g_string_erase(string, (prefs.item_length/2), string->len-(prefs.item_length)); +- string = g_string_insert(string, (string->len/2), "..."); ++ ; /* to avoid wierd gcc error */ ++ gchar* p1 = g_utf8_offset_to_pointer(string->str, prefs.item_length / 2); ++ gchar* p2 = g_utf8_offset_to_pointer(string->str, len - prefs.item_length / 2); ++ string = g_string_erase(string, p1 - string->str, p2 - p1); ++ string = g_string_insert(string, p1 - string->str, "..."); + break; + case PANGO_ELLIPSIZE_END: +- string = g_string_truncate(string, prefs.item_length); ++ string = g_string_truncate(string, g_utf8_offset_to_pointer(string->str, prefs.item_length) - string->str); + string = g_string_append(string, "..."); + break; + } +- } ++ } + /* Remove control characters */ + gsize i = 0; + while (i < string->len) |