merged in changes from stable08 -r412:435:
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Thu, 6 Aug 2009 08:54:50 +0000 (08:54 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Thu, 6 Aug 2009 08:54:50 +0000 (08:54 +0000)
*debian package (to be modified further)
*help menu
*automatic about box
*translation changes from Achim

git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@310 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

19 files changed:
README
debian/README.server [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/dirs [new file with mode: 0644]
debian/gencl [new file with mode: 0755]
debian/magicsmoke.menu [new file with mode: 0644]
debian/magicsmoke.postinst [new file with mode: 0644]
debian/magicsmoke.postrm [new file with mode: 0644]
debian/magicsmoke.prerm [new file with mode: 0644]
debian/rules [new file with mode: 0755]
src/files.qrc
src/mainwindow.cpp
src/mainwindow.h
src/overview.cpp
src/smoke.pro
src/smoke_de.ts
src/version.cpp
src/version.h

diff --git a/README b/README
index d334a34..3306361 100644 (file)
--- a/README
+++ b/README
@@ -14,7 +14,7 @@ See the HTML files in the doc directory for more information.
 Copyrights
 -----------
 
-(c) Konrad Rosenbaum, 2007/8/9
+(c) Konrad Rosenbaum, 2007-9
 (c) Peter Keller, 2007/8
 
 Directory doc:
@@ -58,4 +58,4 @@ Documentation
 ---------------
 
 You will find instructions on how to configure, build, and install the
-software in the doc-directory. Start with doc/index.html .
\ No newline at end of file
+software in the doc-directory. Start with doc/index.html .
diff --git a/debian/README.server b/debian/README.server
new file mode 100644 (file)
index 0000000..55da69e
--- /dev/null
@@ -0,0 +1,71 @@
+MagicSmoke Server Installation on Debian
+=========================================
+
+Unfortunately this does not work entirely automaticly.
+
+1 - DocumentRoot
+-----------------
+
+The debian package installs the server PHP files in /usr/lib/magicsmoke-server
+and links them to /var/www/magicsmoke . You need to change that link if your
+DocumentRoot is somewhere else or you want a different name.
+
+2 - Database
+-------------
+
+Connect to your MySQL server using a client of your choice (I'll assume the
+command line client below).
+
+Create a MySQL user - I'll assume it is called "smoke" and uses "verysecret"
+as password.
+ mysql> CREATE USER smoke IDENTIFIED BY PASSWORD 'verysecret';
+
+Create a MySQL database - I'll assume it is called "smoke".
+ mysql> CREATE DATABASE smoke;
+
+Give the user all rights on this database.
+ mysql> GRANT ALL ON smoke.* TO smoke;
+
+MagicSmoke uses a common configurable prefix for its tables ("smoke_*" per 
+default), so you can use an existing database or even use the same database
+for multiple installations or different programs (assuming the other
+programs are as tolerant as MagicSmoke).
+
+3 - Configuring MagicSmoke
+---------------------------
+
+Go to /usr/lib/magicsmoke-server and copy config.php.template to config.php.
+
+Now edit it, the config template is pretty self-explanatory.
+
+4 - Creating the Database Content
+----------------------------------
+
+Open a browser and direct it to admin.php in your MagicSmoke installation 
+(usually something like http://localhost/magicsmoke/admin.php).
+
+The default user name is "Admin" and the password is "SmokeInMyEye".
+
+Click the create database button.
+
+Create an initial administrator user.
+
+Comment out the "setAdminPassCode" line in config.php, so that noone
+else can abuse this interface.
+
+From now on you can access it with the MagicSmoke client. Your URL for the
+client ends in machine.php (eg. http://localhost/magicsmoke/machine.php).
+
+5 - Templates
+--------------
+
+MagicSmoke comes with really simplistic (and ugly looking) templates for the
+web pages visible to web users. 
+
+They are installed in /usr/share/magicsmoke-server/template .
+
+Copy this directory, install magicsmoke-doc and read the chapter about web 
+templates.
+
+When you are ready redirect the server to your now template directory by
+editing the $template variable in config.php .
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7f8f011
--- /dev/null
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..9be8a17
--- /dev/null
@@ -0,0 +1,32 @@
+Source: magicsmoke
+Section: main
+Priority: extra
+Maintainer: Konrad Rosenbaum <konrad@silmor.de>
+Build-Depends: debhelper (>= 7), libqt4-dev, qt4-dev-tools, subversion, subversion-tools
+Standards-Version: 3.7.3
+Homepage: http://smoke.silmor.de
+
+Package: magicsmoke
+Architecture: any
+Depends: ${shlibs:Depends}
+Recommends: magicsmoke-doc
+Suggests: magicsmoke-server
+Description: MagicSmoke Ticket Sale System
+ This package contains the MagicSmoke Ticket Sales System Client.
+ .
+ It requires a server to be running somewhere.
+
+Package: magicsmoke-doc
+Architecture: all
+Depends:
+Suggests: magicsmoke
+Description: MagicSmoke Ticket Sale System
+ This package contains the MagicSmoke Ticket Sales System Documentation
+ in HTML format.
+
+Package: magicsmoke-server
+Architecture: all
+Depends: php5 (>= 5), php5-mysql (>= 5), php5-mhash (>= 5)
+Suggests: magicsmoke-doc, magicsmoke
+Description: MagicSmoke Ticket Sale System
+ This package contains the MagicSmoke Ticket Sales System Server.
diff --git a/debian/dirs b/debian/dirs
new file mode 100644 (file)
index 0000000..ca882bb
--- /dev/null
@@ -0,0 +1,2 @@
+usr/bin
+usr/sbin
diff --git a/debian/gencl b/debian/gencl
new file mode 100755 (executable)
index 0000000..9318281
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+cl=debian/changelog
+
+REV=$(svn info|grep Revision:|cut -d " " -f 2)
+
+while test $(echo -n $REV|wc -c) -lt 4 ; do REV="0$REV" ; done
+
+if test `svn stat -q|wc -l` -gt 0 ; then
+ REV="$REV-uc"
+fi
+
+echo "magicsmoke (1r$REV) stable; urgency=low" >$cl
+echo >>$cl
+echo "  Package Generated by" `whoami`@`hostname` `date -R`>>$cl
+echo >>$cl
+svn2cl --stdout -i --group-by-day | sed 's/^/  /' | sed 's/\t/   /' >>$cl
+echo >>$cl
+echo -n ' -- konrad <konrad@silmor.de>  ' >>$cl
+date -R >>$cl
diff --git a/debian/magicsmoke.menu b/debian/magicsmoke.menu
new file mode 100644 (file)
index 0000000..01da780
--- /dev/null
@@ -0,0 +1,3 @@
+?package(magicsmoke):needs="X11" section="Applications/Network"\
+  title="MagicSmoke Client" command="/usr/bin/msmoke"\
+  icon="/usr/lib/magicsmoke/icon.png"
diff --git a/debian/magicsmoke.postinst b/debian/magicsmoke.postinst
new file mode 100644 (file)
index 0000000..9079a48
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/sh
+# postinst script for xpack
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    configure)
+       for i in /usr/share/qt4/translations/qt_*.qm; do
+                #echo Linking $i
+                ln -sf $i /usr/lib/magicsmoke/`basename $$i`
+        done
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+       rm -f /usr/lib/magicsmoke/qt_*.qm || true
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/magicsmoke.postrm b/debian/magicsmoke.postrm
new file mode 100644 (file)
index 0000000..7acb589
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/sh
+# postrm script for xpack
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <overwriter>
+#          <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|failed-upgrade|abort-install|abort-upgrade)
+    ;;
+
+    purge|disappear)
+       rm -f /usr/lib/magicsmoke || true
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/magicsmoke.prerm b/debian/magicsmoke.prerm
new file mode 100644 (file)
index 0000000..2686f0c
--- /dev/null
@@ -0,0 +1,41 @@
+#!/bin/sh
+# prerm script for xpack
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|deconfigure)
+       rm -f /usr/lib/magicsmoke/qt_*.qm || true
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..1e089bf
--- /dev/null
@@ -0,0 +1,141 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Debian packaging script for MagicSmoke
+# (c) Konrad Rosenbaum, 2009
+
+#Original comment:
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+all: binary
+
+
+configure: configure-stamp
+configure-stamp:
+       @echo '********************'
+       @echo Configuring...
+       dh_testdir
+       debian/gencl
+       cd src; /usr/bin/qmake
+       touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp  
+       @echo '********************'
+       @echo Building...
+       dh_testdir
+       $(MAKE) -C src
+       cd src ; /usr/bin/lrelease smoke.pro
+       touch $@
+
+clean: 
+       @echo '********************'
+       @echo Cleaning...
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp configure-stamp
+       $(MAKE) -C src distclean
+       dh_clean 
+
+install: install-base install-client install-doc install-server
+install-base: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k -s
+       dh_clean -k -i
+       dh_installdirs -i
+       dh_installdirs -s
+
+install-client:
+       @echo '********************'
+       @echo Install Client...
+       mkdir -p $(CURDIR)/debian/magicsmoke/usr/share/doc/magicsmoke
+       install -D src/msmoke $(CURDIR)/debian/magicsmoke/usr/lib/magicsmoke/msmoke
+       cp src/icon.png $(CURDIR)/debian/magicsmoke/usr/lib/magicsmoke/
+       echo '#!/bin/sh' >$(CURDIR)/debian/magicsmoke/usr/bin/msmoke
+       echo 'exec /usr/lib/magicsmoke/msmoke' >>$(CURDIR)/debian/magicsmoke/usr/bin/msmoke
+       chmod +x $(CURDIR)/debian/magicsmoke/usr/bin/msmoke
+       rm -rf `find $(CURDIR)/debian/magicsmoke -name .svn`
+       cp -L README COPYING* $(CURDIR)/debian/magicsmoke/usr/share/doc/magicsmoke
+       gzip `ls $(CURDIR)/debian/magicsmoke/usr/share/doc/magicsmoke/* |grep -v .gz`
+       cp -L src/smoke*.qm $(CURDIR)/debian/magicsmoke/usr/lib/magicsmoke
+
+install-doc:
+       @echo '********************'
+       @echo Install Doc...
+       mkdir -p $(CURDIR)/debian/magicsmoke-doc/usr/share/doc/magicsmoke
+       mkdir -p $(CURDIR)/debian/magicsmoke-doc/usr/share/doc/magicsmoke-doc
+       mkdir -p $(CURDIR)/debian/magicsmoke-doc/usr/lib/magicsmoke
+       cp -rL doc $(CURDIR)/debian/magicsmoke-doc/usr/share/doc/magicsmoke
+       ln -sf ../../share/doc/magicsmoke/doc $(CURDIR)/debian/magicsmoke-doc/usr/lib/magicsmoke/doc
+       cp -L README COPYING* $(CURDIR)/debian/magicsmoke-doc/usr/share/doc/magicsmoke-doc
+       gzip `ls $(CURDIR)/debian/magicsmoke-doc/usr/share/doc/magicsmoke-doc/* |grep -v .gz`
+       rm -rf `find $(CURDIR)/debian/magicsmoke-doc -name .svn`
+
+install-server:
+       @echo '********************'
+       @echo Install Server...
+       mkdir -p $(CURDIR)/debian/magicsmoke-server/usr/share/doc/magicsmoke-server
+       cp -rL www $(CURDIR)/debian/magicsmoke-server/usr/share/magicsmoke-server
+       mkdir -p $(CURDIR)/debian/magicsmoke-server/var/www
+       ln -sf ../../usr/share/magicsmoke-server $(CURDIR)/debian/magicsmoke-server/var/www/magicsmoke
+       rm -rf `find $(CURDIR)/debian/magicsmoke-server -name .svn`
+       rm -f $(CURDIR)/debian/magicsmoke-server/usr/share/magicsmoke-server/config.php
+       cp -L README COPYING* $(CURDIR)/debian/magicsmoke-server/usr/share/doc/magicsmoke-server
+       gzip `ls $(CURDIR)/debian/magicsmoke-server/usr/share/doc/magicsmoke-server/* |grep -v .gz`
+       gzip <debian/README.server >$(CURDIR)/debian/magicsmoke-server/usr/share/doc/magicsmoke-server/README.Debian-Install.gz
+
+binary-common:
+       dh_testdir
+       dh_testroot
+       dh_installchangelogs 
+#      dh_installdocs
+#      dh_installexamples
+#      dh_install
+       dh_installmenu
+#      dh_installdebconf       
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_python
+#      dh_installinit
+#      dh_installcron
+#      dh_installinfo
+#      dh_installman
+       dh_link
+       dh_strip
+       dh_compress
+       dh_fixperms
+#      dh_perl
+#      dh_makeshlibs
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+# Build architecture independant packages using the common target.
+binary-indep:
+       @echo '********************'
+       @echo Independent Packages...
+       $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+
+# Build architecture dependant packages using the common target.
+binary-arch:
+       @echo '********************'
+       @echo Architecture dependent Packages...
+       $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
+
+binary: build install binary-arch binary-indep
+
+.PHONY: build clean binary-indep binary-arch binary install configure
index 4462340..df22d47 100644 (file)
@@ -5,5 +5,6 @@
         <file>arrowright.png</file>
         <file>arrowdown.png</file>
         <file>arrowdiag.png</file>
+       <file>version.xml</file>
     </qresource>
 </RCC>
index 9ac8dee..9c553aa 100644 (file)
 #include "msinterface.h"
 #include "office.h"
 #include "overview.h"
+#include "version.h"
 
 #include <QApplication>
 #include <QByteArray>
 #include <QCheckBox>
 #include <QComboBox>
 #include <QCryptographicHash>
+#include <QDesktopServices>
 #include <QFile>
 #include <QFileDialog>
 #include <QGridLayout>
 #include <QSpinBox>
 #include <QStackedWidget>
 
+static MMainWindow *maininst=0;
+
 MMainWindow::MMainWindow()
 {
+       maininst=this;
        setWindowTitle("Magic Smoke");
        //create Menu Bar
        QMenuBar*mb=menuBar();
@@ -56,6 +61,7 @@ MMainWindow::MMainWindow()
        m->addAction(tr("&Generate Host Key..."),this,SLOT(generateKey()));
        m->addSeparator();
        m->addAction(tr("&OpenOffice.org Settings..."),this,SLOT(openOfficeCfg()));
+       mb->addMenu(helpMenu());
        
        //create central widget
        QWidget *loginwidget;
@@ -119,6 +125,16 @@ MMainWindow::MMainWindow()
        loadProfile();
 }
 
+QMenu* MMainWindow::helpMenu()
+{
+       QMenu*m=new QMenu(tr("&Help"));
+       m->addAction("&Help",maininst,SLOT(help()));
+       m->addSeparator();
+       m->addAction("About &MagicSmoke",maininst,SLOT(about()));
+       m->addAction("About &Qt",qApp,SLOT(aboutQt()));
+       return m;
+}
+
 void MMainWindow::initProfiles()
 {
        QSettings set;
@@ -339,3 +355,27 @@ void MMainWindow::openOfficeCfg()
        MOfficeConfig c(this);
        c.exec();
 }
+
+void MMainWindow::about()
+{
+       QMessageBox mb(this);
+       mb.setIconPixmap(QPixmap(":/icon.png"));
+       mb.setWindowTitle(tr("About MagicSmoke"));
+       mb.setText(tr(  "<h3>MagicSmoke</h3>"
+                       "&copy; Konrad Rosenbaum, Peter Keller, 2007-9<br>"
+                       "protected under the GNU GPL v.3 or at your option any newer<p>"
+                       "See also the <a href=\"http://smoke.silmor.de\">MagicSmoke Homepage</a>.<p>"
+                       "This version was compiled from repository %1 revision %2.").
+                       arg(repoPart()).arg(svnRevision()));
+       mb.setStandardButtons(QMessageBox::Ok);
+       mb.exec();
+}
+
+void MMainWindow::help()
+{
+       QString d=QApplication::applicationDirPath()+"/doc/index.html";
+       if(!QFile(d).exists()){
+               d="http://smoke.silmor.de/doc/"+repoPart()+"/index.html";
+       }else d="file:///"+d;
+       QDesktopServices::openUrl(QUrl(d));
+}
index b7282f0..7b3515f 100644 (file)
@@ -30,6 +30,8 @@ class MMainWindow:public QMainWindow
        Q_OBJECT
        public:
                MMainWindow();
+               
+               static QMenu*helpMenu();
        private:
                QHttp*req;
                QString sessionid;
@@ -54,6 +56,9 @@ class MMainWindow:public QMainWindow
                void importKey();
                void generateKey();
                void openOfficeCfg();
+               //help menu
+               void about();
+               void help();
 };
 
 #endif
