Bug 106771 - kpdf embedded in konquerror: address bar doesn't updated, when jumping to another file by hyperlink
Summary: kpdf embedded in konquerror: address bar doesn't updated, when jumping to ano...
Status: RESOLVED FIXED
Alias: None
Product: kpdf
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-04 12:19 UTC by Ilia K.
Modified: 2005-06-22 10:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ilia K. 2005-06-04 12:19:16 UTC
Version:           3.4.0 (using KDE 3.4.0,%20ALT%20Linux)
Compiler:          gcc%20version%203.4.3%2020050314%20(ALT%20Linux,%20build%203.4.3-alt6)
OS:                Linux%20(i686)%20release%202.6.11-std26-up-alt6

1. Go to page:
http://www.math.uakron.edu/~dpstory/e-calculus.html#starteCalculus
and click on "e-Calculus" logo. This will open 
http://www.math.uakron.edu/~dpstory/tutorial/mainmenu.pdf
file in embedded kpdf.

2. On the 1st slide click on "e-Calculus" logo (2nd bullet) - it's an external hyperlink. This will open:
http://www.math.uakron.edu/~dpstory/tutorial/maintut.pdf
Title of the window is changed to the new location, but address bar don't. 

Also, neither kpdf's nor konqueror's "Previous" arrow are available - should I open another bug about it?

(You can also note, that only thumbnails are displayed after such a hyperlink jump. It's a kpdf bug #106767, I've just reported)
Comment 1 Albert Astals Cid 2005-06-05 17:15:31 UTC
I've looked at kpart docs and can not find a way that the part notifies the shell it should change the location content, any of the konq devels listening has a idea if that is possible?
Comment 2 Albert Astals Cid 2005-06-06 21:22:08 UTC
This is a kpdf bug
Comment 3 Albert Astals Cid 2005-06-06 23:07:22 UTC
SVN commit 422907 by aacid:

Fix bug 106771
BUGS: 106771


 M  +15 -3     part.cpp  
 M  +4 -0      part.h  


--- trunk/KDE/kdegraphics/kpdf/part.cpp #422906:422907
@@ -80,13 +80,13 @@
            QObject *parent, const char *name,
            const QStringList & /*args*/ )
 	: DCOPObject("kpdf"), KParts::ReadOnlyPart(parent, name), m_showMenuBarAction(0), m_showFullScreenAction(0),
-	m_actionsSearched(false), m_searchStarted(false)
+	m_actionsSearched(false), m_searchStarted(false), m_notifyOpening(false)
 {
 	// load catalog for translation
 	KGlobal::locale()->insertCatalogue("kpdf");
 
 	// create browser extension (for printing when embedded into browser)
-	new BrowserExtension(this);
+	m_bExtension = new BrowserExtension(this);
 
 	// xpdf 'extern' global class (m_count is a static instance counter)
 	//if ( m_count ) TODO check if we need to insert these lines..
@@ -102,7 +102,7 @@
 	m_document = new KPDFDocument();
 	connect( m_document, SIGNAL( linkFind() ), this, SLOT( slotFind() ) );
 	connect( m_document, SIGNAL( linkGoToPage() ), this, SLOT( slotGoToPage() ) );
-	connect( m_document, SIGNAL( openURL(const KURL &) ), this, SLOT( openURL(const KURL &) ) );
+	connect( m_document, SIGNAL( openURL(const KURL &) ), this, SLOT( openURLFromDocument(const KURL &) ) );
 
 	// widgets: ^searchbar (toolbar containing label and SearchWidget)
 //	m_searchToolBar = new KToolBar( parentWidget, "searchBar" );
@@ -367,6 +367,12 @@
     return true;
 }
 
+void Part::openURLFromDocument(const KURL &url)
+{
+    m_notifyOpening = true;
+    openURL(url);
+}
+
 bool Part::openURL(const KURL &url)
 {
     // note: this can be the right place to check the file for gz or bz2 extension
@@ -375,6 +381,12 @@
 
     // this calls the above 'openURL' method
     bool b = KParts::ReadOnlyPart::openURL(url);
+    if (m_notifyOpening)
+    {
+        m_bExtension->openURLNotify();
+        m_bExtension->setLocationBarURL(url.prettyURL());
+        m_notifyOpening = false;
+    }
     if ( !b )
         KMessageBox::error( widget(), i18n("Could not open %1").arg( url.prettyURL() ) );
     else
--- trunk/KDE/kdegraphics/kpdf/part.h #422906:422907
@@ -106,6 +106,8 @@
 	// can be connected to widget elements
 	void updateViewActions();
 	void enableTOC(bool enable);
+	
+	void openURLFromDocument(const KURL &url);
 
 public slots:
 	// connected to Shell action (and browserExtension), not local one
@@ -156,6 +158,8 @@
 	KToggleAction* m_showFullScreenAction;
 	bool m_actionsSearched;
 	bool m_searchStarted;
+	BrowserExtension *m_bExtension;
+	bool m_notifyOpening;
 };
 
 
Comment 4 Rolf Eike Beer 2005-06-22 10:34:16 UTC
Can someone please verify if this also updates the address bar if the new document is opened by drag&drop?