D13450: Add arrow keys to move and resize selection rectangle

2018-07-19 Thread Henrik Fehlauer
rkflx added a comment.


  It seems you forgot to merge stable into master, which I now have done with
  
git checkout master
git pull
git merge -Xours origin/Applications/18.08
git push
  
  Thanks again for the quick update so we could get the string changes in in 
time, and hopefully for the RC in two weeks you'll be able to solve the 
remaining problems with `checkBounds`.

REPOSITORY
  R166 Spectacle

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

To: sharvey, rkflx, ngraham, #spectacle, yurchor
Cc: ltoscano, kde-doc-english, abalaji, #spectacle, skadinna


D13450: Add arrow keys to move and resize selection rectangle

2018-07-19 Thread Henrik Fehlauer
rkflx accepted this revision.
rkflx added a comment.
This revision is now accepted and ready to land.


  Thanks, looking much better now.
  
  Please make sure to commit to the stable branch, i.e. `Applications/18.08` 
(let me know if you are unsure what that means).

REPOSITORY
  R166 Spectacle

BRANCH
  arcpatch-D13450

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

To: sharvey, rkflx, ngraham, #spectacle, yurchor
Cc: ltoscano, kde-doc-english, abalaji, #spectacle, skadinna


D13450: Add arrow keys to move and resize selection rectangle

2018-07-18 Thread Henrik Fehlauer
rkflx added a comment.


  In D13450#294541 , @sharvey wrote:
  
  > In D13450#294538 , @rkflx wrote:
  >
  > > - Revert unnecessary layout changes.
  >
  >
  > Please clarify... layout for the help text? I don’t want to waste time.
  
  
  I was referring to the following inline comment: D13450#inline-74855 
, e.g. the addition of 
`RowLayout` etc., which should not be necessary if I understand things 
correctly.

REPOSITORY
  R166 Spectacle

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

To: sharvey, rkflx, ngraham, #spectacle, yurchor
Cc: ltoscano, kde-doc-english, abalaji, #spectacle, skadinna


D13450: Add arrow keys to move and resize selection rectangle

2018-07-18 Thread Henrik Fehlauer
rkflx added a comment.


  Tagging is on Thursday at 23:59 UTC. I will accept the patch tomorrow so you 
can still land it in time (let me know if you are busy and I should commit on 
your behalf).
  
  It would be great if you could still implement three changes until then:
  
  - Move one line in the help text around (see inline comment).
  - Fix [Alt] + [↓].
  - Revert unnecessary layout changes.
  
  The rest can be improved upon later.

REPOSITORY
  R166 Spectacle

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

To: sharvey, rkflx, ngraham, #spectacle, yurchor
Cc: ltoscano, kde-doc-english, abalaji, #spectacle, skadinna


D13450: Add arrow keys to move and resize selection rectangle

2018-07-18 Thread Henrik Fehlauer
rkflx added a comment.


  Thanks for the updates. Found one more problem, the other changes are fine.
  
  In D13450#294047 , @rkflx wrote:
  
  > - When the rectangle covers the whole screen, I'm unable to resize, i.e. 
make the rectangle smaller again.
  
  
  Note that this problem is more general: Once an edge of the selection touches 
the border of the screen, decreasing the size in that direction is blocked, 
only increasing the size works.
  
  In D13450#294068 , @sharvey wrote:
  
  > In D13450#294047 , @rkflx wrote:
  >
  > > - Selecting with the mouse sets a minimum size, however resizing with the 
arrow keys allows to resize to 0x0px.
  >
  >
  > Where should it stop? 1x1?
  
  
  It should be consistent with how it works for selecting with the mouse (grep 
for `minRectSize`).
  
  In D13450#294279 , @sharvey wrote:
  
  > - Change default adjustment to `largeChange`, [⇧] uses `smallChange` for 
fine tuning
  
  
  Thanks, appreciated!
  
  In D13450#294291 , @ngraham wrote:
  
  > I'm noticing that the magnifier doesn't er show up while you're using the 
keyboard to resize the selection rect. Might wanna hook that up.
  
  
  Yeah, I also had that idea a couple of weeks back, but decided to not bring 
it up in the review, because for conceptual reasons I doubt that's so easy to 
implement like you make it sound: The magnifier shows up at the cursor 
position, which for the mouse case is either at one of the corners, or at an 
arbitrary position along one of the edges. Since with the arrow keys you can 
only control horizontal/vertical movement of the edges (this is true both for 
resizing and moving), there is no well-defined corner, i.e. it does not make 
any sense to show a square magnifier at a random position on the edge. You'd 
have to show a magnifier covering the complete width/height of the respective 
edge, because you cannot know where the user is looking at and which part of 
the screenshot he wants to align the selection to (it might not be the corner).
  
  One way forward could be to not only show the magnifier when resizing (i.e. 
clicking on a handle) as it is implemented currently, but in addition show the 
magnifier directly attached to the cursor as soon as Shift is hold down, e.g. 
more like KWin's magnifying glass. However, this has a couple of drawbacks: In 
case you checked the checkbox to show the magnifier by default, Shift will 
confusingly trigger hiding the magnifier for clicking, but trigger showing when 
not clicking (because without any click or modifier the magnifier should never 
be shown at all). Next, for resizing by keyboard you'd have to first 
move/resize the selection rectangle, and then reach for the mouse to position 
the magnifier where you want it, and iterate as needed. That's pretty awkward, 
if you ask me.
  
  @ngraham Feel free to send a follow-up patch if you can get it working in a 
non-confusing way and have a convincing answer to the question where to show 
the magnifier (or rather what to magnify).
  
  ---
  
  In D13450#294305 , @sharvey wrote:
  
  > You suggested multiple changes to the `checkBounds` function, all of which 
