r23838 by jghali - Do not show print preview button in print dialog if print preview is not available
scribus-commit
scribus-commit at lists.scribus.net
Tue May 26 11:47:11 UTC 2020
Author: jghali
Date: Tue May 26 11:47:11 2020
New Revision: 23838
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23838
Log:
Do not show print preview button in print dialog if print preview is not available
Modified:
trunk/Scribus/scribus/ui/printdialog.cpp
trunk/Scribus/scribus/ui/printdialogbase.ui
Modified: trunk/Scribus/scribus/ui/printdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23838&path=/trunk/Scribus/scribus/ui/printdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/printdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/printdialog.cpp Tue May 26 11:47:11 2020
@@ -12,14 +12,13 @@
#include <QByteArray>
#include "scconfig.h"
-#include "scpaths.h"
-#include "scribusdoc.h"
-#include "ui/createrange.h"
+
#include "commonstrings.h"
+#include "customfdialog.h"
+#include "iconmanager.h"
#include "prefsmanager.h"
#include "prefscontext.h"
#include "prefsfile.h"
-#include "customfdialog.h"
#include "cupsoptions.h"
#if defined(_WIN32)
#include <windows.h>
@@ -27,12 +26,15 @@
#elif defined(HAVE_CUPS) // Haiku doesn't have it
#include <cups/cups.h>
#endif
-#include "util_printer.h"
-#include "iconmanager.h"
-#include "util.h"
+#include "ui/createrange.h"
+#include "scpaths.h"
+#include "scribuscore.h"
+#include "scribusdoc.h"
+#include "scrspinbox.h"
#include "units.h"
#include "usertaskstructs.h"
-#include "scrspinbox.h"
+#include "util.h"
+#include "util_printer.h"
extern bool previewDinUse;
@@ -71,7 +73,14 @@
BleedTop->setNewUnit(m_unit);
BleedTop->setMinimum(0);
BleedTop->setMaximum(3000 * m_unitRatio);
- previewButton->setEnabled(!previewDinUse);
+
+ if (ScCore->haveGS() || ScCore->isWinGUI())
+ previewButton->setEnabled(!previewDinUse);
+ else
+ {
+ previewButton->setVisible(false);
+ previewButton->setEnabled(false);
+ }
// Fill printer list
QString printerName;
@@ -126,9 +135,10 @@
setMaximumSize(sizeHint());
PrintDest->setFocus();
+
// signals and slots connections
connect( OKButton, SIGNAL( clicked() ), this, SLOT( okButtonClicked() ) );
- connect( OKButton_2, SIGNAL( clicked() ), this, SLOT( reject() ) );
+ connect( CancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
connect( PrintDest, SIGNAL(activated(const QString&)), this, SLOT(SelPrinter(const QString&)));
connect( printEngines, SIGNAL(activated(const QString&)), this, SLOT(SelEngine(const QString&)));
connect( RadioButton1, SIGNAL(toggled(bool)), this, SLOT(SelRange(bool)));
Modified: trunk/Scribus/scribus/ui/printdialogbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23838&path=/trunk/Scribus/scribus/ui/printdialogbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/printdialogbase.ui (original)
+++ trunk/Scribus/scribus/ui/printdialogbase.ui Tue May 26 11:47:11 2020
@@ -654,7 +654,7 @@
</widget>
</item>
<item>
- <widget class="QPushButton" name="OKButton_2">
+ <widget class="QPushButton" name="CancelButton">
<property name="text">
<string>Cancel</string>
</property>
@@ -712,7 +712,7 @@
<tabstop>BleedLeft</tabstop>
<tabstop>previewButton</tabstop>
<tabstop>OKButton</tabstop>
- <tabstop>OKButton_2</tabstop>
+ <tabstop>CancelButton</tabstop>
</tabstops>
<resources/>
<connections>
More information about the scribus-commit
mailing list