Commit 4fd1abaa authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

- kpdf_pagewidget sends upstream the right button clicked signal even if there is no document open

 - Plug the show menu bar option in RMB popup when menubar is hidden and unplug it when menubar is there
CCMAIL:89673-done@bugs.kde.org

svn path=/trunk/kdegraphics/kpdf/; revision=347368
parent 2581597b
......@@ -67,6 +67,10 @@ namespace KPDF
PageWidget::contentsMousePressEvent(QMouseEvent* e)
{
double x, y;
if ( e->button() & RightButton )
emit rightClick();
if (m_doc == 0)
return;
if ( e->button() & LeftButton )
......@@ -74,10 +78,6 @@ namespace KPDF
m_dragGrabPos = e -> globalPos();
setCursor( sizeAllCursor );
}
else if ( e->button() & RightButton )
{
emit rightClick();
}
m_outputdev->cvtDevToUser(e->x(), e->y(), &x, &y);
m_pressedAction = m_doc->findLink(x, y);
......
......@@ -128,7 +128,6 @@ Shell::setupActions()
m_showMenuBarAction = KStdAction::showMenubar( this, SLOT( slotShowMenubar() ), actionCollection(), "options_show_menubar" );
m_fullScreenAction = KStdAction::fullScreen( this, SLOT( slotUpdateFullScreen() ), actionCollection(), this );
m_popup = new KPopupMenu( this, "rmb popup" );
m_popup->insertTitle( i18n( "Full Screen Options" ) );
m_fullScreenAction->plug( m_popup );
}
......@@ -144,9 +143,15 @@ Shell::saveProperties(KConfig* config)
void Shell::slotShowMenubar()
{
if ( m_showMenuBarAction->isChecked() )
{
menuBar()->show();
m_showMenuBarAction->unplug( m_popup );
}
else
{
menuBar()->hide();
m_showMenuBarAction->plug( m_popup );
}
}
......@@ -196,6 +201,7 @@ void Shell::slotUpdateFullScreen()
{
if( m_fullScreenAction->isChecked())
{
m_showMenuBarAction->unplug( m_popup );
menuBar()->hide();
toolBar()->hide();
//todo fixme
......@@ -211,7 +217,7 @@ void Shell::slotUpdateFullScreen()
{
//kapp->removeEventFilter( m_fsFilter );
//m_pdfpart->setFullScreen( false );
menuBar()->show();
slotShowMenubar();
toolBar()->show();
showNormal();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment