unity lens: unity 5.0 / ubuntu 12.04 compatibility

This commit is contained in:
Jean-Francois Dockes 2012-03-26 14:59:06 +02:00
parent 7cdd28021d
commit 9cbb5f4625
5 changed files with 67 additions and 30 deletions

View File

@ -5,7 +5,7 @@
# sudo apt-get install pkg-kde-tools cdbs # sudo apt-get install pkg-kde-tools cdbs
RCLVERS=1.17.0 RCLVERS=1.17.0
LENSVERS=1.17.0.2644 LENSVERS=1.17.0.2646
PPAVERS=1 PPAVERS=1
case $RCLVERS in case $RCLVERS in
@ -13,7 +13,7 @@ case $RCLVERS in
1.14*) PPANAME=recoll-ppa;; 1.14*) PPANAME=recoll-ppa;;
*) PPANAME=recoll15-ppa;; *) PPANAME=recoll15-ppa;;
esac esac
PPANAME=recollexp-ppa #PPANAME=recollexp-ppa
echo "PPA: $PPANAME. Type CR if Ok, else ^C" echo "PPA: $PPANAME. Type CR if Ok, else ^C"
read rep read rep
@ -65,7 +65,7 @@ done
### Unity Lens ### Unity Lens
seriesl="natty oneiric precise" seriesl="natty oneiric precise"
seriesl="oneiric" seriesl="natty oneiric precise"
debdir=debianunitylens debdir=debianunitylens
@ -80,6 +80,6 @@ for series in $seriesl ; do
(cd recoll-lens-${LENSVERS};debuild -S -sa) || break (cd recoll-lens-${LENSVERS};debuild -S -sa) || break
dput $PPANAME recoll-lens_${LENSVERS}-0~ppa${PPAVERS}~${series}1_source.changes dput $PPANAME recoll-lens_${LENSVERS}-1~ppa${PPAVERS}~${series}1_source.changes
done done

View File

@ -1,3 +1,6 @@
recoll-lens (1.17.0.2643-1~ppaPPAVERS~SERIES1) SERIES; urgency=low recoll-lens (1.17.0.2646-1~ppaPPAVERS~SERIES1) SERIES; urgency=low
* Updated lens to vers. 1.17.0.2646 : Unity 5.0/Ubuntu 12.04 compatibility
-- Jean-Francois Dockes <jf@dockes.org> Sun, 25 Mar 2012 16:42:00 +0200
recoll-lens (1.17.0.2645-1~ppaPPAVERS~SERIES1) SERIES; urgency=low
* Updated package to recoll version 1.17.0 * Updated package to recoll version 1.17.0
-- Jean-Francois Dockes <jf@dockes.org> Sun, 25 Mar 2012 16:42:00 +0200 -- Jean-Francois Dockes <jf@dockes.org> Sun, 25 Mar 2012 16:42:00 +0200

View File

@ -6,6 +6,8 @@ from gi.repository import Unity
import recoll import recoll
BUS_PATH = "/org/recoll/unitylensrecoll/scope/main"
# These category ids must match the order in which we add them to the lens # These category ids must match the order in which we add them to the lens
CATEGORY_ALL = 0 CATEGORY_ALL = 0
@ -19,22 +21,32 @@ TYPING_TIMEOUT = 0
class Scope (Unity.Scope): class Scope (Unity.Scope):
def __init__ (self): def __init__ (self):
Unity.Scope.__init__ (self, dbus_path="/org/recoll/unitylensrecoll/scope/main") Unity.Scope.__init__ (self, dbus_path=BUS_PATH)
# Listen for changes and requests # Listen for changes and requests
self.connect("notify::active-search", self._on_search_changed) if Unity._version == "4.0":
self.connect("notify::active-global-search", self._on_global_search_changed) #print "Setting up for Unity 4.0"
self.connect("filters-changed", self._on_search_changed); self.connect("notify::active-search",
self._on_search_changed)
self.connect("notify::active-global-search",
self._on_global_search_changed)
self.connect("filters-changed",
self._on_search_changed);
else:
#print "Setting up for Unity 5.0+"
self.connect ("search-changed", self._on_search_changed)
self.connect ("filters-changed",
self._on_filters_changed)
# Bliss loaded the apps_tree menu here, let's connect to
# the index # Connect to the index
self.db = recoll.connect() self.db = recoll.connect()
self.db.setAbstractParams(maxchars=200, self.db.setAbstractParams(maxchars=200,
contextwords=4) contextwords=4)
self.timeout_id = None self.timeout_id = None
def get_search_string (self): def get_search_string (self):
search = self.props.active_search search = self.props.active_search
return search.props.search_string if search else None return search.props.search_string if search else None
@ -56,13 +68,24 @@ class Scope (Unity.Scope):
self._do_browse (self.props.results_model) self._do_browse (self.props.results_model)
self._do_browse (self.props.global_results_model) self._do_browse (self.props.global_results_model)
def _on_search_changed (self, scope, param_spec=None): def _on_filters_changed (self, scope):
search = self.get_search_string() # print "_on_filters_changed()"
results = scope.props.results_model self.queue_search_changed(Unity.SearchType.DEFAULT)
if Unity._version == "4.0":
def _on_search_changed (self, scope, param_spec=None):
search_string = self.get_search_string()
results = scope.props.results_model
# print "Search 4.0 changed to: '%s'" % search_string
# print "Search changed to: '%s'" % search self._update_results_model (search_string, results)
else:
def _on_search_changed (self, scope, search, search_type, cancellable):
search_string = search.props.search_string
results = search.props.results_model
# print "Search 5.0 changed to: '%s'" % search_string
self._update_results_model (search, results) self._update_results_model (search_string, results)
def _on_global_search_changed (self, scope, param_spec): def _on_global_search_changed (self, scope, param_spec):
search = self.get_global_search_string() search = self.get_global_search_string()

