result list: show preview and edit links only when they can be used
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: mimehandler.cpp,v 1.17 2006-03-20 16:05:41 dockes Exp $ (C) 2004 J.F.Dockes";
|
||||
static char rcsid[] = "@(#$Id: mimehandler.cpp,v 1.18 2006-03-29 13:08:08 dockes Exp $ (C) 2004 J.F.Dockes";
|
||||
#endif
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -98,3 +98,15 @@ MimeHandler *getMimeHandler(const string &mtype, RclConfig *cfg)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Can this mime type be interned (according to config) ?
|
||||
bool canIntern(const std::string mtype, RclConfig *cfg)
|
||||
{
|
||||
if (mtype.empty())
|
||||
return false;
|
||||
string hs = cfg->getMimeHandlerDef(mtype);
|
||||
if (hs.empty())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
#ifndef _MIMEHANDLER_H_INCLUDED_
|
||||
#define _MIMEHANDLER_H_INCLUDED_
|
||||
/* @(#$Id: mimehandler.h,v 1.11 2006-01-30 11:15:27 dockes Exp $ (C) 2004 J.F.Dockes */
|
||||
/* @(#$Id: mimehandler.h,v 1.12 2006-03-29 13:08:08 dockes Exp $ (C) 2004 J.F.Dockes */
|
||||
|
||||
#include <string>
|
||||
#include <list>
|
||||
@@ -71,4 +71,7 @@ class MimeHandler {
|
||||
*/
|
||||
extern MimeHandler *getMimeHandler(const std::string &mtyp, RclConfig *cfg);
|
||||
|
||||
/// Can this mime type be interned ?
|
||||
extern bool canIntern(const std::string mimetype, RclConfig *cfg);
|
||||
|
||||
#endif /* _MIMEHANDLER_H_INCLUDED_ */
|
||||
|
||||
Reference in New Issue
Block a user