mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +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>
|
||||
</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>
|
||||
<translation>Печать статьи</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cc" line="1400"/>
|
||||
<location filename="../mainwindow.cc" line="1406"/>
|
||||
<source>Save Article As</source>
|
||||
<translation>Сохранить статью как</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cc" line="1400"/>
|
||||
<location filename="../mainwindow.cc" line="1406"/>
|
||||
<source>Html files (*.html *.htm)</source>
|
||||
<translation>Файлы Html (*.html *.htm)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cc" line="1415"/>
|
||||
<location filename="../mainwindow.cc" line="1421"/>
|
||||
<source>Error</source>
|
||||
<translation>Ошибка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cc" line="1416"/>
|
||||
<location filename="../mainwindow.cc" line="1422"/>
|
||||
<source>Can't save article: %1</source>
|
||||
<translation>Невозможно сохранить статью: %1</translation>
|
||||
</message>
|
||||
|
|
|
@ -1357,9 +1357,15 @@ void MainWindow::on_actionCloseToTray_activated()
|
|||
|
||||
void MainWindow::on_pageSetup_activated()
|
||||
{
|
||||
if ( printer.isValid() )
|
||||
{
|
||||
QPageSetupDialog dialog( &printer, this );
|
||||
|
||||
dialog.exec();
|
||||
}
|
||||
else
|
||||
QMessageBox::critical( this, tr( "Page Setup" ),
|
||||
tr( "No printer is available. Please install one first." ) );
|
||||
}
|
||||
|
||||
void MainWindow::on_printPreview_activated()
|
||||
|
|
Loading…
Reference in a new issue