Re: new dbus api: SearchNotesSorted?



Hi,

> Working on the gnome-shell search provider extension I realized that the
> SearchNotes dbus call returns the notes in an order that is not
> particularly useful. It also does not return the match integer used by
> the normal GUI for indicating the relevance of a match (preventing the
> returned results from being sorted). It would be helpful to have the
> results returned in a useful order.
> 
> Attached is a patch which adds a new SearchNotesSorted api which takes
> the additional step of sorting the results in descending order by the
> match integer.
> 
> Is this the right approach? Would it be better to make the existing
> SearchNotes dbus method return sorted results?

I'm not against introducing new API, but only when it's not possible
with existing one.
In this case I think we should modify the existing search API. Currently
search returns notes at random order (from users perspective). Changing
it to a defined order should not hurt, so I think there's no need to
introduce a new API.

Few notes on a patch:
1. Curly brakets are mandatory by Gnote coding style.
2. There's no real need for comparator class to be defined in a header
file.

Besides that I'm positive on your proposal. I suggest to open a bugzilla
ticket as it's more appropriate place for patches than mailing list.
Keep up with good work!

-- 
Aurimas

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]