Bug 135578

Summary: Presentation mode watch file should stay in Presentation mode
Product: [Unmaintained] kpdf Reporter: Jake Martin <foontala>
Component: generalAssignee: Albert Astals Cid <aacid>
Status: RESOLVED FIXED    
Severity: wishlist CC: foontala
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jake Martin 2006-10-13 12:56:27 UTC
Version:           3.5.5 (using KDE KDE 3.5.5)
Installed from:    Compiled From Sources
Compiler:          gcc 4.1.1 
OS:                Linux

When a file is changed during presentation mode, the presentation mode is "cancelled".  It would be nice if files could change and kpdf would stay in presentation mode and "watch file" at the same tim.  

I would like this because I develop in latex with kile on one monitor, and would like to have kpdf in presentation mode constantly on the other monitor watching file changes.

Thanks for your hard work.  KDE is an awesome product.
Comment 1 Albert Astals Cid 2006-10-15 13:50:33 UTC
SVN commit 595680 by aacid:

When reloading a document because it changed still be in presentation mode after the reload
BUGS: 135578


 M  +2 -0      part.cpp  
 M  +1 -0      part.h  


--- branches/KDE/3.5/kdegraphics/kpdf/part.cpp #595679:595680
@@ -526,6 +526,7 @@
   if (m_viewportDirty.pageNumber == -1)
   {
     m_viewportDirty = m_document->viewport();
+    m_wasPresentationOpen = ((PresentationWidget*)m_presentationWidget != 0);
     m_pageView->showText(i18n("Reloading the document..."), 0);
   }
 
@@ -534,6 +535,7 @@
     if (m_viewportDirty.pageNumber >= (int)m_document->pages()) m_viewportDirty.pageNumber = (int)m_document->pages() - 1;
     m_document->setViewport(m_viewportDirty);
     m_viewportDirty.pageNumber = -1;
+    if (m_wasPresentationOpen) slotShowPresentation();
     emit enablePrintAction(true);
   }
   else
--- branches/KDE/3.5/kdegraphics/kpdf/part.h #595679:595680
@@ -158,6 +158,7 @@
 	KDirWatch *m_watcher;
 	QTimer *m_dirtyHandler;
 	DocumentViewport m_viewportDirty;
+	bool m_wasPresentationOpen;
 	
 	// Remember the search history
 	QStringList m_searchHistory;