Bookmarks for Accretion

Mark Gaiser markg85 at gmail.com
Tue Feb 11 13:11:46 GMT 2014


On Tue, Feb 11, 2014 at 10:10 AM, Frank Reininghaus
<frank78ac at googlemail.com> wrote:
> Hi,
>
> 2014-02-10 21:01 GMT+01:00 Mark Gaiser:
>> Hi,
>>
>> I think this is the very first time that i (ab)use this list for a
>> file manager other then Dolphin. Luckily this list is called kfm-devel
>> and not dolphin-devel so i think i can get away with it ^_-
>>
>> Right, bookmarks!
>>
>> Accretion currently looks like this [1]. The places and devices are
>> currently very hard coded [2]. Doing this made me look into the
>> bookmarks used in Dolphin and how i can integrate them in Accretion.
>> I've spotted a few possible issues that would prevent me from using
>> the current bookmarks.xml or even the XBEL specification.
>>
>> 1. The current bookmarks configuration files don't seem to be owned by
>> dolphin since it's placed in:
>> "<home>./.kde4/share/apps/kfileplaces/bookmarks.xml" and
>> "<home>./.local/share/user-places.xbel". But they do seem to be
>> created and managed by dolphin (thus effectively owned by it).
>
> The bookmarks in that file are neither owned nor managed exclusively
> by Dolphin. Every application that has a KFilePlacesView uses the same
> file and can be used to manage it. Before Peter wrote Dolphin's custom
> Places view for KDE SC 4.9, I think that using
> KFilePlacesView+KFilePlacesModel might have been the only way to
> access that file.
>
> Saying that the file is created by Dolphin is also wrong. Any KDE
> application will create it for you if you open the "File Open/Save"
> dialog.

I was wrong here. I removed the file and observed "dolphin creating
it", but that's not dolphin. It's just KFilePlaces at work.
>
>> 2. The XBEL specification seems to be a full fledged bookmark managing
>> system for browsers. Not a system to make menus (which this is, we
>> just call it bookmarks). That also made me wonder if i should use the
>> XBEL specification at all (and KBookmarks to handle it) or should i
>> make a very simple new "menu format" in json specifically aimed at my
>> needs?
>
> That obviously depends on what your needs are. If you want that people
> use your application and perceive it as a KDE application, then I
> think they might expect that it also uses the "Places" that they have
> configured, e.g., in the file dialog. In that case, you could either
> access the file directly, or use a KFilePlacesView, or (maybe the best
> solution) add a new, possibly QML-based, "Places" view to a suitable
> framework that includes the Baloo places, and that other applications
> might be able to use in the future.

>From what you said there i really get the feeling that i should use
the places view. Just from a user point of view alone.
I'm going to try and get that implemented.

Regarding the Baloo places. For now i will probably just try to use
KFilePlacesModel and expose it to QML. I will look at Baloo when the
need for it arises.
>
>> What would be your preference?
>> My initial preference was going to 1 and show the bookmarks in
>> Accretion that are visible in Dolphin. That would be the least
>> intrusive way from a user point of view, but would also make me
>> dependent on Frank not changing the format :)
>
> We cannot change the format without breaking other applications, and I
> thought that I had already made that clear to you in
>
> https://bugs.kde.org/show_bug.cgi?id=309620

I completely forgot about that bug and the result. Thank you for reminding.
>
> Regards,
> Frank

Just to be sure. How does the places implementation actually work in Dolphin?
I've looked a bit through the code and it looks like dolphin has it's
own model for this (PlacesItemModel). But i can't find any
KFilePlacesModel use there. It does say it's compatible with it and
that class is based on it, but how does it load the data from
KFilePlacesModel? Is it doing that directly via the KBookmarks class
since i do see it loading (and using) that one.

Also, the PlacesItemModel in dolphin has devices support. I'd really
like to have that as well. Is there a separate model (like
KFilePlacesModel) for that somewhere?

Thank you very much for your feedback so far, Frank.




More information about the kfm-devel mailing list