mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
+! Check printer validity before entering Page Setup - this fixes
fault when no printer is installed.
This commit is contained in:
parent
afb9c0d5a5
commit
62a36598c2
|
@ -2221,27 +2221,37 @@
|
||||||
<translation>Пропустить данную версию</translation>
|
<translation>Пропустить данную версию</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cc" line="1379"/>
|
<location filename="../mainwindow.cc" line="1367"/>
|
||||||
|
<source>Page Setup</source>
|
||||||
|
<translation>Параметры страницы</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cc" line="1368"/>
|
||||||
|
<source>No printer is available. Please install one first.</source>
|
||||||
|
<translation>В системе не установлено ни одного принтера.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cc" line="1385"/>
|
||||||
<source>Print Article</source>
|
<source>Print Article</source>
|
||||||
<translation>Печать статьи</translation>
|
<translation>Печать статьи</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cc" line="1400"/>
|
<location filename="../mainwindow.cc" line="1406"/>
|
||||||
<source>Save Article As</source>
|
<source>Save Article As</source>
|
||||||
<translation>Сохранить статью как</translation>
|
<translation>Сохранить статью как</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cc" line="1400"/>
|
<location filename="../mainwindow.cc" line="1406"/>
|
||||||
<source>Html files (*.html *.htm)</source>
|
<source>Html files (*.html *.htm)</source>
|
||||||
<translation>Файлы Html (*.html *.htm)</translation>
|
<translation>Файлы Html (*.html *.htm)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cc" line="1415"/>
|
<location filename="../mainwindow.cc" line="1421"/>
|
||||||
<source>Error</source>
|
<source>Error</source>
|
||||||
<translation>Ошибка</translation>
|
<translation>Ошибка</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cc" line="1416"/>
|
<location filename="../mainwindow.cc" line="1422"/>
|
||||||
<source>Can't save article: %1</source>
|
<source>Can't save article: %1</source>
|
||||||
<translation>Невозможно сохранить статью: %1</translation>
|
<translation>Невозможно сохранить статью: %1</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -1357,9 +1357,15 @@ void MainWindow::on_actionCloseToTray_activated()
|
||||||
|
|
||||||
void MainWindow::on_pageSetup_activated()
|
void MainWindow::on_pageSetup_activated()
|
||||||
{
|
{
|
||||||
QPageSetupDialog dialog( &printer, this );
|
if ( printer.isValid() )
|
||||||
|
{
|
||||||
|
QPageSetupDialog dialog( &printer, this );
|
||||||
|
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
QMessageBox::critical( this, tr( "Page Setup" ),
|
||||||
|
tr( "No printer is available. Please install one first." ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_printPreview_activated()
|
void MainWindow::on_printPreview_activated()
|
||||||
|
|
Loading…
Reference in a new issue