summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Rettberg2015-10-08 19:34:00 +0200
committerSimon Rettberg2015-10-08 19:34:00 +0200
commitec700ad3690a1a1bfd34982dd157072e4a35c01a (patch)
treeba97a224025e64aca31baf6157b8ff2c9aa532c9 /src
parentAdd fullscreen bg to printergui; preserve job name (diff)
parentgermanize (diff)
downloadprintergui-ec700ad3690a1a1bfd34982dd157072e4a35c01a.tar.gz
printergui-ec700ad3690a1a1bfd34982dd157072e4a35c01a.tar.xz
printergui-ec700ad3690a1a1bfd34982dd157072e4a35c01a.zip
Merge branch 'master' of dnbd3:openslx-ng/printergui
Diffstat (limited to 'src')
-rw-r--r--src/pwgui/main.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pwgui/main.cpp b/src/pwgui/main.cpp
index 5dd5a07..b916259 100644
--- a/src/pwgui/main.cpp
+++ b/src/pwgui/main.cpp
@@ -3,6 +3,7 @@
#include <QApplication>
#include <QMessageBox>
#include <QDesktopWidget>
+#include <QLayout>
#include <cups/backend.h>
#include <fcntl.h>
#include <sys/stat.h>
@@ -514,7 +515,7 @@ static int helper_cupsError(const int code)
{
switch (code) {
case CUPS_BACKEND_OK:
- helper_messageBox("CUPS", "Der Druckauftrag wurde erfolgreich an den print server übermittelt", false);
+ helper_messageBox("CUPS", "Der Druckauftrag wurde erfolgreich an den Druckserver übermittelt", false);
return CUPS_BACKEND_OK;
case CUPS_BACKEND_FAILED:
@@ -586,8 +587,9 @@ static void helper_messageBox(const char *caption, const char *text, const bool
msgBox.setIcon(QMessageBox::Information);
}
QRect desktopRect = QApplication::desktop()->screenGeometry();
- msgBox.move(desktopRect.width()/2-msgBox.width()/2,
- desktopRect.height()/2-msgBox.height()/2);
+ QSize msgBoxSize = msgBox.sizeHint();
+ msgBox.move(desktopRect.width()/2-msgBoxSize.width()/2,
+ desktopRect.height()/2-msgBoxSize.height()/2);
msgBox.show();
msgBox.showNormal();
msgBox.raise();