summaryrefslogtreecommitdiffstats
path: root/src/maingui/printergui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/maingui/printergui.cpp')
-rw-r--r--src/maingui/printergui.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/maingui/printergui.cpp b/src/maingui/printergui.cpp
index 21e03f4..0dd9e13 100644
--- a/src/maingui/printergui.cpp
+++ b/src/maingui/printergui.cpp
@@ -112,7 +112,15 @@ void PrinterGui::initializeUI()
QRect desktopRect = QApplication::desktop()->screenGeometry(this);
this->move( desktopRect.width()/2-this->width()/2,
desktopRect.height()/2-this->height()/2);
- this->setWindowTitle(QString::fromUtf8("Drucken - %1").arg(this->user));
+ const char *docName;
+ docName = getenv("J");
+ if (docName == NULL) {
+ docName = getenv("N");
+ }
+ if (docName == NULL) {
+ docName = "Untitled";
+ }
+ this->setWindowTitle(QString::fromUtf8("Drucken - %1 [%2]").arg(this->user, QString::fromUtf8(docName)));
this->show();
this->showNormal();