r21553 by craig - Add SVN revision to Scribus title bar if the version string contains svn

scribus-commit scribus-commit at lists.scribus.net
Tue Nov 29 22:04:15 UTC 2016


Author: craig
Date: Tue Nov 29 22:04:14 2016
New Revision: 21553

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21553
Log:
Add SVN revision to Scribus title bar if the version string contains svn

Modified:
    trunk/Scribus/scribus/scribus.cpp

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21553&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Tue Nov 29 22:04:14 2016
@@ -263,6 +263,9 @@
 #include "util_ghostscript.h"
 #include "util_math.h"
 
+#ifdef HAVE_SVNVERSION
+	#include "svnversion.h"
+#endif
 
 #ifdef HAVE_OSG
 	#include "ui/osgeditor.h"
@@ -331,7 +334,12 @@
 	m_doc->addPage(0);
 	m_doc->setGUI(false, this, 0);
 	CurrStED = NULL;
-	setWindowTitle( tr("Scribus " VERSION));
+	QString scribusTitle(tr("Scribus") + " " + QString(VERSION));
+#if defined(HAVE_SVNVERSION) && defined(SVNVERSION)
+	if (QString(VERSION).contains("svn", Qt::CaseInsensitive));
+		scribusTitle.append(" " + tr("(r%1)").arg(SVNVERSION));
+#endif
+	setWindowTitle(scribusTitle);
 	setAttribute(Qt::WA_KeyCompression, false);
 	setAttribute(Qt::WA_InputMethodEnabled, true);
 	setWindowIcon(IconManager::instance()->loadIcon("AppIcon.png"));




More information about the scribus-commit mailing list