Bookmarks shared among desktop environments
Philip Van Hoof
spamfrommailing at freax.org
Mon Apr 18 23:53:18 EEST 2005
On Mon, 2005-04-18 at 22:21 +0200, Waldo Bastian wrote:
> On Monday 18 April 2005 20:39, Jamie McCracken wrote:
> > We dont need a solution to this for Dconf at this point. However I
> > suspect the keys will look something like :
> >
> > Key Value
> > org.freedesktop.bookmarks.web.1.uri http://www.slashdot.org
> > org.freedesktop.bookmarks.web.1.displayname Slashdot
> > org.freedesktop.bookmarks.web.2.uri http://linuxtoday.com
> > org.freedesktop.bookmarks.web.2.displayname Linux Today
> >
> > org.freedesktop.bookmarks.folder.1.uri /home/jamie/documents
> > org.freedesktop.bookmarks.folder.2.uri /home/jamie/hacking
>
>
> That's something that bothers me about key based configuration systems... what
> happens if I remove org.freedesktop.bookmarks.web.1 ? Do my bookmarks then
> start at 2? Are 1 and 2 some sort of sequence numbers, or should they be seen
> as unique identifiers? Should the config system have a function for "give me
> a new id that isn't used yet" ?
Thats easily solvable: Define a range [000000]..[999999]
org.freedesktop.bookmarks.web.000001.uri
org.freedesktop.bookmarks.web.000010.uri
org.freedesktop.bookmarks.web.100000.uri
org.freedesktop.bookmarks.web.100001.uri
org.freedesktop.bookmarks.web.100007.uri
org.freedesktop.bookmarks.web.100100.uri
org.freedesktop.bookmarks.web.100101.uri
org.freedesktop.bookmarks.web.100110.uri
Of course is the type for bookmarks.web a LIST-type. So the API would
return an array of values here (which you can and should loop with a
foreach construction). Such a foreach construction can be made in such a
way (at the client-side) that it will always loop the items
chronologically.
Perhaps also API functionality to move, delete and fetch the xth item in
a list.
(non official API, just mindsharing)
facade {
...
value get (key)
...
}
value {
bool islist
...
}
list : value {
move (row, dest_row)
remove (row)
value get (row)
}
function foreach_item_in_list (item, data)
ps. I'd keep this for the technical analysis part of the game.
Nevertheless it's good to keep thinks like this in mind.
--
Philip Van Hoof, Software Developer @ Cronos
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
work: philip dot vanhoof at cronos dot be
junk: philip dot vanhoof at gmail dot com
http://www.pvanhoof.be/
More information about the xdg
mailing list