Branch: master

5aac0a76 2014-10-22 01:27:24 Timothy Pearson
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
M src/kile/configcodecompletion.cpp
M src/kile/kileconfigdialog.cpp
M src/kile/texdocdialog.cpp
M src/kile/userhelp.cpp
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 @@
 	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 @@
 
 		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 @@
 		KMimeType::Ptr pMime = KMimeType::findByURL(mimeurl);
 		mimetype = pMime->name();
 	}
-	
+
 	KILE_DEBUG() << "\tmime = "  << mimetype << " " << endl;
 	return mimetype;
 }
@@ -634,21 +634,27 @@
 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 @@
 			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],