https://bugs.kde.org/show_bug.cgi?id=332380

--- Comment #16 from Shunsuke Shimizu <gr...@grafi.jp> ---
Thanks a lot for your comments.

(In reply to Thomas Fischer from comment #15)
> > I'm not sure whether adaptor should be created, KBibTeXPart's one (as does
> > in the patch) or the FileModel's.
> Right now, both are working. I suggest to postpone any decision on which one
> should be removed.

I agree.

> > However, such functionalities also can be implemented for FileModel, by
> > separating the processing of FileModel and the use from view, as I did for
> > `clipboard.cpp`. For filtering, we may create a SortFilterFileModel not tied
> > to the filter bar, every time a user send dbus query to obtain filtered
> > indexes with search terms.
> I am not sure if I can follow this argumentation. Can you please provide an
> example? 

Assume someone would like to search documents that contain "foobar" in those
title, by using dbus API. There are two ways to provide such functionality:

1. give access to the filter bar and the list of displayed documents
2. provide a function to filter indexes in dbus API. For example, dbus call of
`filteredIndexes([1,2,3,4,5],  ["foobar"], AND_SEARCH)` may returns `[2, 5]`
(`AND_SEARCH` can be the constant 0 or so).

To implement 2, reusing existing codes to filter documents makes  sense. Since
such functionalities are concentrated in the `SortFilterFileModel` class,
making an instance of `SortFilterFileModel` per the call of `filteredIndexes`
seems to be reasonable way .

> > I think those features really helps cooperation with web browsers.
> Which browsers or browser plugins are using DBus to exchange bibliographies?

Sorry that I said too much. I don't know any such browser or browser plugin. I
said that because my primary intention to work on this problem is to automate
bibliography importing from firefox, with handmade scripts. I'm using
vimperator, so calling such scripts from my browser is fairly easy.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to