Summary: | Wrong file name in Document Information when viewing PDFs | ||
---|---|---|---|
Product: | [Applications] kghostview | Reporter: | Hans Petter Bieker <bieker> |
Component: | general | Assignee: | Wilco Greven <greven> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Hans Petter Bieker
2002-12-29 18:45:42 UTC
Subject: kdegraphics/kghostview CVS commit by luis_pedro: Gets rid of bug 52389 (file name was shown as /tmp/kde-*/.... instead of useful name). Wilco: this is your code, but the change looks simple enough, so I just commited to HEAD. Feel free to disagree. CCMAIL: 52389-close@bugs.kde.org, greven@kde.org M +1 -1 kgv_miniwidget.cpp 1.163 M +6 -0 kgvdocument.cpp 1.5 M +1 -0 kgvdocument.h 1.3 --- kdegraphics/kghostview/kgv_miniwidget.cpp #1.162:1.163 @@ -138,5 +138,5 @@ void KGVMiniWidget::info() _infoDialog = new InfoDialog( _part->widget(), "info", true ); - _infoDialog->setup( document()->fileName(), + _infoDialog->setup( document()->userFileName(), dsc()->dsc_title(), dsc()->dsc_date() ); _infoDialog->exec(); --- kdegraphics/kghostview/kgvdocument.cpp #1.4:1.5 @@ -163,4 +163,10 @@ void KGVDocument::doOpenFile() } +const QString& KGVDocument::userFileName() const +{ + if ( _pdfFileName.isNull() || _format == PS) return _fileName; + return _pdfFileName; +} + void KGVDocument::uncompressFile() { --- kdegraphics/kghostview/kgvdocument.h #1.2:1.3 @@ -61,4 +61,5 @@ public: const QString& fileName() const { return _fileName; } + const QString& userFileName() const; FILE* psFile() { return _psFile; } |