I understand and agree with. This function caused me the most heartburn and I 
feel uncomfortable attempting to rework it while under a time crunch. 
Unfortunately, this leaves the `0x0px` resize and the "cannot resize when 
expanded to full screen` bugs unresolved.
  
  
  Indeed, those are not critical and can be worked on for the RC (although 
that's a huge responsibility, as normally you are not supposed to ship broken 
stuff where the fix is only promised for the future…).
  
  > (Again, thank you for the code optimization suggestions. They are 
appreciated.)
  
  Glad you find them useful. It's not always easy to find the correct 
abstractions to get concise, readable and maintainable code, but practice makes 
perfect ;)

INLINE COMMENTS

> EditorRoot.qml:169
> + case Qt.Key_Down:
> + change = checkBounds(0.0, smallChange, "down");
> + selection.height = selection.height + change;

[Alt] + [↓] is broken (should be fast, not slow)

> rkflx wrote in EditorRoot.qml:92
> Insert space after `switch`, please. Repeat for all other occurrences.

Not done, but maybe I should have given you an example. This is how I meant it:

  switch (event.modifiers) {

IOW, this should be consistent with how the spacing works for `if`.

> rkflx wrote in EditorRoot.qml:173
> Insert space after `case`.

Not yet done.

> rkflx wrote in EditorRoot.qml:443-507
> Currently I don't understand what all those changes are for and how they 
> relate to the topic of the patch (and I would disagree with some).
> 
> Contrary to @ngraham I'd

D13450: Add arrow keys to move and resize selection rectangle

2018-07-17 Thread Henrik Fehlauer
rkflx requested changes to this revision.
rkflx added a comment.
This revision now requires changes to proceed.


  @sharvey Thanks for the updates. As always, first I'd like to iterate to get 
the patch working properly, and then I'll look at the code in detail. As I'm 
now put under pressure again to squeeze the patch into 18.08, we'll see how it 
goes (in general rushing leads to bugs, see last Plasma release…). First of all:
  
  I still disagree regarding the default speed selection. We determined by 
looking at other apps that [⇧] is the modifier to use, and I argued (in line 
with what I meant when triaging the bug) that for making the rectangle feature 
useful for keyboard users by default the movement should be fast. BTW, this is 
also what KWin is doing, and I see no reason at all why Spectacle should 
deviate from that standard. (See above for even more arguments.) I don't feel 
comfortable approving the current default, sorry.
  
  Apart from that, the patch now works well for the most part, good job (and 
thanks to @abalaji for commenting on some things). In addition to some inline 
comments below, I found those issues:
  
  - When the rectangle covers the whole screen, I'm unable to resize, i.e. make 
the rectangle smaller again.
  - I'm unable to fine-tune both size and position with HiDPI scaling active 
(see also inline comment for the likely cause).
  - Selecting with the mouse sets a minimum size, however resizing with the 
arrow keys allows to resize to 0x0px.
  
  ---
  
  To summarize, here's what I propose: If we can reach agreement on the default 
and you are fast with the string changes still required, the patch can go in 
for the Beta. Then you have time to work on the other points until the RC (at 
which point we have to decide whether to ship or to revert again, based on your 
progress).
  
  ---
  
  In D13450#283620 , @abalaji wrote:
  
  > A few thing tho @sharvey, it looks like currently the resize functionality 
only moves the bottom right corner, and I've preserved that. But was wondering 
if we can add in Ctrl or something to control that. Maybe something like:
  >
  > When Alt is pressed down:
  >
  > - We are in "expand" mode by default. Pressing left expands selection on 
the left by moving the left border outwards to the left, etc.
  > - Also holding Ctrl enables a "shrink" mode. Now pressing left shrinks the 
selection from the right by moving the right border inwards, as if we are 
nudging it from the right towards the left, etc.
  
  
  I think that's too complicated, and you still need two steps to get to the 
final selection (just like setting one corner by moving and the other corner by 
resizing are two steps too).

INLINE COMMENTS

> index.docbook:154
> +
> +You can use the arrow keys to move and adjust 
> the rectangle. Pressing the arrow keys will slowly move the rectangle. 
> Holding the Shift while using the arrow keys will move the 
> rectangle more quickly. Holding the Alt key while using the 
> arrows will adjust the size of the rectangle. 
> +

"Holding the Shift while": Either remove "the", or add "key".

"using the arrows": Change to "Using the arrow keys"?

> EditorRoot.qml:41
>  property int magOffset: 32;
> +property int largeChange: 15 / Screen.devicePixelRatio;
> +property int smallChange: 1 / Screen.devicePixelRatio

That does not seem right, because this will result in slower movement on a 
HiDPI screen compared to a regular screen of the same size. (It's needed for 
the 1px case, of course.)

> EditorRoot.qml:42
> +property int largeChange: 15 / Screen.devicePixelRatio;
> +property int smallChange: 1 / Screen.devicePixelRatio
>  

That looks suspicious: How will you be able to store the result accurately in 
an `int`?

> EditorRoot.qml:54-57
> + "x":   xx,
> + "y":   yy,
> + "height":  hh,
> + "width":   ww

Unrelated whitespace change, please revert.

> EditorRoot.qml:84
> +
> +var delta;  // valid for either direction
> +

Without the context of the patch in mind, this is a bit hard to understand what 
it is about when you stumble upon this while reading the code.  Could you come 
up with a better name and/or comment?

> EditorRoot.qml:92
> +// nested switches for arrow keys based on modifier keys
> +switch(event.modifiers) {
> +

Insert space after `switch`, please. Repeat for all other occurrences.

> EditorRoot.qml:98
> +delta = checkBounds(-smallChange, 0, "left");
> +selection.x = selection.x + delta;
> +break;

Do you know about the `+=` operator, which would be more concise?

> EditorRoot.qml:116-137
> +case Qt.ShiftModifier:
> +switch(event.key) {
> +case Qt.Key_Left:
> + delta = checkBou

[gwenview/Applications/18.08] /: Add mouse shortcut for Fill and adapt docbook

2018-07-16 Thread Henrik Fehlauer
Git commit 11ed44cdf988db2a055265afc76f6b7c8be64fb6 by Henrik Fehlauer.
Committed on 16/07/2018 at 22:11.
Pushed by rkflx into branch 'Applications/18.08'.

Add mouse shortcut for Fill and adapt docbook

Summary:
D14093 will add back middle-clicking to toggle between {nav Fit} (with
{key F} as its keyboard shortcut) and {nav 100%} zoom. In addition,
D14094 sets {key Shift F} as a shortcut for {nav Fill}.

Going along with this, here we add {key Shift}-middle-clicking for
{nav Fill}. The code is moved to `DocumentView` in order not to
duplicate the handling of the toggling behaviour.

We also adapt the docbook accordingly, as some users still seem to read
the manual.

CCBUG: 396360

Depends on D14093

Test Plan:
Middle-click multiple times on an image in {nav View} mode and observe
{nav Fit} is toggled. Repeat while holding down {key Shift} for
{nav Fill}.
Proof-read docbook ("View mode" and "Tips" sections).

Reviewers: #gwenview, muhlenpfordt

Reviewed By: #gwenview, muhlenpfordt

Subscribers: muhlenpfordt, kde-doc-english

Tags: #documentation

Differential Revision: https://phabricator.kde.org/D14103

M  +3-4doc/index.docbook
M  +0-8lib/documentview/abstractimageview.cpp
M  +13   -0lib/documentview/documentview.cpp
M  +1-0lib/documentview/documentview.h

https://commits.kde.org/gwenview/11ed44cdf988db2a055265afc76f6b7c8be64fb6

diff --git a/doc/index.docbook b/doc/index.docbook
index 9bc0fea7..367f25eb 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -36,7 +36,7 @@
 
 &FDLNotice;
 
-2018-04-09
+2018-07-13
 Applications 18.08
 
 &gwenview; is an image and video viewer.
@@ -263,7 +263,7 @@ buttons are next to the zoom slider and are three preset 
zoom levels. The
 Fit button zooms the current image to fit the size
 of the window, the Fill button zooms the image to fill 
the window 
 by fitting width or height and the 100% button zooms 
the image to
-the actual pixel size. The shortcut F switches to fit 
mode.
+the actual pixel size. The shortcut F toggles between 
Fit mode and 100%, pressing 
&Shift;F will toggle 
Fill respectively.
 
 When an image is in zoom-to-fit mode, you can go to the previous and next
 image with the arrow keys. When you zoom in, arrow keys are used to scroll the 
image.
@@ -532,8 +532,7 @@ enter it into the text box or type one manually.
 
 Zooming with the mouse
 
-  Clicking the middle mouse button will toggle the auto zoom
-  on/off.
+  Clicking the middle mouse button will toggle the 
Fit zoom button. Hold down the &Shift; key and 
middle-click to toggle the Fill zoom 
button.
   Hold down the &Ctrl; key, then either use the mouse wheel to
   zoom in and out or left click to zoom in and right click to zoom
   out.
diff --git a/lib/documentview/abstractimageview.cpp 
b/lib/documentview/abstractimageview.cpp
index 8119e4cc..65e45218 100644
--- a/lib/documentview/abstractimageview.cpp
+++ b/lib/documentview/abstractimageview.cpp
@@ -368,14 +368,6 @@ qreal AbstractImageView::computeZoomToFill() const
 void AbstractImageView::mousePressEvent(QGraphicsSceneMouseEvent* event)
 {
 QGraphicsItem::mousePressEvent(event);
-if (event->button() == Qt::MiddleButton) {
-bool value = !zoomToFit();
-setZoomToFit(value);
-if (!value) {
-setZoom(1., event->pos());
-}
-return;
-}
 
 d->checkAndRequestZoomAction(event);
 
diff --git a/lib/documentview/documentview.cpp 
b/lib/documentview/documentview.cpp
index ffea98d2..2942282c 100644
--- a/lib/documentview/documentview.cpp
+++ b/lib/documentview/documentview.cpp
@@ -708,6 +708,19 @@ void DocumentView::resizeEvent(QGraphicsSceneResizeEvent 
*event)
 QGraphicsWidget::resizeEvent(event);
 }
 
+void DocumentView::mousePressEvent(QGraphicsSceneMouseEvent* event)
+{
+QGraphicsWidget::mousePressEvent(event);
+
+if (d->mAdapter->canZoom() && event->button() == Qt::MiddleButton) {
+if (event->modifiers() == Qt::NoModifier) {
+toggleZoomToFit();
+} else if (event->modifiers() == Qt::SHIFT) {
+toggleZoomToFill();
+}
+}
+}
+
 void DocumentView::wheelEvent(QGraphicsSceneWheelEvent* event)
 {
 if (d->mAdapter->canZoom() && event->modifiers() & Qt::ControlModifier) {
diff --git a/lib/documentview/documentview.h b/lib/documentview/documentview.h
index 8e1a2b07..d044bbe7 100644
--- a/lib/documentview/documentview.h
+++ b/lib/documentview/documentview.h
@@ -204,6 +204,7 @@ protected:
 void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, 
QWidget* widget = nullptr) Q_DECL_OVERRIDE;
 
 void resizeEvent(QGraphicsSceneResizeEvent* event) Q_DECL_OVERRIDE;
+void mousePressEvent(QGraphicsSceneMouseEvent* event) Q_DECL_OVERRIDE;
 void wheelEvent(QGraphicsSceneWheelEvent* event) Q_DECL_OVERRIDE;
 void contextMenuEvent(QGraphicsSceneContextMenuEvent* event) 
Q_DECL_OVERRIDE;
 bool sceneEventFilter(QGraphicsItem*, QEvent*) Q_DECL_OVERRIDE;


D14103: Add mouse shortcut for Fill and adapt docbook

2018-07-16 Thread Henrik Fehlauer
This revision was automatically updated to reflect the committed changes.
Closed by commit R260:11ed44cdf988: Add mouse shortcut for Fill and adapt 
docbook (authored by rkflx).

CHANGED PRIOR TO COMMIT
  https://phabricator.kde.org/D14103?vs=37772&id=37914#toc

REPOSITORY
  R260 Gwenview

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D14103?vs=37772&id=37914

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

AFFECTED FILES
  doc/index.docbook
  lib/documentview/abstractimageview.cpp
  lib/documentview/documentview.cpp
  lib/documentview/documentview.h

To: rkflx, #gwenview, muhlenpfordt
Cc: muhlenpfordt, kde-doc-english, skadinna


D14103: Add mouse shortcut for Fill and adapt docbook

2018-07-15 Thread Henrik Fehlauer
rkflx added a comment.


  In D14103#292346 , @muhlenpfordt 
wrote:
  
  > Sadly the centering to mouse position when zooming to 100% gets lost with 
our combination.
  
  
  Interesting. Is this really working for you without the patches? For me, even 
middle-clicking with a KDE4-based Gwenview centers instead of respecting the 
mouse position.
  
  > Should I add this to `DocumentView::toggleZoomTo...()`? It will work for 
both shortcut (maybe surprising for users?) and click.
  >  Or add an argument to pass the mouse position only for click events?
  
  I think it would be great to get this working for both clicking and the 
keyboard shortcuts, see my comment in D14093#291581 
. (I'm not sure how well this will 
work for the shortcut case when the cursor is outside the viewport. If it is 
confusing maybe in that case there could be a fallback to the center, but let's 
try without it first.)

REPOSITORY
  R260 Gwenview

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

To: rkflx, #gwenview
Cc: muhlenpfordt, kde-doc-english, skadinna


D14103: Add mouse shortcut for Fill and adapt docbook

2018-07-14 Thread Henrik Fehlauer
rkflx updated this revision to Diff 37772.
rkflx added a comment.


  Rebase

REPOSITORY
  R260 Gwenview

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D14103?vs=37715&id=37772

BRANCH
  middle-click-zooming

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

AFFECTED FILES
  doc/index.docbook
  lib/documentview/abstractimageview.cpp
  lib/documentview/documentview.cpp
  lib/documentview/documentview.h

To: rkflx, #gwenview
Cc: kde-doc-english, skadinna


D14103: Add mouse shortcut for Fill and adapt docbook

2018-07-13 Thread Henrik Fehlauer
rkflx added inline comments.

INLINE COMMENTS

> documentview.cpp:691
> +if (event->modifiers() == Qt::NoModifier) {
> +setZoomToFit(true);
> +} else if (event->modifiers() == Qt::SHIFT) {

I'd rather be able to write something like `setZoomMode(ZoomMode::Custom, 
zoomLevel)` or `setZoomMode(ZoomMode::Fit)` here…

REPOSITORY
  R260 Gwenview

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

To: rkflx, #gwenview
Cc: kde-doc-english, skadinna


D14103: Add mouse shortcut for Fill and adapt docbook

2018-07-13 Thread Henrik Fehlauer
rkflx created this revision.
rkflx added a reviewer: Gwenview.
Restricted Application added a project: Documentation.
Restricted Application added a subscriber: kde-doc-english.
rkflx requested review of this revision.

REVISION SUMMARY
  D14093  will add back middle-clicking to 
toggle between Fit (with
  [F] as its keyboard shortcut) and 100% zoom. In addition,
  D14094  sets [⇧] + [F] as a shortcut for 
Fill.
  
  Going along with this, here we add [⇧]-middle-clicking for
  Fill. The code is moved to `DocumentView` in order not to
  duplicate the handling of the toggling behaviour.
  
  We also adapt the docbook accordingly, as some users still seem to read
  the manual.
  
  CCBUG: 396360
  
  Depends on D14093 

TEST PLAN
  Middle-click multiple times on an image in View mode and observe
  Fit is toggled. Repeat while holding down [⇧] for
  Fill.
  Proof-read docbook ("View mode" and "Tips" sections).

REPOSITORY
  R260 Gwenview

BRANCH
  middle-click-zooming

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

AFFECTED FILES
  doc/index.docbook
  lib/documentview/abstractimageview.cpp
  lib/documentview/documentview.cpp
  lib/documentview/documentview.h

To: rkflx, #gwenview
Cc: kde-doc-english, skadinna


D13860: Fix typos in docbook

2018-07-03 Thread Henrik Fehlauer
This revision was automatically updated to reflect the committed changes.
Closed by commit R166:025030fb9bdd: Fix typos in docbook (authored by rkflx).

REPOSITORY
  R166 Spectacle

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D13860?vs=37085&id=37122

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

AFFECTED FILES
  doc/index.docbook

To: rkflx, #spectacle, yurchor
Cc: kde-doc-english, skadinna


[spectacle] doc: Fix typos in docbook

2018-07-03 Thread Henrik Fehlauer
Git commit 025030fb9bdd619c130c841b5755ee7d5c717047 by Henrik Fehlauer.
Committed on 03/07/2018 at 18:19.
Pushed by rkflx into branch 'master'.

Fix typos in docbook

Summary:
c6a767100086 and 2b1c8bec0fd1 forgot to add markup to make
mentions of "Spectacle" entities. By changing to `&spectacle;`, the
proper uppercase spelling is used in every case, too, which was not the
case before.

Test Plan:
Start Spectacle, press {key F1}, check consistent spelling of
"Spectacle".

Reviewers: #spectacle, yurchor

Reviewed By: yurchor

Subscribers: kde-doc-english

Tags: #documentation

Differential Revision: https://phabricator.kde.org/D13860

M  +4-4doc/index.docbook

https://commits.kde.org/spectacle/025030fb9bdd619c130c841b5755ee7d5c717047

diff --git a/doc/index.docbook b/doc/index.docbook
index adbc003..4fcfb40 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -118,7 +118,7 @@
 
 Taking A Screenshot
 
-When you open spectacle, it immediately takes a screenshot 
of the whole screen as a convenience and shows a preview of it in the main 
window. You can save this screenshot using the buttons on the bottom of the 
window, or take a new one using the controls to the right of the preview.
+When you open &spectacle;, it immediately takes a screenshot 
of the whole screen as a convenience and shows a preview of it in the main 
window. You can save this screenshot using the buttons on the bottom of the 
window, or take a new one using the controls to the right of the preview.
 
 To discard the current screenshot and take another 
screenshot, press the Take a New Screenshot (&Ctrl;N) button.
 
@@ -161,7 +161,7 @@
 
 Options
 
-The Options settings allow you to select whether the 
mouse cursor should be included in the screenshots, and whether to capture 
window decorations along with the image of a single application window. In 
Window Under Cursor mode, it also allows you to select if 
&spectacle; shall only capture the image of the current popup menu under the 
cursor, or also include the parent window. Finally, Quit after Save 
or Copy will quit Spectacle after any save or copy operations.
+The Options settings allow you to select whether the 
mouse cursor should be included in the screenshots, and whether to capture 
window decorations along with the image of a single application window. In 
Window Under Cursor mode, it also allows you to select if 
&spectacle; shall only capture the image of the current popup menu under the 
cursor, or also include the parent window. Finally, Quit after Save 
or Copy will quit &spectacle; after any save or copy 
operations.
 
 
 
@@ -174,7 +174,7 @@
 The Capture the current pop-up 
only option is only enabled when the Window Under 
Cursor mode is selected in the Area combo-box. 
Checking this option captures only the popup menu under the cursor, without its 
parent window.
 
 
-The Quit after Save or Copy 
option will quit Spectacle after any saving or copying operations. Note that a 
copied screenshot will only be retained if you are running a clipboard manager 
that accepts images. KDE Klipper can be configured in this manner by 
right-clicking on its icon, selecting Configure 
Clipboard..., and unchecking Ignore 
images.
+The Quit after Save or Copy 
option will quit &spectacle; after any saving or copying operations. Note that 
a copied screenshot will only be retained if you are running a clipboard 
manager that accepts images. KDE Klipper can be configured in this manner by 
right-clicking on its icon, selecting Configure 
Clipboard..., and unchecking Ignore 
images.
 
 
 
@@ -199,7 +199,7 @@
 
 Configure...
 
-Gives you access to Spectacle's Configure window 
where you can change the capture settings and default save location and 
filename.
+Gives you access to &spectacle;'s Configure 
window where you can change the capture settings and default save location and 
filename.
 
 
 


D13860: Fix typos in docbook

2018-07-02 Thread Henrik Fehlauer
rkflx created this revision.
rkflx added a reviewer: Spectacle.
Restricted Application added a project: Documentation.
Restricted Application added a subscriber: kde-doc-english.
rkflx requested review of this revision.

REVISION SUMMARY
  c6a767100086 
 and 
2b1c8bec0fd1 
 
forgot to add markup to make
  mentions of "Spectacle" entities. By changing to `&spectacle;`, the
  proper uppercase spelling is used in every case, too, which was not the
  case before.

TEST PLAN
  Start Spectacle, press [F1], check consistent spelling of
  "Spectacle".

REPOSITORY
  R166 Spectacle

BRANCH
  master

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

AFFECTED FILES
  doc/index.docbook

To: rkflx, #spectacle
Cc: kde-doc-english, skadinna


D13493: Auto-copy shared image link to clipboard

2018-06-19 Thread Henrik Fehlauer
rkflx accepted this revision.
rkflx added a comment.
This revision is now accepted and ready to land.


  LGTM, just a comment to keep the commit history spotless ;)

INLINE COMMENTS

> KSMainWindow.cpp:268
>  hide();
> +mMessageWidget->hide();
>  emit newScreenshotRequest(mode, timeout, includePointer, 
> includeDecorations);

That's a nice and simple solution!

Would it make sense to split that out in a separate commit (no need for a 
Diff), and reference e9218fddfabd 
 in 
the commit message? That's where `MessageDuration::Persistent` was introduced, 
which is not really specific to shared image links.

REPOSITORY
  R166 Spectacle

BRANCH
  auto-copy-link-to-clipboard (branched from master)

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

To: ngraham, #spectacle, #kde_applications, rkflx
Cc: kde-doc-english, rkflx, skadinna


D12062: Slightly update the docs, add configuration section

2018-04-13 Thread Henrik Fehlauer
rkflx added a comment.


  @yurchor I guess you can land this now.

REPOSITORY
  R260 Gwenview

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

To: yurchor, #gwenview, #documentation, rkflx
Cc: rkflx, ngraham, kde-doc-english


D12062: Slightly update the docs, add configuration section

2018-04-10 Thread Henrik Fehlauer
rkflx accepted this revision.
rkflx added a comment.
This revision is now accepted and ready to land.


  Thanks again. LGTM now, but there really is no need to rush, so perhaps wait 
a day or two with committing in case other people have more ideas for 
improvements.

REPOSITORY
  R260 Gwenview

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

To: yurchor, #gwenview, #documentation, rkflx
Cc: rkflx, ngraham, kde-doc-english


D12062: Slightly update the docs, add configuration section

2018-04-09 Thread Henrik Fehlauer
rkflx added a comment.


  Thanks for the updates! One more thing I noticed: Currently "Configuring 
Gwenview" is under "4. Tips" in the table of contents. Not sure whether there's 
any standard to follow, but perhaps this would make more sense now as a 
top-level section, i.e. "5. Configuring Gwenview"? (Before your patch, not 
having only "Advanced Configuration Options" as a top-level section was 
reasonable, of course…)
  
  ---
  
  BTW, the screenshots don't show up as part of the patch on Phabrictor (most 
likely because you used the web uploader instead of Arcanist), but I assume on 
you local branch everything will be fine.

REPOSITORY
  R260 Gwenview

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

To: yurchor, #gwenview, #documentation, rkflx
Cc: rkflx, ngraham, kde-doc-english


D12062: Slightly update the docs, add configuration section

2018-04-09 Thread Henrik Fehlauer
rkflx added subscribers: ngraham, rkflx.
rkflx requested changes to this revision.
rkflx added a comment.
This revision now requires changes to proceed.


  @yurchor Nice, you even used the new terminology which landed only today…
  
  Also, thanks for re-adding the importer section, I've been meaning to tackle 
this basically since the importer was added back. Never got around to it, 
because ideally such a change would also need to replace the KDE4-era 
screenshots with something more recent…
  
  There are a couple of changes I'd like you to make. Nothing serious, just 
some points to describe more accurately how Gwenview works.
  
  @ngraham Any additional tips on the wording in the new section?

INLINE COMMENTS

> index.docbook:221
> +
> +Share: Clicking this button opens an export menu to share 
> your images through social
> +media and image collection web services. This functionality depends on the 
> list of installed

Shouldn't this (and `Rotate Left/Right`) get the same `` treatment as 
the items in the lines above?

> index.docbook:716
> +
> +Check the Show videos to 
> allow &gwenview; to show videos among the images items.
> +

Either remove the first `the`, or add `checkbox` after ``.

> index.docbook:716
> +
> +Check the Show videos to 
> allow &gwenview; to show videos among the images items.
> +

images items → images

> index.docbook:722
> +
> +Use slider to change the grayscale color from 
> black (the leftmost position) to white (the rightmost position).
> +

Use → Move the

grayscale color → color of the gray background in Browse and View mode

> index.docbook:731
> +
> +All buttons - show 
> all buttons
> +

Instead of "-", would it make sense to use something more typographically 
correct like "—", or is there some entity for that?

Also, I'd use a capital letter at the start of the phrase.

(Applies to all places where this was added.)

> index.docbook:737
> +
> +None - do not show 
> thumbnail button
> +

Add `any` after `show`.

> index.docbook:750
> +
> +Choose the transparency in the view mode.
> +

"Choose how the background of transparent raster or SVG images is rendered."

> index.docbook:759
> +
> +Solid color 
> background - use the solid color that can be chosen using the 
> color selector.
> +

the solid color → a color

> index.docbook:767
> +
> +Choose the mouse behavior in &gwenview;.
> +

"Select how scrolling over an image in View mode behaves."

> index.docbook:770
> +
> +Scroll - mouse wheel 
> scrolls through the list of images in the View mode.
> +

That's not what this option is about. Better:

"When zoomed in, pan the image vertically. Otherwise, nothing will happen."

> index.docbook:773
> +
> +Browse - mouse wheel 
> can be used to switch to the next/previous image in the View mode.
> +

"Switch to the next or the previous image."

> index.docbook:781
> +
> +Allows choosing the zoom mode.
> +

"Allows choosing how zooming in View mode works."

> index.docbook:787
> +
> +Keep same zoom and 
> position - use the same zoom for all images.
> +

zoom → zoom level

> index.docbook:790
> +
> +Per image zoom and 
> position - use separate options for each image.
> +

"Use individual zoom levels for each image."

> index.docbook:793
> +
> +Enlarge smaller 
> images - check this item to make &gwenview; enlarge smaller images 
> in the View mode.
> +

the View mode → View mode

> index.docbook:801
> +
> +Allows choosing the animation handler for the View 
> mode.
> +

"Allows choosing how fading between images is done in View mode."

> index.docbook:804
> +
> +OpenGL - use hardware 
> animation acceleration.
> +

"Use hardware accelerated animations."

> index.docbook:807
> +
> +Software - use 
> software animation acceleration.
> +

"Do not use hardware accelerated animations. Select this option if 
OpenGL does not work satisfactory, but you still wa

[gwenview/Applications/18.04] /: Align slideshow terminology to MPRIS behaviour

2018-03-21 Thread Henrik Fehlauer
Git commit beef8f3b0f6f23f1b8f48f954063b5ac232de221 by Henrik Fehlauer.
Committed on 21/03/2018 at 09:27.
Pushed by rkflx into branch 'Applications/18.04'.

Align slideshow terminology to MPRIS behaviour

Summary:
9631043c110d introduced MPRIS support to Gwenview. Common MPRIS
controllers often only provide "Pause" in the main interface, with
"Stop" being non-existent or hidden. Therefore "holding" the slideshow
was mapped to "Pause". "Play" either "Resumes" automatically advancing
to the next image, or in non-fullscreen mode switches to fullscreen and
starts playback. Conversely, "Stop" ends playback and exits from
fullscreen.

To keep consistency, we change the tooltip text of the fullscreen button
controlling the playback to "Pause". In addition, the internal `enum` is
adapted accordingly to avoid confusing developers.

Note that the icon on the button still shows a "Pause" symbol as before
the patch.

Ref T8222

Test Plan:
Start Gwenview normally, with `-f` and with `-s`, and observe the
tooltip of the playback button in the top fullscreen toolbar as well as
the button text in non-fullscreen mode (use {nav Configure Toolbars} to
add it) make sense in every situation.

Reviewers: #gwenview, kossebau, muhlenpfordt

Reviewed By: #gwenview, muhlenpfordt

Subscribers: ltoscano, muhlenpfordt, huoni, kde-doc-english

Maniphest Tasks: T8222

Differential Revision: https://phabricator.kde.org/D11495

M  +5-4app/mainwindow.cpp
M  +1-1doc/index.docbook
M  +1-1lib/mpris2/mprismediaplayer2player.cpp
M  +8-8lib/slideshow.cpp
M  +2-2lib/slideshow.h

https://commits.kde.org/gwenview/beef8f3b0f6f23f1b8f48f954063b5ac232de221

diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp
index 61660ea0..c8646465 100644
--- a/app/mainwindow.cpp
+++ b/app/mainwindow.cpp
@@ -1324,7 +1324,7 @@ void MainWindow::toggleFullScreen(bool checked)
 qApp->setProperty("KDE_COLOR_SCHEME_PATH", QVariant());
 QApplication::setPalette(d->mGvCore->palette(GvCore::NormalPalette));
 
-d->mSlideShow->stop();
+d->mSlideShow->pause();
 KToggleFullScreenAction::setFullScreen(this, false);
 menuBar()->setVisible(d->mShowMenuBarAction->isChecked());
 toolBar()->setVisible(d->mStateBeforeFullScreen.mToolBarVisible);
@@ -1402,7 +1402,7 @@ void MainWindow::showDocumentInFullScreen(const QUrl &url)
 void MainWindow::toggleSlideShow()
 {
 if (d->mSlideShow->isRunning()) {
-d->mSlideShow->stop();
+d->mSlideShow->pause();
 } else {
 if (!d->mViewAction->isChecked()) {
 d->mViewAction->trigger();
@@ -1433,10 +1433,11 @@ void MainWindow::toggleSlideShow()
 void MainWindow::updateSlideShowAction()
 {
 if (d->mSlideShow->isRunning()) {
-d->mToggleSlideShowAction->setText(i18n("Stop Slideshow"));
+d->mToggleSlideShowAction->setText(i18n("Pause Slideshow"));
 
d->mToggleSlideShowAction->setIcon(QIcon::fromTheme("media-playback-pause"));
 } else {
-d->mToggleSlideShowAction->setText(i18n("Start Slideshow"));
+d->mToggleSlideShowAction->setText(d->mFullScreenAction->isChecked() ? 
i18n("Resume Slideshow")
+ : 
i18n("Start Slideshow"));
 
d->mToggleSlideShowAction->setIcon(QIcon::fromTheme("media-playback-start"));
 }
 }
diff --git a/doc/index.docbook b/doc/index.docbook
index 7b54f939..95730450 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -376,7 +376,7 @@ mouse to the top of the screen. If the mouse cursor is over 
the top bar, it
 will not autohide. Most of the buttons on the bar are the same as the ones on
 the toolbar in Browse or View Modes, except for the Exit Full
 Screen Mode button which returns you to the &gwenview; window, the
-Start/Stop Slideshow button, and the
+Pause/Resume Slideshow button, and the
 Configure Full Screen Mode button which shows a
 small settings dialog that allows you to easily and quickly configure the
 slideshow. The slideshow controls there are: 
diff --git a/lib/mpris2/mprismediaplayer2player.cpp 
b/lib/mpris2/mprismediaplayer2player.cpp
index 19abe4a7..530c6e73 100644
--- a/lib/mpris2/mprismediaplayer2player.cpp
+++ b/lib/mpris2/mprismediaplayer2player.cpp
@@ -136,7 +136,7 @@ bool MprisMediaPlayer2Player::canPause() const
 
 void MprisMediaPlayer2Player::Pause()
 {
-mSlideShow->stop();
+mSlideShow->pause();
 }
 
 void MprisMediaPlayer2Player::PlayPause()
diff --git a/lib/slideshow.cpp b/lib/slideshow.cpp
index f14a27e9..019b7a6a 100644
--- a/lib/slideshow.cpp
+++ b/lib/slideshow.cpp
@@ -50,7 +50,7 @@ namespace Gwenview
 #endif
 
 enum S

D11495: Align slideshow terminology to MPRIS behaviour

2018-03-21 Thread Henrik Fehlauer
This revision was automatically updated to reflect the committed changes.
Closed by commit R260:beef8f3b0f6f: Align slideshow terminology to MPRIS 
behaviour (authored by rkflx).

REPOSITORY
  R260 Gwenview

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11495?vs=29932&id=30104

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

AFFECTED FILES
  app/mainwindow.cpp
  doc/index.docbook
  lib/mpris2/mprismediaplayer2player.cpp
  lib/slideshow.cpp
  lib/slideshow.h

To: rkflx, #gwenview, kossebau, muhlenpfordt
Cc: ltoscano, muhlenpfordt, huoni, kde-doc-english


D11495: Align slideshow terminology to MPRIS behaviour

2018-03-21 Thread Henrik Fehlauer
rkflx added a comment.


  In D11495#230603 , @ltoscano wrote:
  
  > A note about the deadlines: this can still land onto the newly created 
Applications/18.04, at least until the freeze tomorrow.
  
  
  Thanks Luigi, we are aware off that ;)

REPOSITORY
  R260 Gwenview

BRANCH
  mpris-pause-renaming (branched from master)

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

To: rkflx, #gwenview, kossebau, muhlenpfordt
Cc: ltoscano, muhlenpfordt, huoni, kde-doc-english


D11495: Align slideshow terminology to MPRIS behaviour

2018-03-19 Thread Henrik Fehlauer
rkflx created this revision.
rkflx added reviewers: Gwenview, kossebau.
Restricted Application added a subscriber: kde-doc-english.
rkflx requested review of this revision.

REVISION SUMMARY
  9631043c110d 
 
introduced MPRIS support to Gwenview. Common MPRIS
  controllers often only provide "Pause" in the main interface, with
  "Stop" being non-existent or hidden. Therefore "holding" the slideshow
  was mapped to "Pause". "Play" either "Resumes" automatically advancing
  to the next image, or in non-fullscreen mode switches to fullscreen and
  starts playback. Conversely, "Stop" ends playback and exits from
  fullscreen.
  
  To keep consistency, we change the tooltip text of the fullscreen button
  controlling the playback to "Pause". In addition, the internal `enum` is
  adapted accordingly to avoid confusing developers.
  
  Note that the icon on the button still shows a "Pause" symbol as before
  the patch.
  
  Ref T8222 

TEST PLAN
  Start Gwenview normally, with `-f` and with `-s`, and observe the
  tooltip of the playback button in the top fullscreen toolbar as well as
  the button text in non-fullscreen mode (use Configure Toolbars to
  add it) make sense in every situation.

REPOSITORY
  R260 Gwenview

BRANCH
  mpris-pause-renaming (branched from master)

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

AFFECTED FILES
  app/mainwindow.cpp
  doc/index.docbook
  lib/mpris2/mprismediaplayer2player.cpp
  lib/slideshow.cpp
  lib/slideshow.h

To: rkflx, #gwenview, kossebau
Cc: kde-doc-english


D11147: Bump date+releaseinfo for Gwenview docbook

2018-03-13 Thread Henrik Fehlauer
rkflx closed this revision.

REPOSITORY
  R260 Gwenview

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

To: rkflx, #gwenview, ngraham, lueck
Cc: ltoscano, kde-doc-english


D11147: Bump date+releaseinfo for Gwenview docbook

2018-03-13 Thread Henrik Fehlauer
rkflx commandeered this revision.
rkflx edited reviewers, added: lueck; removed: rkflx.

REPOSITORY
  R260 Gwenview

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

To: rkflx, #gwenview, #documentation, ngraham, lueck
Cc: ltoscano, kde-doc-english


D11147: Bump date+releaseinfo for Gwenview docbook

2018-03-13 Thread Henrik Fehlauer
rkflx removed a reviewer: Documentation.
This revision is now accepted and ready to land.

REPOSITORY
  R260 Gwenview

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

To: rkflx, #gwenview, ngraham, lueck, #documentation
Cc: ltoscano, kde-doc-english


D11147: Bump date+releaseinfo for Gwenview docbook

2018-03-13 Thread Henrik Fehlauer
rkflx added a commit: R260:d883cdcdc1ea: Bump date+releaseinfo for Gwenview 
docbook.

REPOSITORY
  R260 Gwenview

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

To: lueck, #gwenview, #documentation, ngraham, rkflx
Cc: ltoscano, kde-doc-english


D10542: Add docbook content which was lost during a merge and more cleanup

2018-03-13 Thread Henrik Fehlauer
This revision was automatically updated to reflect the committed changes.
Closed by commit R166:159b7d507b41: Add docbook content which was lost during a 
merge and more cleanup (authored by rkflx).

REPOSITORY
  R166 Spectacle

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10542?vs=29048&id=29443

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

AFFECTED FILES
  doc/index.docbook

To: rkflx, #spectacle, gregormi, #documentation, lueck
Cc: kde-doc-english, lueck, ngraham, rkflx


[spectacle] doc: Add docbook content which was lost during a merge and more cleanup

2018-03-13 Thread Henrik Fehlauer
Git commit 159b7d507b416f44d454f966700aaf81fecaa2d2 by Henrik Fehlauer.
Committed on 14/03/2018 at 00:17.
Pushed by rkflx into branch 'master'.

Add docbook content which was lost during a merge and more cleanup

Summary:
45c37a64e1cc lost some docbook changes from 7034b50c5c9e, let's restore
them.

Also bump date and releaseinfo, and remove entities which now come from
`kdoctools`.

Thanks to @gregormi for the initial version of the patch, and @lueck for
help with the docbook.

Depends on D10529

Test Plan:
`checkXML5 index.docbook`
Proofread in KHelpCenter.

Reviewers: #spectacle, gregormi, #documentation, lueck

Reviewed By: #documentation, lueck

Subscribers: kde-doc-english, lueck, ngraham, rkflx

Differential Revision: https://phabricator.kde.org/D10542

M  +7-6doc/index.docbook

https://commits.kde.org/spectacle/159b7d507b416f44d454f966700aaf81fecaa2d2

diff --git a/doc/index.docbook b/doc/index.docbook
index 32bea95..a6db8e4 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -3,8 +3,6 @@
   Spectacle">
   

-  BoudhayanGupta">
-  bgu...@kde.org">
 ]>
 
 
@@ -31,8 +29,8 @@
 
 &FDLNotice;
 
-2017-11-06
-Applications 17.12
+2018-03-06
+Applications 18.04
 
 
 &spectacle; is a simple application for capturing desktop 
screenshots. It can capture images of the entire desktop, a single monitor, the 
currently active window, the window currently under the mouse, or a rectangular 
region of the screen. The images can then be printed, sent to other 
applications for manipulation, or quickly be saved as-is.
@@ -210,10 +208,13 @@
 Opens a drop-down menu which offers various 
tools:
 
 
-the print dialog
+Open Screenshots 
Folder will highlight the last saved screenshot in the default 
file manager
 
 
-a range of external programs for Screen 
Recording
+Access to the 
Print dialog
+
+
+A range of external programs for Screen 
Recording
 
 
 


D10529: Convert tabs to spaces in docbook

2018-03-13 Thread Henrik Fehlauer
This revision was automatically updated to reflect the committed changes.
Closed by commit R166:90c4a03981e3: Convert tabs to spaces in docbook (authored 
by rkflx).
Restricted Application added a subscriber: kde-doc-english.

REPOSITORY
  R166 Spectacle

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10529?vs=29047&id=29442

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

AFFECTED FILES
  doc/index.docbook

To: rkflx, #spectacle, #documentation, ngraham, gregormi
Cc: kde-doc-english, gregormi, ltoscano, yurchor, rkflx, lueck, ngraham


[spectacle] doc: Convert tabs to spaces in docbook

2018-03-13 Thread Henrik Fehlauer
Git commit 90c4a03981e3822786cfad34bc28be76dda3ece1 by Henrik Fehlauer.
Committed on 14/03/2018 at 00:14.
Pushed by rkflx into branch 'master'.

Convert tabs to spaces in docbook

Summary:
Tabs in the docbook often cause contributor's editors to introduce
accidental whitespace changes. It was agreed to change to spaces like in
most other files.

This also corrects a problem where there were tabs inside the content.

Thanks to @gregormi for the initial version of the patch.

Test Plan: `checkXML5 index.docbook`

Reviewers: #spectacle, #documentation, ngraham, gregormi

Reviewed By: #spectacle, ngraham

Subscribers: gregormi, ltoscano, yurchor, rkflx, lueck, ngraham

Differential Revision: https://phabricator.kde.org/D10529

M  +318  -318  doc/index.docbook

https://commits.kde.org/spectacle/90c4a03981e3822786cfad34bc28be76dda3ece1

diff --git a/doc/index.docbook b/doc/index.docbook
index 0ada2ed..32bea95 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -8,64 +8,64 @@
 ]>
 
 
-   
-   The &spectacle; Handbook
+
+The &spectacle; Handbook
 
-   
-   
-   &Boudhayan.Gupta;
-   &Boudhayan.Gupta.mail;
-   
+
+
+&Boudhayan.Gupta;
+&Boudhayan.Gupta.mail;
+
 
-   
-   &Boudhayan.Gupta;
-   &Boudhayan.Gupta.mail;
-   
+
+&Boudhayan.Gupta;
+&Boudhayan.Gupta.mail;
+
 
-   
-   
+
+
 
-   
1997-2000&Richard.J.Moore;
-   
2000&Matthias.Ettrich;
-   
2015&Boudhayan.Gupta;
+
1997-2000&Richard.J.Moore;
+
2000&Matthias.Ettrich;
+
2015&Boudhayan.Gupta;
 
-   &FDLNotice;
+&FDLNotice;
 
-   2017-11-06
-   Applications 17.12
+2017-11-06
+Applications 17.12
 
-   
-   &spectacle; is a simple application for capturing 
desktop screenshots. It can capture images of the entire desktop, a single 
monitor, the currently active window, the window currently under the mouse, or 
a rectangular region of the screen. The images can then be printed, sent to 
other applications for manipulation, or quickly be saved as-is.
-   
+
+&spectacle; is a simple application for capturing desktop 
screenshots. It can capture images of the entire desktop, a single monitor, the 
currently active window, the window currently under the mouse, or a rectangular 
region of the screen. The images can then be printed, sent to other 
applications for manipulation, or quickly be saved as-is.
+
 
-   
-   KDE
-   spectacle
-   kdegraphics
-   screenshot
-   screen capture
-   screen grab
-   
-   
+
+KDE
+spectacle
+kdegraphics
+screenshot
+screen capture
+screen grab
+
+
 
-   
-   Introduction
+
+Introduction
 
-   &spectacle; is a simple application for capturing desktop 
screenshots. It can capture images of the entire desktop, a single monitor, the 
currently active window, the window currently under the mouse, or a rectangular 
region of the screen. The images can then be printed, sent to other 
applications for manipulation, or quickly be saved as-is.
+&spectacle; is a simple application for capturing desktop 
screenshots. It can capture images of the entire desktop, a single monitor, the 
currently active window, the window currently under the mouse, or a rectangular 
region of the screen. The images can then be printed, sent to other 
applications for manipulation, or quickly be saved as-is.
 
-   Please report any problems or feature requests to the http://bugs.kde.org/";>&kde; Bug Tracking System.
-   
+Please report any problems or feature requests to the http://bugs.kde.org/";>&kde; Bug Tracking System.
+
 
-   
-   Starting &spectacle;
+
+Starting &spectacle;
 
-   &spectacle; can be started in a variety of ways, as 
described below:
+&spectacle; can be started in a variety of ways, as described 
below:
 
-   
-   
-   In the application launcher menu, 
&spectacle; can be found at 
ApplicationsUtilitiesScreenshot
 Capture Utility &spectacle;
-   
-   
+

D10542: Add docbook content which was lost during a merge and more cleanup

2018-03-12 Thread Henrik Fehlauer
rkflx added a comment.
Restricted Application added a subscriber: kde-doc-english.


  @lueck Please let me know until tomorrow if I should change anything, or 
accept this review on Phab otherwise.

REPOSITORY
  R166 Spectacle

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

To: rkflx, #spectacle, gregormi, #documentation
Cc: kde-doc-english, lueck, ngraham, rkflx


D11147: Bump date+releaseinfo for Gwenview docbook

2018-03-12 Thread Henrik Fehlauer
rkflx added a comment.


  @lueck This landed in d883cdcdc1ea 
, 
please close this Diff.
  
  Just use `arc land` next time, it prevents typos, adds the test plan and the 
reviewers to the commit message and does more awesome things ;)

REPOSITORY
  R260 Gwenview

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

To: lueck, #gwenview, #documentation, ngraham, rkflx
Cc: ltoscano, kde-doc-english


D11147: Bump date+releaseinfo for Gwenview docbook

2018-03-09 Thread Henrik Fehlauer
rkflx added a comment.


  In D11147#221820 , @lueck wrote:
  
  > In D11147#221141 , @ngraham 
wrote:
  >
  > > And perhaps our friendly sysadmins can work their magic to have 
Phabricator automatically add the Documentation group to any differential 
revision that touches a docbook file?
  >
  >
  > This Feature was added by our friendly sysadmins with 
https://phabricator.kde.org/T8164
  
  
  The task is restricted, I cannot see it. Also I wonder if it is really 
necessary to make #documentation 
 a "blocking reviewer", 
wouldn't a regular group reviewer have been enough? Nevertheless, thanks for 
adding it ;)
  
  ---
  
  In D11147#221693 , @lueck wrote:
  
  > In D11147#221578 , @rkflx wrote:
  >
  > > @lueck Quick question regarding your test plan. Is this normal/expected 
or should we change something:
  > >
  > >   $ checkXML5 index.docbook 
  > >   Note: namesp. add : added namespace before processing  
Gwenview User Manual
  >
  >
  > I don't get this output and I have never seen this as output of checkXML5
  >  I am using docbook5-xml 5.0-2, is your version different?
  
  
  I used docbook 4.5 (kdoctools depends on that in Tumbleweed), but it turns 
out the problem was with docbook-xsl-stylesheets: Migrating to the latest 
version from the main repo, the warning is gone again.
  
  Anyway, that problem is/was OT for this patch, which should be ready for `arc 
