[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 120974] WISH: archives handling please
From:       Aurelien Gateau <aurelien.gateau () free ! fr>
Date:       2006-06-30 21:12:58
Message-ID: 20060630211258.7056.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=120974         
aurelien.gateau free fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From aurelien.gateau free fr  2006-06-30 23:12 -------
SVN commit 556603 by gateau:

List of supported archive formats is no longer hard coded, so you can for
example add support for rar archives by installing kio_rar.
BUG:120974


 M  +2 -0      NEWS  
 M  +10 -4     gvcore/archive.cpp  


--- trunk/extragear/graphics/gwenview/NEWS #556602:556603
 @ -10,6 +10,8  @
    files whose resolution is unknown.
  - Correct of by one error in selection after files have been removed (Bug
    111240).
+ - List of supported archive formats is no longer hard coded, so you can for
+   example add support for rar archives by installing kio_rar (Bug 120974).
 
 2006.06.24 - v1.3.91
 - New features:
--- trunk/extragear/graphics/gwenview/gvcore/archive.cpp #556602:556603
 @ -31,13 +31,19  @
 
 typedef QMap<QString,QString> MimeTypeProtocols;
 
+static const char* KDE_PROTOCOL = "X-KDE-LocalProtocol";
+
 static const MimeTypeProtocols& mimeTypeProtocols() {
 	static MimeTypeProtocols map;
 	if (map.isEmpty()) {
-		map["application/x-tar"]="tar";
-		map["application/x-tgz"]="tar";
-		map["application/x-tbz"]="tar";
-		map["application/x-zip"]="zip";
+		KMimeType::List list = KMimeType::allMimeTypes();
+		KMimeType::List::Iterator it=list.begin(), end=list.end();
+		for (; it!=end; ++it) {
+			if ( (*it)->propertyNames().findIndex(KDE_PROTOCOL)!= -1 ) {
+				QString protocol = (*it)->property(KDE_PROTOCOL).toString();
+				map[(*it)->name()] = protocol;
+			}
+		}
 	}
 	return map;
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic