From f1c7b97bbcacaae22230d660f0e0092205b387ff22b2e4e22587ade384e8f5cc Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 2 Feb 2015 13:55:23 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Publishing/a2ps?expand=0&rev=44 --- a2ps-4.14.diff | 2 +- a2ps-open | 26 ++++++++++++++++++-------- a2ps.changes | 6 ++++++ a2ps.spec | 2 +- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/a2ps-4.14.diff b/a2ps-4.14.diff index 8408d06..b2a5df4 100644 --- a/a2ps-4.14.diff +++ b/a2ps-4.14.diff @@ -306,7 +306,7 @@ diff -rupN a2ps-4.14.old/etc/a2ps_cfg.in a2ps-4.14/etc/a2ps_cfg.in -@COM_gv@Variable: ghostview @gv@ -antialias --arguments=-dNOPLATFONTS +##@COM_ghostview@Variable: ghostview @ghostview@ --arguments=-dNOPLATFONTS +#@COM_gv@Variable: ghostview @gv@ -antialias --arguments=-dNOPLATFONTS -+variable: ghostview a2ps-open ++Variable: a2ps-open # Used for the `pdf' printer. # Use as `#{ps2pdf} INPUT OUTPUT'. diff --git a/a2ps-open b/a2ps-open index d2585d1..1dc5232 100644 --- a/a2ps-open +++ b/a2ps-open @@ -41,12 +41,18 @@ # Checks for known desktop environments # set variable DE to the desktop environments name, lowercase +DE=generic detectDE() { if test "$KDE_FULL_SESSION" = "true" ; then DE=kde; elif test -n "$GNOME_DESKTOP_SESSION_ID" ; then DE=gnome; elif xprop -root _DT_SAVE_MODE | grep ' = \"xfce4\"$' &>/dev/null ; then DE=xfce; fi + case "$DE" in + kde) ;; + gnome) type -p kioclient &>/dev/null || DE=generic ;; + xfce) type -p exo-open &>/dev/null || DE=generic ;; + esac } #---------------------------------------------------------------------------- @@ -69,26 +75,30 @@ kfmclient_fix_exit_code() open_kde() { - kfmclient exec "$1" - kfmclient_fix_exit_code $? + if type -p kioclient &>/dev/null ; then + kioclient exec ${1+"$@"} + else + kfmclient exec ${1+"$@"} + kfmclient_fix_exit_code $? + fi test $? -eq 0 || exit 1 } open_gnome() { - gnome-open "$1" + gnome-open ${1+"$@"} test $? -eq 0 || exit 1 } open_xfce() { - exo-open "$1" + exo-open ${1+"$@"} test $? -eq 0 || exit 1 } open_generic() { - gv -antialias ${1+"$@"} + gv ${1+"$@"} test $? -eq 0 || exit 1 } @@ -98,8 +108,8 @@ GS_DEVICE=x11alpha GS_OPTIONS=-dNOPLATFONTS export GS_DEVICE GS_OPTIONS case "$DE" in -# kde) open_kde ${1+"$@"} ;; -# gnome) open_gnome ${1+"$@"} ;; -# xfce) open_xfce ${1+"$@"} ;; + kde) open_kde ${1+"$@"} ;; + gnome) open_gnome ${1+"$@"} ;; + xfce) open_xfce ${1+"$@"} ;; *) open_generic ${1+"$@"} esac diff --git a/a2ps.changes b/a2ps.changes index 59b04d5..3d35a37 100644 --- a/a2ps.changes +++ b/a2ps.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 2 13:42:36 UTC 2015 - werner@suse.de + +- Correct patch a2ps-4.14.diff +- Make a2ps-open smart now + ------------------------------------------------------------------- Tue Dec 23 13:23:34 UTC 2014 - meissner@suse.com diff --git a/a2ps.spec b/a2ps.spec index 6799dd9..545693f 100644 --- a/a2ps.spec +++ b/a2ps.spec @@ -1,7 +1,7 @@ # # spec file for package a2ps # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed