Commit graph

407 commits

Author SHA1 Message Date
Albert Astals Cid 56e356df61 Fix crash on close 2012-02-02 19:55:40 +01:00
Jonathan Marten 06326f7311 Allow the page number selector to be added to the toolbar
Ok, this is not really the review Jonathan did, i did rewrite the code partially because i did not really
want to have a new observer, but the code is heavily inspired in his patch.

Also the page number selector is not in the toolbar as the review had, it'd be silly to have it in both places
by default, so if you want to have it you have to go, edit the toolbar and add the "Page Number" action to it.

REVIEW: 103427
BUGS: 279128
FIXED-IN: 4.9.0
2012-01-31 19:54:15 +01:00
Albert Astals Cid b2dfb910e8 Small rework of AnnotWindow
* We do not keep them around any more time than needed (they are cheap to create)
 * AnnotWindow::slotsaveWindowText calls m_document->modifyPageAnnotation so
   edition of inline notes happens immediately
2012-01-17 23:46:37 +01:00
Elvis Stansvik d066fb0004 Remember collapse state of sidebar when file is auto-reloaded
BUGS: 289010
REVIEW: 103517
2011-12-28 00:49:44 +01:00
Albert Astals Cid 6176e29256 Use a queued connection instead of direct call
It seems some shells (like konqueror and kile) are too smart and play with the focus and the focus ends up in the wrong place because they "overwrite" our setFocus call, now we workaoround that by using the queuedconnection
BUGS: 214020
BUGS: 240516
FIXED-IN: 4.8.0
2011-12-16 00:25:24 +01:00
Albert Astals Cid 83a052b3ac Revert 604187b7a3 and 258cd6562a
I did not have time to finish the poppler work and even if this will probably be good for using the poppler work, this adds new API and I don't want to commit to this since having a proper look at making it work
Sorry i failed to fulfill my promise
2011-12-11 22:20:45 +01:00
Albert Astals Cid 395d7163f6 Set an empty shortcut to Save copy as
Since we are going to use KStandardAction::saveAs again later for the "real" 'Save As...'.
This was working fine since there is no default shortcut for SaveAs but if the user sets one
in the global kde config then he gets duplicate shortcut problems
BUGS: 268551
2011-11-21 23:34:59 +01:00
Michel Ludwig 5db362fb26 Use the correct line number in 'Part::showSourceLocation' 2011-11-08 08:25:36 +00:00
Michel Ludwig ab436aaaf5 Better move the calls to 'viewport()->update()' relating to the ViewerInterface inside the PageView class. 2011-11-07 21:07:10 +00:00
Michel Ludwig d02c86fe9b Also add an update call to 'Part::showSourceLocation'.
This handles the case when the source location changes without a need for the
document to be scrolled.
Better call 'viewport()->update()' in 'Part::setShowSourceLocationsGraphically'.
2011-11-06 14:55:05 +00:00
Michel Ludwig 5b7c6b8170 Add two new methods to the viewer interface.
Namely, 'areSourceLocationsShownGraphically()' and 'isWatchFileModeEnabled()'.
A corresponding implementation is provided.
2011-11-05 09:40:12 +00:00
Michel Ludwig 1be2696cc3 Allow for more control over when source locations are shown graphically.
The method 'showSourceLocation' has been extended with a new parameter which
controls whether the given source location is shown graphically. A new method
'clearLastShownSourceLocation' has been added; and a corresponding implementation
is provided.
2011-11-05 09:18:08 +00:00
Michel Ludwig 00b01aa987 Add method 'setLastSourceLocationViewport( const Okular::DocumentViewport& vp )' to PageView
Undo changes to the class 'DocumentViewport'.
2011-11-01 21:13:20 +00:00
Michel Ludwig 872c537f44 Merge branch 'master' into viewerinterface 2011-11-01 21:12:40 +00:00
Michel Ludwig a823df5c8f Some more changes according to the review. 2011-10-31 21:44:21 +00:00
Albert Astals Cid 3b272175ea Also add the possibility of renaming bookmarks using RMB menu 2011-10-26 00:19:58 +02:00
Albert Astals Cid 880dae2e19 Add a way to rename the current page bookmark from the menu
Comes with some api additions to bookmarkmanager
2011-10-25 22:21:22 +02:00
Michel Ludwig 31828b4850 Move the setting of shortcuts for viewer mode to a special method 'setViewerShortcuts()' 2011-10-24 21:30:05 +01:00
Michel Ludwig 2fd4100cbd Coding style fixes 2011-10-23 14:22:58 +01:00
Michel Ludwig 6494e071d7 Also update the state of the menu 'view_orientation' correctly. 2011-10-23 11:07:38 +01:00
Michel Ludwig f431e98bb8 Change the action states according to whether a document is shown or not 2011-10-23 10:17:04 +01:00
Michel Ludwig e8e0237ca0 Add the possibility to show sources location graphically on the rendered pages.
Note that currently the rotation of pages is not taken into account as one still has
to find a unique way of handling this.
2011-10-17 20:56:45 +01:00
Michel Ludwig d29099b39c Only activate a subset of the available features when the part is launched in viewer mode.
In viewer mode the part will now use a different XML GUI file (part-viewermode.rc).
Also, some actions won't be created, e.g. those used for exporting stuff, for
launching presentation mode, or for selecting parts of the document. The captions
of the configuration dialogs also contain the word 'viewer' then.
2011-10-12 20:36:01 +01:00
Michel Ludwig 1a5f2be05c Merge branch 'master' into viewerinterface 2011-10-12 20:16:46 +01:00
Jiri Baum f81a49fafa table selection tool
BUGS: 279859
REVIEW: 102358
FIXED-IN: 4.8.0
2011-10-12 15:52:24 +02:00
Michel Ludwig b4206819e3 Allow to specify which config file the part uses.
This is done through a string "ConfigFileName=<file name>" which can be given to
the constructor in its argument list.

Note that the file ui/fileinterpreterpreview.cpp currently still contains a
reference to "okularrc", which we leave for now (as it just stores the size
of a dialog in that config file).
2011-10-05 21:50:12 +01:00
Michel Ludwig 0e29008150 Initial commit of the 'ViewerInterface' and of a first implementation. 2011-09-10 18:15:52 +01:00
Michel Ludwig b9da827e73 When 'closeUrl()' is complete, also clear the currently set URL.
This allows applications to detect whether a document is loaded simply by checking
whether 'url()' returns an empty URL or not.
2011-09-09 21:59:59 +01:00
Albert Astals Cid 200215bf41 Fix KDirWatchPrivate warnings
Need to add everything we remove or otherwise it complains we are trying to remove something we did not add
BUGS: 280123
FIXED-IN: 4.7.2
(cherry picked from commit af4316a938)
2011-09-06 20:05:00 +02:00
Albert Astals Cid 604187b7a3 Ui work for Reset Form Action support
Heavily inspired in Guillermo Amaral patches
CCMAIL: gamaral@kde.org
2011-08-25 02:25:43 +02:00
Ralf Habacker a69336517f use high resolution on windows only for now to avoid problems on other os as suggest by Albert Astals Cid 2011-08-23 21:47:37 +02:00
Ralf Habacker 2f203f063b avoid non portable resolution setting 2011-08-22 22:56:56 +02:00
Ralf Habacker 6f1a041868 use resolution from printer settings 2011-08-22 22:03:02 +02:00
Albert Astals Cid b8870e5bb0 Stat the file before switching to it
This way if the document does not exist at least we do not loose the current file
FIXED-IN: 4.8.0
BUGS: 267344
2011-08-10 10:17:36 +01:00
David Faure 2c9794071a Port away from deprecated API + from deprecated lib 2011-08-10 01:48:01 +02:00
Albert Astals Cid 9f99d536dc Add GUI option to switch off showing the document title
Pleasing users is not so bad
BUGS: 158401
2011-08-09 16:59:49 +01:00
Montel Laurent f9f65979f5 Normalize signals/slots 2011-07-31 21:22:04 +02:00
Kevin Kofler e001fbab55 Fix landscape documents getting printed in portrait format if "Landscape" is selected in the print dialog (the default).
Partly based on a patch by Falk from KDE bug #181290.

BUG: 181290
REVIEW: 101513
2011-07-28 01:41:48 +02:00
Christopher Reichert f0bfbb4caa Remove symlink target from m_watcher if added. 2011-07-05 18:31:06 -05:00
Christopher Reichert 752a59f5b8 Reload Document when contents of symlink target change.
If okular loads a symlink, watch the document the symlink
points to using readlink. Reload the symlink when the
actual document changes.

CCBUG: 186118
2011-07-05 18:11:02 -05:00
Christopher Reichert a9354072ad View orientation cached in memory.
Cache the view orientation in memory to anticipate
a document reload.

CCBUG: 184518
2011-06-25 17:14:04 -05:00
Christopher Reichert 0213afca46 Page up and Page down buttons now work while focus is in the search bar
or in the page number line edit in the minibar.

CCBUG: 270524
CCBUG: 274887
2011-06-10 00:34:44 -05:00
David Faure d473477a5a Look up kttsd.desktop correctly.
svn path=/trunk/KDE/kdegraphics/okular/; revision=1228495
2011-04-19 09:10:23 +00:00
Albert Astals Cid 50015ed233 kdelibs complains with a kError this is a QAction, move to KAction so users don't get pollution in their shells
svn path=/trunk/KDE/kdegraphics/okular/; revision=1225385
2011-03-20 13:46:43 +00:00
Albert Astals Cid 0071c788ff Make 53 users happy by allowing to show or hide the bottom page bar
Based on a patch by kde2eran@tromer.org
BUGS: 157284
FIXED-IN: 4.6

svn path=/trunk/KDE/kdegraphics/okular/; revision=1191188
2010-10-29 21:47:17 +00:00
Albert Astals Cid 3675bc6575 restore sidebar visibility correctly
svn path=/trunk/KDE/kdegraphics/okular/; revision=1171494
2010-09-04 00:14:45 +00:00
Albert Astals Cid 66c5ad47b4 Make Ctrl+End/Ctrl+Home go to end up document/beginning of documents instead of lastpage/firstpage
BUGS: 241197

svn path=/trunk/KDE/kdegraphics/okular/; revision=1171437
2010-09-03 21:30:30 +00:00
Pino Toscano 88a6d10888 use a simple char[] for the buffer, instead of a QByteArray, and make it bigger (64K instead of 1K)
svn path=/trunk/KDE/kdegraphics/okular/; revision=1166346
2010-08-21 15:48:02 +00:00
Pino Toscano 578b535877 when the user cancels the loading of a non-local document, just show an info message in the page view instead of an error message box
move the generic error for local files to openUrl()

svn path=/trunk/KDE/kdegraphics/okular/; revision=1166044
2010-08-20 16:20:17 +00:00
Pino Toscano 5d884febb0 rename slot: setMimeTypes -> slotJobStarted
svn path=/trunk/KDE/kdegraphics/okular/; revision=1166032
2010-08-20 16:07:36 +00:00