Thursday, November 10, 2011

Okular and Send by Mail

There are regular requests about Okular having a "Send by Mail" menu item in the File menu.

In terms of implementation, it is a five minutes hack, since all you have to do is create a new KAction that calls KToolInvocation::invokeMailer with a few params and you are done.

Yet, i have been refusing to implement it since i do not think it is Okular responsibility to offer this feature.

I can understand that users are used to Adobe Reader having it, and in the unintegrated world of Windows it makes sense that every app includes as many features as possible since it is you versus the world.

On the other hand, in KDE land we pride ourselves of having things properly integrated and each feature in the software where it logically belongs, and in my book, the action of initiating the sending of an email, does not belong to a document viewer.

It is true though, that even if I've been involved in UI designing/programming for a while I can't still say I know what belongs to a given program or not.

Because once we add it to Okular? Why not to gwenview? And why not to Calligra? And And And?

What do you think?

36 comments:

L.A. said...

First of all, I don't know whether Okular can be installed standalone so if it needs the entire KDE environment you can stop reading :).

I think it shouldn't have that feature because, as you said, then what should you do with the rest of applications? add it too to them and remove then that feature from the KDE environment?

But, maybe you should think about what it will happen if some user installs only Okular (or any other KDE application) in an environment that lacks that feature. Will it make sense even in such a situation? I don't know, maybe it doesn't anyway.

Davide Bettio said...

In 2011 I expect every document based application having Share/Like/Send menu items. I can see several usecases, one possibile of them is to save time if you manage a lot of documents. Another one is "when I download a PDF I may want to send it to my mail". It might be nice to allow users to share/send just one page or a range of pages.

suy said...

I completely agree with you. Why send to email? Why not send to my USB drive? Why not send to a peer through Konversation or Kopete? Why not one of my customized "service menus" that I have to send to my website or my laptop?

Anonymous said...

This is really 2 questions:

1) Should the code to send a entity (document, song, whatever) over arbitrary mechanism X live in each application? No, that breeds error.

2) Should user access to a generic "sending" mechanism be part of every application? Of course: sending things among friends is very common. Make it as easy to share as possible. Name the button "Share" and have it evoke the proper mechanism with the file already listed.

Ask yourself: how many additional hoops are you asking a casual user to jump through to do something simple for you, maybe hard for them. Can it really be true that KDE lacks a generic "share this" function?

Fri13 said...

Maybe one day we have that "share" button on every application like gwenview has and how even Android shares data.

Share function would be similar to drag'n'drop function. Like you have a song playing in amarok from you collection and your friend wants it.

1) Open stick with dolphin
2) drag and drop song/album to dolphin

Same thing can do from digiKam:

1) Open album/tag of photos
2) drag and drop to dolphin
Or vice versa

How about kate/kwrite to kmail?

Drag and drop text or even files as attachment.

The Okular is special, and because it is a viewer, not manager or editor (annotates ain't actually editing).

Okular mouse dragging just moves view.
Gwenview works same when when image is open in it. So does digiKam.

Even konqueror does same, we can not just drag and drop whole web page to filemanager or as attachment to email. But we can drag and drop images or selected text if wanted.

I dont like idea of "share" in desktop apps. I like about drag and dropping, even that demands user has the receiver application open. But "share" will work greatly on smartphones with touch small touch screens, but bigger (touch)screens or mouse controlling works better way with drag'n'dropping.

What I wish to see, is that it would be possible to drag and drop file what KDE application has open, by dragging the icon from window decoration.

So to email a PDF open in okular?
Open KMail and/or Click "new" and then just drag the okular icon over new email and it gets there as attachment. Without opening dolphin or trough kmail open dialog.

This kind universal drag'n'drop would allow people to do even more amazing things as the current one.
Want to save a web page? Just drag and drop it to dolphin. (Littlebit same way as dragging the favicon from URL bar).

Video open in player and want to copy it to USB stick or even network computer, just drag and drop it.

Want to stream video file to other person in network (IRC/IM contact lists) ? Just drag and drop the video over person and choose "stream" instead "send".

Taking a snapshot of video? Pause videoplayer and then just drag video to dolphin or even as attachment to email and choose "snapshot" instead copying video.

Same thing could be done with PDF files then. Drag and drop to copy a single page.

Drag and drop a PDF file or even single page from okular over printer applet/list and you get it printed.

Would there be easier way to actually copy/print/send a open PDF file/page than drag and dropping from A to B?


I have had this vision now few years, since I saw the documentary of Xerox Star UI. People could at that time (1981) to actually do amazing things just with copy/paste and drag'n'drop.

http://www.youtube.com/watch?v=Cn4vC80Pv6Q (two parts)
http://www.youtube.com/watch?v=SDpagiwYDg4 watch 1:30 -> 2:00

PDF's are such documents what are nice to read but harder to share and copy data. Email attaching is just very small thing from many things and I dont think "Send via email" is good function to be added menu for that.

Pau Garcia i Quiles said...

Gwenview already has "send by mail", via KIPI plugins.

Anonymous said...

1. Sending mail is definitely the MUA
responsibility (kmail in case of KDE)

2. Dropping a file (e.g: from Dolphin) into
kmail "compose" windows, already
attaches it, so half of the solution
exist in some generic form (give me a file)

3. So maybe this mechanism (drag/drop) can
be wrapped in an alternative *generic* UI
component (send to.../accept from...)
so it could be used as a proxy between
any file handling KDE apps

Oron Peled

Anonymous said...

Personally I use those actions quite often. I use it in digikam, and in many applications I use the ability to upload data to the net. I use it in konqueror once in a while. I use quite often freoffice "send as pdf" feature, which is really nice.

I never missed it in okular, except when filling in forms. Others may have different workflows.

I use those actions because they make things easy, first and foremost by providing instant access to the document I want to send. Instead of having to switch to a mail client and start a composer, press attach, browse to the file (sometimes after saving it in a temporary location), just click file->send... Instantly I get a composer window with the file attached... Smart!

In the case of okular, an argument could be that often the file you read is downloaded, so how one would need to save a copy to send, instead of just using the temporary one that okular keeps?

Really, I can't see what is wrong with it - especially given the nice kde integration, that deals with the work for you?

BartOtten said...

I have no idea why we should not have a 'Share' button in more KDE programms. Afaik PLasma Active does have it, so why shouldn't we?

jstaniek said...

I'd vote to use QtScript to expose Okular UI with a nice, simple extension API. Allow for platform-independent plugins this way.
At least this solution will be used by Kexi since no program can fit to all cases.

Anonymous said...

So there isn't a "KShare" applet?

One of you has an opportunity to be famous here.

The interface should be pretty clean:

1) No selection means the entire entity, selection(s) means just that part (responsibility of the sending app.) BTW drag/drop just makes life complicated for the user. Include it: yes. Require it: no.

1a) Format the responsibility of the sending app, using MIME tags maybe

2) Need to be able to send arbitrary explanation/context as well as the data. (probably part of the KShare applet but some input from the app)

3) Ideally preserve some link to the original work (joint responsibility)

4) Need to be able to send to as many channels as possible. Mail, Calendar, IM/SMS, Twitter, Facebook, blogs, others?) (KShare and channel joint responsibility... maybe plugins?)

You'll be a hero: offload code/UI function from many apps AND make life easier for real users.

Tom Littauer
aka Anonymous 2011/11/10 23:30:00

Anonymous said...

"Because once we add it to Okular? Why not to gwenview? And why not to Calligra"

Exactly -- Why not?

1052 said...

Precisely, KDE would be better integrated if Okular and other applications had a "Send To..." entry. This entry could pop-up: a plasmoid a la klipper, a modal windown, or a menu a la krunner. From there, one would be able to select: the mailer, the browser, kopete (telepathy), kirc, but perhaps even plasmoids, maybe one could even select "anything" like in krunner. And this option would be consistently available in all kde applications that handle files.

Anonymous said...

"Need to be able to send to as many channels as possible. Mail, Calendar, IM/SMS, Twitter, Facebook, blogs, others?)"

"From there, one would be able to select: the mailer, the browser, kopete (telepathy), kirc,"

Surely those approaches are the wrong way around. Why not have a KDE "share" button give you a searchable list of your Akonadi contacts. Once you've selected a person, you can then be presented with whatever contact mechanisms are available for them - email, IM send (with "are they online" check, as you already know who the target is...), social network message, etc...

Anonymous said...

@grok-mctanys

Of course you're right.