index bce24d5..8feed63 100644 (file)
@@ -14,6 +14,7 @@
 #include "checkdlg.h"
 #include "eventedit.h"
 #include "eventsummary.h"
+#include "mainwindow.h"
 #include "misc.h"
 #include "moneylog.h"
 #include "msinterface.h"
@@ -132,6 +133,8 @@ MOverview::MOverview(QString pk)
         ->setEnabled(req->hasRole("backup"));
        m->addAction(tr("&Backup now..."),this,SLOT(doBackup()))
         ->setEnabled(req->hasRole("backup"));
+
+       mb->addMenu(MMainWindow::helpMenu());
        
        //tabs
        setCentralWidget(tab=new QTabWidget);
index 5283ee5..c7bf4df 100644 (file)
@@ -95,3 +95,10 @@ include(wbase/wbase.pri)
 include(wob/wob.pri)
 
 LIBS += -lgmp
+
+versiontarget.target = version.xml
+versiontarget.commands = svn info -R --xml --non-interactive .. > version.xml
+versiontarget.depends = FORCE
+
+PRE_TARGETDEPS += version.xml
+QMAKE_EXTRA_TARGETS += versiontarget
index 0d50e42..89742d2 100644 (file)
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE TS>
 <TS version="2.0" language="de">
-<defaultcodec></defaultcodec>
 <context>
     <name>MBackupDialog</name>
     <message>
     <message>
         <location filename="eventsummary.cpp" line="62"/>
         <source>Total Income:</source>
-        <translation>Umsatz:</translation>
+        <translation>erwarteter Umsatz:</translation>
     </message>
     <message>
         <source>.</source>
@@ -628,7 +627,7 @@ At least %1 Bits of random are required.</source>
     <message>
         <location filename="mainwindow.cpp" line="97"/>
         <source>Username:</source>
-        <translation>Nutzername:</translation>
+        <translation>Benutzername:</translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="100"/>
@@ -742,7 +741,7 @@ At least %1 Bits of random are required.</source>
     <message>
         <location filename="mainwindow.cpp" line="272"/>
         <source>Unable to open file %1 for writing: %2</source>
-        <translation>Datei %1 kann nicht zum Schreiben geöffnet werden: %2</translation>
+        <translation>Datei %1 kann zum Schreiben nicht geöffnet werden: %2</translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="283"/>
@@ -757,7 +756,7 @@ At least %1 Bits of random are required.</source>
     <message>
         <location filename="mainwindow.cpp" line="295"/>
         <source>Unable to open file %1 for reading: %2</source>
-        <translation>Datei %1 kann nicht zum Lesen geöffnet werden: %2</translation>
+        <translation>Datei %1 kann zum Lesen nicht geöffnet werden: %2</translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="303"/>
@@ -971,7 +970,7 @@ At least %1 Bits of random are required.</source>
     <message>
         <location filename="order.cpp" line="445"/>
         <source>This ticket is not part of this order.</source>
-        <translation>Dieses Ticket ist nicht in einer Bestellung enthalten.</translation>
+        <translation>Dieses Ticket ist in keiner Bestellung enthalten.</translation>
     </message>
     <message>
         <location filename="order.cpp" line="527"/>
@@ -1699,7 +1698,7 @@ At least %1 Bits of random are required.</source>
     <message>
         <location filename="overview.cpp" line="212"/>
         <source>Clear</source>
-        <translation>Von vorn</translation>
+        <translation>Zurücksetzen</translation>
     </message>
     <message>
         <location filename="overview.cpp" line="373"/>
@@ -1757,7 +1756,7 @@ At least %1 Bits of random are required.</source>
     <message>
         <location filename="overview.cpp" line="291"/>
         <source>Roles...</source>
-        <translation>Rollen...</translation>
+        <translation>Rechte...</translation>
     </message>
     <message>
         <location filename="overview.cpp" line="300"/>
@@ -1782,7 +1781,7 @@ At least %1 Bits of random are required.</source>
     <message>
         <location filename="overview.cpp" line="496"/>
         <source>Please enter new user name (only letters, digits, and underscore allowed):</source>
-        <translation>Neuen Nutzernamen eingeben (Buchstaben, Ziffern, Unterstrich):</translation>
+        <translation>Neuen Nutzernamen eingeben (Kleinbuchstaben, Ziffern, Unterstrich, Minus):</translation>
     </message>
     <message>
         <location filename="overview.cpp" line="501"/>
