Commit 67dff3b3 authored by Pino Toscano's avatar Pino Toscano

show the correct file name in the title when the document is compressed (that...

show the correct file name in the title when the document is compressed (that is, we're opening the temporary extracted file) and it has no title

svn path=/trunk/KDE/kdegraphics/okular/; revision=692303
parent be0023b0
......@@ -481,6 +481,15 @@ QStringList Part::supportedMimeTypes() const
}
KUrl Part::realUrl() const
{
if ( !m_realUrl.isEmpty() )
return m_realUrl;
return url();
}
void Part::openUrlFromDocument(const KUrl &url)
{
if (m_dummyMode) return;
......@@ -544,7 +553,7 @@ void Part::setWindowTitleFromDocument()
}
else
{
emit setWindowCaption( url().fileName() );
emit setWindowCaption( realUrl().fileName() );
}
}
......@@ -816,6 +825,8 @@ bool Part::openUrl(const KUrl &url)
{
m_viewportDirty.pageNumber = -1;
m_realUrl = url;
setWindowTitleFromDocument();
}
......@@ -853,6 +864,7 @@ bool Part::closeUrl()
emit setWindowCaption("");
emit enablePrintAction(false);
m_searchStarted = false;
m_realUrl = KUrl();
if (!localFilePath().isEmpty()) m_watcher->removeFile(localFilePath());
m_document->closeDocument();
updateViewActions();
......
......@@ -94,6 +94,8 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi
void startPresentation();
QStringList supportedMimeTypes() const;
KUrl realUrl() const;
public slots: // dbus
Q_SCRIPTABLE Q_NOREPLY void goToPage(uint page);
Q_SCRIPTABLE Q_NOREPLY void openDocument(KUrl doc);
......@@ -248,6 +250,8 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi
bool m_dummyMode;
KUrl m_realUrl;
private slots:
void slotGeneratorPreferences();
};
......
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