I'd assumed akonadi and failed to specify it.

The goal needs to be: make it as easy as possible to share.

Thanks for making it clearer.

Tom Littauer

damian said...

Plasma active already does this, and very good, it has a button in the taskbar that lets you share/like/connect a document that you have open, if the apps supports it of course.

damian said...

@grok-mctanys
There should also be a button there that said, share to all and offered things like your facebook wall, flickr, youtube, etc.
This could be better implemented as a button in the workspace than in the apps, like in plasma active.
The idea of grouping sharing/sending/liking together and integrating it to the workspace is a good one, because adding it to every app is a complex task (I mean the gui), but just putting a button there and interfacing with it would be awesome

Anonymous said...

you know: every useful computer program eventually grows enough to send email :D

Anonymous said...

I miss that feature too and not only in Okular, I would not mind, it existed in other apps too and more than mail, but also USB media, would be cool too.

Anonymous said...

The idea of an systray plasmoid offering some actions like "send by email" when a document viewer application is running seems quite appealing :)

don't know if this is possible but it could be great

Anonymous said...

I would like to be able to send page 1-3 of any document, by mail or anything else. The proper place to implement this is in okular.

Albert Astals Cid said...

"I would like to be able to send page 1-3 of any document, by mail or anything else."

Sorry but no, Okular is not a Document Editor (required to only ship part of the pages) so that is totally outside Okular's scope

Stefan said...

I think that you could remove the "Save Copy" action using the same argument; a file manager can be used for that purpose. I do not know if this invalidates the argument already, though.

The obvious solution for integration here would be to allow drag+drop from Okular to e.g. a KMail launcher on the panel. Since this is not possible (Okular already handles these mouse events), "Send Mail" looks useful to me.

More generally speaking, I agree with Davide Bettio (comment #2).

Kevin Colyer said...

I for one would like it!

As Okular can markup and make notes, fill in PDF's it makes sense to then push it to my co-collaboraters from Okular.

I use send as a pdf in Openoffice all the time, and is one key feature I l love and use a lot.

I would like all KDE apps to have a shared frame to share documents; via whatever mechanism email, google+, twitter, dropbox etc. Plugins galore here!

Thanks for asking the questions

Unknown said...

I agree with what has been said previously. Although I haven't experienced the implementation in Plasma Active the generic "Share" action in Android is very useful.

I think the best long-term solution would be to have a global mechanism to add a share action to KDE applications.

Rino said...

I believe this is consistency problem.

So this is not a problem related to okular, but it is related to all the kde environment. For this reason, an answer to your question shouldn't be taken here by me or by you or by everyone here, but it should be taken by all the kde workspace developers. So we should go in the kde mailing list and ask them: "Do we want a share/like/send function in kde workspace like in plasma active? If yes, how do we implement it?"

Vít Tuček said...

I really like Fri13's drag'n'droppin idea.

What I dislike in gwenview and digikam is that their share menu is too crowded. I haven't even heard about 80% of their services. What I would like to see is a configurable list of share services (e.g. mail, google+, facebook, etc) in the form of a menu that developers could add to their application and I as an end user could edit (i.e. show me only those that I use) in configure desktop application.

Regarding your reasoning: "the action of initiating the sending of an email, does not belong to a document viewer" ... Let me just ask you what is the right application for sharing and annotated pdf file (i.e. for collaborative proofreading)?

Fri13 said...

@Vít Tuček

"What I dislike in gwenview and digikam is that their share menu is too crowded. I haven't even heard about 80% of their services. What I would like to see is a configurable list of share services (e.g. mail, google+, facebook, etc) in the form of a menu that developers could add to their application and I as an end user could edit (i.e. show me only those that I use) in configure desktop application."

Go to: digiKam > Settings > Configure digiKam > Kipi-plugins

From there you choose what services and export functions you want. Anything what you dont like, you disable it.

The distributor job is to narrow that list down and allow user to modify it but everyone seems to deliver digiKam with all enabled.

After you have chosen wanted plugins, they are in tools > or in export > menus.

I have only for plugins enabled:
1) HDR images
2) Panoramas
3) Email
4) Picasa

And as you can notice, gwenview does not allow to configure these plugins or even allow user to edit "share" function.

The drag'n'drop is intuitive action. It should not be "share" button in menu.

