Re: Homerun and single-runner runners

2013-02-13 Thread Aurélien Gâteau
Le Wednesday 13 February 2013 15:02:33 Aaron J. Seigo a écrit : > > 2. The way single-runners are queried is not very elegant. It looks like > > > this: > this probably should be provided by RunnerManager and RunnerSyntax. sth > like: > > QString RunnerSyntax::asQuery(const QString &userInput = Q

Re: Homerun and single-runner runners

2013-02-13 Thread Aurélien Gâteau
Le Wednesday 13 February 2013 14:10:40 Marco Martin a écrit : > On Wednesday 13 February 2013, Aurélien Gâteau wrote: > > >> 3. I noticed some runners advertise single-runner mode but do not > > >> define a > > >> default syntax. Is it a bug or is there a reason for that? > > > > > > hmm, example

Re: Homerun and single-runner runners

2013-02-13 Thread Aaron J. Seigo
On Wednesday, February 13, 2013 11:15:58 Aurélien Gâteau wrote: > This means that if I add the "Activities" runner, whose default syntax is > "activity :q:", then by default Homerun queries the runner for "activity". > If the user types "work" in the search field, Homerun queries the runner > for "

Re: Homerun and single-runner runners

2013-02-13 Thread Marco Martin
On Wednesday 13 February 2013, Aurélien Gâteau wrote: > On Wed, 13 Feb 2013 12:45:33 +0100, Marco Martin wrote: > >> if (query.contains(placeHolder)) { > >> > >> return query.replace(placeHolder, term); > >> > >> } else { > >> > >> return query + ' ' + term; >

Re: Homerun and single-runner runners

2013-02-13 Thread Aurélien Gâteau
On Wed, 13 Feb 2013 12:45:33 +0100, Marco Martin wrote: if (query.contains(placeHolder)) { return query.replace(placeHolder, term); } else { return query + ' ' + term; } } Is there a better way to do this? uhm... RunnerManager::launchQuery(const QString &term, cons

Re: Homerun and single-runner runners

2013-02-13 Thread Marco Martin
On Wednesday 13 February 2013, Aurélien Gâteau wrote: > In the long term, I hope this makes it possible to drop some of Homerun > sources and replace them with single-runner runners. Potential candidates > are (Source => runner): > - Favorite Places => Places > - Recent Documents => Recent Documen

Homerun and single-runner runners

2013-02-13 Thread Aurélien Gâteau
Hi, I have been working lately on adding better support for single-runner runners to Homerun. The code is currently available in the "wip/single-runner" branch of Homerun. This code exposes all runners which advertise single-runner mode as sources. When a single-runner is used, Homerun uses th