On Mon, Sep 6, 2010 at 11:42 AM, Amir Pakdel <pak...@gmail.com> wrote:
> Dear developers,
>
> I added some meta-data to Nepomuk and I could search and find them
> using KDE Run Command (KRunner). However, in order to be able to open
> the item found in KRunner or any other application, we should define a
> MIME-type for baskets and associate them with the Basket Note Pads.
> I found the following line in basketbasket/src/basketlistview.cpp:
> QString BasketTreeListView::TREE_ITEM_MIME_STRING = 
> "application/x-basket-item";
>
> Therefore, I thought that "application/x-basket-item" would be a right
> choice. Hence, I added it to the end of "MimeType=" line in
> src/basket.desktop and then I have added a mime using the attached
> basket.xml file and associated this MIME-type with the basket.desktop
> using the following commands:
> xdg-mime install --novendor basket.xml
> xdg-desktop-menu install --novendor basket.desktop
> xdg-mime default basket.desktop application/x-basket-item
>
One more thing:
IMHO we should integrate the file-integration/basket.magic into basket.xml

The following pages might come in handy:
http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html
http://portland.freedesktop.org/xdg-utils-1.0/xdg-mime.html
http://portland.freedesktop.org/xdg-utils-1.0/xdg-desktop-menu.html

> This procedure seems work fine, but I cannot add it to the CMake. I
> mean, I cannot do it automatically during installation via CMake
> rules.
>
> Can anyone help me please.
>
>
>
> Cheers,
>
> Amir
>
>
>
> On Sun, Aug 29, 2010 at 8:58 AM, Amir Pakdel <pak...@gmail.com> wrote:
>>
>>
>> On Sun, Aug 29, 2010 at 8:07 AM, Matt Rogers <ma...@kde.org> wrote:
>>>
>>> On Wed, Aug 25, 2010 at 10:04 AM, Amir Pakdel <pak...@gmail.com> wrote:
>>> > Hi
>>> >
>>> > I was reading the source code in order to get familiar with its
>>> > structure
>>> > and find out how should I start implementing Nepomuk integration. I
>>> > found
>>> > out that NoteEditor::autoSave and BasketView::save are using
>>> > BasketView::saveToFile; and BasketView::saveToFile itself uses
>>> > BasketView::safelySaveToFile for the actual work. Am I right?
>>>
>>> That sounds about right, based on the last time that I looked at that
>>> particular piece of code.
>>>
>>>
>>> > I would like to know you opinion about where the code for insertion of
>>> > metadata into Nepomuk should be added:
>>> >    1. Inside BasketView::saveToFile or BasketView::save
>>> >    2. In another separate function: something like
>>> > BasketView::updateNepomukMetadata which would be called after every
>>> > BasketView::save or BasketView::saveToFile
>>> >
>>> >
>>> >
>>> > Thanks
>>> >
>>> > Amir
>>> >
>>> >
>>>
>>> I like option 2, but I would call updateNepomukMetadata inside of
>>> BasketView::saveToFile instead, so it's seamless to the rest of the
>>> current API.
>>
>>
>> Good point.
>> Right now, I am trying to get the Nepomuk plugin of KRunner (KDE Run
>> Command) to open baskets (which I have added manually to Nepomuk) using the
>> Basket Note Pads. Afterwards, I would start coding a clean separate function
>> called updateNepomukMetadata.
>>
>>>
>>> Thanks
>>> --
>>> Matt
>>
>>
>> Thanks,
>> Amir
>>
>

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Basket-devel mailing list
Basket-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/basket-devel

Reply via email to