@@ -2123,7 +2122,7 @@ At least %1 Bits of random are required.</source>
     <message>
         <location filename="overview.cpp" line="243"/>
         <source>Find by Ticket...</source>
-        <translation>Mit Kartennummer finden...</translation>
+        <translation>Mit Kartennummer suchen...</translation>
     </message>
     <message>
         <location filename="overview.cpp" line="458"/>
@@ -2280,17 +2279,17 @@ Die Bestellung ist überbezahlt: es gibt noch Geld zurück.</translation>
     <message>
         <location filename="overview.cpp" line="246"/>
         <source>Find by Event...</source>
-        <translation>Nach Veranstaltung finden...</translation>
+        <translation>Nach Veranstaltung suchen...</translation>
     </message>
     <message>
         <location filename="overview.cpp" line="249"/>
         <source>Find by Customer...</source>
-        <translation>Nach Kunde finden...</translation>
+        <translation>Nach Kunde suchen...</translation>
     </message>
     <message>
         <location filename="overview.cpp" line="501"/>
         <source>The user name must contain only letters, digits, dots and underscores and must be at least one character long!</source>
-        <translation>Nutzernamen dürfen nur Buchstaben, Ziffern, Punkte und Unterstriche enthalten und müssen mindestens ein Zeichen lang sein!</translation>
+        <translation>Nutzernamen dürfen nur Kleinbuchstaben, Ziffern, Punkte, Bindestriche und Unterstriche enthalten und müssen mindestens ein Zeichen lang sein!</translation>
     </message>
     <message>
         <location filename="overview.cpp" line="1204"/>
