D12067: [Okular Part] Add "Print" action

2018-04-27 Thread David Faure
dfaure added a comment.


  Hmm that's not how this is supposed to work, no need to look up actions. Look 
at the connect in kparts browserextension.cpp. The basic idea is: the part 
derives from BrowserExtension and provides a print slot, the shell calls it. 
Then the question became "but how does the shell know when to enable/disable 
the action", which is what actionSlotMapPtr() and isActionEnabled() are about, 
see KonqMainWindow::connectExtension for sample code.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D12067

To: broulik, #okular, aacid
Cc: dfaure, ngraham, aacid


D12067: [Okular Part] Add "Print" action

2018-04-27 Thread Kai Uwe Broulik
broulik added a comment.


  When I do `m_part->actionCollection()->action(KStandardAction::Print)` I get 
the "next bookmark" action in Okular and none in Kate. I tried 
`QMetaObject::invokeMethod` but sometimes it's called `print` and sometimes 
`slotPrint` and I don't find where Konqueror actually handles the "print" 
action.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D12067

To: broulik, #okular, aacid
Cc: dfaure, ngraham, aacid


D12067: [Okular Part] Add "Print" action

2018-04-27 Thread David Faure
dfaure added a comment.


  I'd say so.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D12067

To: broulik, #okular, aacid
Cc: dfaure, ngraham, aacid


D12067: [Okular Part] Add "Print" action

2018-04-26 Thread Kai Uwe Broulik
broulik added a comment.


  So, Ark should get a print action (I could add one next to the "Close" button 
which would make it quite obvious) and Kate is wrong to show it in the menu?

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D12067

To: broulik, #okular, aacid
Cc: dfaure, ngraham, aacid


D12067: [Okular Part] Add "Print" action

2018-04-26 Thread David Faure
dfaure added a comment.


  The idea was that the shell provides the print action, and the part gets 
triggered via a BrowserExtension slot (just like cut/copy/paste).

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D12067

To: broulik, #okular, aacid
Cc: dfaure, ngraham, aacid


D12067: [Okular Part] Add "Print" action

2018-04-25 Thread Albert Astals Cid
aacid added a subscriber: dfaure.
aacid added a comment.


  @dfaure David, what is correct, should the part or the shell provide the 
print action?

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D12067

To: broulik, #okular, aacid
Cc: dfaure, ngraham, aacid


D12067: [Okular Part] Add "Print" action

2018-04-25 Thread Kai Uwe Broulik
broulik added a comment.


  So, the situation is: the "Print" action comes from Konqueror. Kate part, for 
instance, adds its own "Print" action, so you get two but only one in Ark. So I 
don't know how this could be fixed in both cases. Either you end up with 
duplicate actions in Konqueror or none in Ark (or duplicate in Ark if we add 
one there).

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D12067

To: broulik, #okular, aacid
Cc: ngraham, aacid


D12067: [Okular Part] Add "Print" action

2018-04-12 Thread Albert Astals Cid
aacid added a comment.


  As discussed on IRC with Kai it seems more a bug in Ark since Konqueror seems 
to have it correctly work

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D12067

To: broulik, #okular, aacid
Cc: ngraham, michaelweghorn, aacid


D12067: [Okular Part] Add "Print" action

2018-04-12 Thread Kai Uwe Broulik
broulik added a comment.


  Oh, I see. So Okular's Print action must go then. There is currently no way 
to print a PDF file from within Ark.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D12067

To: broulik, #okular, aacid
Cc: ngraham, michaelweghorn, aacid


D12067: [Okular Part] Add "Print" action

2018-04-12 Thread Kai Uwe Broulik
broulik planned changes to this revision.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D12067

To: broulik, #okular, aacid
Cc: ngraham, michaelweghorn, aacid


D12067: [Okular Part] Add "Print" action

2018-04-11 Thread Nathaniel Graham
ngraham added a comment.


  In D12067#243884 , @aacid wrote:
  
  > Doesn't this mean that when you open okular you end up with two print 
actions?
  
  
  Yep:
  
  F5804952: Two Prints.png 

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D12067

To: broulik, #okular, aacid
Cc: ngraham, michaelweghorn, aacid


D12067: [Okular Part] Add "Print" action

2018-04-10 Thread Albert Astals Cid
aacid added a comment.


  Doesn't this mean that when you open okular you end up with two print actions?

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D12067

To: broulik, #okular, aacid
Cc: michaelweghorn, ngraham, aacid


D12067: [Okular Part] Add "Print" action

2018-04-09 Thread Kai Uwe Broulik
broulik created this revision.
broulik added reviewers: Okular, aacid.
Restricted Application added a project: Okular.
broulik requested review of this revision.

REVISION SUMMARY
  There's "Print Preview" but not "Print"

TEST PLAN
  Successfully printed a PDF I viewed in Ark's previewer

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D12067

AFFECTED FILES
  part.cpp
  part.h

To: broulik, #okular, aacid
Cc: michaelweghorn, ngraham, aacid