Commit graph

441 commits

Author SHA1 Message Date
Albert Astals Cid 4032f0a38a Only reload if the changed file is our file
And not any other file in the folder
BUGS: 321880
FIXED-IN: 4.11.0
2013-07-20 00:29:08 +02:00
Albert Astals Cid 54d9ffb9a3 Merge remote-tracking branch 'origin/KDE/4.10'
Conflicts:
	VERSION
	core/version.h
	part.cpp
2013-06-15 19:54:04 +02:00
Albert Astals Cid 449861c118 KMimeType::mimeType can return null 2013-06-15 19:50:51 +02:00
Fabio D'Urso 8e8c7a40b3 Invalidate saved data (viewport, expanded TOC nodes) when reload is canceled
So that next time slotDoFileDirty() is called, it will save data again, instead
of keeping data from the old reload attempt.
2013-06-08 17:27:17 +02:00
Fabio D'Urso 889c942909 Test that we don't crash if we open the Configure backends dialog twice
This would have caught the issue fixed in 3dd3a000db
2013-06-08 16:54:56 +02:00
Fabio D'Urso 5860fc89c5 Added shortcut to annotation config panel as review toolbar's context menu 2013-05-28 23:55:10 +02:00
Fabio D'Urso c3f7fd525e Don't reuse KConfigDialogs
Because a cached dialog stays parented to the initial part, which might
not be the one used to open it.
This is especially visible now that we support more than one window per
okular process.

For example:
 - User initially opens a dialog from window A
      -> This dialog gets cached as child of A's PageView. This implies that
         clicking on the dialog also brings window A to foreground.
 - User re-opens the dialog from a different window B
      -> The dialog is still a child of A's PageView, therefore clicking on the
         dialog's frame brings A to the foreground, and B to the background.
2013-05-28 23:44:56 +02:00
Fabio D'Urso 84d7eae067 Make KConfigDialogs application-modal (instead of window-modal) 2013-05-28 23:44:55 +02:00
Fabio D'Urso 4526dd2fd0 Make all parts receive config change notifications
Instead of listening on KConfigDialog's signals, this patch makes parts
listen on Okular::Settings::self()'s configChanged() signal.

Unlike KConfigDialogs, Okular::Settings::self() is unique and never
changes during the process lifetime, and therefore:
 - A part can connect during initialization and receive notifications,
   without depeding on KConfigDialog objects (which might be instanced
   or deleted by a different part).
 - The connection now survives deletion of the KConfigDialog.
2013-05-28 23:44:55 +02:00
Albert Astals Cid 0fa9232f78 Do compressed checks based on mime inheritance
Instead of using a hardcoded map
BUGS: 320195
FIXED-IN: 4.10.4
2013-05-27 23:34:58 +02:00
Albert Astals Cid d8133a173c Do compressed checks based on mime inheritance
Instead of using a hardcoded map
BUGS: 320195
FIXED-IN: 4.10.4
2013-05-27 23:33:34 +02:00
Fabio D'Urso 460502d124 Make "Save As" default path point to where the file was opened from
BUG: 319042
FIXED-IN: 4.11.0
REVIEW: 110419
2013-05-14 01:02:51 +02:00
Tomáš Poledný 5ab30aae15 Open print dialog from command line
BUGS: 252462
REVIEW: 109096
FIXED-IN: 4.11.0
GUI
2013-03-11 22:52:25 +01:00
Albert Astals Cid 541650a4f4 Remove the concept of observer/view id
Just use the pointer as id :-)

This is BIC and SIC, increase the soversion now to makes sure we don't forget in the future

Patch based in an earlier patch by Bogdan Cristea <cristeab@gmail.com>
REVIEW: 109115
2013-02-24 23:01:02 +01:00
Albert Astals Cid f40b42f8db Fix my fixes for 313147 and 313146
It actually fixed them but make the toc reload keeping not work anymore :D
2013-01-18 18:03:10 +01:00
Albert Astals Cid 4fefc60e35 Do not prepare the toc for reload until we are really reloading
BUGS: 313147
2013-01-15 01:17:14 +01:00
Jaydeep Solanki 7c99477f94 Preserve TOC folding status on document dirty reload
REVIEW: 107994
BUGS: 312138
2013-01-09 23:31:23 +01:00
Fabio D'Urso 8decf29df9 Make "Reloading in progress" visible while the file is being reloaded 2012-12-01 01:16:59 +01:00
Fabio D'Urso a0135a3c8e Fix reload of modified documents that take longer to be ready
SlotDoFileDirty tries to reload the file at regular intervals.
This patch fixes it so that it can actually reopen the file even if
it is not ready at the first timer shot.

