[PATCH] UDS_TARGET_URL and UDS_DISPLAY_NAME

David Faure faure at kde.org
Sat Feb 23 00:29:43 GMT 2008


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)

> 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.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list