[arch-commits] Commit in xfce4-smartbookmark-plugin/trunk (2 files)

Evangelos Foutras foutrelis at archlinux.org
Mon May 14 20:21:04 UTC 2012


    Date: Monday, May 14, 2012 @ 16:21:04
  Author: foutrelis
Revision: 159005

upgpkg: xfce4-smartbookmark-plugin 0.4.4-3

Use exo-open to open URLs instead of xfbrowser4. (FS#29860)

Added:
  xfce4-smartbookmark-plugin/trunk/use-exo-open-instead-of-xfbrowser4.patch
Modified:
  xfce4-smartbookmark-plugin/trunk/PKGBUILD

------------------------------------------+
 PKGBUILD                                 |   45 +++++++++++++++++------------
 use-exo-open-instead-of-xfbrowser4.patch |   37 +++++++++++++++++++++++
 2 files changed, 64 insertions(+), 18 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-05-14 18:20:56 UTC (rev 159004)
+++ PKGBUILD	2012-05-14 20:21:04 UTC (rev 159005)
@@ -1,36 +1,45 @@
 # $Id$
-# Maintainer: AndyRTR <andyrtr at archlinux.org>
+# Maintainer:
+# Contributor: AndyRTR <andyrtr at archlinux.org>
 # Contributor: Tobias Kieslich <tobias (at) archlinux.org>
 
 pkgname=xfce4-smartbookmark-plugin
 pkgver=0.4.4
-pkgrel=2
-pkgdesc="Plugin for the Xfce4 panel that let you quicksearch from selected websites"
+pkgrel=3
+pkgdesc="Plugin for the Xfce4 panel that lets you quicksearch from selected websites"
 arch=('i686' 'x86_64')
+url="http://goodies.xfce.org/projects/panel-plugins/xfce4-smartbookmark-plugin"
 license=('GPL2')
-url="http://goodies.xfce.org/projects/panel-plugins/xfce4-smartbookmark-plugin"
 groups=('xfce4-goodies')
 depends=('xfce4-panel' 'libxfcegui4')
 makedepends=('intltool' 'libxt')
 options=('!libtool')
-source=(http://archive.xfce.org/src/panel-plugins/${pkgname}/0.4/${pkgname}-${pkgver}.tar.bz2
-	xfce4-smartbookmark-plugin-archlinux.patch)
-md5sums=('273e38306a82f14e1b8c2c5db912f6c3'
-         '323ac898cfcfdb078f67f9ecd1905aec')
+source=(http://archive.xfce.org/src/panel-plugins/$pkgname/0.4/$pkgname-$pkgver.tar.bz2
+        xfce4-smartbookmark-plugin-archlinux.patch
+        use-exo-open-instead-of-xfbrowser4.patch)
+sha256sums=('6c77e8fee0ec4dcee7aa34d94377e068a522b1ea650823422f2f5cca8126f2ed'
+            'a126b086811b60a8f3cd1a2b818cb6b9a9c6e959e00db1499b114fa8803325e6'
+            '436f7cda2b2bdfee61ac3d887d17dc91094526fec8713ab84fda249850525aac')
 
 build() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-  patch -p0 -i "${srcdir}/xfce4-smartbookmark-plugin-archlinux.patch"
-  ./configure --prefix=/usr \
-	--sysconfdir=/etc \
-	--libexecdir=/usr/lib \
-	--localstatedir=/var \
-	--disable-static \
-	--disable-debug
+  cd "$srcdir/$pkgname-$pkgver"
+
+  patch -Np0 -i "$srcdir/xfce4-smartbookmark-plugin-archlinux.patch"
+  patch -Np1 -i "$srcdir/use-exo-open-instead-of-xfbrowser4.patch"
+
+  ./configure \
+    --prefix=/usr \
+    --sysconfdir=/etc \
+    --libexecdir=/usr/lib \
+    --localstatedir=/var \
+    --disable-static \
+    --disable-debug
   make
 }
 
 package() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-  make DESTDIR="${pkgdir}" install
+  cd "$srcdir/$pkgname-$pkgver"
+  make DESTDIR="$pkgdir" install
 }
+
+# vim:set ts=2 sw=2 et:

Added: use-exo-open-instead-of-xfbrowser4.patch
===================================================================
--- use-exo-open-instead-of-xfbrowser4.patch	                        (rev 0)
+++ use-exo-open-instead-of-xfbrowser4.patch	2012-05-14 20:21:04 UTC (rev 159005)
@@ -0,0 +1,37 @@
+--- xfce4-smartbookmark-plugin-0.4.4/src/smartbookmark.c	
++++ xfce4-smartbookmark-plugin-0.4.4/src/smartbookmark.c	
+@@ -75,18 +75,27 @@ XFCE_PANEL_PLUGIN_REGISTER_INTERNAL(smar
+ 
+ static gboolean do_search(const char *url, const char *keyword)
+ {
++    gchar *argv[] = { "exo-open", "--launch", "WebBrowser", NULL, NULL };
++    gchar *complete_url;
++    gboolean retval;
++    GError *error = NULL;
++
+     DBG ("Do search");
+-    gchar *execute;
+-    gboolean success;
+-    execute = g_strconcat("xfbrowser4  \"", url, NULL);//works better for me
+-    //execute = g_strconcat("x-www-browser \"", url, NULL);
+-    execute = g_strconcat(execute, keyword, NULL);
+-    execute = g_strconcat(execute, "\"", NULL);
+ 
+-    success = exec_command(execute);
+-    g_free(execute);
++    complete_url = g_strconcat(url, keyword, NULL);
++    argv[3] = complete_url;
++
++    retval = g_spawn_async(NULL, (gchar **)argv, NULL,
++        G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, NULL, &error);
++
++    g_free(complete_url);
++
++    if (!retval) {
++        xfce_err("%s", error->message);
++        g_error_free(error);
++    }
+ 
+-    return success;
++    return retval;
+ }




More information about the arch-commits mailing list