If watching a new computer user, they find it really easy. 1) Open a source (application like dolphin, digiKam etc) 2) open destination (write new email to friend) and then just drag and drop from source to destination.

No thinking and searching the button. No clicking or anything else. It is simple and it follows every possible other editing like images from web or text or so on.

Even copying files in dolphin is best to do by that. Drag files and drop and select "copy"

The "share" functionality is needed in very limited hardware like smartphones where we do not have space to have two window open same time.

Please do not turn desktop computers to as limited as well.

Anonymous said...

I have a different point of view on this.

I have clients who work in manufacturing and they receive and work with .pdf's every single day.

.pdf's are the life-blood of their business.

I look over their shoulders, watching how they work, and see that this very feature, being able to mail a pdf directly from the reader, is an intuitive, often-used feature.

If I were to convince them to ditch Windows and switch to KDE, they would love everything else, but I guarantee they would be mad at Okular for making them work around it rather than with them.

This type of issue should be more about implementation and not about "should it be there?"

Yes, it should be there, because in the real world, outside the mind's of software programmers, real people use this all the time.

Ingolf Schäfer said...

I'd love to have Okular have a "send to .." menu, where I could share PDFs to KMail and Google Docs.

First, I reject the idea that there is an easy way for doing it KDE. Right now, I have to either use Dolphin's Send To.. or append to a written mail. Neither is particularly easy or straight forward.

Second, I don't see why it would be a bad design decision to have it in Okular and only there. Gwenview already has its special menu for that called export in the modules menu.

It would be way cooler to have a general "share" interface like in Android, but better release it for 4.8 in the a simple way than to maybe get a more awesome feature in KDE 5.

Anonymous said...

I also thing a "Share..." button is more than welcome. And this button should be available through all kde apps.
It would be an easy and simple way to share anything through any services amongst kde app.
Kde is meant to be a social desktop, isn't it?

Anonymous said...

Initially as it is a viewer:
I want Okular to quickly open and display documents. I do not want to wait around while it tries to discover what services are available, but probably will not be used.

Subsequently:
I want to continue reading from where I was last time.
I want to find things in various ways. And got back to where I was should I not find what I was looking for.
I want to easily view the meta-data.

Finally:
I want to print whole or extract or meta-data; copy meta-data, plain-text or images and paste them elsewhere; in lieu of annotation, I would like to copy a link to a specific location in the document.

Should there not be a sharing file-system to access shared files: be it Google Docs, WebDAV, FTP, version control system, email drafts folder, etc.

NeXTSTEP in the 80's or 90's had a services menu 'free' to any application: dictionary/thesaurus look-up selected word (cmd =), sendmail document, etc.

To be a success, you need to address the different user's emotional needs: many will want something familiar and comfortable - something small and understandable, some will want something new, exciting, vast and explorable, and some will want something to measure their success or prestige.

The last group want it to say how many they have shared with (and influenced), how far they have 'conquered' the document.

The middle group want the 'secret door' to access large number of services and tools.

The first group want something they can immediately see how to use.

You can see these behaviours in the choices people make in the things they buy.

sebas said...

The Share Like Connect feature is the way to go here. Without adding any UI, it makes this (and a host of other related features) possible.

The mechanism works as follows, Okular registers on DBus that it's viewing a specific document right now, all the rest is figured out by Share Like Connect.

Adding SLC to Okular is also about 3 lines of code.

Flo said...

Hi,

I just had the same wish to send from Okular per mail and found this not so young discussion.

As Okular still hasn't this feature, I went on searching and found a solution imho much better than hard-coding this feature into Okular, even it'd take only 3 lines.

Just enable access to the Actions submenu in Okular, maybe as a submenu in the File menu. So, everyone can have the KDE-wide actions for the document directly from within Okular, and define own actions like send per mail.

I've found it here
http://zebardast.ir/en/add-%E2%80%9Csend-files-to-email%E2%80%9D-item-to-right-click-menu-on-dolphin-and-konqueror/

Many Thanks for your effort with Okular!

Flo

Anonymous said...

Of course we need this feature. My daily work consists in reading articles and once opened and read sometime I want to send it to my colleagues here i need to do a 3 steps process to do so...

All the comment I read just go the other way around. Now all Apple suit has this feature and why ? because that's useful...

Anonymous said...

needed