Bug 120974 - WISH: archives handling please
Summary: WISH: archives handling please
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-29 13:12 UTC by Maciej Pilichowski
Modified: 2012-10-19 13:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Pilichowski 2006-01-29 13:12:43 UTC
Version:           1.3.1 (using KDE KDE 3.5.0)
Installed from:    SuSE RPMs
OS:                Linux

Please, add archives handling -- I mean, I would like to click on the archive, and archive will be unpack on fly so I can view pictures in it.
Comment 1 Stephan Kulow 2006-01-29 14:02:03 UTC
you're talking zip files?
Comment 2 Maciej Pilichowski 2006-01-29 14:25:38 UTC
Archives -- tar.gz, tar.bz2, zip, rar, 7z, anything recognizable.
Comment 3 Aurelien Gateau 2006-06-28 23:48:59 UTC
I don't understand. Gwenview shows archives in the file view. If you click on one, you will enter it and be able to view pictures in it. Can you give an example of your problem?
Comment 4 Maciej Pilichowski 2006-06-29 12:26:28 UTC
> I don't understand.

Time difference is the key -- there could be a lot of changes during half a year, right?

> Gwenview shows archives in the file view. 

Thanks for the tip, great news, however for example, rar is still unsupported -- more exactly, rar files are not even listed.
Comment 5 Aurelien Gateau 2006-06-29 22:39:11 UTC
Hum... 1.3.1 is the latest stable version, so support for tar.gz, tar.bz2 and zip should be available to you. But you are right, the list of supported archive formats is hard coded. I will try to make it more dynamic, if possible.

I'm slowly going through the Bugzilla list, which I neglected for too long, hence the (too long) delay in my answer.
Comment 6 Maciej Pilichowski 2006-06-30 12:20:34 UTC
> Hum... 1.3.1 is the latest stable version, so support for tar.gz, tar.bz2
> and zip should be available to you. 

Yup, thanks for those!

> But you are right, the list of supported archive formats is hard coded. 

Well it is not so bad, if major formats are supported -- bz2, tar, gz, rar, arj, zip.

> hence the (too long) delay in my answer

No problem, I just explained why I wished for archives (earlier) when they are supported (now).
Comment 7 Aurelien Gateau 2006-06-30 23:12:56 UTC
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;
 }
Comment 8 Yuriy Kozlov 2007-02-23 00:15:40 UTC
Gwenview 1.4.1 on Kubuntu doesn't seem to be able to view archives.  They don't appear in the file view.
Comment 9 Valent Turkovic 2010-01-11 15:11:04 UTC
Gwenviwe 2.3.4 on KDE 4.3.4 (Fedora 12) still lacks this feature. RAR archives aren't even shown in files list, let alone opened.