@@ -3532,7 +3531,7 @@ Verbleibender Betrag: %2</translation>
     <message>
         <location filename="../www/machine.php" line="38"/>
         <source>getcustomerlist</source>
-        <translation>Kunden abfragen</translation>
+        <translation>Kundenliste abfragen</translation>
     </message>
     <message>
         <location filename="../www/machine.php" line="38"/>
@@ -3547,7 +3546,7 @@ Verbleibender Betrag: %2</translation>
     <message>
         <location filename="../www/machine.php" line="38"/>
         <source>deletecustomer</source>
-        <translation>Nutzer löschen/ersetzen</translation>
+        <translation>Kunden löschen/ersetzen</translation>
     </message>
     <message>
         <location filename="../www/machine.php" line="40"/>
@@ -3592,7 +3591,7 @@ Verbleibender Betrag: %2</translation>
     <message>
         <location filename="../www/machine.php" line="41"/>
         <source>cancelorder</source>
-        <translation>Bestellung rückgängig machen</translation>
+        <translation>Bestellung stornieren</translation>
     </message>
     <message>
         <location filename="../www/machine.php" line="42"/>
index 7c2ddc8..394eb31 100644 (file)
 #define defversion(x,y) const char VERSION_##x[] = #y;
 #include "../www/inc/machine/version.inc"
 #undef defversion
+
+#include <QDomDocument>
+#include <QDomElement>
+#include <QFile>
+#include <QStringList>
+
+static QString rpart,srev;
+
+static void initVer()
+{
+       QFile x(":/version.xml");
+       x.open(QIODevice::ReadOnly);
+       QDomDocument doc;
+       doc.setContent(&x);
+       QDomNodeList nl=doc.documentElement().elementsByTagName("entry");
+       int baserev=0,maxrev=0;
+       for(int i=0;i<nl.size();i++){
+               QDomElement el=nl.at(i).toElement();
+               QString p=el.attribute("path");
+               int r=el.attribute("revision").toInt();
+               if(p==".."){
+                       baserev=r;
+                       QDomNodeList nl2=el.elementsByTagName("url");
+                       QString u;
+                       if(nl2.size()>0)u=nl2.at(0).toElement().text();
+                       else continue;
+                       nl2=el.elementsByTagName("root");
+                       if(nl2.size()>0){
+                               u="."+u.mid(nl2.at(0).toElement().text().size());
+                       }
+                       QStringList sl=u.split("/smoke/");
+                       if(sl.size()>1)rpart=sl[1];
+                       else rpart=u;
+               }
+               if(r>maxrev)maxrev=r;
+       }
+       srev=QString::number(baserev);
+       if(maxrev>baserev)srev+="-"+QString::number(maxrev);
+}
+
+QString repoPart()
+{
+       if(rpart=="")initVer();
+       return rpart;
+}
+
+QString svnRevision()
+{
+       if(rpart=="")initVer();
+       return srev;
+}
index b8a12eb..8d73366 100644 (file)
@@ -1,4 +1,8 @@
+#include <QString>
 
 #define defversion(x,y) extern const char VERSION_##x[];
 #include "../www/inc/machine/version.inc"
 #undef defversion
+
+QString repoPart();
+QString svnRevision();