diff --git a/src/common/rclconfig.cpp b/src/common/rclconfig.cpp index c9d62c11..54924f57 100644 --- a/src/common/rclconfig.cpp +++ b/src/common/rclconfig.cpp @@ -885,33 +885,30 @@ bool RclConfig::mimeViewerNeedsUncomp(const string &mimetype) return true; } -/** - * Return icon name and path - */ -string RclConfig::getMimeIconName(const string &mtype, string *path) +string RclConfig::getMimeIconPath(const string &mtype, const string &apptag) { string iconname; - mimeconf->get(mtype, iconname, "icons"); + if (!apptag.empty()) + mimeconf->get(mtype + string("|") + apptag, iconname, "icons"); + if (iconname.empty()) + mimeconf->get(mtype, iconname, "icons"); if (iconname.empty()) iconname = "document"; - if (path) { - string iconsdir; - + string iconpath; #if defined (__FreeBSD__) && __FreeBSD_version < 500000 - // gcc 2.95 dies if we call getConfParam here ?? - if (m_conf) m_conf->get(string("iconsdir"), iconsdir, m_keydir); + // gcc 2.95 dies if we call getConfParam here ?? + if (m_conf) m_conf->get(string("iconsdir"), iconpath, m_keydir); #else - getConfParam("iconsdir", iconsdir); + getConfParam("iconsdir", iconpath); #endif - if (iconsdir.empty()) { - iconsdir = path_cat(m_datadir, "images"); - } else { - iconsdir = path_tildexpand(iconsdir); - } - *path = path_cat(iconsdir, iconname) + ".png"; + + if (iconpath.empty()) { + iconpath = path_cat(m_datadir, "images"); + } else { + iconpath = path_tildexpand(iconpath); } - return iconname; + return path_cat(iconpath, iconname) + ".png"; } string RclConfig::getDbDir() diff --git a/src/common/rclconfig.h b/src/common/rclconfig.h index 451ce331..be84dbac 100644 --- a/src/common/rclconfig.h +++ b/src/common/rclconfig.h @@ -196,8 +196,8 @@ class RclConfig { bool valueSplitAttributes(const string& whole, string& value, ConfSimple& attrs); - /** mimeconf: get icon name for mimetype */ - string getMimeIconName(const string &mtype, string *path = 0); + /** Return icon path for mime type and tag */ + string getMimeIconPath(const string &mt, const string& apptag); /** mimeconf: get list of file categories */ bool getMimeCategories(vector&); diff --git a/src/internfile/txtdcode.cpp b/src/internfile/txtdcode.cpp index 51a98223..c886dcec 100644 --- a/src/internfile/txtdcode.cpp +++ b/src/internfile/txtdcode.cpp @@ -100,7 +100,7 @@ bool RecollFilter::txtdcode(const string& who) string& ocs = m_metaData[cstr_dj_keyorigcharset]; string& itext = m_metaData[cstr_dj_keycontent]; - LOGDEB0(("%s::txtdcode: %d bytes from [%s] to UTF-8\n", + LOGDEB1(("%s::txtdcode: %d bytes from [%s] to UTF-8\n", who.c_str(), itext.size(), ocs.c_str())); int ecnt; string otext; diff --git a/src/qtgui/mtpics/README b/src/qtgui/mtpics/README index 51c7a4e9..90ee5e82 100644 --- a/src/qtgui/mtpics/README +++ b/src/qtgui/mtpics/README @@ -1,4 +1,8 @@ -Most icons thanks to kde crystalsvg -The Python and archive icons comes from oxygen (www.oxygen-icons.org) GPL -The Pidgin icon comes from the Pidgin project (GPL) +Most icons thanks to KDE crystalsvg + +Oxygen (www.oxygen-icons.org) (GPL): + archive.png book.png bookchap.png text-x-python.png + +The Pidgin project (GPL): + pidgin.png diff --git a/src/query/reslistpager.cpp b/src/query/reslistpager.cpp index d174255e..2ddec757 100644 --- a/src/query/reslistpager.cpp +++ b/src/query/reslistpager.cpp @@ -453,10 +453,10 @@ string ResListPager::prevUrl() string ResListPager::iconUrl(RclConfig *config, Rcl::Doc& doc) { - string iconurl; - config->getMimeIconName(doc.mimetype, &iconurl); - iconurl = cstr_fileu + iconurl; - return iconurl; + string apptag; + doc.getmeta(Rcl::Doc::keyapptg, &apptag); + + return cstr_fileu + config->getMimeIconPath(doc.mimetype, apptag); } bool ResListPager::append(const string& data) diff --git a/src/sampleconf/mimeconf b/src/sampleconf/mimeconf index c1ef4d11..5b4ddaa9 100644 --- a/src/sampleconf/mimeconf +++ b/src/sampleconf/mimeconf @@ -146,16 +146,16 @@ text/xml = exec rclxml ## ############################################# # Icons to be used in the result list if required by gui config [icons] -application/epub+zip = document +application/epub+zip = book application/msword = wordprocessing application/ogg = sownd application/pdf = pdf application/postscript = postscript application/vnd.ms-excel = spreadsheet application/vnd.ms-powerpoint = presentation -application/vnd.oasis.opendocument.text = wordprocessing application/vnd.oasis.opendocument.presentation = presentation application/vnd.oasis.opendocument.spreadsheet = spreadsheet +application/vnd.oasis.opendocument.text = wordprocessing application/vnd.openxmlformats-officedocument.presentationml.presentation = presentation application/vnd.openxmlformats-officedocument.presentationml.template = presentation application/vnd.openxmlformats-officedocument.spreadsheetml.sheet = spreadsheet @@ -175,12 +175,12 @@ application/vnd.sun.xml.writer.template = wordprocessing application/vnd.wordperfect = wordprocessing application/x-abiword = wordprocessing application/x-awk = source -application/x-chm = document +application/x-chm = book application/x-dia-diagram = drawing application/x-dvi = document application/x-flac = sownd application/x-fsdirectory = folder -application/x-gnuinfo = document +application/x-gnuinfo = book application/x-gnumeric = spreadsheet application/x-kword = wordprocessing application/x-lyx = wordprocessing @@ -211,6 +211,9 @@ image/x-xcf = image image/x-xpmi = image message/rfc822 = message text/html = html +text/html|chm = bookchap +text/html|epub = bookchap +text/html|gnuinfo = bookchap text/plain = txt text/rtf = wordprocessing text/x-c = source diff --git a/website/BUGS.html b/website/BUGS.html index 19875434..bbe02d25 100644 --- a/website/BUGS.html +++ b/website/BUGS.html @@ -79,6 +79,7 @@

recoll 1.17.3