|
|
|
|
@ -47,7 +47,9 @@ DVIExport::DVIExport(dviRenderer& parent, QWidget* parent_widget) |
|
|
|
|
progress_(0), |
|
|
|
|
parent_(&parent), |
|
|
|
|
parent_widget_(parent_widget) |
|
|
|
|
{} |
|
|
|
|
{ |
|
|
|
|
connect( this, SIGNAL(error(QString,int)), &parent, SIGNAL(error(QString,int)) ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DVIExport::~DVIExport() |
|
|
|
|
@ -138,7 +140,7 @@ void DVIExport::finished_impl(int exit_code) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (process_ && exit_code != 0) |
|
|
|
|
KMessageBox::error(parent_widget_, error_message_); |
|
|
|
|
emit error(error_message_, -1); |
|
|
|
|
// Remove this from the store of all export processes.
|
|
|
|
|
parent_->m_eventLoop->exit( exit_code ); |
|
|
|
|
parent_->export_finished(this); |
|
|
|
|
@ -169,15 +171,14 @@ DVIExportToPDF::DVIExportToPDF(dviRenderer& parent, QWidget* parent_widget) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
if (KStandardDirs::findExe("dvipdfm").isEmpty()) { |
|
|
|
|
KMessageBox::sorry(parent_widget, |
|
|
|
|
i18n("Okular could not locate the program 'dvipdfm' on your computer. This program is " |
|
|
|
|
"essential for the export function to work. You can, however, convert " |
|
|
|
|
"the DVI-file to PDF using the print function of Okular, but that will often " |
|
|
|
|
"produce documents which print okay, but are of inferior quality if viewed in " |
|
|
|
|
"Acrobat Reader. It may be wise to upgrade to a more recent version of your " |
|
|
|
|
"TeX distribution which includes the 'dvipdfm' program.\n" |
|
|
|
|
"Hint to the perplexed system administrator: Okular uses the PATH environment variable " |
|
|
|
|
"when looking for programs.")); |
|
|
|
|
emit error(i18n("Okular could not locate the program 'dvipdfm' on your computer. This program is " |
|
|
|
|
"essential for the export function to work. You can, however, convert " |
|
|
|
|
"the DVI-file to PDF using the print function of Okular, but that will often " |
|
|
|
|
"produce documents which print okay, but are of inferior quality if viewed in " |
|
|
|
|
"Acrobat Reader. It may be wise to upgrade to a more recent version of your " |
|
|
|
|
"TeX distribution which includes the 'dvipdfm' program.\n" |
|
|
|
|
"Hint to the perplexed system administrator: Okular uses the PATH environment variable " |
|
|
|
|
"when looking for programs."), -1); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -241,23 +242,17 @@ DVIExportToPS::DVIExportToPS(dviRenderer& parent, |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
if (dvi.numberOfExternalNONPSFiles != 0) { |
|
|
|
|
KMessageBox::sorry(parent_widget, |
|
|
|
|
i18n("<qt><P>This DVI file refers to external graphic files which are not in PostScript format, and cannot be handled by the " |
|
|
|
|
"<strong>dvips</strong> program that Okular uses internally to print or to export to PostScript. The functionality that " |
|
|
|
|
"you require is therefore unavailable in this version of Okular.</p>" |
|
|
|
|
"<p>As a workaround, you can use the <strong>File/Export As</strong>-Menu to save this file in PDF format, and then use " |
|
|
|
|
"a PDF viewer.</p>" |
|
|
|
|
"<p>It is planned to add this functionality at a later date.</p></qt>") , |
|
|
|
|
i18n("Functionality Unavailable")); |
|
|
|
|
emit error(i18n("This DVI file refers to external graphic files which are not in PostScript format, and cannot be handled by the " |
|
|
|
|
"'dvips' program that Okular uses internally to print or to export to PostScript. The functionality that " |
|
|
|
|
"you require is therefore unavailable in this version of Okular."), -1); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (KStandardDirs::findExe("dvips").isEmpty()) { |
|
|
|
|
KMessageBox::sorry(parent_widget, |
|
|
|
|
i18n("Okular could not locate the program 'dvips' on your computer. That program is " |
|
|
|
|
"essential for the export function to work.\n" |
|
|
|
|
"Hint to the perplexed system administrator: Okular uses the PATH environment variable " |
|
|
|
|
"when looking for programs.")); |
|
|
|
|
emit error(i18n("Okular could not locate the program 'dvips' on your computer. That program is " |
|
|
|
|
"essential for the export function to work.\n" |
|
|
|
|
"Hint to the perplexed system administrator: Okular uses the PATH environment variable " |
|
|
|
|
"when looking for programs."), -1); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|