This is a multi-part message in MIME format. --------------E68F25389239D5A075554816 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > See the whole problem is that from an ioslave point-of-view is that there's > no difference between "listing the directory in the sidebar" and "listing > the directory in the iconview (or listview)". I could manage to do what I want. Basically it relies on the fact that I can return different results when "listDir()" and "stat()". When my slave receives a "listDir()", it only returns directories so that they can be shown in the sidebar, but when "stat()" it returns a file on printer object with the mime type set to "text/html". But now I have to persuade konqueror to ask a "stat()" on a openURLRequest(). For that, the client (sidebar or iconview) shouldn't pass the serviceType as argument, konqueror will then stat the file to get its mimetype. This is possible in iconview if the KFileItem contain a mimeType and a guessedMimeType. So I simply have to add a fake UDS_GUESSED_MIME_TYPE in my entries on listDir(). To make it finally work in the sidebar, the code of dirtree_item.cpp has to be changed a little bit such that externalMimeType() returns QString::null if KFileItem::isMimeTypeKnown() is false. I attached a patch for the changes. Should I commit? (don't thing it breaks anything). Michael. -- ------------------------------------------------------------------ Michael Goffioul IMEC-DESICS-MIRA e-mail: goffioul@imec.be (Mixed-Signal and RF Applications) Tel: +32/16/28-8510 Kapeldreef, 75 Fax: +32/16/28-1515 3001 HEVERLEE, BELGIUM ------------------------------------------------------------------ --------------E68F25389239D5A075554816 Content-Type: text/plain; charset=us-ascii; name="sidebar.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sidebar.diff" Index: dirtree_item.cpp =================================================================== RCS file: /home/kde/kdebase/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp,v retrieving revision 1.5 diff -u -8 -r1.5 dirtree_item.cpp --- dirtree_item.cpp 2001/10/12 13:06:07 1.5 +++ dirtree_item.cpp 2001/11/12 17:15:16 @@ -109,17 +109,20 @@ KURL KonqSidebarDirTreeItem::externalURL() const { return m_fileItem->url(); } QString KonqSidebarDirTreeItem::externalMimeType() const { - return m_fileItem->mimetype(); + if (m_fileItem->isMimeTypeKnown()) + return m_fileItem->mimetype(); + else + return QString::null; } bool KonqSidebarDirTreeItem::acceptsDrops( const QStrList & formats ) { if ( formats.contains("text/uri-list") ) return m_fileItem->acceptsDrops(); return false; } --------------E68F25389239D5A075554816-- >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<