Bug 58505 - Manpage ioslave uses profile with navbar displayed
Summary: Manpage ioslave uses profile with navbar displayed
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: man (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-15 01:54 UTC by Nick Leverton
Modified: 2003-05-15 12:38 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Leverton 2003-05-15 01:54:40 UTC
Version:            (using KDE KDE 3.1.1a)
Installed from:    Unlisted Binary Package
Compiler:          gcc2.95 Binaries from kde.org
OS:          Linux

Usability sort of item rather than functionality: by default, the manpage ioslave selects "file management" profile, which has the navbar displayed.  In KDE2.2, the navbar wasn't displayed on man pages, and I feel that was better.  I rarely need to consult it when I'm looking up a command syntax.

Nick
Comment 1 Stephan Kulow 2003-05-15 11:00:46 UTC
the ioslave can't select konqueror profiles, it simply delivers files. I can however confirm, 
that info:gcc selects web browsing, while man:gcc selects file management in konqueror. 
Comment 2 David Faure 2003-05-15 12:38:21 UTC
Subject: kdelibs/kio/kio

CVS commit by faure: 

If the protocol says it returns always e.g. text/html, then trust it.
As discussed with coolo (and my patch is more readable than his :)
CCMAIL: 58505-done@bugs.kde.org


  M +9 -5      kmimetype.cpp   1.163


--- kdelibs/kio/kio/kmimetype.cpp  #1.162:1.163
@@ -225,4 +225,5 @@ KMimeType::Ptr KMimeType::findByURL( con
   if ( !_is_local_file || _fast_mode )
   {
+    QString def = KProtocolInfo::defaultMimetype( _url );
     if ( path.endsWith( slash ) || path.isEmpty() )
     {
@@ -231,12 +232,15 @@ KMimeType::Ptr KMimeType::findByURL( con
       // of redirections (e.g. freshmeat downloads).
       // Assume inode/directory otherwise.
-      QString def = KProtocolInfo::defaultMimetype( _url );
       return mimeType( def.isEmpty() ? QString::fromLatin1("inode/directory") : def );
     }
+    if ( !def.isEmpty() && def != defaultMimeType() )
+    {
+       // The protocol says it always returns a given mimetype (e.g. text/html for "man:")
+       return mimeType( def );
   }
 
   // No more chances for non local URLs
-  if ( !_is_local_file || _fast_mode )
     return mimeType( defaultMimeType() );
+  }
 
   // Do some magic for local files