Commit 804abdc5 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Merge branch 'master' into kill_poppler_thread

parents 744915f2 0c4ed4c0
......@@ -100,6 +100,7 @@ install( FILES
interfaces/configinterface.h
interfaces/guiinterface.h
interfaces/printinterface.h
interfaces/viewerinterface.h
DESTINATION ${INCLUDE_INSTALL_DIR}/okular/interfaces COMPONENT Devel)
kde4_add_ui_files(okularcore_SRCS
......@@ -196,7 +197,7 @@ install(TARGETS okularpart DESTINATION ${PLUGIN_INSTALL_DIR})
########### install files ###############
install( FILES okular_part.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install( FILES part.rc DESTINATION ${DATA_INSTALL_DIR}/okular )
install( FILES part.rc part-viewermode.rc DESTINATION ${DATA_INSTALL_DIR}/okular )
########### cmake files #################
......
......@@ -15,11 +15,18 @@
#include "ui_dlggeneralbase.h"
DlgGeneral::DlgGeneral( QWidget * parent )
DlgGeneral::DlgGeneral( QWidget * parent, Okular::EmbedMode embedMode )
: QWidget( parent )
{
m_dlg = new Ui_DlgGeneralBase();
m_dlg->setupUi( this );
if( embedMode == Okular::ViewerWidgetMode )
{
m_dlg->kcfg_SyncThumbnailsViewport->setVisible( false );
m_dlg->kcfg_DisplayDocumentTitle->setVisible( false );
m_dlg->kcfg_WatchFile->setVisible( false );
}
}
DlgGeneral::~DlgGeneral()
......
......@@ -12,12 +12,14 @@
#include <qwidget.h>
#include "part.h"
class Ui_DlgGeneralBase;
class DlgGeneral : public QWidget
{
public:
DlgGeneral( QWidget * parent = 0 );
DlgGeneral( QWidget * parent, Okular::EmbedMode embedMode );
virtual ~DlgGeneral();
protected:
......
......@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
<kcfgfile name="okularpartrc" />
<kcfgfile arg="true" />
<include>kuser.h</include>
<group name="Debugging Options" >
<entry key="DebugDrawBoundaries" type="Bool" >
......@@ -261,6 +261,9 @@
<min>0.1</min>
<max>4.0</max>
</entry>
<entry key="ShowSourceLocationsGraphically" type="Bool" >
<default>false</default>
</entry>
</group>
<group name="Identity" >
<entry key="IdentityAuthor" type="String">
......
......@@ -21,15 +21,15 @@
#include "dlgeditor.h"
#include "dlgdebug.h"
PreferencesDialog::PreferencesDialog( QWidget * parent, KConfigSkeleton * skeleton )
PreferencesDialog::PreferencesDialog( QWidget * parent, KConfigSkeleton * skeleton, Okular::EmbedMode embedMode )
: KConfigDialog( parent, "preferences", skeleton )
{
m_general = new DlgGeneral( this );
m_general = new DlgGeneral( this, embedMode );
m_performance = new DlgPerformance( this );
m_accessibility = new DlgAccessibility( this );
m_presentation = new DlgPresentation( this );
m_identity = new DlgIdentity( this );
m_editor = new DlgEditor( this );
m_presentation = 0;
m_identity = 0;
m_editor = 0;
#ifdef OKULAR_DEBUG_CONFIGPAGE
m_debug = new DlgDebug( this );
#endif
......@@ -37,11 +37,21 @@ PreferencesDialog::PreferencesDialog( QWidget * parent, KConfigSkeleton * skelet
addPage( m_general, i18n("General"), "okular", i18n("General Options") );
addPage( m_accessibility, i18n("Accessibility"), "preferences-desktop-accessibility", i18n("Accessibility Reading Aids") );
addPage( m_performance, i18n("Performance"), "preferences-system-performance", i18n("Performance Tuning") );
addPage( m_presentation, i18n("Presentation"), "view-presentation",
i18n("Options for Presentation Mode") );
addPage( m_identity, i18n("Identity"), "preferences-desktop-personal",
i18n("Identity Settings") );
addPage( m_editor, i18n("Editor"), "accessories-text-editor", i18n("Editor Options") );
if( embedMode == Okular::ViewerWidgetMode )
{
setCaption( i18n("Configure Viewer") );
}
else
{
m_presentation = new DlgPresentation( this );
m_identity = new DlgIdentity( this );
m_editor = new DlgEditor( this );
addPage( m_presentation, i18n("Presentation"), "view-presentation",
i18n("Options for Presentation Mode") );
addPage( m_identity, i18n("Identity"), "preferences-desktop-personal",
i18n("Identity Settings") );
addPage( m_editor, i18n("Editor"), "accessories-text-editor", i18n("Editor Options") );
}
#ifdef OKULAR_DEBUG_CONFIGPAGE
addPage( m_debug, "Debug", "system-run", "Debug options" );
#endif
......
......@@ -11,6 +11,7 @@
#define _PREFERENCESDIALOG_H
#include <kconfigdialog.h>
#include "part.h"
#include "settings.h"
class QWidget;
......@@ -28,7 +29,7 @@ class PreferencesDialog : public KConfigDialog
{
public:
PreferencesDialog( QWidget * parent, KConfigSkeleton * config );
PreferencesDialog( QWidget * parent, KConfigSkeleton * config, Okular::EmbedMode embedMode );
protected:
// void updateSettings(); // Called when OK/Apply is pressed.
......
......@@ -66,6 +66,7 @@
#include "interfaces/printinterface.h"
#include "interfaces/saveinterface.h"
#include "observer.h"
#include "misc.h"
#include "page.h"
#include "page_p.h"
#include "pagecontroller_p.h"
......@@ -3073,6 +3074,12 @@ void Document::processSourceReference( const SourceReference * ref )
return;
}
bool handled = false;
emit sourceReferenceActivated(absFileName, ref->row(), ref->column(), &handled);
if(handled) {
return;
}
static QHash< int, QString > editors;
// init the editors table if empty (on first run, usually)
if ( editors.isEmpty() )
......
......@@ -730,6 +730,18 @@ class OKULAR_EXPORT Document : public QObject
*/
void formFieldChanged( Okular::FormField *formField );
/**
* This signal is emitted whenever a source reference with the given parameters has been
* activated.
*
* \param handled should be set to 'true' if a slot handles this source reference; the
* default action to launch the configured editor will then not be performed
* by the document
*
* @since 0.14 (KDE 4.8)
*/
void sourceReferenceActivated(const QString& absFileName, int line, int col, bool *handled);
private:
/// @cond PRIVATE
friend class DocumentPrivate;
......
/***************************************************************************
* Copyright (C) 2011 by Michel Ludwig <michel.ludwig@kdemail.net> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#ifndef _OKULAR_VIEWERINTERFACE_H_
#define _OKULAR_VIEWERINTERFACE_H_
#include "../core/okular_export.h"
#include <QtCore/QObject>
#include <QString>
namespace Okular {
/**
* @short Abstract interface for controlling advanced features of a document viewer
*
* This interface can be used to control some more or less advanced features of a document
* viewer.
*/
class OKULAR_EXPORT ViewerInterface
{
public:
virtual ~ViewerInterface() {}
/**
* Show the specified source location centrally in the viewer.
*/
virtual void showSourceLocation(const QString& fileName, int line, int column) = 0;
/**
* Allows to control whether source locations are shown graphically, or not.
**/
virtual void setShowSourceLocationsGraphically(bool b) = 0;
/**
* Allows to enable or disable the watch file mode
*/
virtual void setWatchFileModeEnabled(bool b) = 0;
// SIGNALS
/**
* The signal 'openSourceReference' is emitted whenever the user has triggered a source
* reference in the currently displayed document.
*/
void openSourceReference(const QString& absFileName, int line, int column);
/**
* The signal 'viewerMenuStateChange' is emitted whenever the state of the menu
* 'menu_okular_part_viewer' defined in 'part-viewermode.rc' has changed.
*/
void viewerMenuStateChange(bool enabled);
};
}
Q_DECLARE_INTERFACE( Okular::ViewerInterface, "org.kde.okular.ViewerInterface/0.1" )
#endif
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui name="okular_part_viewermode" version="1">
<MenuBar>
<Menu name="file"><text>&amp;File</text>
<Action name="file_print_preview" group="okular_print_merge"/>
</Menu>
<Menu name="settings"><text>&amp;Settings</text>
<Action name="options_configure_generators" group="configure_merge"/>
<Action name="options_configure" group="configure_merge"/>
</Menu>
<Menu name="help"><text>&amp;Help</text>
<Action name="help_about_backend" group="about_merge"/>
</Menu>
</MenuBar>
<Menu name="menu_okular_part_viewer">
<Action name="mouse_drag" group="viewer_menu_merge"/>
<Action name="mouse_zoom" group="viewer_menu_merge"/>
<Separator group="viewer_menu_merge"/>
<Action name="view_zoom_in" group="viewer_menu_merge"/>
<Action name="view_zoom_out" group="viewer_menu_merge"/>
<Action name="view_fit_to_width" group="viewer_menu_merge"/>
<Action name="view_fit_to_page" group="viewer_menu_merge"/>
<Action name="zoom_fit_rect" group="viewer_menu_merge"/>
<Separator group="viewer_menu_merge"/>
<Action name="view_continuous" group="viewer_menu_merge"/>
<Action name="view_render_mode" group="viewer_menu_merge"/>
<Separator group="viewer_menu_merge"/>
<Menu name="view_orientation" group="viewer_menu_merge"><text>&amp;Orientation</text>
<Action name="view_orientation_rotate_ccw" group="viewer_menu_merge"/>
<Action name="view_orientation_rotate_cw" group="viewer_menu_merge"/>
<Action name="view_orientation_original" group="viewer_menu_merge"/>
</Menu>
<Action name="view_pagesizes" group="viewer_menu_merge"/>
<Action name="view_trim_margins" group="viewer_menu_merge"/>
<Separator group="viewer_menu_merge"/>
<Action name="go_previous" group="viewer_menu_merge"/>
<Action name="go_next" group="viewer_menu_merge"/>
<Separator group="viewer_menu_merge"/>
<Action name="first_page" group="viewer_menu_merge"/>
<Action name="last_page" group="viewer_menu_merge"/>
<Separator group="viewer_menu_merge"/>
<Action name="go_document_back" group="viewer_menu_merge"/>
<Action name="go_document_forward" group="viewer_menu_merge"/>
<Separator group="viewer_menu_merge"/>
<Action name="go_goto_page" group="viewer_menu_merge"/>
<Separator group="viewer_menu_merge"/>
<Menu name="okular_bookmarks" group="viewer_menu_merge"><text>&amp;Bookmarks</text>
<Action name="bookmark_add" group="viewer_menu_merge"/>
<Action name="previous_bookmark" group="viewer_menu_merge"/>
<Action name="next_bookmark" group="viewer_menu_merge"/>
<Separator group="viewer_menu_merge"/>
<ActionList name="bookmarks_currentdocument" group="viewer_menu_merge"/>
</Menu>
<Separator group="viewer_menu_merge"/>
<Action name="edit_find" group="viewer_menu_merge"/>
<Action name="edit_find_next" group="viewer_menu_merge"/>
<Action name="edit_find_prev" group="viewer_menu_merge"/>
</Menu>
<ToolBar name="OkularViewerToolBar"><text>Viewer Toolbar</text>
<Action name="zoom_to" />
<Action name="view_zoom_out"/>
<Action name="view_zoom_in"/>
<Separator/>
<Action name="mouse_drag"/>
<Action name="mouse_zoom"/>
<Action name="mouse_selecttools"/>
</ToolBar>
</kpartgui>
This diff is collapsed.
......@@ -24,6 +24,7 @@
#include "core/observer.h"
#include "core/document.h"
#include "kdocumentviewer.h"
#include "interfaces/viewerinterface.h"
#include <QtDBus/QtDBus>
......@@ -42,6 +43,7 @@ class KAboutData;
class KTemporaryFile;
class KAction;
class KMenu;
namespace KParts { class GUIActivateEvent; }
class FindBar;
class ThumbnailList;
......@@ -64,6 +66,20 @@ namespace Okular
class BrowserExtension;
class ExportFormat;
/**
* Describes the possible embedding modes of the part
*
* @since 0.14 (KDE 4.8)
*/
enum EmbedMode
{
UnknownEmbedMode,
NativeShellMode, // embedded in the native Okular' shell
PrintPreviewMode, // embedded to show the print preview of a document
KHTMLPartMode, // embedded in KHTML
ViewerWidgetMode, // the part acts as a widget that can display all kinds of documents
};
/**
* This is a "Part". It that does all the real work in a KPart
* application.
......@@ -72,22 +88,21 @@ class ExportFormat;
* @author Wilco Greven <greven@kde.org>
* @version 0.2
*/
class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, public KDocumentViewer
class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, public KDocumentViewer, public Okular::ViewerInterface
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.kde.okular")
Q_INTERFACES(KDocumentViewer)
Q_INTERFACES(Okular::ViewerInterface)
public:
enum EmbedMode
{
UnknownEmbedMode,
NativeShellMode, // embedded in the native Okular' shell
PrintPreviewMode, // embedded to show the print preview of a document
KHTMLPartMode // embedded in KHTML
};
// Default constructor
/**
* If one element of 'args' contains one of the strings "Print/Preview" or "ViewerWidget",
* the part will be set up in the corresponding mode. Additionally, it is possible to specify
* which config file should be used by adding a string containing "ConfigFileName=<file name>"
* to 'args'.
**/
Part(QWidget* parentWidget, QObject* parent, const QVariantList& args);
// Destructor
......@@ -105,6 +120,10 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi
KUrl realUrl() const;
void showSourceLocation(const QString& fileName, int line, int column);
void setWatchFileModeEnabled(bool enable);
void setShowSourceLocationsGraphically(bool show);
public slots: // dbus
Q_SCRIPTABLE Q_NOREPLY void goToPage(uint page);
Q_SCRIPTABLE Q_NOREPLY void openDocument( const QString &doc );
......@@ -124,12 +143,15 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi
signals:
void enablePrintAction(bool enable);
void openSourceReference(const QString& absFileName, int line, int column);
void viewerMenuStateChange(bool enabled);
protected:
// reimplemented from KParts::ReadOnlyPart
bool openFile();
bool openUrl(const KUrl &url);
bool closeUrl();
void guiActivateEvent(KParts::GUIActivateEvent *event);
protected slots:
// connected to actions
......@@ -186,6 +208,10 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi
void psTransformEnded(int, QProcess::ExitStatus);
private:
void setupViewerActions();
void setViewerShortcuts();
void setupActions();
void setupPrint( QPrinter &printer );
void doPrint( QPrinter &printer );
bool handleCompressed( QString &destpath, const QString &path, const QString &compressedMimetype );
......@@ -283,6 +309,7 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi
private slots:
void slotGeneratorPreferences();
void slotHandleActivatedSourceReference(const QString& absFileName, int line, int col, bool *handled);
};
}
......
......@@ -51,12 +51,12 @@ void PagePainter::paintPageOnPainter( QPainter * destPainter, const Okular::Page
int pixID, int flags, int scaledWidth, int scaledHeight, const QRect &limits )
{
paintCroppedPageOnPainter( destPainter, page, pixID, flags, scaledWidth, scaledHeight, limits,
Okular::NormalizedRect( 0, 0, 1, 1 ) );
Okular::NormalizedRect( 0, 0, 1, 1 ), 0 );
}
void PagePainter::paintCroppedPageOnPainter( QPainter * destPainter, const Okular::Page * page,
int pixID, int flags, int scaledWidth, int scaledHeight, const QRect &limits,
const Okular::NormalizedRect &crop )
const Okular::NormalizedRect &crop, Okular::NormalizedPoint *viewPortPoint )
{
/* Calculate the cropped geometry of the page */
QRect scaledCrop = crop.geometry( scaledWidth, scaledHeight );
......@@ -209,7 +209,7 @@ void PagePainter::paintCroppedPageOnPainter( QPainter * destPainter, const Okula
/** 3 - ENABLE BACKBUFFERING IF DIRECT IMAGE MANIPULATION IS NEEDED **/
bool bufferAccessibility = (flags & Accessibility) && Okular::Settings::changeColors() && (Okular::Settings::renderMode() != Okular::Settings::EnumRenderMode::Paper);
bool useBackBuffer = bufferAccessibility || bufferedHighlights || bufferedAnnotations;
bool useBackBuffer = bufferAccessibility || bufferedHighlights || bufferedAnnotations || viewPortPoint;
QPixmap * backPixmap = 0;
QPainter * mixedPainter = 0;
QRect limitsInPixmap = limits.translated( crop.geometry( scaledWidth, scaledHeight ).topLeft() );
......@@ -524,6 +524,33 @@ void PagePainter::paintCroppedPageOnPainter( QPainter * destPainter, const Okula
} // end current annotation drawing
}
if(viewPortPoint)
{
QPainter painter(&backImage);
painter.translate( -limits.left(), -limits.top() );
painter.setPen( QApplication::palette().color( QPalette::Active, QPalette::Highlight ) );
painter.drawLine( 0, viewPortPoint->y * scaledHeight + 1, scaledWidth - 1, viewPortPoint->y * scaledHeight + 1 );
// ROTATION CURRENTLY NOT IMPLEMENTED
/*
if( page->rotation() == Okular::Rotation0)
{
}
else if(page->rotation() == Okular::Rotation270)
{
painter.drawLine( viewPortPoint->y * scaledHeight + 1, 0, viewPortPoint->y * scaledHeight + 1, scaledWidth - 1);
}
else if(page->rotation() == Okular::Rotation180)
{
painter.drawLine( 0, (1.0 - viewPortPoint->y) * scaledHeight - 1, scaledWidth - 1, (1.0 - viewPortPoint->y) * scaledHeight - 1 );
}
else if(page->rotation() == Okular::Rotation90) // not right, rotation clock-wise
{
painter.drawLine( scaledWidth - (viewPortPoint->y * scaledHeight + 1), 0, scaledWidth - (viewPortPoint->y * scaledHeight + 1), scaledWidth - 1);
}
*/
}
// 4B.5. create the back pixmap converting from the local image
backPixmap = new QPixmap( QPixmap::fromImage( backImage ) );
......
......@@ -49,7 +49,7 @@ class PagePainter
// The painter's (0,0) is assumed to be top left of the painted ('pageLimits') rect.
static void paintCroppedPageOnPainter( QPainter * p, const Okular::Page * page, int pixID,
int flags, int scaledWidth, int scaledHeight, const QRect & pageLimits,
const Okular::NormalizedRect & crop );
const Okular::NormalizedRect & crop, Okular::NormalizedPoint *viewPortPoint );
private:
static void cropPixmapOnImage( QImage & dest, const QPixmap * src, const QRect & r );
......
......@@ -68,6 +68,7 @@
#include "tts.h"
#include "videowidget.h"
#include "core/action.h"
#include "core/area.h"
#include "core/document.h"
#include "core/form.h"
#include "core/page.h"
......@@ -143,6 +144,9 @@ public:
bool viewportMoveActive;
QTime viewportMoveTime;
QPoint viewportMoveDest;
int lastSourceLocationViewportPageNumber;
double lastSourceLocationViewportNormalizedX;
double lastSourceLocationViewportNormalizedY;
QTimer * viewportMoveTimer;
// auto scroll
int scrollIncrement;
......@@ -198,6 +202,7 @@ public:
KAction * aSpeakPage;
KAction * aSpeakStop;
KActionCollection * actionCollection;
QActionGroup * mouseModeActionGroup;
int setting_viewCols;
};
......@@ -305,6 +310,7 @@ PageView::PageView( QWidget *parent, Okular::Document *document )
d->actionCollection = 0;
d->aPageSizes=0;
d->setting_viewCols = Okular::Settings::viewColumns();
d->mouseModeActionGroup = 0;
switch( Okular::Settings::zoomMode() )
{
......@@ -401,10 +407,13 @@ void PageView::setupBaseActions( KActionCollection * ac )
d->aZoomOut = KStandardAction::zoomOut( this, SLOT(slotZoomOut()), ac );
}
void PageView::setupActions( KActionCollection * ac )
void PageView::setupViewerActions( KActionCollection * ac )
{
d->actionCollection = ac;
d->aZoomIn->setShortcut( QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Plus) );
d->aZoomOut->setShortcut( QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Minus) );
// orientation menu actions
d->aRotateClockwise = new KAction( KIcon( "object-rotate-right" ), i18n( "Rotate &Right" ), this );
d->aRotateClockwise->setIconText( i18nc( "Rotate right", "Right" ) );
......@@ -481,16 +490,16 @@ do { \
connect( d->aViewContinuous, SIGNAL(toggled(bool)), SLOT(slotContinuousToggled(bool)) );
d->aViewContinuous->setChecked( Okular::Settings::viewContinuous() );
// Mouse-Mode actions
QActionGroup * actGroup = new QActionGroup( this );
actGroup->setExclusive( true );
// Mouse mode actions for viewer mode
d->mouseModeActionGroup = new QActionGroup( this );
d->mouseModeActionGroup->setExclusive( true );
d->aMouseNormal = new KAction( KIcon( "input-mouse" ), i18n( "&Browse Tool" ), this );
ac->addAction("mouse_drag", d->aMouseNormal );
connect( d->aMouseNormal, SIGNAL(triggered()), this, SLOT(slotSetMouseNormal()) );
d->aMouseNormal->setIconText( i18nc( "Browse Tool", "Browse" ) );
d->aMouseNormal->setCheckable( true );
d->aMouseNormal->setShortcut( Qt::CTRL + Qt::Key_1 );
d->aMouseNormal->setActionGroup( actGroup );
d->aMouseNormal->setActionGroup( d->mouseModeActionGroup );
d->aMouseNormal->setChecked( true );
KAction * mz = new KAction(KIcon( "page-zoom" ), i18n("&Zoom Tool"), this);
......@@ -499,15 +508,26 @@ do { \
mz->setIconText( i18nc( "Zoom Tool", "Zoom" ) );
mz->setCheckable( true );
mz->setShortcut( Qt::CTRL + Qt::Key_2 );
mz->setActionGroup( actGroup );
mz->setActionGroup( d->mouseModeActionGroup );
}
// WARNING: 'setupViewerActions' must have been called before this method
void PageView::setupActions( KActionCollection * ac )
{
d->actionCollection = ac;
d->aZoomIn->setShortcut( KStandardShortcut::zoomIn() );
d->aZoomOut->setShortcut( KStandardShortcut::zoomOut() );
// Mouse-Mode actions
d->aMouseSelect = new KAction(KIcon( "select-rectangular" ), i18n("&Selection Tool"), this);
ac->addAction("mouse_select", d->aMouseSelect );
connect( d->aMouseSelect, SIGNAL(triggered()), this, SLOT(slotSetMouseSelect()) );
d->aMouseSelect->setIconText( i18nc( "Select Tool", "Selection" ) );
d->aMouseSelect->setCheckable( true );
d->aMouseSelect->setShortcut( Qt::CTRL + Qt::Key_3 );
d->aMouseSelect->setActionGroup( actGroup );
d->aMouseSelect->setActionGroup( d->mouseModeActionGroup );
d->aMouseTextSelect = new KAction(KIcon( "draw-text" ), i18n("&Text Selection Tool"), this);
ac->addAction("mouse_textselect", d->aMouseTextSelect );
......@@ -515,7 +535,7 @@ do { \
d->aMouseTextSelect->setIconText( i18nc( "Text Selection Tool", "Text Selection" ) );
d->aMouseTextSelect->setCheckable( true );
d->aMouseTextSelect->setShortcut( Qt::CTRL + Qt::Key_4 );
d->aMouseTextSelect->setActionGroup( actGroup );
d->aMouseTextSelect->setActionGroup( d->mouseModeActionGroup );
d->aMouseTableSelect = new KAction(KIcon( "select-table" ), i18n("T&able Selection Tool"), this);
ac->addAction("mouse_tableselect", d->aMouseTableSelect );
......@@ -523,7 +543,7 @@ do { \
d->aMouseTableSelect->setIconText( i18nc( "Table Selection Tool", "Table Selection" ) );
d->aMouseTableSelect->setCheckable( true );
d->aMouseTableSelect->setShortcut( Qt::CTRL + Qt::Key_5 );
d->aMouseTableSelect->setActionGroup( actGroup );
d->aMouseTableSelect->setActionGroup( d->mouseModeActionGroup );
d->aToggleAnnotator = new KToggleAction(KIcon( "draw-freehand" ), i18n("&Review"), this);
ac->addAction("mouse_toggle_annotate", d->aToggleAnnotator );
......@@ -840,6 +860,9 @@ void PageView::notifySetup( const QVector< Okular::Page * > & pageSet, int setup
// update the mouse cursor when closing because we may have close through a link and
// want the cursor to come back to the normal cursor
updateCursor( contentAreaPosition() + viewport()->mapFromGlobal( QCursor::pos() ) );
// then, make the message window and scrollbars disappear, which triggers a repaint
d->messageWindow->hide();
resizeContentArea( QSize( 0,0 ) );
}