DevHeads.net

Review Request 113175: Always use an external viewer application to view files

Review request for KDE Base Apps.

Repository: ark

Description
This patch makes ark always use an external viewer application instead of using the clunky internal preview thing. The internal viewer would just embed a plain kpart into a window, but without providing any of the XMLGUI or whatever from that part. Thus, when you for example clicked a PDF, you couldn't print it. The advantages of the internal viewer are imo overall quite questionable, and are far outweighted by its disadvantages.

Plus, it removes code ;)

Diffs
part/arkviewer.cpp 053cd1c0502d3bb88895dc8d3653eaea9e6c3c83

Diff: <a href="http://git.reviewboard.kde.org/r/113175/diff/" title="http://git.reviewboard.kde.org/r/113175/diff/">http://git.reviewboard.kde.org/r/113175/diff/</a>

Testing
Clicking files opens them in the default application, as it should.

Thanks,

Sven Brauch

Comments

Re: Review Request 113175: Always use an external viewer applica

By Sven Brauch at 10/08/2013 - 11:11

(Updated Oct. 8, 2013, 3:11 p.m.)

Review request for KDE Base Apps and Raphael Kubo da Costa.

Repository: ark

Description
This patch makes ark always use an external viewer application instead of using the clunky internal preview thing. The internal viewer would just embed a plain kpart into a window, but without providing any of the XMLGUI or whatever from that part. Thus, when you for example clicked a PDF, you couldn't print it. The advantages of the internal viewer are imo overall quite questionable, and are far outweighted by its disadvantages.

Plus, it removes code ;)

Diffs
part/arkviewer.cpp 053cd1c0502d3bb88895dc8d3653eaea9e6c3c83

Diff: <a href="http://git.reviewboard.kde.org/r/113175/diff/" title="http://git.reviewboard.kde.org/r/113175/diff/">http://git.reviewboard.kde.org/r/113175/diff/</a>

Testing
Clicking files opens them in the default application, as it should.

Thanks,

Sven Brauch

Re: Review Request 113175: Always use an external viewer applica

By Sven Brauch at 10/08/2013 - 11:13

(Updated Oct. 8, 2013, 3:13 p.m.)

Review request for KDE Base Apps.

Repository: ark

Description
This patch makes ark always use an external viewer application instead of using the clunky internal preview thing. The internal viewer would just embed a plain kpart into a window, but without providing any of the XMLGUI or whatever from that part. Thus, when you for example clicked a PDF, you couldn't print it. The advantages of the internal viewer are imo overall quite questionable, and are far outweighted by its disadvantages.

Plus, it removes code ;)

Diffs
part/arkviewer.cpp 053cd1c0502d3bb88895dc8d3653eaea9e6c3c83

Diff: <a href="http://git.reviewboard.kde.org/r/113175/diff/" title="http://git.reviewboard.kde.org/r/113175/diff/">http://git.reviewboard.kde.org/r/113175/diff/</a>

Testing
Clicking files opens them in the default application, as it should.

Thanks,

Sven Brauch

Re: Review Request 113175: Always use an external viewer applica

By Sven Brauch at 10/08/2013 - 11:17

(Updated Oct. 8, 2013, 3:17 p.m.)

Review request for KDE Base Apps.

Repository: ark

Description
This patch makes ark always use an external viewer application instead of using the clunky internal preview thing. The internal viewer would just embed a plain kpart into a window, but without providing any of the XMLGUI or whatever from that part. Thus, when you for example clicked a PDF, you couldn't print it. The advantages of the internal viewer are imo overall quite questionable, and are far outweighted by its disadvantages.

Plus, it removes code ;)

Diffs (updated)
part/arkviewer.h bb41472eaec985e2e1b3d9c2f7c257c949316bf4
part/arkviewer.cpp 053cd1c0502d3bb88895dc8d3653eaea9e6c3c83

Diff: <a href="http://git.reviewboard.kde.org/r/113175/diff/" title="http://git.reviewboard.kde.org/r/113175/diff/">http://git.reviewboard.kde.org/r/113175/diff/</a>

Testing
Clicking files opens them in the default application, as it should.

Thanks,

Sven Brauch

