Intergrating mht file to konqueror

Spiros Georgaras sngeorgaras at otenet.gr
Wed Oct 6 09:27:38 BST 2004


Hi again

I have managed to activate the file browser of konqueror to browse the mht 
file. The problem is that when pressing <Enter> in konqueror and the location 
bar is 'mht:/d/292 Euro.mht/', konqueror opens the file browser but with no 
contents. (Tha status bar reports 0 files - 0 folders).

Is this because of the lack of hacking of konq_mainwindow.cc, or is it the 
ioslave's problem?

In the later case, what should I return in ::stat in order to work?

At this point this is the code that my mhtProtocol::stat( const KURL & url ) 
uses when I have to display the contents of the mht file in konqueror' file 
browser.


totalSize( m_mhtFile->count() ); // number of files within the mht file
mimeType("inode/directory");

UDSAtom atom;
entry.clear();
atom.m_uds = UDS_NAME;
atom.m_str = QString("/");
entry.append(atom);
 
atom.m_uds = UDS_FILE_TYPE;
atom.m_long = m_mhtFile->permissions() & S_IFMT; // keep file type only
entry.append( atom );

atom.m_uds = UDS_SIZE;
atom.m_long = m_mhtFile->size(); // size of the mht file
//atom.m_long = 0;
entry.append( atom );

atom.m_uds = UDS_MODIFICATION_TIME;
atom.m_long = m_mhtFile->date();
entry.append( atom );


atom.m_uds = UDS_ACCESS;
atom.m_long = m_mhtFile->permissions() & 07777; // keep permissions only
entry.append( atom );

atom.m_uds = UDS_USER;
atom.m_str = m_mhtFile->user();
entry.append( atom );


atom.m_uds = UDS_GROUP;
atom.m_str = m_mhtFile->group();
entry.append( atom );
  
statEntry( entry );
finished();

One more question. When I update the ioslave (after make install), I see from 
the debuging info that its previous version is still running. In order to 
activate the new version I have to restart. Is there a way to do this form 
within KDE?




More information about the kfm-devel mailing list