Optionnally show mime type icons in result list

This commit is contained in:
dockes
2005-11-16 15:07:20 +00:00
parent fb42a135e8
commit 9f52e4ce90
9 changed files with 162 additions and 20 deletions
+11 -1
View File
@@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: mimehandler.cpp,v 1.10 2005-11-08 21:02:55 dockes Exp $ (C) 2004 J.F.Dockes";
static char rcsid[] = "@(#$Id: mimehandler.cpp,v 1.11 2005-11-16 15:07:20 dockes Exp $ (C) 2004 J.F.Dockes";
#endif
#include <iostream>
@@ -167,6 +167,16 @@ string getMimeViewer(const std::string &mtype, ConfTree *mhandlers)
return hs;
}
/**
* Return icon name
*/
string getMimeIconName(const std::string &mtype, ConfTree *mhandlers)
{
string hs;
mhandlers->get(mtype, hs, "icons");
return hs;
}
/**
* Return decompression command line for given mime type
*/
+7 -1
View File
@@ -1,6 +1,6 @@
#ifndef _MIMEHANDLER_H_INCLUDED_
#define _MIMEHANDLER_H_INCLUDED_
/* @(#$Id: mimehandler.h,v 1.7 2005-11-08 21:02:55 dockes Exp $ (C) 2004 J.F.Dockes */
/* @(#$Id: mimehandler.h,v 1.8 2005-11-16 15:07:20 dockes Exp $ (C) 2004 J.F.Dockes */
#include <string>
#include <list>
@@ -54,6 +54,12 @@ extern MimeHandler *getMimeHandler(const std::string &mtyp, ConfTree *mhdlers);
*/
extern std::string getMimeViewer(const std::string &mtyp, ConfTree *mhandlers);
/**
* Return icon name
*/
extern std::string getMimeIconName(const std::string &mtyp, ConfTree *mhandlers);
/**
* Return command to uncompress the given type. The returned command has
* substitutable places for input file name and temp dir name, and will