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

pull/1/head
Timothy Pearson 10 years ago
parent 7fbdeee938
commit 5aac0a76d5

@ -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");

@ -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");

@ -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;
}

@ -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],

Loading…
Cancel
Save