View File

@ -223,35 +223,40 @@
<a href="http://www.launchpad.net/~xapian-backports/+archive/xapian-1.2"> <a href="http://www.launchpad.net/~xapian-backports/+archive/xapian-1.2">
Xapian</a>, Xapian</a>,
<a href="https://launchpad.net/~recoll-backports/+archive/recoll-1.15-on"> <a href="https://launchpad.net/~recoll-backports/+archive/recoll-1.15-on">
Recoll and kio-recoll</a>. These were built from the latest versions, Recoll, kio-recoll and recoll-lens</a>. These were built from the
for a set of Ubuntu series.</p> latest versions, for a set of Ubuntu series.</p>
<p>Ubuntu 10.04 (lucid) and later versions just need the Recoll <p>Ubuntu 10.04 (lucid) and later versions just need the Recoll
PPA. Older versions also needed a backport for Xapian PPA. Older versions also needed a backport for Xapian
(xapian-backports/xapian-1.2).</p> (xapian-backports/xapian-1.2).</p>
<p>Just add the <p>Just add the PPA to your system software sources (the
PPA to your system software sources (the instructions are on instructions are on the PPA page or
the PPA page or
<a href="https://help.launchpad.net/Packaging/PPA/InstallingSoftware"> <a href="https://help.launchpad.net/Packaging/PPA/InstallingSoftware">
here</a>), and you can then use the normal package here</a>), and you can then use the normal package
manager to install or update Recoll. For Ubuntu versions manager to install or update Recoll.
after 9.10 (Karmic), only one command is needed: <pre><tt>
sudo add-apt-repository ppa:recoll-backports/recoll-1.15-on
</tt></pre>
</p>
<p>Only for Ubuntu versions before 9.10 (Karmic):
<pre><tt> <pre><tt>
sudo add-apt-repository ppa:recoll-backports/recoll-1.15-on sudo add-apt-repository ppa:recoll-backports/recoll-1.15-on
sudo add-apt-repository ppa:xapian-backports/xapian-1.2 sudo add-apt-repository ppa:xapian-backports/xapian-1.2
</tt></pre> </tt></pre>
</p> </p>
<p>For Ubuntu 9.04 (Jaunty) and older, <p>For Ubuntu 9.04 (Jaunty) and older, you may also have to
you may have to explicitely import the explicitely import the Recoll and Xapian public keys:
Recoll and Xapian public keys: <pre><tt> <pre><tt>
gpg --keyserver keyserver.ubuntu.com --recv 9DA85604 gpg --keyserver keyserver.ubuntu.com --recv 9DA85604
gpg --export --armor 9DA85604 | sudo apt-key add - gpg --export --armor 9DA85604 | sudo apt-key add -
gpg --keyserver keyserver.ubuntu.com --recv A0735AD0 gpg --keyserver keyserver.ubuntu.com --recv A0735AD0
gpg --export --armor A0735AD0 | sudo apt-key add - gpg --export --armor A0735AD0 | sudo apt-key add -
</tt></pre> </tt></pre>
</p> </p>
</blockquote> </blockquote>
<h3>RPMS</h3> <h3>RPMS</h3>

View File

@ -70,6 +70,12 @@
<div class="news"> <div class="news">
<ul> <ul>
<li>2012-03-26: Recoll gets a Ubuntu Unity Lens. If you are running
an Ubuntu release where this makes sense, you can install
the recoll-lens package from the
<a href="https://launchpad.net/~recoll-backports/+archive/recoll-1.15-on">
Recoll PPA</a>.
<li>2012-03-24: Release 1.17 is out, see <li>2012-03-24: Release 1.17 is out, see
the <a href="release-1.17.html">Release notes</a>. </li> the <a href="release-1.17.html">Release notes</a>. </li>