BUG: 310531
2012-12-01 00:04:34 +01:00
Fabio D'Urso 9f19fc3daa PDF documents: Tell the user that XFA forms are not supported yet 2012-11-03 18:28:51 +01:00
Jaydeep Solanki b115232966 D-Bus access to non-first Okular::Part
REVIEW: 106531
BUGS: 306313
FIXED-IN: 4.10.0
2012-09-25 21:30:23 +02:00
Sandro Mani 21fd5cfb0d Add option to show complete file path in window title
BUGS: 296870
REVIEW: 106345
FIXED-IN: 4.10.0
2012-09-08 15:33:42 +02:00
Jaydeep Solanki 6d6a3bfce5 Open a new Shell when opening a new file
BUGS: 166645
FIXED-IN: 4.10.0
REVIEW: 105965
GUI
2012-09-04 20:04:01 +02:00
Fabio D'Urso 0a6f211c41 Moved m_findBar->resetSearch() from closeUrl() to notifySetup()
As a side effect, this change fixes bug 303998, that caused a crash if
the part's widget was destroyed before the part itself, because
m_findBar had already been destroyed.

BUG: 303998
FIXED-IN: 4.9.0
2012-07-25 19:13:20 +02:00
Fabio D'Urso e0b74d7c09 Force next search to be restarted when the document is changed 2012-07-12 22:53:53 +02:00
Fabio D'Urso a72fbc6a8c Keep the find bar working after ESC is pressed in PageView
Instead of directly killing the search in the core, emit a signal
caught by FindBar to tell its SearchLineEdit to reset the search
operation.
In this way, SearchLineEdit can set m_changed, and next time a new
search operation will be started, instead of attempting to use the
old one.
2012-07-12 22:53:53 +02:00
Sebastian Dörner 8ab7683ea1 Let additional mouse buttons trigger history navigation
This is consistent with a recent change in Dolphin and with what browsers have been doing for a long time.

REVIEW: 105440
DIGEST:
2012-07-10 17:45:23 +01:00
Fabio D'Urso 939891c9dd Renamed Document::SaveCapability members I added ten minutes ago
Forms -> SaveFormsCapability
Annotations -> SaveAnnotationsCapability
2012-06-14 00:31:17 +02:00
Fabio D'Urso 23eb083b00 Show a warning if annotations will not be saved to PDF.
The only affected generator is poppler (because it's the only one with
saving support).
Since version 0.20, Poppler can save annotations to PDF. If the user is
using an older version, this patch warns him that annotations are not
saved.
2012-06-13 22:59:55 +02:00
Fabio D'Urso dee51ee71b Disable presentation-related actions if presentation mode is not open
- Keep "Toggle drawing mode", "Erase Drawings" and "Switch blackscreen
  mode" actions disabled unless the presentation mode is open.
- Uncheck blackscreen mode on presentation exit
2012-06-07 18:59:38 +02:00
Fabio D'Urso ac695d448d Do not close the document in Shell::queryClose()
Because if we do, Shell::saveProperties will find it closed and won't
save the session correctly.

BUG: 300985
2012-06-05 00:49:03 +02:00
Fabio D'Urso a6922a4430 Don't produce unusable file if user presses "Save As" on a .okular archive
Make "Save As" behave like "Export as Document Archive" if we are
saving a .okular file.
BUG: 258475
2012-06-05 00:48:58 +02:00
Fabio D'Urso e3f1c388de Ask "Save annotation changes?" if there are unsaved annotations that cannot be saved locally
This patch turns Okular into a ReadWritePart. Annotation editing is always
disabled if we're loaded as ReadOnlyPart, no matter the document type.

REVIEW: 105020
2012-05-23 23:43:44 +02:00
Mailson Menezes bd9087f20a Remember position on the page in bookmark
IOW accept more than one bookmark per page
BUGS: 157198
REVIEW: 104365
2012-03-26 20:01:01 +02:00
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