land` now, pending acceptance from #documentation 
.

REPOSITORY
  R260 Gwenview

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

To: lueck, #gwenview, #documentation, ngraham, rkflx
Cc: kde-doc-english


D10542: Add docbook content which was lost during a merge and more cleanup

2018-03-08 Thread Henrik Fehlauer
rkflx added a reviewer: Documentation.
rkflx added a comment.


  (…actually add the correct reviewer…)

REPOSITORY
  R166 Spectacle

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

To: rkflx, #spectacle, gregormi, #documentation
Cc: lueck, ngraham, rkflx


D10529: Convert tabs to spaces in docbook

2018-03-08 Thread Henrik Fehlauer
rkflx added a dependent revision: D10542: Add docbook content which was lost 
during a merge and more cleanup.

REPOSITORY
  R166 Spectacle

BRANCH
  docbook-spaces (branched from master)

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

To: rkflx, #spectacle, #documentation, ngraham, gregormi
Cc: gregormi, ltoscano, yurchor, rkflx, lueck, ngraham


D10529: Convert tabs to spaces in docbook

2018-03-08 Thread Henrik Fehlauer
rkflx added a comment.


  @ngraham Looks good on Phab to me now.

REPOSITORY
  R166 Spectacle

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

To: rkflx, #spectacle, #documentation, ngraham, gregormi
Cc: gregormi, ltoscano, yurchor, rkflx, lueck, ngraham


D10529: Convert tabs to spaces in docbook

2018-03-08 Thread Henrik Fehlauer
rkflx commandeered this revision.
rkflx added a reviewer: gregormi.

REPOSITORY
  R166 Spectacle

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

To: rkflx, #spectacle, #documentation, ngraham, gregormi
Cc: gregormi, ltoscano, yurchor, rkflx, lueck, ngraham


D10529: Convert tabs to spaces in docbook

2018-03-08 Thread Henrik Fehlauer
rkflx updated this revision to Diff 29047.
rkflx retitled this revision from "docbook file: convert tabs to spaces" to 
"Convert tabs to spaces in docbook".
rkflx edited the summary of this revision.
rkflx edited the test plan for this revision.
rkflx added a subscriber: gregormi.
rkflx added a comment.


  - Rebase (actually I redid the whole thing, because XML merge conflicts over 
the whole file are horrible...)
  - Correct inline tabs
  - Reword commit message

REPOSITORY
  R166 Spectacle

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10529?vs=27216&id=29047

BRANCH
  docbook-spaces (branched from master)

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

AFFECTED FILES
  doc/index.docbook

To: gregormi, #spectacle, #documentation, ngraham
Cc: gregormi, ltoscano, yurchor, rkflx, lueck, ngraham


D11147: Bump date+releaseinfo for Gwenview docbook

2018-03-08 Thread Henrik Fehlauer
rkflx added a comment.


  @lueck Quick question regarding your test plan. Is this normal/expected or 
should we change something:
  
$ checkXML5 index.docbook 
Note: namesp. add : added namespace before processing  Gwenview 
User Manual

REPOSITORY
  R260 Gwenview

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

To: lueck, #gwenview, #documentation, ngraham, rkflx


D11147: Bump date+releaseinfo for Gwenview docbook

2018-03-07 Thread Henrik Fehlauer
rkflx accepted this revision.
rkflx added a comment.
This revision is now accepted and ready to land.


  Sorry for not keeping you in the loop. We only had the best intentions ;) 
Feel free to remind us again if we forget to bump something.
  
  Could you tell us more about the ideal doc workflow? Currently we tried to 
update the docbook (in Spectacle, mainly) as soon as we changed something. Do 
you prefer we'd not do that and instead to write it all yourself? Or perform 
docbook changes always in a follow-up patch in order to avoid spamming the doc 
team with excessive technical review noise?

REPOSITORY
  R260 Gwenview

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

To: lueck, #gwenview, #documentation, ngraham, rkflx


[gwenview] /: Replace "Fit Width" feature with "Fill"

2018-02-28 Thread Henrik Fehlauer
Git commit ba63c8a44f463b883c03c77c942809cd238a6594 by Henrik Fehlauer, on 
behalf of Silas Lenz.
Committed on 28/02/2018 at 09:16.
Pushed by rkflx into branch 'master'.

Replace "Fit Width" feature with "Fill"

Summary:
Fit width is arguably less useful than a more general Fill feature. This 
replaces "Fit Width" with "Fill", fitting width or height, depending on what 
fills the window.

FEATURE: 195579

Test Plan: Use Fill with landscape and portrait pictures with the window in 
landscape and portrait size.

Reviewers: #gwenview, ngraham, rkflx

Reviewed By: #gwenview, ngraham, rkflx

Subscribers: rkflx, muhlenpfordt, ngraham, #gwenview

Tags: #gwenview

Differential Revision: https://phabricator.kde.org/D10844

M  +5-4doc/index.docbook
M  +5-5lib/documentview/abstractdocumentviewadapter.h
M  +15   -13   lib/documentview/abstractimageview.cpp
M  +4-4lib/documentview/abstractimageview.h
M  +19   -24   lib/documentview/documentview.cpp
M  +6-6lib/documentview/documentview.h
M  +19   -19   lib/documentview/documentviewcontroller.cpp
M  +1-1lib/documentview/documentviewcontroller.h
M  +5-5lib/documentview/documentviewsynchronizer.cpp
M  +1-1lib/documentview/documentviewsynchronizer.h
M  +6-6lib/documentview/rasterimageview.cpp
M  +7-7lib/documentview/rasterimageviewadapter.cpp
M  +3-3lib/documentview/rasterimageviewadapter.h
M  +9-9lib/documentview/svgviewadapter.cpp
M  +3-3lib/documentview/svgviewadapter.h
M  +13   -12   lib/zoomwidget.cpp
M  +1-1lib/zoomwidget.h

https://commits.kde.org/gwenview/ba63c8a44f463b883c03c77c942809cd238a6594

diff --git a/doc/index.docbook b/doc/index.docbook
index 61ac18e4..4a0e7813 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -256,11 +256,12 @@ on the left, press &Shift;	.
 
 
 The slider at the bottom right controls the zoom of the image. The
-Fit button and the 100%
-button are next to the zoom slider and are two preset zoom levels. The
+Fit, Fill and 
100%
+buttons are next to the zoom slider and are three preset zoom levels. The
 Fit button zooms the current image to fit the size
-of the window, and the 100% button zooms the image to
-the actual pixel size. The shortcut F toggles between both 
view modes.
+of the window, the Fill button zooms the image to fill 
the window 
+by fitting width or height and the 100% button zooms 
the image to
+the actual pixel size. The shortcut F switches to fit 
mode.
 
 When an image is in zoom-to-fit mode, you can go to the previous and next
 image with the arrow keys. When you zoom in, arrow keys are used to scroll the 
image.
diff --git a/lib/documentview/abstractdocumentviewadapter.h 
b/lib/documentview/abstractdocumentviewadapter.h
index 13bc74ea..75c79093 100644
--- a/lib/documentview/abstractdocumentviewadapter.h
+++ b/lib/documentview/abstractdocumentviewadapter.h
@@ -92,11 +92,11 @@ public:
 return false;
 }
 
-// Implementation must emit zoomToFitWidthChanged()
-virtual void setZoomToFitWidth(bool)
+// Implementation must emit zoomToFillChanged()
+virtual void setZoomToFill(bool)
 {}
 
-virtual bool zoomToFitWidth() const
+virtual bool zoomToFill() const
 {
 return false;
 }
@@ -114,7 +114,7 @@ public:
 return 1.;
 }
 
-virtual qreal computeZoomToFitWidth() const
+virtual qreal computeZoomToFill() const
 {
 return 1.;
 }
@@ -154,7 +154,7 @@ Q_SIGNALS:
 
 void zoomToFitChanged(bool);
 
-void zoomToFitWidthChanged(bool);
+void zoomToFillChanged(bool);
 
 void zoomInRequested(const QPointF&);
 
diff --git a/lib/documentview/abstractimageview.cpp 
b/lib/documentview/abstractimageview.cpp
index 7a2501fa..370c7d40 100644
--- a/lib/documentview/abstractimageview.cpp
+++ b/lib/documentview/abstractimageview.cpp
@@ -51,7 +51,7 @@ struct AbstractImageViewPrivate
 
 qreal mZoom;
 bool mZoomToFit;
-bool mZoomToFitWidth;
+bool mZoomToFill;
 QPointF mImageOffset;
 QPointF mScrollPos;
 QPointF mLastDragPos;
@@ -120,7 +120,7 @@ AbstractImageView::AbstractImageView(QGraphicsItem* parent)
 d->mEnlargeSmallerImages = false;
 d->mZoom = 1;
 d->mZoomToFit = true;
-d->mZoomToFitWidth = false;
+d->mZoomToFill = false;
 d->mImageOffset = QPointF(0, 0);
 d->mScrollPos = QPointF(0, 0);
 setFocusPolicy(Qt::WheelFocus);
@@ -228,9 +228,9 @@ bool AbstractImageView::zoomToFit() const
 return d->mZoomToFit;
 }
 
-bool AbstractImageView::zoomToFitWidth() const
+bool AbstractImageView::zoomToFill() const
 {
-return d->mZoomToFitWidth;
+return d->mZoomToFill;
 }
 
 void AbstractImageView::setZoomToFit(bool on)
@@ -245,16 +245,16 @@ void AbstractImageView::setZoomToFit(bool on)
 zoomToFitChanged(d->mZoomToFit);
 }
 
-void AbstractImageView::setZoomToFitWidth(bool on)
+void Abs

D10529: docbook file: convert tabs to spaces

2018-02-16 Thread Henrik Fehlauer
rkflx added a comment.


  Okay, let's go for spaces then. We are not the only one 
.

INLINE COMMENTS

> ngraham wrote in index.docbook:323
> Was the change to break this up onto multiple lines intentional?

@gregormi This should be fixed, i.e. remove the linebreaks. Looks like if there 
were some inline tabs too, those could be removed as well.

Other than that, I think you've catched all tabs.

REPOSITORY
  R166 Spectacle

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

To: gregormi, #spectacle, #documentation
Cc: ltoscano, yurchor, rkflx, lueck, ngraham


D10529: docbook file: convert tabs to spaces

2018-02-15 Thread Henrik Fehlauer
rkflx added subscribers: ngraham, lueck, rkflx.
rkflx added a reviewer: Documentation.
rkflx added a comment.


  @lueck Any tips on what's the preferred way to format a docbook? Or should we 
just keep the tabs and watch out for accidental changes?
  
  (Note you have to set Revision Contents > History > Whitespace Changes to 
"Show All" to see all changes.)
  
  FWIW, @ngraham also suggested to convert tabs to spaces in 
D10469#inline-49361 .
  
  However, I looked around and there are vastly different styles:
  
  - Okular: tabs
  - Gwenview, Dolphin: no indentation at all
  - Proposed Spectacle patch: spaces

REPOSITORY
  R166 Spectacle

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

To: gregormi, #spectacle, #documentation
Cc: rkflx, lueck, ngraham


[spectacle] /: Add action to open screenshots folder to tools menu

2018-02-14 Thread Henrik Fehlauer
Git commit 7034b50c5c9ef9c97ec0b7741f3667a93d9a567a by Henrik Fehlauer.
Committed on 14/02/2018 at 22:46.
Pushed by rkflx into branch 'master'.

Add action to open screenshots folder to tools menu

Summary:
With {nav Quit after Save or Copy} checked, there is a desktop
notification when saving which allows to open the folder containing the
saved screenshot. However, when the user opts to let the window stay
open, only the title will reflect the filename of the saved screenshot.
It's quite hard to know in which folder it was saved and not that easy
to open that folder.

By introducing {nav Tools > Open Screenshots Folder}, usability in that
regard is much-improved. When no screenshot has been saved yet, it will
open the last {nav Save As} folder or the default {nav Save} location
depending on the button state. As soon as a screenshot is saved, the
new action will highlight the new screenshot in the filemanager.

BUG: 389695

Depends on D10467
Ref T7841

Test Plan:
For {nav Save} and {nav Save As} each, click on new menu entry after
starting Spectacle as well as after saving. Also test everything with
`fish:/` (but beware of Bug 390297).

{F5705490}

Reviewers: #spectacle, ngraham

Reviewed By: #spectacle, ngraham

Subscribers: ngraham

Maniphest Tasks: T7841

Differential Revision: https://phabricator.kde.org/D10470

M  +1-1doc/index.docbook
M  +11   -1src/ExportManager.cpp
M  +3-1src/ExportManager.h
M  +29   -1src/Gui/KSMainWindow.cpp
M  +1-0src/Gui/KSMainWindow.h

https://commits.kde.org/spectacle/7034b50c5c9ef9c97ec0b7741f3667a93d9a567a

diff --git a/doc/index.docbook b/doc/index.docbook
index f0630c3..b0af19f 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -207,7 +207,7 @@


Tools

-   Clicking on this button 
shows a drop-down menu, offering access to the print dialog.
+   Clicking on this button 
shows a drop-down menu, offering access to various functions. You can open the 
Print dialog, and Open Screenshots 
Folder is a shortcut to highlight the last saved screenshot in 
the default file manager.



diff --git a/src/ExportManager.cpp b/src/ExportManager.cpp
index 8f36a4a..fd06325 100644
--- a/src/ExportManager.cpp
+++ b/src/ExportManager.cpp
@@ -41,9 +41,14 @@
 ExportManager::ExportManager(QObject *parent) :
 QObject(parent),
 mSavePixmap(QPixmap()),
+mLastSavePath(QUrl()),
 mTempFile(QUrl()),
 mTempDir(nullptr)
-{}
+{
+connect(this, &ExportManager::imageSaved, [this](const QUrl savedAt) {
+mLastSavePath = savedAt;
+});
+}
 
 ExportManager::~ExportManager()
 {
@@ -118,6 +123,11 @@ QString ExportManager::saveLocation() const
 return savePath;
 }
 
+QUrl ExportManager::lastSavePath() const
+{
+return isFileExists(mLastSavePath) ? mLastSavePath : QUrl();
+}
+
 void ExportManager::setSaveLocation(const QString &savePath)
 {
 KSharedConfigPtr config = 
KSharedConfig::openConfig(QStringLiteral("spectaclerc"));
diff --git a/src/ExportManager.h b/src/ExportManager.h
index 5b45070..8101267 100644
--- a/src/ExportManager.h
+++ b/src/ExportManager.h
@@ -55,6 +55,8 @@ class ExportManager : public QObject
 
 void setSaveLocation(const QString &location);
 QString saveLocation() const;
+QUrl lastSavePath() const;
+bool isFileExists(const QUrl &url) const;
 void setPixmap(const QPixmap &pixmap);
 QPixmap pixmap() const;
 QString pixmapDataUri() const;
@@ -88,10 +90,10 @@ class ExportManager : public QObject
 bool save(const QUrl &url);
 bool localSave(const QUrl &url, const QString &mimetype);
 bool remoteSave(const QUrl &url, const QString &mimetype);
-bool isFileExists(const QUrl &url) const;
 bool isTempFileAlreadyUsed(const QUrl &url) const;
 
 QPixmap mSavePixmap;
+QUrl mLastSavePath;
 QUrl mTempFile;
 QTemporaryDir *mTempDir;
 QList mUsedTempFileNames;
diff --git a/src/Gui/KSMainWindow.cpp b/src/Gui/KSMainWindow.cpp
index 6c7f37d..8c6aa5b 100644
--- a/src/Gui/KSMainWindow.cpp
+++ b/src/Gui/KSMainWindow.cpp
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "SettingsDialog/SettingsDialog.h"
 #include "ExportMenu.h"
@@ -149,7 +150,6 @@ void KSMainWindow::init()
 KGuiItem::assign(mToolsButton, KGuiItem(i18n("Tools")));
 
mToolsButton->setIcon(QIcon::fromTheme(QStringLiteral("application-menu")));
 mDialogButtonBox->addButton(mToolsButton, QDialogButtonBox::ActionRole);
-mToolsMenu->addAction(KStandardAction::print(this, 
SLOT(showPrintDialog()), this));
 mToolsButton->setMenu(mToolsMenu);

[spectacle] /: Move printing to a new tools button

2018-02-07 Thread Henrik Fehlauer
Git commit 5206cdda229225333bd94fa4dfe24c6be2291d98 by Henrik Fehlauer.
Committed on 07/02/2018 at 23:14.
Pushed by rkflx into branch 'master'.

Move printing to a new tools button

Summary:
{nav Print} does neither belong to {nav Save} nor {nav Save As}, so it
goes into a new menu button called {nav Tools}. More entries will be
added to the menu in D10295 and possibly in T6321.

In order to gain more horizontal space, {nav Export Image...} is renamed
to {nav Export}, which is in line with the other buttons not repeating
"image". "..." is removed as it should be only added to the menu entries
itself if necessary and the arrow on the button is enough to indicate
its purpose.

Ref. T7841

Test Plan:
{F5697449}

- Printing via the button still works, as well as {key Ctrl P}.
- Somewhat sensible icon chosen for the button.
- Docbook updated.

Reviewers: #spectacle, ngraham

Reviewed By: #spectacle, ngraham

Subscribers: ngraham

Differential Revision: https://phabricator.kde.org/D10371

M  +8-2doc/index.docbook
M  +10   -5src/Gui/KSMainWindow.cpp
M  +3-1src/Gui/KSMainWindow.h

https://commits.kde.org/spectacle/5206cdda229225333bd94fa4dfe24c6be2291d98

diff --git a/doc/index.docbook b/doc/index.docbook
index 1013761..946485f 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -186,7 +186,7 @@

Buttons
 
-   There are five buttons located at the bottom of 
the &spectacle; window. Their functions are described below:
+   There are six buttons located at the bottom of 
the &spectacle; window. Their functions are described below:
 


@@ -202,7 +202,13 @@



-   Export 
Image...
+   
Tools
+   
+   Clicking on this button 
shows a drop-down menu, offering access to the print dialog.
+   
+   
+   
+   
Export

This drop-down menu will 
allow you to directly open the screenshot with all programs that are associated 
with the PNG (Portable Network Graphics) &MIME; type. Depending on what 
programs are installed, you will be able to open and edit the snapshot in your 
graphics applications or viewers.
 
diff --git a/src/Gui/KSMainWindow.cpp b/src/Gui/KSMainWindow.cpp
index 193b6bf..60dbab7 100644
--- a/src/Gui/KSMainWindow.cpp
+++ b/src/Gui/KSMainWindow.cpp
@@ -51,12 +51,14 @@ KSMainWindow::KSMainWindow(bool onClickAvailable, QWidget 
*parent) :
 mKSWidget(new KSWidget),
 mDivider(new QFrame),
 mDialogButtonBox(new QDialogButtonBox),
-mSendToButton(new QPushButton),
 mConfigureButton(new QToolButton),
+mToolsButton(new QPushButton),
+mSendToButton(new QPushButton),
 mClipboardButton(new QToolButton),
 mSaveButton(new QToolButton),
 mSaveMenu(new QMenu),
 mMessageWidget(new KMessageWidget),
+mToolsMenu(new QMenu),
 mExportMenu(new ExportMenu(this)),
 mOnClickAvailable(onClickAvailable)
 {
@@ -132,7 +134,13 @@ void KSMainWindow::init()
 mConfigureButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
 mDialogButtonBox->addButton(mConfigureButton, QDialogButtonBox::ResetRole);
 
-KGuiItem::assign(mSendToButton, KGuiItem(i18n("Export Image...")));
+KGuiItem::assign(mToolsButton, KGuiItem(i18n("Tools")));
+
mToolsButton->setIcon(QIcon::fromTheme(QStringLiteral("application-menu")));
+mDialogButtonBox->addButton(mToolsButton, QDialogButtonBox::ActionRole);
+mToolsMenu->addAction(KStandardAction::print(this, 
SLOT(showPrintDialog()), this));
+mToolsButton->setMenu(mToolsMenu);
+
+KGuiItem::assign(mSendToButton, KGuiItem(i18n("Export")));
 mSendToButton->setIcon(QIcon::fromTheme(QStringLiteral("document-share")));
 mDialogButtonBox->addButton(mSendToButton, QDialogButtonBox::ActionRole);
 
@@ -220,9 +228,6 @@ void KSMainWindow::buildSaveMenu()
 mSaveMenu->addAction(actionSaveAs);
 break;
 }
-
-// finish off building the menu
-mSaveMenu->addAction(KStandardAction::print(this, SLOT(showPrintDialog()), 
this));
 }
 
 // overrides
diff --git a/src/Gui/KSMainWindow.h b/src/Gui/KSMainWindow.h
index d35443d..350e572 100644
--- a/src/Gui/KSMainWindow.h
+++ b/src/Gui/KSMainWindow.h
@@ -73,12 +73,14 @@ class KSMainWindow : public QDialog
 KSWidget *mKSWidget;
 QFrame   *mDivider;
 QDialogButtonBox *mDialogButtonBox;
-QPush

[okular] doc: Document ".okular" filename extension

2017-12-31 Thread Henrik Fehlauer
Git commit 9f0aa37906c9230ad1a48961f88ab2d654eec0e6 by Henrik Fehlauer.
Committed on 01/01/2018 at 07:41.
Pushed by rkflx into branch 'master'.

Document ".okular" filename extension

Summary:
In general Okular makes it very hard to get the filename extension for
document archives wrong when saving. Still it would be nice to document
this.

BUG: 291176

Test Plan: `meinproc5` still happy.

Reviewers: lueck, yurchor

Reviewed By: yurchor

Subscribers: #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D9577

M  +1-1doc/index.docbook

https://commits.kde.org/okular/9f0aa37906c9230ad1a48961f88ab2d654eec0e6

diff --git a/doc/index.docbook b/doc/index.docbook
index 354733cf2..51558e641 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -457,7 +457,7 @@ Context menu actions like Rename Bookmarks etc.)
Using the context menu either in the 
Reviews view of the navigation panel or in the main window 
you can open a Pop up Note for any kind of annotation and 
add or edit comments.
Annotations are not only limited to &PDF; files, 
they can be used for any format &okular; supports.

-&okular; has the "document archiving" feature. This is an 
&okular;-specific format for carrying the document plus various metadata 
related to it (currently only annotations). You can save a "document archive" 
from the open document by choosing 
FileSave 
As and selecting Okular document 
archive in the Filter selector. To open an 
&okular; document archive, just open it with &okular; as it would be ⪚ a 
&PDF; document.
+&okular; has the "document archiving" feature. This is an 
&okular;-specific format for carrying the document plus various metadata 
related to it (currently only annotations). You can save a "document archive" 
from the open document by choosing 
FileSave 
As and selecting Okular document 
archive in the Filter selector. Documents saved 
this way will get .okular as their filename extension. To 
open an &okular; document archive, just open it with &okular; as it would be 
⪚ a &PDF; document.


  You can also save annotations 
directly into &PDF; files. You can use File 
Save to save it over the current file 
or File Save 
As... to save it to a new file.