Re: Review Request 113175: Always use an external viewer applica

By Sven Brauch at 10/08/2013 - 11:23

(Updated Oct. 8, 2013, 3:23 p.m.)

Review request for KDE Base Apps.

Changes
No, in fact we should do this, of course. The class is worthless now.

Repository: ark

Description
This patch makes ark always use an external viewer application instead of using the clunky internal preview thing. The internal viewer would just embed a plain kpart into a window, but without providing any of the XMLGUI or whatever from that part. Thus, when you for example clicked a PDF, you couldn't print it. The advantages of the internal viewer are imo overall quite questionable, and are far outweighted by its disadvantages.

Plus, it removes code ;)

Diffs (updated)
part/CMakeLists.txt 9e384438b60322f1d51d31e40c556b2912970ceb
part/arkviewer.h bb41472eaec985e2e1b3d9c2f7c257c949316bf4
part/arkviewer.cpp 053cd1c0502d3bb88895dc8d3653eaea9e6c3c83
part/part.cpp b4ebcd27c462d2b8037b5ea40c56969eda71bdcb

Diff: <a href="http://git.reviewboard.kde.org/r/113175/diff/" title="http://git.reviewboard.kde.org/r/113175/diff/">http://git.reviewboard.kde.org/r/113175/diff/</a>

Testing
Clicking files opens them in the default application, as it should.

Thanks,

Sven Brauch

Re: Review Request 113175: Always use an external viewer applica

By Sven Brauch at 02/07/2014 - 18:13

(Updated Feb. 7, 2014, 10:13 p.m.)

Status
This change has been discarded.

Review request for KDE Base Apps.

Repository: ark

Description
This patch makes ark always use an external viewer application instead of using the clunky internal preview thing. The internal viewer would just embed a plain kpart into a window, but without providing any of the XMLGUI or whatever from that part. Thus, when you for example clicked a PDF, you couldn't print it. The advantages of the internal viewer are imo overall quite questionable, and are far outweighted by its disadvantages.

Plus, it removes code ;)

Diffs
part/CMakeLists.txt 9e384438b60322f1d51d31e40c556b2912970ceb
part/arkviewer.h bb41472eaec985e2e1b3d9c2f7c257c949316bf4
part/arkviewer.cpp 053cd1c0502d3bb88895dc8d3653eaea9e6c3c83
part/part.cpp b4ebcd27c462d2b8037b5ea40c56969eda71bdcb

Diff: <a href="https://git.reviewboard.kde.org/r/113175/diff/" title="https://git.reviewboard.kde.org/r/113175/diff/">https://git.reviewboard.kde.org/r/113175/diff/</a>

Testing
Clicking files opens them in the default application, as it should.

Thanks,

Sven Brauch

Re: Review Request 113175: Always use an external viewer applica

By Jonathan Marten at 10/08/2013 - 12:47

I'm not totally happy with this change. Yes, the internal viewer is limited in functionality, but it has advantages: (1) it is fast to open and can be closed again with a single keystroke; (2) it remembers its size and can be resized without affecting the default window size of, say, KWrite or whichever external application is used; (3) it can be forced to display an archive component of any type as plain text.

There's nothing wrong with having the facility to open an archive component in its default application (or any other application), but it should be an option. Either a configuration setting (Use internal viewer - Use external application), or a context menu with options View (in the internal viewer), Open (in the default application) or Open With... (any other application).

- Jonathan Marten

On Oct. 8, 2013, 3:23 p.m., Sven Brauch wrote:

Re: Review Request 113175: Always use an external viewer applica

By =?UTF-8?Q?Nicol... at 10/19/2013 - 15:56

To add my 2 cents, these are the things I find most annoying:
- XML files are shown in the internal viewer using the KHTML KPart, which is pretty useless unless the file happens to be XHTML. For many XML files I get an empty window because there are no text nodes (all data in attributes).
- Diff files appear using a KPart (I don't remember if it's Kompare or KDiff3) that only shows the diff for the first file by default. Usually there are controls to go to the next file, but as mentioned by Sven, Ark shows no controls. Keyboard shortcuts don't work either.
- Some other formats show a "can't be opened in the internal viewer" error.

- Nicolás

