diff options
author | Timothy Pearson <[email protected]> | 2014-10-22 01:27:24 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2014-10-22 01:27:24 -0500 |
commit | 5aac0a76d5915ee10590060f9829ba627ec87532 (patch) | |
tree | 58d3c79542d8b462dc4f0463cecb83fa9c48836b /src | |
parent | 7fbdeee9380fb5e791a8ad59e6036572981b4edb (diff) | |
download | kile-5aac0a76d5915ee10590060f9829ba627ec87532.tar.gz kile-5aac0a76d5915ee10590060f9829ba627ec87532.zip |
Bring most mimetypes in line with XDG specifications. The following are not fully verified in source as of this commit due to ubiquity: html, empty, info, make, man, misc, source, unknown
Diffstat (limited to 'src')
-rw-r--r-- | src/kile/configcodecompletion.cpp | 2 | ||||
-rw-r--r-- | src/kile/kileconfigdialog.cpp | 2 | ||||
-rw-r--r-- | src/kile/texdocdialog.cpp | 26 | ||||
-rw-r--r-- | src/kile/userhelp.cpp | 11 |
4 files changed, 28 insertions, 13 deletions
diff --git a/src/kile/configcodecompletion.cpp b/src/kile/configcodecompletion.cpp index 76e003a..375904d 100644 --- a/src/kile/configcodecompletion.cpp +++ b/src/kile/configcodecompletion.cpp @@ -55,7 +55,7 @@ ConfigCodeCompletion::ConfigCodeCompletion(TDEConfig *config, KileWidget::LogMsg tab = new TQTabWidget(gb_tab); // add three pages: Tex/Latex, Dictionary, Abbreviation - addPage(tab, TexPage, i18n("TeX/LaTeX"), "tex"); + addPage(tab, TexPage, i18n("TeX/LaTeX"), "text-x-tex"); addPage(tab, DictionaryPage, i18n("Dictionary"), "dictionary"); addPage(tab, AbbreviationPage, i18n("Abbreviation"), "abbreviation"); diff --git a/src/kile/kileconfigdialog.cpp b/src/kile/kileconfigdialog.cpp index bc6a73e..d8af035 100644 --- a/src/kile/kileconfigdialog.cpp +++ b/src/kile/kileconfigdialog.cpp @@ -67,7 +67,7 @@ namespace KileDialog setShowIconsInTreeList(true); addConfigFolder(i18n("Kile"),"kile"); - addConfigFolder(i18n("LaTeX"),"tex"); + addConfigFolder(i18n("LaTeX"),"text-x-tex"); addConfigFolder(i18n("Tools"),"gear"); addConfigFolder(i18n("Editor"),"edit"); diff --git a/src/kile/texdocdialog.cpp b/src/kile/texdocdialog.cpp index 9ab22d7..4f54170 100644 --- a/src/kile/texdocdialog.cpp +++ b/src/kile/texdocdialog.cpp @@ -626,7 +626,7 @@ TQString TexDocDialog::getMimeType(const TQString &filename) KMimeType::Ptr pMime = KMimeType::findByURL(mimeurl); mimetype = pMime->name(); } - + KILE_DEBUG() << "\tmime = " << mimetype << " " << endl; return mimetype; } @@ -634,21 +634,27 @@ TQString TexDocDialog::getMimeType(const TQString &filename) TQString TexDocDialog::getIconName(const TQString &filename) { TQFileInfo fi( filename ); - TQString basename = fi.baseName().lower(); + TQString basename = fi.baseName().lower(); TQString ext = fi.extension(false).lower(); - + TQString icon; - if ( ext=="dvi" || ext=="pdf" || ext=="html" || ext == "htm" || ext == "txt") - icon = ext; + if ( ext=="dvi" ) + icon = "application-x-lyx"; + else if ( ext == "pdf" ) + icon = "application-pdf"; + else if ( ext == "html" || ext == "htm" ) + icon = "text-html"; + else if ( ext == "txt" ) + icon = "text-plain"; else if ( ext == "ps" ) - icon = "postscript"; + icon = "application-postscript"; else if ( ext == "sty" ) - icon = "tex"; + icon = "text-x-tex"; else if ( ext == "faq" || basename=="readme" || basename=="00readme" ) - icon = "readme"; + icon = "text-x-readme"; else - icon = "ascii"; - + icon = "text-vnd.tde.ascii"; + return icon; } diff --git a/src/kile/userhelp.cpp b/src/kile/userhelp.cpp index f040866..91adf2c 100644 --- a/src/kile/userhelp.cpp +++ b/src/kile/userhelp.cpp @@ -164,7 +164,16 @@ void UserHelp::setupUserHelpMenu() TQString ext = fi.extension(false); if ( ext == "htm" ) ext = "html"; - if ( http || ext=="html" || ext=="dvi" || ext=="ps" || ext=="pdf" ) + TQString icon; + if ( ext == "html" ) + icon = "text-html"; + else if ( ext == "dvi" ) + icon = "application-x-lyx"; + else if ( ext == "ps" ) + icon = "application-postscript"; + else if ( ext == "pdf" ) + icon = "application-pdf"; + if ( icon != "" ) { TQString icon = ( http ) ? "viewhtml" : ext; helpid = m_helppopup->insertItem( SmallIcon(icon),m_menuentries[i], |