Summary: | kpdf embedded in konquerror: address bar doesn't updated, when jumping to another file by hyperlink | ||
---|---|---|---|
Product: | [Unmaintained] kpdf | Reporter: | Ilia K. <mail4ilia> |
Component: | general | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aacid |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Ilia K.
2005-06-04 12:19:16 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? This is a kpdf bug 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; }; Can someone please verify if this also updates the address bar if the new document is opened by drag&drop? |