[PATCH] UDS_TARGET_URL and UDS_DISPLAY_NAME

nf2 nf2 at scheinwelt.at
Tue Feb 26 22:18:23 GMT 2008


David Faure wrote:
> On Friday 22 February 2008, nf2 wrote:
>   
>> David Faure wrote:
>>     
>>>   
>>>       
>>>>> The first patch also makes KDirOperator switch the Url instantly
>>>>> when 
>>>>> you click on a file-item which has UDS_TARGET_URL set. Therefore 
>>>>> file-dialogs follow such links appropriately. The second patch 
>>>>> implements the same feature for Dolphin. Unfortunately I didn't find
>>>>> the right code in Konqueror yet to add this feature.
>>>>>       
>>>>>           
>>> Konqueror uses dolphin :)
>>>   
>>>       
>> Ah - seems to be DolphinPart which i have patched already. Konqueror and 
>> UDS_TARGET_URL actually works when the mime-type is "inode/directory". 
>> But with "remote/gvfs-mount" (which inherits from "inode/directory"), 
>> Konqueror seems to think that it cannot handle that itself, and launches 
>> Dolphin
>>     
>
> Hmm, shouldn't happen. Does KonqMainWindow::isMimeTypeAssociatedWithSelf return true?
> (please reply on kfm-devel at kde.org if you don't figure it out, this is definitely konqueror-specific)
>
>   

One reason might be that KonqFMSettings::shouldEmbed() only returns true 
for inode/*  (called in KonqMainWindow::openView()):

konqueror(11287) KonqMainWindow::openView: openView: KonqFMSettings 
says: don't embed this servicetype
konqueror(11287) KonqMainWindow::openView: KonqMainWindow::openView ok= 
false  bOthersFollowed= false  returning  false


>> Another thing which is not UDS_TARGET_URL aware, is "Open in new Window" 
>> and "Open in Tab" in Konqueror. Hmm ... any suggestions?
>>     
>
> ===================================================================
> --- konqmainwindow.cpp  (révision 775377)
> +++ konqmainwindow.cpp  (copie de travail)
> @@ -2408,7 +2408,7 @@
>      const KFileItemList::const_iterator end = m_popupItems.end();
>      for ( ; it != end; ++it )
>      {
> -        KonqMisc::createNewWindow( (*it).url(), m_popupUrlArgs, m_popupUrlBrowserArgs );
> +        KonqMisc::createNewWindow( (*it).targetUrl(), m_popupUrlArgs, m_popupUrlBrowserArgs );
>      }
>  }
>
> assuming you change KFileItem::targetUrl() to return the same as url() if UDS_TARGET_URL is not set
> (I think it would make things simpler in the application code in all cases)
>
> Same thing in line 2451, KonqMainWindow::popupNewTab.
>
>   

Thanks, that worked. I'm not sure whether KFileItem::targetUrl() should 
return the same as url(), as that would make it harder to check if the 
item is a shortcut. Attached is a new patch for kdebase.

Regards,
Norbert



-------------- next part --------------
A non-text attachment was scrubbed...
Name: dolphin_and_konqeror_follow_uds_target_url.patch
Type: text/x-patch
Size: 2471 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20080226/813bc978/attachment.bin>


More information about the kfm-devel mailing list