On Oct. 8, 2013, 12:23 p.m., Sven Brauch wrote:

Re: Review Request 113175: Always use an external viewer applica

By Sven Brauch at 10/08/2013 - 16:35

Ok, I see the problem with that approach -- it requires extracting files on selecting them, which is of course not optimal.

- Sven

On Oct. 8, 2013, 3:23 p.m., Sven Brauch wrote:

Re: Review Request 113175: Always use an external viewer applica

By Martin Koller at 10/19/2013 - 11:57

On Tuesday 08 October 2013 20:35:01 Sven Brauch wrote:
<snip>

What is the advantage of having ark at all ?
konqueror/dolphin can already open at least tar/(gz, bzip) and zip files directly and there you have all the functionality
you are discussing currently (e.g. viewing the file according to defined association, right click menu, everything
one would expect ...
I don't know the drawbacks, so please enlighten me.
Thanks.

Re: Review Request 113175: Always use an external viewer applica

By Emmanuel Pescosta at 10/19/2013 - 15:50

See DolphinView::openItemAsFolderUrl for more information.

Emmanuel

2013/10/19 Martin Koller < ... at aon dot at>

Re: Review Request 113175: Always use an external viewer applica

By Martin Koller at 10/19/2013 - 16:26

On Saturday 19 October 2013 21:50:40 Emmanuel Pescosta wrote:
you think that ark can _directly_ browse into remote archives ?
You're wrong. It also downloads a copy of the archive to the local filesystem.
I tried to open a tar file via sftp://

Re: Review Request 113175: Always use an external viewer applica

By Sebastian =?utf... at 10/21/2013 - 05:35

On Saturday, October 19, 2013 17:57:17 Martin Koller wrote:
They are not mutually exclusive, some people prefer integrated apps, such as
Dolphin opening archives like directories, others prefer a special unzipping
application.

People who want that can use this function in Dolphin, people who prefer the
separate zipping app use Ark.

Cheers,

Re: Review Request 113175: Always use an external viewer applica

By Sven Brauch at 10/08/2013 - 15:49

I feel like Sebastian does and I have watched people use Ark before which obviously felt the same (i.e. which were confused because the PDF viewer was missing all the buttons). I do see the point of the viewer in some corner cases, but in almost all cases I don't want it.

Maybe we could do this: The side panel is currently quite useless (huge amount of space occupied + little information in there). We could embed the viewer there, and change the action on click to select the file and display it there. That would serve the (I guess?) common use case, which is looking through several images and deciding which one you want to extract even better than the current solution. Then there could be a button below the viewer widget to open the file in the actual application.
I'm not sure this is a good idea, what do you think?

- Sven

On Oct. 8, 2013, 3:23 p.m., Sven Brauch wrote:

Re: Review Request 113175: Always use an external viewer applica

By Sebastian =?utf... at 10/08/2013 - 14:54

Honestly, to most people the internal viewer just looks broken, like an incomplete stepchild of the real viewer application.

Can we please at least make the default to open the application, not the crippled viewer?

- Sebastian

On Oct. 8, 2013, 3:23 p.m., Sven Brauch wrote:

Re: Review Request 113175: Always use an external viewer applica

By Jonathan Marten at 10/08/2013 - 13:55

Not sure that changing the function of the right-click would be approved of (but then, I'm not the ark maintainer or authority, just an intensive user of it). Maybe the middle button?

There has been some discussion about adding a context menu to Ark before now - e.g. bug #166203.

- Jonathan

On Oct. 8, 2013, 3:23 p.m., Sven Brauch wrote:

Re: Review Request 113175: Always use an external viewer applica

By Sven Brauch at 10/08/2013 - 12:59

I guessed some people would not be happy with it, but it was worth a try ;)

How about a context menu action? Or, since the context menu is currently empty, just opening the external viewer on right-click?

- Sven

On Oct. 8, 2013, 3:23 p.m., Sven Brauch wrote:

Re: Review Request 113175: Always use an external viewer applica

By Kai Uwe Broulik at 10/08/2013 - 11:14

You should remove the functions from the headerfile as well.

- Kai Uwe Broulik

On Oct. 8, 2013, 3:13 p.m., Sven Brauch wrote: