[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r2012: o created regular expressions for lineedits o bugfixing V2 c (in branches/hidden-services: . src/gui/config src/gui/help/content/de src/gui/help/content/en src/lang)



Author: klimachristian
Date: 2007-10-12 08:24:22 -0400 (Fri, 12 Oct 2007)
New Revision: 2012

Modified:
   branches/hidden-services/CHANGELOG
   branches/hidden-services/src/gui/config/groupdialog.cpp
   branches/hidden-services/src/gui/config/hiddenservicepage.cpp
   branches/hidden-services/src/gui/config/userdialog.cpp
   branches/hidden-services/src/gui/help/content/de/config.html
   branches/hidden-services/src/gui/help/content/en/config.html
   branches/hidden-services/src/lang/vidalia_de.ts
   branches/hidden-services/src/lang/vidalia_en.ts
Log:
o created regular expressions for lineedits
o bugfixing V2 communication
o removing V0V2 option

Modified: branches/hidden-services/CHANGELOG
===================================================================
--- branches/hidden-services/CHANGELOG	2007-10-12 07:49:28 UTC (rev 2011)
+++ branches/hidden-services/CHANGELOG	2007-10-12 12:24:22 UTC (rev 2012)
@@ -1,3 +1,8 @@
+0.0.18  12-Oct-2007
+  o created regular expressions for lineedits
+  o bugfixing V2 communication
+  o removing V0V2 option
+
 0.0.17  09-Oct-2007
   o Widgets are now sorted alphabetical 
   o Bug fixing (group management)

Modified: branches/hidden-services/src/gui/config/groupdialog.cpp
===================================================================
--- branches/hidden-services/src/gui/config/groupdialog.cpp	2007-10-12 07:49:28 UTC (rev 2011)
+++ branches/hidden-services/src/gui/config/groupdialog.cpp	2007-10-12 12:24:22 UTC (rev 2012)
@@ -36,6 +36,9 @@
 	setupUi(this);
 	groupnameline->setText("");
 	groupnameline->setFocus();
+	groupnameline->setValidator( new QRegExpValidator( QRegExp( "^[0-9a-zA-Z_-]+"), this));
+	cookiekeyline->setValidator( new QRegExpValidator( QRegExp( "^[0-9a-zA-Z_-]+"), this));
+	confirmationline->setValidator( new QRegExpValidator( QRegExp( "^[0-9a-zA-Z_-]+"), this));
 }
 
 void 

Modified: branches/hidden-services/src/gui/config/hiddenservicepage.cpp
===================================================================
--- branches/hidden-services/src/gui/config/hiddenservicepage.cpp	2007-10-12 07:49:28 UTC (rev 2011)
+++ branches/hidden-services/src/gui/config/hiddenservicepage.cpp	2007-10-12 12:24:22 UTC (rev 2012)
@@ -1,379 +1,408 @@
-/****************************************************************
- *  Vidalia is distributed under the following license:
- *
- *  Copyright (C) 2006,  Matt Edman, Justin Hipple
- *  Copyright (C) 2007,  Domenik Bork, Christian Klima
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU General Public License
- *  as published by the Free Software Foundation; either version 2
- *  of the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, 
- *  Boston, MA  02110-1301, USA.
- ****************************************************************/
-
-#include <vidalia.h>
-#include <qlistview.h>
-#include <qdir.h>
+/****************************************************************
+ *  Vidalia is distributed under the following license:
+ *
+ *  Copyright (C) 2006,  Matt Edman, Justin Hipple
+ *  Copyright (C) 2007,  Domenik Bork, Christian Klima
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; either version 2
+ *  of the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+ *  Boston, MA  02110-1301, USA.
+ ****************************************************************/
+
+#include <vidalia.h>
+#include <qlistview.h>
+#include <qdir.h>
 #include <qheaderview.h>
-#include <QTextStream>
-#include <qfileinfo.h>
-#include  "util/file.h"
-#include <gui/common/vmessagebox.h>
-#include "hiddenservicepage.h"
-#include "groupdialog.h"
-#include "userdialog.h"
-#include "adduserdialog.h"
-#include <qclipboard.h>
-
-using namespace std;
-
-/** Constructor */
-HiddenservicePage::HiddenservicePage(QWidget *parent) :
-  ConfigPage(parent) {
-  /* Keep a pointer to the TorControl object used to talk to Tor */
-  _torControl = Vidalia::torControl();
-  /* Create ServerSettings object */
-   _settings = new ServerSettings(_torControl);
-   /** temporary user object used to temporary store the entered values */  
-   _tempUser = new User();
-   /** temporary group object used to temporary store the entered values */
-   _tempGroup = new Group();
-   /** the parent widget */
-  _parent = parent;
-  /* Invoke the Qt Designer generated object setup routine */
-  ui.setupUi(this);
-  /* Create settings objects */
-  _torSettings = new TorSettings;
-  _hiddenServiceSettings = new HiddenServiceSettings(_torControl);
-  /* Accept valid port numbers only */
-  ui.localPortLine->setValidator(new QIntValidator(1, 65535, this));
-  /* Accept valid port numbers only */
-  ui.listeningPortLine->setValidator(new QIntValidator(1, 65535, this));
-  /* Connect the gui events with the local methods */
-  connect(ui.addServiceButton, SIGNAL(clicked()), this,
-    SLOT(addHiddenService()));
-  connect(ui.deleteServiceButton, SIGNAL(clicked()), this,
-    SLOT(deleteHiddenService()));
-  connect(ui.publishServiceButton, SIGNAL(clicked()), this,
-    SLOT(publishButtonClicked()));
-  connect(ui.deleteUserButton, SIGNAL(clicked()), this, SLOT(deleteUser()));
-  connect(ui.createUserButton, SIGNAL(clicked()), this, SLOT(createUser()));
-  connect(ui.modifyUserButton, SIGNAL(clicked()), this, SLOT(modifyUser()));
-  connect(ui.addUserButton, SIGNAL(clicked()), this, SLOT(addUser()));
-  connect(ui.deleteGroupButton, SIGNAL(clicked()), this, SLOT(deleteGroup()));
-  connect(ui.createGroupButton, SIGNAL(clicked()), this, SLOT(createGroup()));
-  connect(ui.modifyGroupButton, SIGNAL(clicked()), this, SLOT(modifyGroup()));
-  connect(ui.groupListView, SIGNAL(itemDoubleClicked(QTableWidgetItem*)), 
-    this, SLOT(modifyGroup()));
-  connect(ui.userManagementView, SIGNAL(itemDoubleClicked(QListWidgetItem*)), 
+#include <QTextStream>
+#include <qfileinfo.h>
+#include  "util/file.h"
+#include <gui/common/vmessagebox.h>
+#include "hiddenservicepage.h"
+#include "groupdialog.h"
+#include "userdialog.h"
+#include "adduserdialog.h"
+#include <qclipboard.h>
+
+using namespace std;
+
+/** Constructor */
+HiddenservicePage::HiddenservicePage(QWidget *parent) :
+  ConfigPage(parent) {
+  /* Keep a pointer to the TorControl object used to talk to Tor */
+  _torControl = Vidalia::torControl();
+  /* Create ServerSettings object */
+   _settings = new ServerSettings(_torControl);
+   /** temporary user object used to temporary store the entered values */  
+   _tempUser = new User();
+   /** temporary group object used to temporary store the entered values */
+   _tempGroup = new Group();
+   /** the parent widget */
+  _parent = parent;
+  /* Invoke the Qt Designer generated object setup routine */
+  ui.setupUi(this);
+  /* Create settings objects */
+  _torSettings = new TorSettings;
+  _hiddenServiceSettings = new HiddenServiceSettings(_torControl);
+  /* Accept valid port numbers only */
+  ui.localPortLine->setValidator(new QIntValidator(1, 65535, this));
+  /* Accept valid port numbers only */
+  ui.listeningPortLine->setValidator(new QIntValidator(1, 65535, this));
+  /* Connect the gui events with the local methods */
+  ui.serviceNameLine->setValidator( new QRegExpValidator( QRegExp( "^[0-9a-zA-Z_-]+"), this));
+  connect(ui.addServiceButton, SIGNAL(clicked()), this,
+    SLOT(addHiddenService()));
+  connect(ui.deleteServiceButton, SIGNAL(clicked()), this,
+    SLOT(deleteHiddenService()));
+  connect(ui.publishServiceButton, SIGNAL(clicked()), this,
+    SLOT(publishButtonClicked()));
+  connect(ui.deleteUserButton, SIGNAL(clicked()), this, SLOT(deleteUser()));
+  connect(ui.createUserButton, SIGNAL(clicked()), this, SLOT(createUser()));
+  connect(ui.modifyUserButton, SIGNAL(clicked()), this, SLOT(modifyUser()));
+  connect(ui.addUserButton, SIGNAL(clicked()), this, SLOT(addUser()));
+  connect(ui.deleteGroupButton, SIGNAL(clicked()), this, SLOT(deleteGroup()));
+  connect(ui.createGroupButton, SIGNAL(clicked()), this, SLOT(createGroup()));
+  connect(ui.modifyGroupButton, SIGNAL(clicked()), this, SLOT(modifyGroup()));
+  connect(ui.groupListView, SIGNAL(itemDoubleClicked(QTableWidgetItem*)), 
+    this, SLOT(modifyGroup()));
+  connect(ui.userManagementView, SIGNAL(itemDoubleClicked(QListWidgetItem*)), 
     this, SLOT(modifyUser()));
-  connect(ui.serviceListView, SIGNAL(itemClicked(QTableWidgetItem*)), this,
-    SLOT(serviceSelectionChanged()));
-  connect(ui.groupListView, SIGNAL(itemClicked(QTableWidgetItem*)), this,
-    SLOT(groupSelectionChanged()));
-  connect(ui.userManagementView, SIGNAL(itemClicked(QListWidgetItem*)), this,
-    SLOT(userSelectionChanged(QListWidgetItem*))); 
-  connect(ui.modifyServiceButton, SIGNAL(clicked()), this, SLOT(modifyService()));
-  connect(ui.copyToClipboardButton, SIGNAL(clicked()), this, SLOT(copyToClipboard()));
-  /* A QTableWidget object representing the table of services in Vidalia*/ 
-  _serviceWidget = ui.serviceListView;
-  /* A QTableWidget object representing the table of groups in Vidalia */
-  _groupWidget = ui.groupListView;
-  /* A QListWidget object representing the list of users in Vidalia*/
-  _userWidget = ui.userManagementView;
-  /* A QMap, mapping from QString groupname to the Entity group */
-  _groups = new QMap<QString, Group>();
-  /* A QMap, mapping from QString username to the Entity user */
-  _users = new QMap<QString, User>();
-  /* A QMap, mapping from QString servicename to the Entity service */
-  _services = new QMap<QString, Service>();  
-  /* strech the horizontal header of the service table */
-  _serviceWidget->horizontalHeader()->setStretchLastSection(true);
-  /* strech the horizontal header of the group table */
-  _groupWidget->horizontalHeader()->setStretchLastSection(true);
-  /*a boolean that shows whether the installed Tor version supports V2 or not*/
-  _v2Support = supportV2();
-}
-
-/** Destructor */
-HiddenservicePage::~HiddenservicePage() {
-  delete _hiddenServiceSettings;
-  delete _torSettings;
-}
-
-/** Saves all settings for this page */
-bool HiddenservicePage::save(QString &errmsg) {
-  errmsg = tr("Problems while trying to store data.");
-  QList<Service> serviceList = _services->values();
-  ServiceList sList;
-  sList.setServices(serviceList);
-  _hiddenServiceSettings->setServices(sList);
-  while(_groupWidget->currentRow() >= 0) {
-  	_groupWidget->removeRow(0);
-  }
-  _userWidget->clear();
-  _selectedService.clear();
-  _selectedGroup.clear();
-  _selectedUser.clear();
-  return true;
-}
-
-/** Adds a new hidden service to the list of known services */
-void HiddenservicePage::addHiddenService() {
-  /* read the data fields */
-  QHostAddress serviceAddress(ui.serviceAdressLine->text());
-  QString serviceName(ui.serviceNameLine->text().trimmed());
-  QString localPort(ui.localPortLine->text());
-  QString listenPort(ui.listeningPortLine->text());
-  // only if all values are set
-  if (serviceAddress.isNull() || serviceName.isEmpty() || 
-    localPort.isEmpty() || listenPort.isEmpty() ) {
-    VMessageBox::warning(this, tr("Error"), tr("Please set all fields."),
-        VMessageBox::Ok);
-  } else {
-    if(_services->keys().contains(serviceName) == false) {
-      int rows = ui.serviceListView->rowCount();
-      ui.serviceListView->insertRow(rows);
-      QTableWidgetItem *cubesHeaderItem = new QTableWidgetItem(serviceName);
-      ui.serviceListView->setItem(rows, 1, cubesHeaderItem);
-      QTableWidgetItem *cboxitem = new QTableWidgetItem();
-      cboxitem->setFlags(Qt::ItemIsSelectable);
-      cboxitem->setCheckState(Qt::Unchecked);
-      cboxitem->setTextAlignment(Qt::AlignCenter);
-      ui.serviceListView->setItem(rows, 0, cboxitem);
-      //Saved checkbox states
-      Service::AuthenticationVersion version = Service::V0;      
-      if (ui.rbV2->isChecked() == true) {
-        version = Service::V2;
-      } 
-      Service newService(serviceName, serviceAddress.toString(), localPort, 
-        listenPort, version);
-      _services->insert(serviceName, newService);
-      initDataStructures();
-      showServices();
-    } else {
-        VMessageBox::warning(this,tr("Error"),
-        tr("Service name already in use, select a different one."), VMessageBox::Ok);
-      }    
-  }
-}
-
-
-/** Deletes selected hidden services */
-void HiddenservicePage::deleteHiddenService() { 
-  if(_selectedService.isEmpty() == false) {
-    while(_groupWidget->rowCount() > 0) {
-  	  _groupWidget->removeRow(0);
-    }
-    Service s = _services->take(_selectedService);
-    if(s.isDeployed()) {
-      VMessageBox::warning(this,tr("Error"),
-        tr("Please note that deleting this service will cause its undeployment."),
-         VMessageBox::Ok);
-    }	
-    ui.serviceNameLine->clear();
-    ui.listeningPortLine->clear();
-    _selectedGroup.clear();
-    _userWidget->clear();  
-    _serviceWidget->removeRow(_serviceWidget->currentRow());
-    _selectedService.clear(); 
-    _services->remove(_selectedService);
-    initDataStructures();
-    showServices();
-    showGroups();
-    publishButtonClicked();
-  } 	
-}
-
-/** Loads previously saved settings */
-void HiddenservicePage::load() {
-  ui.serviceAdressLine->setText(_hiddenServiceSettings->getServiceAddress().
-    toString());
-  ui.localPortLine->setText(QString::number(
-    _hiddenServiceSettings->getLocalServicePort()));
-  _services->clear();
-  ServiceList serviceList = _hiddenServiceSettings->getServices();  
-  QList<Service> services = serviceList.services();
+  connect(ui.serviceListView, SIGNAL(itemClicked(QTableWidgetItem*)), this,
+    SLOT(serviceSelectionChanged()));
+  connect(ui.groupListView, SIGNAL(itemClicked(QTableWidgetItem*)), this,
+    SLOT(groupSelectionChanged()));
+  connect(ui.userManagementView, SIGNAL(itemClicked(QListWidgetItem*)), this,
+    SLOT(userSelectionChanged(QListWidgetItem*))); 
+  connect(ui.modifyServiceButton, SIGNAL(clicked()), this, SLOT(modifyService()));
+  connect(ui.copyToClipboardButton, SIGNAL(clicked()), this, SLOT(copyToClipboard()));
+  /* A QTableWidget object representing the table of services in Vidalia*/ 
+  _serviceWidget = ui.serviceListView;
+  /* A QTableWidget object representing the table of groups in Vidalia */
+  _groupWidget = ui.groupListView;
+  /* A QListWidget object representing the list of users in Vidalia*/
+  _userWidget = ui.userManagementView;
+  /* A QMap, mapping from QString groupname to the Entity group */
+  _groups = new QMap<QString, Group>();
+  /* A QMap, mapping from QString username to the Entity user */
+  _users = new QMap<QString, User>();
+  /* A QMap, mapping from QString servicename to the Entity service */
+  _services = new QMap<QString, Service>();  
+  /* strech the horizontal header of the service table */
+  _serviceWidget->horizontalHeader()->setStretchLastSection(true);
+  /* strech the horizontal header of the group table */
+  _groupWidget->horizontalHeader()->setStretchLastSection(true);
+  /*a boolean that shows whether the installed Tor version supports V2 or not*/
+  _v2Support = supportV2();
+}
+
+/** Destructor */
+HiddenservicePage::~HiddenservicePage() {
+  delete _hiddenServiceSettings;
+  delete _torSettings;
+  delete _torControl;
+  delete _settings;
+  delete _parent;
+  delete _serviceWidget;
+  delete _groupWidget;
+  delete _userWidget;
+  delete _services;
+  delete _groups;
+  delete _users;  
+}
+
+/** Saves all settings for this page */
+bool HiddenservicePage::save(QString &errmsg) {
+  errmsg = tr("Problems while trying to store data.");
+  QList<Service> serviceList = _services->values();
+  ServiceList sList;
+  sList.setServices(serviceList);
+  _hiddenServiceSettings->setServices(sList);
+  while(_groupWidget->currentRow() >= 0) {
+  	_groupWidget->removeRow(0);
+  }
+  _userWidget->clear();
+  _selectedService.clear();
+  _selectedGroup.clear();
+  _selectedUser.clear();
+  return true;
+}
+
+/** Adds a new hidden service to the list of known services */
+void HiddenservicePage::addHiddenService() {
+  /* read the data fields */
+  QHostAddress serviceAddress(ui.serviceAdressLine->text());
+  QString serviceName(ui.serviceNameLine->text().trimmed());
+  QString localPort(ui.localPortLine->text());
+  QString listenPort(ui.listeningPortLine->text());
+  // only if all values are set
+  if (serviceAddress.isNull() || serviceName.isEmpty() || 
+    localPort.isEmpty() || listenPort.isEmpty() ) {
+    VMessageBox::warning(this, tr("Error"), tr("Please set all fields."),
+        VMessageBox::Ok);
+  } else {
+    if(_services->keys().contains(serviceName) == false) {
+      int rows = ui.serviceListView->rowCount();
+      ui.serviceListView->insertRow(rows);
+      QTableWidgetItem *cubesHeaderItem = new QTableWidgetItem(serviceName);
+      ui.serviceListView->setItem(rows, 1, cubesHeaderItem);
+      QTableWidgetItem *cboxitem = new QTableWidgetItem();
+      cboxitem->setFlags(Qt::ItemIsSelectable);
+      cboxitem->setCheckState(Qt::Unchecked);
+      cboxitem->setTextAlignment(Qt::AlignCenter);
+      ui.serviceListView->setItem(rows, 0, cboxitem);
+      //Saved checkbox states
+      Service::AuthenticationVersion version = Service::V0;      
+      if (ui.rbV2->isChecked() == true) {
+        version = Service::V2;
+        ui.settingsWidget->setTabEnabled(1, true);
+      } else {
+      	ui.settingsWidget->setTabEnabled(1, false);
+      	while(_groupWidget->rowCount() > 0) {
+  	      _groupWidget->removeRow(0);
+        }
+      }	
+      Service newService(serviceName, serviceAddress.toString(), localPort, 
+        listenPort, version);
+      _services->insert(serviceName, newService);
+      ui.serviceNameLine->setText("");
+      ui.listeningPortLine->setText("");
+      initDataStructures();
+      showServices();
+    } else {
+        VMessageBox::warning(this,tr("Error"),
+        tr("Service name already in use, select a different one."), VMessageBox::Ok);
+      }    
+  }
+}
+
+
+/** Deletes selected hidden services */
+void HiddenservicePage::deleteHiddenService() { 
+  if(_selectedService.isEmpty() == false) {
+    while(_groupWidget->rowCount() > 0) {
+  	  _groupWidget->removeRow(0);
+    }
+    Service s = _services->take(_selectedService);
+    if(s.isDeployed()) {
+      VMessageBox::warning(this,tr("Error"),
+        tr("Please note that deleting this service will cause its undeployment."),
+         VMessageBox::Ok);
+    }	
+    ui.serviceNameLine->clear();
+    ui.listeningPortLine->clear();
+    _selectedGroup.clear();
+    _userWidget->clear();  
+    _serviceWidget->removeRow(_serviceWidget->currentRow());
+    _selectedService.clear(); 
+    _services->remove(_selectedService);
+    initDataStructures();
+    showServices();
+    showGroups();
+    publishButtonClicked();
+  } 	
+}
+
+/** Loads previously saved settings */
+void HiddenservicePage::load() {
+  ui.serviceAdressLine->setText(_hiddenServiceSettings->getServiceAddress().
+    toString());
+  ui.localPortLine->setText(QString::number(
+    _hiddenServiceSettings->getLocalServicePort()));
+  _services->clear();
+  ServiceList serviceList = _hiddenServiceSettings->getServices();  
+  QList<Service> services = serviceList.services();
   QListIterator<Service> i(services);   
-  while (i.hasNext()) {    
-    Service tempService = i.next();    
-    _services->insert(tempService.serviceName(), tempService);
+  while (i.hasNext()) {    
+    Service tempService = i.next();    
+    _services->insert(tempService.serviceName(), tempService);
   }
-  checkPublishedServices();
-  initDataStructures();
-  showServices();  
-}
-
-/** this method is called whenever the publish/unpublish button is clicked */
-void HiddenservicePage::publishButtonClicked() {
-  /* only publish if services are available */
-	if (_serviceWidget->rowCount() != 0 && _selectedService.isEmpty() == false) {
-  /* set Service objects and GUI checkboxes */  
-  int f = _serviceWidget->currentRow();
-  QTableWidgetItem* widgetName = _serviceWidget->item(f,1);  
-  QTableWidgetItem* widgetChecked = _serviceWidget->item(f,0);
-  QString serviceName = widgetName->text();  
-  Service service;
-  service = _services->take(serviceName);
-  if((service.authenticationVersion() == Service::V2)  && _v2Support == false) {
-	   VMessageBox::information(this, tr("Old Tor Version"),
-        tr("Your Version of Tor does not support V2."),
-        VMessageBox::Ok);
-      }
-  else { if (service.isDeployed() == false){    
-    service.setDeployed(true);
-    widgetChecked->setCheckState(Qt::Checked);    
-    }
-  else {
-    service.setDeployed(false);
-    widgetChecked->setCheckState(Qt::Unchecked); 
-    }  
-  }
-  _services->insert(serviceName, service);  
-  /* get QList of checked services only */
-  QList<Service> allServices = _services->values();
-  QList<Service> checkedServices;
-   foreach (Service service, allServices) {
-      if(service.isDeployed() == true){
-        checkedServices.append(service);        
-      }
-    }    
-   /*reset hiddenServiceSettings configuration if all services are unpublished*/
-   if (checkedServices.size()== 0){  
-   	QString errmsg1 = tr("Error while trying to unpublish hidden service.");
-   	QString &errmsg = errmsg1;
-    _hiddenServiceSettings->unpublishAllServices(&errmsg); 
-    return;
-   }      
-  /* communicate with Tor controller to publish checked services */   
-  QString hiddenServiceConf;    
-  QList<Service>::iterator i;
-   for (i = checkedServices.begin(); i != checkedServices.end(); ++i) {	   
-        if (i != checkedServices.begin()){
-        hiddenServiceConf.append("HiddenServiceDir=\" ");
-      }      
-      QString serviceName = i->serviceName();
-      QString localServicePort = i->localServicePort();
-      QString listeningServicePort = i->listeningServicePort();
-      QString serviceAdress = i->serviceAdress();
-      QString authenticationVersion = i->toString(i->authenticationVersion()); 
-      QString dataDirectory; 
-      dataDirectory = Vidalia::dataDirectory();
-      dataDirectory.append("/");
-      dataDirectory.append( serviceName);      
-      hiddenServiceConf.append(dataDirectory + "\" ");
-      hiddenServiceConf.append("HiddenServicePort=\"" + listeningServicePort 
-        + " " + serviceAdress + ":" + localServicePort);
-      //Check for v2 Support
-      if(_v2Support == true){
-      hiddenServiceConf.append(" HiddenServiceVersion=\"" 
-        + authenticationVersion); 
-      }
-      if (i+1 != checkedServices.end()){
-        hiddenServiceConf.append("\" ");
-      }
-      hiddenServiceConf.replace(QString("\\"), QString("/"));
-   }
-   QString errmsg1 = tr("Error while trying to publish hidden service.");
-   QString &errmsg = errmsg1;
-   _hiddenServiceSettings->apply(hiddenServiceConf, &errmsg);  
-   createUserFile();
-   errmsg = tr("Problems while trying to store data."); 
-   save(errmsg);
-  }       
-}
-
-/** this method decides whether the local Tor version can work with V2 or not*/
-bool HiddenservicePage::supportV2(){	
-  QString version = _hiddenServiceSettings->getTorVersion();
-  //Second number has to be higher than 2 => support for V2
-  QString versionNumber = version.section('.', 2, 2);   
-	if (versionNumber.toInt() > 2){
-		return true;
-	} else {
-		return false;
-	}
-}
-
-/** create the authtentication data file needed by V2 services */
-void HiddenservicePage::createUserFile() {
-  /* get all services */
-  QList<Service> servicelist = _services->values();     
-  /* get checked services only */
-  QList<Service> checkedServices;     
-  foreach (Service service, servicelist) {
-    if(service.isDeployed() == true) {
-      checkedServices.append(service);               
-    } 
-  }
-  /* write files for checked services */
-  QListIterator<Service> i(checkedServices);
-   while (i.hasNext()) {       
-    /* for each checked service */
-    Service tempService;
-    tempService = i.next();         
-    QList<Group> groups;
-    groups = tempService.groups();
-    /* only checked groups */
-    QList<Group> checkedGroups;     
-      foreach (Group group, groups) {
-        if(group.isDeployed() == true){
-          checkedGroups.append(group);               
-        } 
-      }
-    /* only if there are groups write a group file */
-    if (checkedGroups.size() >0){
-      /* get Data Directory path to write User Files */
-      QString dataDirectory;  
-      dataDirectory = Vidalia::dataDirectory();
-      dataDirectory.append("/");
-      dataDirectory.append(tempService.serviceName());
-      dataDirectory.append("/");
-      dataDirectory.append("authdata");
-      touch_file(dataDirectory, true, new QString);
-      QFile file(dataDirectory);
-      if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
-        return;
-        QTextStream out(&file);                  
-        /* for all groups */
-        QListIterator<Group> i2(checkedGroups);
-        while (i2.hasNext()) {
-          /* for each group */
-          Group tempGroup;
-          tempGroup = i2.next();
-          out << "SecretCookieName " << tempGroup.groupName() << "\n";
-          out << "SecretCookieKey " << tempGroup.cookieKey() << "\n";
-           /* for all users; */
-           QList<User> users;         
-           users = tempGroup.groupMembers();
-           QListIterator<User> i3(users);
-           while (i3.hasNext()) {
-             User tempUser;
-             tempUser = i3.next();
-             /* write in file */
-             out << "User " << tempUser.userName() << "\n";
-             out << "IntroductionPointAuthentication "; 
-             out << tempUser.introductionPassword() << "\n";
-             out << "HiddenServiceAuthentication ";
-             out << tempUser.authenticationPassword() << "\n";
-             out << "-----BEGIN RSA PUBLIC KEY----- " << "\n";
-             out << tempUser.publicKey() << "\n";
-             out << "-----END RSA PUBLIC KEY----- " << "\n";
-           }
-         }
-       }
-     }
+  checkPublishedServices();
+  initDataStructures();
+  showServices();  
 }
 
+/** this method is called whenever the publish/unpublish button is clicked */
+void HiddenservicePage::publishButtonClicked() {
+  /* only publish if services are available */
+  if (_serviceWidget->rowCount() != 0 && _selectedService.isEmpty() == false) {
+  /* set Service objects and GUI checkboxes */  
+  int f = _serviceWidget->currentRow();
+  QTableWidgetItem* widgetName = _serviceWidget->item(f,1);  
+  QTableWidgetItem* widgetChecked = _serviceWidget->item(f,0);
+  QString serviceName = widgetName->text();  
+  Service service;
+  service = _services->take(serviceName);
+  if((service.authenticationVersion() == Service::V2)  && _v2Support == false) {
+        VMessageBox::information(this, tr("Old Tor Version"),
+        tr("Your Version of Tor does not support V2."),
+        VMessageBox::Ok);
+      }
+  else { if (service.isDeployed() == false){    
+    service.setDeployed(true);
+    widgetChecked->setCheckState(Qt::Checked);    
+    }
+  else {
+    service.setDeployed(false);
+    widgetChecked->setCheckState(Qt::Unchecked); 
+    }  
+  }
+  _services->insert(serviceName, service);  
+  /* get QList of checked services only */
+  QList<Service> allServices = _services->values();
+  QList<Service> checkedServices;
+   foreach (Service service, allServices) {
+      if(service.isDeployed() == true){
+        checkedServices.append(service);        
+      }
+    }    
+   /*reset hiddenServiceSettings configuration if all services are unpublished*/
+   if (checkedServices.size()== 0){  
+   	QString errmsg1 = tr("Error while trying to unpublish hidden service.");
+   	QString &errmsg = errmsg1;
+    _hiddenServiceSettings->unpublishAllServices(&errmsg); 
+    return; 
+    }
+   /* create User Files before sending to controler*/
+   createUserFile();      
+  /* communicate with Tor controller to publish checked services */   
+  QString hiddenServiceConf;    
+  QList<Service>::iterator i;
+   for (i = checkedServices.begin(); i != checkedServices.end(); ++i) {	   
+        if (i != checkedServices.begin()){
+        hiddenServiceConf.append("HiddenServiceDir=\" ");
+      }      
+      QString serviceName = i->serviceName();
+      QString localServicePort = i->localServicePort();
+      QString listeningServicePort = i->listeningServicePort();
+      QString serviceAdress = i->serviceAdress();
+      Service::AuthenticationVersion Authversion = i->authenticationVersion(); 
+      QString dataDirectory; 
+      dataDirectory = Vidalia::dataDirectory();
+      dataDirectory.append("/");
+      dataDirectory.append( serviceName);      
+      hiddenServiceConf.append(dataDirectory + "\" ");
+      hiddenServiceConf.append("HiddenServicePort=\"" + listeningServicePort 
+        + " " + serviceAdress + ":" + localServicePort);
+ 
+      if (i+1 != checkedServices.end() || i+1 == checkedServices.end() && _v2Support == true){
+        hiddenServiceConf.append("\" ");
+      }
+      //Check for v2 Support
+      QString version = "0";
+       if (Authversion == Service::V2) {
+         version = "2";
+       }     
+      if(_v2Support == true){
+      hiddenServiceConf.append(" HiddenServiceVersion=\"" 
+        + version);
+        if (i+1 != checkedServices.end()){
+        hiddenServiceConf.append("\" ");
+        } 
+      }     
+      hiddenServiceConf.replace(QString("\\"), QString("/"));
+   }
+   QString errmsg1 = tr("Error while trying to publish hidden service.");
+   QString &errmsg = errmsg1;  
+   _hiddenServiceSettings->apply(hiddenServiceConf, &errmsg);   
+   errmsg = tr("Problems while trying to store data."); 
+   save(errmsg);
+  }       
+}
+
+/** this method decides whether the local Tor version can work with V2 or not*/
+bool HiddenservicePage::supportV2(){	
+  QString version = _hiddenServiceSettings->getTorVersion();
+  //Second number has to be higher than 2 => support for V2
+  QString versionNumber = version.section('.', 1, 1);   
+	if (versionNumber.toInt() > 2){
+		return true;
+	} else {
+		return false;
+	}
+}
+
+/** create the authtentication data file needed by V2 services */
+void HiddenservicePage::createUserFile() {
+  /* get all services */
+  QList<Service> servicelist = _services->values();     
+  /* get checked services only */
+  QList<Service> checkedServices;     
+  foreach (Service service, servicelist) {
+    if(service.isDeployed() == true) {
+      checkedServices.append(service);               
+    } 
+  }
+  /* write files for checked services */
+  QListIterator<Service> i(checkedServices);
+   while (i.hasNext()) {       
+    /* for each checked service */
+    Service tempService;
+    tempService = i.next();         
+    QList<Group> groups;
+    groups = tempService.groups();
+    /* only checked groups */
+    QList<Group> checkedGroups;     
+      foreach (Group group, groups) {
+        if(group.isDeployed() == true){
+          checkedGroups.append(group);               
+        } 
+      }
+    /* only if there are groups write a group file */
+    if (checkedGroups.size() >0){
+      /* get Data Directory path to write User Files */
+      QString dataDirectory;  
+      dataDirectory = Vidalia::dataDirectory();
+      dataDirectory.append("/");
+      dataDirectory.append(tempService.serviceName());
+      dataDirectory.append("/");
+      dataDirectory.append("authdata");
+      touch_file(dataDirectory, true, new QString);
+      QFile file(dataDirectory);
+      if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
+        return;
+        QTextStream out(&file);                  
+        /* for all groups */
+        QListIterator<Group> i2(checkedGroups);
+        while (i2.hasNext()) {
+          /* for each group */
+          Group tempGroup;
+          tempGroup = i2.next();
+          out << "SecretCookieName " << tempGroup.groupName() << "\n";
+          out << "SecretCookieKey " << tempGroup.cookieKey() << "\n";
+           /* for all users; */
+           QList<User> users;         
+           users = tempGroup.groupMembers();
+           QListIterator<User> i3(users);
+           while (i3.hasNext()) {
+             User tempUser;
+             tempUser = i3.next();
+             /* write in file */
+             out << "User " << tempUser.userName() << "\n";
+             out << "IntroductionPointAuthentication "; 
+             out << tempUser.introductionPassword() << "\n";
+             out << "HiddenServiceAuthentication ";
+             out << tempUser.authenticationPassword() << "\n";
+             if (tempUser.publicKey().isEmpty() == false){
+             out << "-----BEGIN RSA PUBLIC KEY----- " << "\n";
+             out << tempUser.publicKey() << "\n";
+             out << "-----END RSA PUBLIC KEY----- " << "\n";
+             }
+           }
+         }
+       }
+     }
+}
+
 /** Search for Services which are deployed */
 void HiddenservicePage::checkPublishedServices() { 
   QString directory;
@@ -404,87 +433,97 @@
          }
      }
   }
-}    
-
-/** craete the data structures needed during runtime */
-void HiddenservicePage::initDataStructures() {
-  _groups->clear();
-  _users->clear();
-  int index = 0;
-  QList<Service> serviceList = _services->values();
-  while (index < serviceList.size()) {
-    /* for each service */
-    Service tempService;
-    tempService = serviceList.value(index);
-    QList<Group> groups;
-    groups = tempService.groups();
-    QListIterator<Group> i2(groups);
-    while (i2.hasNext()) {
-      /* for each group */
-      Group tempGroup;
-      tempGroup = i2.next();
-      _groups->insert(tempGroup.groupName(), tempGroup);
-      QList<User> users;
-      users = tempGroup.groupMembers();
-      QListIterator<User> i3(users);
-      while (i3.hasNext()) {
-        /* for each user */
-        User tempUser = i3.next(); 
-        if (_users->keys().contains(tempUser.userName()) == false) {
-          /* if the map does not contain the username yet */
-          _users->insert(tempUser.userName(), tempUser);
-        }
-      }
-    }
-    index++;
-  }
-}
-
-void HiddenservicePage::modifyService() {
-  QString newServiceName(ui.serviceNameLine->text().trimmed());
-  QString newListPort(ui.listeningPortLine->text());
-  QString newLocalPort(ui.localPortLine->text()); 
-  QHostAddress newServiceAddress(ui.serviceAdressLine->text()); 
-  if (newServiceAddress.isNull() || newServiceName.isEmpty() || 
-    newLocalPort.isEmpty() || newListPort.isEmpty() ) {
-    VMessageBox::warning(this, tr("Error"), tr("Please set all fields."),
-        VMessageBox::Ok);
-  } else if(_services->keys().contains(newServiceName) == false || 
-    (_services->keys().contains(newServiceName) == true & 
-      newServiceName.compare(_selectedService) == 0)) {
-  	Service s = _services->take(_selectedService);
-  	s.setServiceName(newServiceName);
-  	s.setServiceAdress(newServiceAddress.toString());
-  	s.setLocalServicePort(newLocalPort);
-  	s.setListeningServicePort(newListPort);
-  	if (ui.rbV0->isChecked()) {
-      s.setAuthenticationVersion(Service::V0);
-    } else if (ui.rbV2->isChecked()) {
-        s.setAuthenticationVersion(Service::V2);
-      } 
-    _services->insert(s.serviceName(), s);
-    initDataStructures();
-    showServices();
-    _selectedService.clear();
-    _selectedGroup.clear();
-    while(_groupWidget->rowCount() > 0) {
-  	  _groupWidget->removeRow(0);
-    }
-  } else {
-  	  VMessageBox::warning(this, tr("Error"),
-        tr("Service name already in use, please select a different one."), 
-          VMessageBox::Ok);
-    }
-}
-
-
+}    
+
+/** craete the data structures needed during runtime */
+void HiddenservicePage::initDataStructures() {
+  _groups->clear();
+  _users->clear();
+  int index = 0;
+  QList<Service> serviceList = _services->values();
+  while (index < serviceList.size()) {
+    /* for each service */
+    Service tempService;
+    tempService = serviceList.value(index);
+    QList<Group> groups;
+    groups = tempService.groups();
+    QListIterator<Group> i2(groups);
+    while (i2.hasNext()) {
+      /* for each group */
+      Group tempGroup;
+      tempGroup = i2.next();
+      _groups->insert(tempGroup.groupName(), tempGroup);
+      QList<User> users;
+      users = tempGroup.groupMembers();
+      QListIterator<User> i3(users);
+      while (i3.hasNext()) {
+        /* for each user */
+        User tempUser = i3.next(); 
+        if (_users->keys().contains(tempUser.userName()) == false) {
+          /* if the map does not contain the username yet */
+          _users->insert(tempUser.userName(), tempUser);
+        }
+      }
+    }
+    index++;
+  }
+}
+
+void HiddenservicePage::modifyService() {
+  if(_selectedService.isEmpty()) {
+  	VMessageBox::warning(this, tr("Error"), tr("Please select the service you want to modify."),
+    VMessageBox::Ok);
+    return;
+  }  
+  QString newServiceName(ui.serviceNameLine->text().trimmed());
+  QString newListPort(ui.listeningPortLine->text());
+  QString newLocalPort(ui.localPortLine->text()); 
+  QHostAddress newServiceAddress(ui.serviceAdressLine->text()); 
+  if (newServiceAddress.isNull() || newServiceName.isEmpty() || 
+    newLocalPort.isEmpty() || newListPort.isEmpty() ) {
+    VMessageBox::warning(this, tr("Error"), tr("Please set all fields."),
+        VMessageBox::Ok);
+  } else if(_services->keys().contains(newServiceName) == false || 
+    (_services->keys().contains(newServiceName) == true & 
+      newServiceName.compare(_selectedService) == 0)) {
+  	Service s = _services->take(_selectedService);
+  	s.setServiceName(newServiceName);
+  	s.setServiceAdress(newServiceAddress.toString());
+  	s.setLocalServicePort(newLocalPort);
+  	s.setListeningServicePort(newListPort);
+  	_selectedService.clear();
+    _selectedGroup.clear();
+    _selectedUser.clear();
+  	if (ui.rbV0->isChecked()) {
+      s.setAuthenticationVersion(Service::V0);
+      ui.settingsWidget->setTabEnabled(1, false);
+      while(_groupWidget->rowCount() > 0) {
+  	  _groupWidget->removeRow(0);
+      }
+    } else if (ui.rbV2->isChecked()) {
+        s.setAuthenticationVersion(Service::V2);
+        ui.settingsWidget->setTabEnabled(1, true);
+      } 
+    _services->insert(s.serviceName(), s);
+    ui.serviceNameLine->setText("");
+    ui.listeningPortLine->setText("");
+    initDataStructures();
+    showServices();
+  } else {
+  	  VMessageBox::warning(this, tr("Error"),
+        tr("Service name already in use, please select a different one."), 
+          VMessageBox::Ok);
+    }
+}
+
+
 /** display all services in the service widget */
 void HiddenservicePage::showServices() {
 	QList<QString> keys;
 	QList<Service> serviceList = _services->values();
-	QListIterator<Service> i(serviceList);
-	while(_serviceWidget->rowCount() > 0) {
-  	  _serviceWidget->removeRow(0);
+	QListIterator<Service> i(serviceList);
+	while(_serviceWidget->rowCount() > 0) {
+  	  _serviceWidget->removeRow(0);
     }
 	int currentRow = 0;
 	while (i.hasNext()) {
@@ -503,7 +542,7 @@
 	  cboxitem->setTextAlignment(Qt::AlignCenter);
 	  _serviceWidget->setItem(currentRow, 0, cboxitem);
 	  currentRow++;
-	}	
+	}	
 	_serviceWidget->sortItems(1, Qt::AscendingOrder);
 }
 
@@ -512,658 +551,660 @@
   int currentRow = _serviceWidget->currentRow();
   QTableWidgetItem* widget = _serviceWidget->item(currentRow, 1);
   _selectedService = widget->text(); 
-  showGroups();
-  QTableWidgetItem* groupWidgetItem = _groupWidget->item(0,1);
-  _groupWidget->setCurrentItem(groupWidgetItem);
-  if(groupWidgetItem != NULL) 
-    _selectedGroup = groupWidgetItem->text();
-  showUsers();
+  showGroups();
+  QTableWidgetItem* groupWidgetItem = _groupWidget->item(0,1);
+  _groupWidget->setCurrentItem(groupWidgetItem);
+  if(groupWidgetItem != NULL) 
+    _selectedGroup = groupWidgetItem->text();
+  showUsers();
 }
-
+
 /** this method is called when the user selects a different group */
-void HiddenservicePage::groupSelectionChanged()  {
-  int currentRow = _groupWidget->currentRow();
-  QTableWidgetItem* widget = _groupWidget->item(currentRow, 1);
-  _selectedGroup = widget->text();
-  QTableWidgetItem* widgetChecked = _groupWidget->item(currentRow,0);
-  Service s = _services->value(_selectedService);
-  QList<Group> groups = s.groups();
-  Group g;
-  int index = 0;
-  while(index < groups.size()) {
-    Group tempGroup = groups.value(index);
-    int comp = tempGroup.groupName().compare(_selectedGroup);
-    if(comp == 0) {
-      g = groups.takeAt(index);
-    }	
-    index++;
-  }
-  bool state = false;
-  if(widgetChecked->checkState() == Qt::Checked) {
-  	state = true;
-  } else {
-  }	
-  g.setIsDeployed(state);
-  groups.append(g);
-  s.setGroups(groups);
-  _services->insert(_selectedService, s);
-  initDataStructures();
-  showUsers();
-}
-
-/** this method is called when the user selects a different user */
-void HiddenservicePage::userSelectionChanged(QListWidgetItem* current) {
-  _selectedUser = current->text();
-}
+void HiddenservicePage::groupSelectionChanged()  {
+  int currentRow = _groupWidget->currentRow();
+  QTableWidgetItem* widget = _groupWidget->item(currentRow, 1);
+  _selectedGroup = widget->text();
+  QTableWidgetItem* widgetChecked = _groupWidget->item(currentRow,0);
+  Service s = _services->value(_selectedService);
+  QList<Group> groups = s.groups();
+  Group g;
+  int index = 0;
+  while(index < groups.size()) {
+    Group tempGroup = groups.value(index);
+    int comp = tempGroup.groupName().compare(_selectedGroup);
+    if(comp == 0) {
+      g = groups.takeAt(index);
+    }	
+    index++;
+  }
+  bool state = false;
+  if(widgetChecked->checkState() == Qt::Checked) {
+  	state = true;
+  } else {
+  }	
+  g.setIsDeployed(state);
+  groups.append(g);
+  s.setGroups(groups);
+  _services->insert(_selectedService, s);
+  initDataStructures();
+  showUsers();
+}
 
-/** display all groups in the group widget */
-void HiddenservicePage::showGroups() {
-  while(_groupWidget->rowCount() > 0) {
-  	_groupWidget->removeRow(0);
-  }  	
-  _selectedGroup.clear();
-  _userWidget->clear();  
-  if(_services->count() != 0) {
-    Service s;
-    s = _services->value(_selectedService);
-    ui.serviceAdressLine->setText(s.serviceAdress());
-    ui.localPortLine->setText(s.localServicePort());
-    ui.serviceNameLine->setText(s.serviceName());
-    ui.listeningPortLine->setText(s.listeningServicePort());
-    /* update checkbox view */
-    if (s.authenticationVersion() == Service::V0) {
-      ui.rbV0->setChecked(true);
-      ui.settingsWidget->setTabEnabled(1, false);
-    } else if (s.authenticationVersion() == Service::V2) {
-        ui.rbV2->setChecked(true);
-        ui.settingsWidget->setTabEnabled(1, true);
-      }
-      QList<Group> groups = s.groups();
-      QListIterator<Group> i(groups);
-      while (i.hasNext()) {
-        Group tempGroup = i.next();
-        int rows = _groupWidget->rowCount();
-        _groupWidget->insertRow(rows);
-        QTableWidgetItem *cubesHeaderItem = new 
-        QTableWidgetItem(tempGroup.groupName());
-        _groupWidget->setItem(rows, 1, cubesHeaderItem);
-        QTableWidgetItem *cboxitem = new QTableWidgetItem( tr(""));
-        if(tempGroup.isDeployed() == false) {
-          cboxitem->setCheckState(Qt::Unchecked);
-        } else {
-      	    cboxitem->setCheckState(Qt::Checked);
-          }
-        cboxitem->setTextAlignment(Qt::AlignCenter);
-        _groupWidget->setItem(rows, 0, cboxitem);
-      }
-  }
-  _groupWidget->sortItems(1, Qt::AscendingOrder);  
-}
-
-/** display all users in the user widget */
-void HiddenservicePage::showUsers() {
-  _userWidget->clear();
-  _selectedUser.clear();  
-  Group g;
-  Service s;
-  s = _services->value(_selectedService);  
-  QList<Group> groups = s.groups();
-  QListIterator<Group> i(groups);
-  while (i.hasNext()) {
-    Group tempGroup = i.next();
-    QString tempString = tempGroup.groupName();
-    int comp = _selectedGroup.compare(tempString);
-    if (comp == 0) {
-      QList<User> users;
-      users = tempGroup.groupMembers();
-      QListIterator<User> i2(users);
-      while (i2.hasNext()) {
-        User tempUser;
-        tempUser = i2.next();
-        _userWidget->addItem(new QListWidgetItem(tempUser.userName(), 
-          _userWidget, 0));
-      }
-    }
-  }
-  _userWidget->sortItems(Qt::AscendingOrder);
-}
-
-/** Adds a already known user to the selected Group */
-void HiddenservicePage::addUser() {
-  if ((_selectedService.isEmpty() == false && 
-    _selectedGroup.isEmpty()== false)) {
-    Service selectedService = _services->value(_selectedService);
-    QList<Group> groups = selectedService.groups();
-    Group selectedGroup;
-    int groupIndex = 0;
-    QList<QString> selectableUsers = _users->keys();
-    /* the selected service, delete all users from the selectableUsers */     
-    int index = 0;
-    while(index < groups.size()) {
-      Group tempGroup = groups.value(index);
-      QList<User> tempUsers = tempGroup.groupMembers();
-      int index2 = 0;
-      while(index2 < tempUsers.size()) {
-        QString tempString = tempUsers.value(index2).userName();
-        if(selectableUsers.contains(tempString) == true) {
-          int pos = selectableUsers.indexOf(tempString, 0);
-          selectableUsers.removeAt(pos);
-        }
-        index2++;
-      }
-      int comp = tempGroup.groupName().compare(_selectedGroup);
-      if(comp == 0) {
-        /* found right group */
-        groupIndex = index;
-      } else {
-        }  
-      index++;
-    }
-    Adduserdialog *adduserdialog = new Adduserdialog(this);
-    adduserdialog->setUsers(selectableUsers);
-    adduserdialog->show();
-    QString selectedUser;
-    if (adduserdialog->exec() == QDialog::Accepted) {
-      selectedUser = adduserdialog->selectedUser();
-      delete adduserdialog;
-      if(selectedUser.length() > 0) {
-        selectedGroup = groups.takeAt(groupIndex);
-        User user = _users->value(selectedUser);
-        selectedGroup.addUser(user);
-        groups.push_front(selectedGroup);
-        selectedService.setGroups(groups);
-        _services->insert(_selectedService, selectedService);
-        showUsers();
-        initDataStructures();
-        return;
-      }
-    }
-  } else {
-      VMessageBox::warning(this, tr("Error"),
-        tr("Please select service and group."), VMessageBox::Ok);
-    }    
-}
-
-/** this method creates a new user object */ 
-void HiddenservicePage::createUser() {
-  if ((_selectedService.isEmpty() == false && 
-    _selectedGroup.isEmpty()== false)) {
-    Userdialog *userdialog = new Userdialog(this);
-    userdialog->setUserName(_tempUser->userName());
-    userdialog->setPublicKey(_tempUser->publicKey());
-    userdialog->show();
-    QString enteredName;
-    QString enteredIntroPassword;
-    QString enteredIntroConfirmation;
-    QString enteredAuthPassword;
-    QString enteredAuthConfirmation;
-    QString enteredPublicKey;
-    if (userdialog->exec() == QDialog::Accepted) {
-      enteredName = userdialog->userName().trimmed();
-      enteredIntroPassword = userdialog->introductionPassword().trimmed();
-      enteredAuthPassword = userdialog->authenticationPassword().trimmed();
-      enteredPublicKey = userdialog->publicKey().trimmed();
-      enteredIntroConfirmation = userdialog->introductionConfirmation().trimmed();
-      enteredAuthConfirmation = userdialog->authenticationConfirmation().trimmed();
-      _tempUser->setUserName(enteredName);
-      _tempUser->setPublicKey(enteredPublicKey);
-      if(enteredName.isEmpty()) {
-        VMessageBox::warning(this, tr("Error"),
-        tr("The username has to be set."), VMessageBox::Ok);
-        createUser();
-        return;
-      }	
-      if(enteredIntroPassword.isEmpty() && enteredAuthPassword.isEmpty()) {
-      	if(enteredPublicKey.isEmpty()) {
-      	  VMessageBox::warning(this, tr("Error"),
-          tr("Please fill out the public key field."), VMessageBox::Ok);
-          createUser();
-          return;
-      	}
-      } else if(enteredIntroPassword.isEmpty() || enteredAuthPassword.isEmpty()) {
-      		VMessageBox::warning(this, tr("Error"),
-            tr("Please fill out the neccesary fields."), VMessageBox::Ok);
-      		createUser();
-      		return;
-      	}
-      delete userdialog;
-      bool alreadyExists = _users->keys().contains(enteredName);
-      if(alreadyExists) {
-      	VMessageBox::warning(this, tr("Error"),
-          tr("The entered user name already exists. Please select a "
-            "different one."), VMessageBox::Ok);
-        createUser();
-        return;
-      } else if(enteredIntroPassword != enteredIntroConfirmation) {
-          VMessageBox::warning(this, tr("Error"),
-          tr("No matching for introduction password and confirmation."), 
-          VMessageBox::Ok);
-          createUser();
-          return;
-      } else if(enteredAuthPassword != enteredAuthConfirmation) {
-      	  VMessageBox::warning(this, tr("Error"),
-          tr("No matching for authentication password and confirmation."), 
-          VMessageBox::Ok);
-          createUser();
-          return;
-      }
-      User newUser;
-      newUser.setUserName(enteredName);
-      newUser.setIntroductionPassword(enteredIntroPassword);
-      newUser.setAuthenticationPassword(enteredAuthPassword);
-      newUser.setPublicKey(enteredPublicKey);
-      _userWidget->addItem(new QListWidgetItem(enteredName, 
-      _userWidget, 0));
-      Service s = _services->value(_selectedService);
-      QList<Group> groups = s.groups();
-      QListIterator<Group> i(groups);
-      int index = 0;
-      while (i.hasNext()) {
-        i.next();
-        Group tempGroup = groups.takeAt(index);
-        QString tempString = tempGroup.groupName();
-        int comp = tempString.compare(_selectedGroup);
-        if (comp == 0) {
-          tempGroup.addUser(newUser);
-        }
-        groups.append(tempGroup);
-      }
-      _tempUser = new User();
-      s.setGroups(groups);
-      _services->insert(_selectedService, s);
-      initDataStructures();
-      showUsers();       
-    } 
-    _tempUser = new User();   
-  } else {
-      VMessageBox::warning(this, tr("Error"),
-        tr("Please select a service and a group."), VMessageBox::Ok);
-    }
-}
-
-/** delete the selected user */
-void HiddenservicePage::deleteUser() {
-  QList<QListWidgetItem*> userItems = _userWidget->selectedItems();
-  if(userItems.size() > 0)  {
-    QListWidgetItem *selectedUser = userItems.front();
-    _selectedUser = selectedUser->text();
-    int index = _userWidget->currentRow();  
-    if (_selectedService.isEmpty() == false && 
-      _selectedGroup.isEmpty() == false) {
-      Service s = _services->value(_selectedService);
-      QList<Group> groups = s.groups();
-      int count = 0;
-      while (count < groups.size()) {
-        Group tempGroup = groups.takeAt(count);
-        QString tempString = tempGroup.groupName();
-        int compare = tempString.compare(_selectedGroup);
-        if (compare == 0) {
-          QList<User> users = tempGroup.groupMembers();
-          int pos = 0;
-          while (pos < users.size()) {
-            User tempUser = users.value(pos);
-            QString tempName = tempUser.userName();
-            int comp = tempName.compare(_selectedUser);
-            if (comp == 0) {
-              users.removeAt(pos);        
-              _userWidget->takeItem(index);        
-            }
-            pos++;
-          }
-          tempGroup.setGroupMembers(users);
-          groups.append(tempGroup);
-          s.setGroups(groups);
-        }
-        _services->insert(_selectedService, s);
-       initDataStructures();
-       _selectedUser.clear();
-       count++;
-      }
-    }
-  } else {
-      VMessageBox::warning(this, tr("Error"),
-        tr("Please select the user you want to delete."), VMessageBox::Ok);
-    }  
-}
-
-/** create a new group */
-void HiddenservicePage::createGroup() {
-  if(_selectedService.isEmpty() == false)  {
-    Groupdialog *groupdialog = new Groupdialog(this);
-    groupdialog->setGroupName(_tempGroup->groupName());
-    groupdialog->show();
+/** this method is called when the user selects a different user */
+void HiddenservicePage::userSelectionChanged(QListWidgetItem* current) {
+  _selectedUser = current->text();
+}
+
+/** display all groups in the group widget */
+void HiddenservicePage::showGroups() {
+  while(_groupWidget->rowCount() > 0) {
+  	_groupWidget->removeRow(0);
+  }  	
+  _selectedGroup.clear();
+  _userWidget->clear();  
+  if(_services->count() != 0) {
+    Service s;
+    s = _services->value(_selectedService);
+    ui.serviceAdressLine->setText(s.serviceAdress());
+    ui.localPortLine->setText(s.localServicePort());
+    ui.serviceNameLine->setText(s.serviceName());
+    ui.listeningPortLine->setText(s.listeningServicePort());
+    /* update checkbox view */
+    if (s.authenticationVersion() == Service::V0) {
+      ui.rbV0->setChecked(true);
+      ui.settingsWidget->setTabEnabled(1, false);
+    } else if (s.authenticationVersion() == Service::V2) {
+        ui.rbV2->setChecked(true);
+        ui.settingsWidget->setTabEnabled(1, true);
+      }
+      QList<Group> groups = s.groups();
+      QListIterator<Group> i(groups);
+      while (i.hasNext()) {
+        Group tempGroup = i.next();
+        int rows = _groupWidget->rowCount();
+        _groupWidget->insertRow(rows);
+        QTableWidgetItem *cubesHeaderItem = new 
+        QTableWidgetItem(tempGroup.groupName());
+        _groupWidget->setItem(rows, 1, cubesHeaderItem);
+        QTableWidgetItem *cboxitem = new QTableWidgetItem( tr(""));
+        if(tempGroup.isDeployed() == false) {
+          cboxitem->setCheckState(Qt::Unchecked);
+        } else {
+      	    cboxitem->setCheckState(Qt::Checked);
+          }
+        cboxitem->setTextAlignment(Qt::AlignCenter);
+        _groupWidget->setItem(rows, 0, cboxitem);
+      }
+  }
+  _groupWidget->sortItems(1, Qt::AscendingOrder);  
+}
+
+/** display all users in the user widget */
+void HiddenservicePage::showUsers() {
+  _userWidget->clear();
+  _selectedUser.clear();  
+  Group g;
+  Service s;
+  s = _services->value(_selectedService);  
+  QList<Group> groups = s.groups();
+  QListIterator<Group> i(groups);
+  while (i.hasNext()) {
+    Group tempGroup = i.next();
+    QString tempString = tempGroup.groupName();
+    int comp = _selectedGroup.compare(tempString);
+    if (comp == 0) {
+      QList<User> users;
+      users = tempGroup.groupMembers();
+      QListIterator<User> i2(users);
+      while (i2.hasNext()) {
+        User tempUser;
+        tempUser = i2.next();
+        _userWidget->addItem(new QListWidgetItem(tempUser.userName(), 
+          _userWidget, 0));
+      }
+    }
+  }
+  _userWidget->sortItems(Qt::AscendingOrder);
+}
+
+/** Adds a already known user to the selected Group */
+void HiddenservicePage::addUser() {
+  if ((_selectedService.isEmpty() == false && 
+    _selectedGroup.isEmpty()== false)) {
+    Service selectedService = _services->value(_selectedService);
+    QList<Group> groups = selectedService.groups();
+    Group selectedGroup;
+    int groupIndex = 0;
+    QList<QString> selectableUsers = _users->keys();
+    /* the selected service, delete all users from the selectableUsers */     
+    int index = 0;
+    while(index < groups.size()) {
+      Group tempGroup = groups.value(index);
+      QList<User> tempUsers = tempGroup.groupMembers();
+      int index2 = 0;
+      while(index2 < tempUsers.size()) {
+        QString tempString = tempUsers.value(index2).userName();
+        if(selectableUsers.contains(tempString) == true) {
+          int pos = selectableUsers.indexOf(tempString, 0);
+          selectableUsers.removeAt(pos);
+        }
+        index2++;
+      }
+      int comp = tempGroup.groupName().compare(_selectedGroup);
+      if(comp == 0) {
+        /* found right group */
+        groupIndex = index;
+      } else {
+        }  
+      index++;
+    }
+    Adduserdialog *adduserdialog = new Adduserdialog(this);
+    adduserdialog->setUsers(selectableUsers);
+    adduserdialog->show();
+    QString selectedUser;
+    if (adduserdialog->exec() == QDialog::Accepted) {
+      selectedUser = adduserdialog->selectedUser();
+      delete adduserdialog;
+      if(selectedUser.length() > 0) {
+        selectedGroup = groups.takeAt(groupIndex);
+        User user = _users->value(selectedUser);
+        selectedGroup.addUser(user);
+        groups.push_front(selectedGroup);
+        selectedService.setGroups(groups);
+        _services->insert(_selectedService, selectedService);
+        showUsers();
+        initDataStructures();
+        return;
+      }
+    }
+  } else {
+      VMessageBox::warning(this, tr("Error"),
+        tr("Please select service and group."), VMessageBox::Ok);
+    }    
+}
+
+/** this method creates a new user object */ 
+void HiddenservicePage::createUser() {
+  if ((_selectedService.isEmpty() == false && 
+    _selectedGroup.isEmpty()== false)) {
+    Userdialog *userdialog = new Userdialog(this);
+    userdialog->setUserName(_tempUser->userName());
+    userdialog->setPublicKey(_tempUser->publicKey());
+    userdialog->show();
+    QString enteredName;
+    QString enteredIntroPassword;
+    QString enteredIntroConfirmation;
+    QString enteredAuthPassword;
+    QString enteredAuthConfirmation;
+    QString enteredPublicKey;
+    if (userdialog->exec() == QDialog::Accepted) {
+      enteredName = userdialog->userName().trimmed();
+      enteredIntroPassword = userdialog->introductionPassword().trimmed();
+      enteredAuthPassword = userdialog->authenticationPassword().trimmed();
+      enteredPublicKey = userdialog->publicKey().trimmed();
+      enteredIntroConfirmation = userdialog->introductionConfirmation().trimmed();
+      enteredAuthConfirmation = userdialog->authenticationConfirmation().trimmed();
+      _tempUser->setUserName(enteredName);
+      _tempUser->setPublicKey(enteredPublicKey);
+      if(enteredName.isEmpty()) {
+        VMessageBox::warning(this, tr("Error"),
+        tr("The username has to be set."), VMessageBox::Ok);
+        createUser();
+        return;
+      }	
+      if(enteredIntroPassword.isEmpty() && enteredAuthPassword.isEmpty()) {
+      	if(enteredPublicKey.isEmpty()) {
+      	  VMessageBox::warning(this, tr("Error"),
+          tr("Please fill out the public key field."), VMessageBox::Ok);
+          createUser();
+          return;
+      	}
+      } else if(enteredIntroPassword.isEmpty() || enteredAuthPassword.isEmpty()) {
+      		VMessageBox::warning(this, tr("Error"),
+            tr("Please fill out the neccesary fields."), VMessageBox::Ok);
+      		createUser();
+      		return;
+      	}
+      delete userdialog;
+      bool alreadyExists = _users->keys().contains(enteredName);
+      if(alreadyExists) {
+      	VMessageBox::warning(this, tr("Error"),
+          tr("The entered user name already exists. Please select a "
+            "different one."), VMessageBox::Ok);
+        createUser();
+        return;
+      } else if(enteredIntroPassword != enteredIntroConfirmation) {
+          VMessageBox::warning(this, tr("Error"),
+          tr("No matching for introduction password and confirmation."), 
+          VMessageBox::Ok);
+          createUser();
+          return;
+      } else if(enteredAuthPassword != enteredAuthConfirmation) {
+      	  VMessageBox::warning(this, tr("Error"),
+          tr("No matching for authentication password and confirmation."), 
+          VMessageBox::Ok);
+          createUser();
+          return;
+      }
+      User newUser;
+      newUser.setUserName(enteredName);
+      newUser.setIntroductionPassword(enteredIntroPassword);
+      newUser.setAuthenticationPassword(enteredAuthPassword);
+      newUser.setPublicKey(enteredPublicKey);
+      _userWidget->addItem(new QListWidgetItem(enteredName, 
+      _userWidget, 0));
+      Service s = _services->value(_selectedService);
+      QList<Group> groups = s.groups();
+      QListIterator<Group> i(groups);
+      int index = 0;
+      while (i.hasNext()) {
+        i.next();
+        Group tempGroup = groups.takeAt(index);
+        QString tempString = tempGroup.groupName();
+        int comp = tempString.compare(_selectedGroup);
+        if (comp == 0) {
+          tempGroup.addUser(newUser);
+        }
+        groups.append(tempGroup);
+      }
+      _tempUser = new User();
+      s.setGroups(groups);
+      _services->insert(_selectedService, s);
+      initDataStructures();
+      showUsers();       
+    } 
+    _tempUser = new User();   
+  } else {
+      VMessageBox::warning(this, tr("Error"),
+        tr("Please select a service and a group."), VMessageBox::Ok);
+    }
+}
+
+/** delete the selected user */
+void HiddenservicePage::deleteUser() {
+  QList<QListWidgetItem*> userItems = _userWidget->selectedItems();
+  if(userItems.size() > 0)  {
+    QListWidgetItem *selectedUser = userItems.front();
+    _selectedUser = selectedUser->text();
+    int index = _userWidget->currentRow();  
+    if (_selectedService.isEmpty() == false && 
+      _selectedGroup.isEmpty() == false) {
+      Service s = _services->value(_selectedService);
+      QList<Group> groups = s.groups();
+      int count = 0;
+      while (count < groups.size()) {
+        Group tempGroup = groups.takeAt(count);
+        QString tempString = tempGroup.groupName();
+        int compare = tempString.compare(_selectedGroup);
+        if (compare == 0) {
+          QList<User> users = tempGroup.groupMembers();
+          int pos = 0;
+          while (pos < users.size()) {
+            User tempUser = users.value(pos);
+            QString tempName = tempUser.userName();
+            int comp = tempName.compare(_selectedUser);
+            if (comp == 0) {
+              users.removeAt(pos);        
+              _userWidget->takeItem(index);        
+            }
+            pos++;
+          }
+          tempGroup.setGroupMembers(users);
+          groups.append(tempGroup);
+          s.setGroups(groups);
+        }
+        _services->insert(_selectedService, s);
+       initDataStructures();
+       _selectedUser.clear();
+       count++;
+      }
+    }
+  } else {
+      VMessageBox::warning(this, tr("Error"),
+        tr("Please select the user you want to delete."), VMessageBox::Ok);
+    }  
+}
+
+/** create a new group */
+void HiddenservicePage::createGroup() {
+  if(_selectedService.isEmpty() == false)  {
+    Groupdialog *groupdialog = new Groupdialog(this);
+    groupdialog->setGroupName(_tempGroup->groupName());
+    groupdialog->show();
     QString groupName;
     QString secretCookie;
-    QString secretCookieConfirmation;
-    if (groupdialog->exec() == QDialog::Accepted) {
+    QString secretCookieConfirmation;
+    if (groupdialog->exec() == QDialog::Accepted) {
       groupName = groupdialog->groupName().trimmed();
       secretCookie = groupdialog->secretCookie().trimmed();
-      secretCookieConfirmation = groupdialog->secretCookieConfirmation().trimmed();
+      secretCookieConfirmation = groupdialog->secretCookieConfirmation().trimmed();
       _tempGroup->setGroupName(groupName);
-     if (groupName.isEmpty() || secretCookie.isEmpty()) {
-        VMessageBox::warning(this, tr("Error"),
-          tr("Please fill out all fields."), VMessageBox::Ok);
-        delete groupdialog;
-        createGroup();
+     if (groupName.isEmpty() || secretCookie.isEmpty()) {
+        VMessageBox::warning(this, tr("Error"),
+          tr("Please fill out all fields."), VMessageBox::Ok);
+        delete groupdialog;
+        createGroup();
         return;
        }
        else if (secretCookie != secretCookieConfirmation) {
-       VMessageBox::warning(this, tr("Error"),
-          tr("No match for cookieKey and confirmation field."),
-            VMessageBox::Ok);
-        delete groupdialog;
-        createGroup();
+       VMessageBox::warning(this, tr("Error"),
+          tr("No match for cookieKey and confirmation field."),
+            VMessageBox::Ok);
+        delete groupdialog;
+        createGroup();
         return;
-     }
-      delete groupdialog;
-      QList<QString> keys = _groups->keys();
-      if(keys.contains(groupName) == false) {
-      	int rows = _groupWidget->rowCount();
-        _groupWidget->insertRow(rows);
-        QTableWidgetItem *cubesHeaderItem = new QTableWidgetItem(groupName);
-        _groupWidget->setItem(rows, 1, cubesHeaderItem);
-        QTableWidgetItem *cboxitem = new QTableWidgetItem();
-        cboxitem->setCheckState(Qt::Unchecked);
-        cboxitem->setTextAlignment(Qt::AlignCenter);
-        _groupWidget->setItem(rows, 0, cboxitem);
-        Group g;
+     }
+      delete groupdialog;
+      QList<QString> keys = _groups->keys();
+      if(keys.contains(groupName) == false) {
+      	int rows = _groupWidget->rowCount();
+        _groupWidget->insertRow(rows);
+        QTableWidgetItem *cubesHeaderItem = new QTableWidgetItem(groupName);
+        _groupWidget->setItem(rows, 1, cubesHeaderItem);
+        QTableWidgetItem *cboxitem = new QTableWidgetItem();
+        cboxitem->setCheckState(Qt::Unchecked);
+        cboxitem->setTextAlignment(Qt::AlignCenter);
+        _groupWidget->setItem(rows, 0, cboxitem);
+        Group g;
         g.setGroupName(groupName);
-        g.setCookieKey(secretCookie);
-        g.setIsDeployed(false);
-        Service s = _services->value(_selectedService);
-        QList<Group> gruppen = s.groups();
-        gruppen.append(g);
-        s.setGroups(gruppen);
-        _tempGroup = new Group();
-        _services->insert(_selectedService, s);
-        initDataStructures();
-        showGroups();
-      } else {
-          VMessageBox::warning(this, tr("Error"),
-            tr("Group name already in use, please select a different one."), 
-              VMessageBox::Ok);
-          createGroup();
-        }    
-    }
-  } else {
-      VMessageBox::warning(this, tr("Error"),
-        tr("Please select a service associated with the new group."), 
-          VMessageBox::Ok);
-    }  
-}
-
-/** delete the selected group and the group members */
-void HiddenservicePage::deleteGroup() {
-  if(_selectedService.isEmpty() == false && _selectedGroup.isEmpty() == false){
-    Service s = _services->value(_selectedService);
-    QList<Group> groups = s.groups();
-    QListIterator<Group> i(groups);
-    int index = 0;
-    while (i.hasNext()) {
-      Group g = i.next();
-      QString tempString = g.groupName();
-      int comp = tempString.compare(_selectedGroup);
-      if (comp == 0) {
-        groups.removeAt(index);
-      }
-      index++;
-    }
-    s.setGroups(groups);   
-    _services->insert(_selectedService, s);
-    while(_groupWidget->rowCount() > 0) {
-  	_groupWidget->removeRow(0);
-    }
-    initDataStructures();
-    showGroups();
-  } else {
-      VMessageBox::warning(this, tr("Error"), 
-      tr("Please select service and group."),
-        VMessageBox::Ok);
-    }  
-}
-
-/**  modify the values of the selected group */
-void HiddenservicePage::modifyGroup() {
+        g.setCookieKey(secretCookie);
+        g.setIsDeployed(false);
+        Service s = _services->value(_selectedService);
+        QList<Group> gruppen = s.groups();
+        gruppen.append(g);
+        s.setGroups(gruppen);
+        _tempGroup = new Group();
+        _services->insert(_selectedService, s);
+        initDataStructures();
+        showGroups();
+      } else {
+          VMessageBox::warning(this, tr("Error"),
+            tr("Group name already in use, please select a different one."), 
+              VMessageBox::Ok);
+          createGroup();
+        }    
+    }
+  } else {
+      VMessageBox::warning(this, tr("Error"),
+        tr("Please select a service associated with the new group."), 
+          VMessageBox::Ok);
+    }  
+}
+
+/** delete the selected group and the group members */
+void HiddenservicePage::deleteGroup() {
+  if(_selectedService.isEmpty() == false && _selectedGroup.isEmpty() == false){
+    Service s = _services->value(_selectedService);
+    QList<Group> groups = s.groups();
+    QListIterator<Group> i(groups);
+    int index = 0;
+    while (i.hasNext()) {
+      Group g = i.next();
+      QString tempString = g.groupName();
+      int comp = tempString.compare(_selectedGroup);
+      if (comp == 0) {
+        groups.removeAt(index);
+      }
+      index++;
+    }
+    s.setGroups(groups);   
+    _services->insert(_selectedService, s);
+    while(_groupWidget->rowCount() > 0) {
+  	_groupWidget->removeRow(0);
+    }
+    initDataStructures();
+    showGroups();
+  } else {
+      VMessageBox::warning(this, tr("Error"), 
+      tr("Please select service and group."),
+        VMessageBox::Ok);
+    }  
+}
+
+/**  modify the values of the selected group */
+void HiddenservicePage::modifyGroup() {
   if(_selectedService.isEmpty() == false && _selectedGroup.isEmpty() == false){    
     Group selectedGroup = _groups->value(_selectedGroup);
-    Groupdialog *groupdialog = new Groupdialog(this);
+    Groupdialog *groupdialog = new Groupdialog(this);
     groupdialog->setGroupName(_selectedGroup);
     groupdialog->setSecretCookie(selectedGroup.cookieKey());
-    groupdialog->setSecretCookieConfirmation(selectedGroup.cookieKey());
-    groupdialog->show();
+    groupdialog->setSecretCookieConfirmation(selectedGroup.cookieKey());
+    groupdialog->show();
     QString newGroupName;
     QString newsecretCookie;
-    QString confirmation;
-    if (groupdialog->exec() == QDialog::Accepted) {
+    QString confirmation;
+    if (groupdialog->exec() == QDialog::Accepted) {
       newGroupName = groupdialog->groupName().trimmed();  
       newsecretCookie = groupdialog->secretCookie().trimmed();
-      confirmation = groupdialog->secretCookieConfirmation().trimmed();
-      if(newGroupName.isEmpty()) {
-        VMessageBox::warning(this, tr("Error"),
-        tr("The groupname has to be set."), VMessageBox::Ok);
-        modifyGroup();
-        return;
+      confirmation = groupdialog->secretCookieConfirmation().trimmed();
+      if(newGroupName.isEmpty()) {
+        VMessageBox::warning(this, tr("Error"),
+        tr("The groupname has to be set."), VMessageBox::Ok);
+        modifyGroup();
+        return;
       }
-      if(newsecretCookie != confirmation) {
-            VMessageBox::warning(this, tr("Error"),
-              tr("No match for cookieKey and confirmation field."), VMessageBox::Ok);
-            delete groupdialog;  
-            modifyGroup();
+      if(newsecretCookie != confirmation) {
+            VMessageBox::warning(this, tr("Error"),
+              tr("No match for cookieKey and confirmation field."), VMessageBox::Ok);
+            delete groupdialog;  
+            modifyGroup();
             return;
-         }
-      delete groupdialog;
-      if (newGroupName.isEmpty() == false) {
-        bool alreadyExists = false;
-        Service s = _services->take(_selectedService);
-        QList<Group> groups = s.groups();
-        int index = 0;
-        while (index < groups.size()) {
-          Group g = groups.value(index);
-          QString tempGroupName = g.groupName();
-          int comp = tempGroupName.compare(newGroupName);
-          if (comp == 0 && tempGroupName != _selectedGroup) {
-            alreadyExists = true;
-          }
-          index++;
-        }
-        if (alreadyExists == false) {
-        int index2 = 0;
-        QList<Group> groups2 = s.groups();
-        while (index2 < groups2.size()) {
-          Group tempGroup = groups2.takeAt(index2);
-          QString tempString = tempGroup.groupName();
-          int comp2 = tempString.compare(_selectedGroup);
-          if (comp2 == 0) {
+         }
+      delete groupdialog;
+      if (newGroupName.isEmpty() == false) {
+        bool alreadyExists = false;
+        Service s = _services->take(_selectedService);
+        QList<Group> groups = s.groups();
+        int index = 0;
+        while (index < groups.size()) {
+          Group g = groups.value(index);
+          QString tempGroupName = g.groupName();
+          int comp = tempGroupName.compare(newGroupName);
+          if (comp == 0 && tempGroupName != _selectedGroup) {
+            alreadyExists = true;
+          }
+          index++;
+        }
+        if (alreadyExists == false) {
+        int index2 = 0;
+        QList<Group> groups2 = s.groups();
+        while (index2 < groups2.size()) {
+          Group tempGroup = groups2.takeAt(index2);
+          QString tempString = tempGroup.groupName();
+          int comp2 = tempString.compare(_selectedGroup);
+          if (comp2 == 0) {
             tempGroup.setGroupName(newGroupName);
-            tempGroup.setCookieKey(newsecretCookie);
-          }
-          groups2.insert(index2, tempGroup);
-          index2++;
-        }
-        s.setGroups(groups2);
-        _services->insert(_selectedService, s);
-        } else {
-            _services->insert(_selectedService, s);
-            VMessageBox::warning(this, tr("Error"), 
-            tr("Please select a different group name."),
-              VMessageBox::Ok);
-            modifyGroup();
-          }
-      } else {
-          VMessageBox::warning(this, tr("Error"), 
-            tr("Group name has to be entered."), VMessageBox::Ok);
-        }
+            tempGroup.setCookieKey(newsecretCookie);
+          }
+          groups2.insert(index2, tempGroup);
+          index2++;
+        }
+        s.setGroups(groups2);
+        _services->insert(_selectedService, s);
+        } else {
+            _services->insert(_selectedService, s);
+            VMessageBox::warning(this, tr("Error"), 
+            tr("Please select a different group name."),
+              VMessageBox::Ok);
+            modifyGroup();
+          }
+      } else {
+          VMessageBox::warning(this, tr("Error"), 
+            tr("Group name has to be entered."), VMessageBox::Ok);
+        }
         _selectedGroup = newGroupName;
-        initDataStructures();
-        showGroups();
-    }
-  } else {
-      VMessageBox::warning(this, tr("Error"),
-        tr("Please select service and group."), VMessageBox::Ok);
-  }  
-}
-
-/** Modifes settings of an already known user */
-void HiddenservicePage::modifyUser() {
-  if(_selectedService.isEmpty() == false && _selectedGroup.isEmpty() == false 
-    && _selectedUser.isEmpty() == false) {
-    User selectedUser = _users->value(_selectedUser);
-    QString oldName = _selectedUser;
-    Userdialog *userdialog = new Userdialog(this);
-    userdialog->setUserName(selectedUser.userName());
-    userdialog->setIntroductionPassword(selectedUser.
-      introductionPassword());
-    userdialog->setIntroductionConfirmation(selectedUser.
-      introductionPassword());
-    userdialog->setAuthenticationPassword(selectedUser.
-      authenticationPassword());
-    userdialog->setAuthenticationConfirmation(selectedUser.
-      authenticationPassword());
-    userdialog->setPublicKey(selectedUser.publicKey());
-    userdialog->show();
-    QString enteredName;
-    QString enteredIntroPassword;
-    QString enteredAuthPassword;
-    QString enteredPublicKey;
-    QString enteredIntroConfirmation;
-    QString enteredAuthConfirmation;
-    if (userdialog->exec() == QDialog::Accepted) {
-      enteredName = userdialog->userName().trimmed();
-      enteredIntroPassword = userdialog->introductionPassword().trimmed();
-      enteredAuthPassword = userdialog->authenticationPassword().trimmed();
-      enteredPublicKey = userdialog->publicKey().trimmed();
-      enteredIntroConfirmation = userdialog->introductionConfirmation().trimmed();
-      enteredAuthConfirmation = userdialog->authenticationConfirmation().trimmed();
-      if(enteredName.isEmpty()) {
-        VMessageBox::warning(this, tr("Error"),
-        tr("The username has to be set."), VMessageBox::Ok);
-        modifyUser();
-        return;
-      }
-      if(enteredIntroPassword.isEmpty() && enteredAuthPassword.isEmpty()) {
-      	if(enteredPublicKey.isEmpty()) {
-      	  VMessageBox::warning(this, tr("Error"),
-          tr("Please fill out the public key field."), VMessageBox::Ok);
-          modifyUser();
-          return;
-      	}
-      } else if(enteredIntroPassword.isEmpty() || enteredAuthPassword.isEmpty()) {
-      		VMessageBox::warning(this, tr("Error"),
-            tr("Please fill out the neccesary fields."), VMessageBox::Ok);
-            modifyUser();
-      		return;
-      	}
-      delete userdialog;
-      if(enteredIntroPassword != enteredIntroConfirmation) {
-          VMessageBox::warning(this, tr("Error"),
-          tr("No matching for introduction password and confirmation."), 
-          VMessageBox::Ok);
-          modifyUser();
-          return;
-      } else if(enteredAuthPassword != enteredAuthConfirmation) {
-      	  VMessageBox::warning(this, tr("Error"),
-          tr("No matching for authentication password and confirmation."), 
-          VMessageBox::Ok);
-          modifyUser();
-          return;
-      }
-      if(_users->keys().contains(enteredName) == false || 
-            (_users->keys().contains(enteredName) 
-            == true && enteredName.compare(_selectedUser) == 0)) {
-            QList<Service> services = _services->values();
-            for(int i = 0; i < services.size(); ++i) {
-              Service tempService = services.value(i);
-              QList<Group> groups = tempService.groups();
-              for(int j = 0; j < groups.size(); ++j) {
-                Group tempGroup = groups.takeAt(j);
-                QList<User> users = tempGroup.groupMembers();
-                for(int o = 0; o < users.size(); ++o) {
-                  User tempUser = users.takeAt(o);
-                  if(tempUser.userName().compare(oldName) == 0) {
-                    //user found, change values
-                    tempUser.setUserName(enteredName);
-                    tempUser.setIntroductionPassword(enteredIntroPassword);
-                    tempUser.setAuthenticationPassword(enteredAuthPassword);
-                    tempUser.setPublicKey(enteredPublicKey);
-                  }
-                  users.push_front(tempUser);
-                  tempGroup.setGroupMembers(users);
-                }
-                groups.push_front(tempGroup);    
-              }
-              tempService.setGroups(groups);
-              _services->insert(tempService.serviceName(), tempService); 
-            }
-            initDataStructures();
-            showUsers();
-            } else  {
-                VMessageBox::warning(this, tr("Error"),
-                  tr("Name already in use please try another one."), 
-                    VMessageBox::Ok);
-              }
-    } 
-  } else {
-      VMessageBox::warning(this, tr("Error"),
-        tr("Please select service, group and user."), VMessageBox::Ok);
-    }
-}
-
-/** copy userdata to Clipboard */ 
-void HiddenservicePage::copyToClipboard(){
-  if (_selectedUser.isEmpty()){
-  VMessageBox::warning(this, tr("Error"),
-     "Please select a User.", VMessageBox::Ok);
-     return;
-  }
-  Service tempService = _services->value(_selectedService);
-  QClipboard *clipboard = QApplication::clipboard();  
-  QString clipboardText;
-  QString dataDirectory;  
-  dataDirectory = Vidalia::dataDirectory();
-  dataDirectory.append("/");
-  dataDirectory.append(tempService.serviceName());
-  dataDirectory.append("/");
-  QString hostnamePath = dataDirectory;
-  hostnamePath.append("hostname");
-
-  /* read HiddenServiceID from hostname file */  
-  QString processline;
-  QFile file(hostnamePath);
-  if (!file.open(QIODevice::ReadOnly | QIODevice::Text)){
-    VMessageBox::warning(this, tr("Error"),
-    "Hostname file of selected service not found, please redeploy.", VMessageBox::Ok);
-    return;
-  }
-  QTextStream in(&file);
-  while (!in.atEnd()) {
-    processline = in.readLine();              
-  }
-  clipboardText.append("HiddenServiceID " +processline +"\n");
-  QList<Group> groupList= tempService.groups();
-  foreach(Group group,  groupList){
-    if(group.groupName() == _selectedGroup){
-      clipboardText.append("SecretCookieKey ");
-      clipboardText.append(group.cookieKey() + "\n");
-      QList<User> userList=  group.groupMembers();
-      foreach(User user, userList){
-        if (user.userName() == _selectedUser){
-          if(!user.introductionPassword().isEmpty()){ 
-            clipboardText.append("IntroductionPointAuthentication " );
-            clipboardText.append(user.introductionPassword() + "\n");
-          }
-          if(!user.authenticationPassword().isEmpty()){
-            clipboardText.append("HiddenServiceAuthentication " );
-            clipboardText.append(user.authenticationPassword() + "\n");
-          }
-        }
-      }
-    }
-  }
-  /* write content to clipboard */
-  clipboard->setText(clipboardText);
-  VMessageBox::information(this, tr("Clipboard"),
-    "Data copied to clipboard.", VMessageBox::Ok);
-}
-
-
-
+        initDataStructures();
+        showGroups();
+    }
+  } else {
+      VMessageBox::warning(this, tr("Error"),
+        tr("Please select service and group."), VMessageBox::Ok);
+  }  
+}
+
+/** Modifes settings of an already known user */
+void HiddenservicePage::modifyUser() {
+  if(_selectedService.isEmpty() == false && _selectedGroup.isEmpty() == false 
+    && _selectedUser.isEmpty() == false) {
+    User selectedUser = _users->value(_selectedUser);
+    QString oldName = _selectedUser;
+    Userdialog *userdialog = new Userdialog(this);
+    userdialog->setUserName(selectedUser.userName());
+    userdialog->setIntroductionPassword(selectedUser.
+      introductionPassword());
+    userdialog->setIntroductionConfirmation(selectedUser.
+      introductionPassword());
+    userdialog->setAuthenticationPassword(selectedUser.
+      authenticationPassword());
+    userdialog->setAuthenticationConfirmation(selectedUser.
+      authenticationPassword());
+    userdialog->setPublicKey(selectedUser.publicKey());
+    userdialog->show();
+    QString enteredName;
+    QString enteredIntroPassword;
+    QString enteredAuthPassword;
+    QString enteredPublicKey;
+    QString enteredIntroConfirmation;
+    QString enteredAuthConfirmation;
+    if (userdialog->exec() == QDialog::Accepted) {
+      enteredName = userdialog->userName().trimmed();
+      enteredIntroPassword = userdialog->introductionPassword().trimmed();
+      enteredAuthPassword = userdialog->authenticationPassword().trimmed();
+      enteredPublicKey = userdialog->publicKey().trimmed();
+      enteredIntroConfirmation = userdialog->introductionConfirmation().trimmed();
+      enteredAuthConfirmation = userdialog->authenticationConfirmation().trimmed();
+      if(enteredName.isEmpty()) {
+        VMessageBox::warning(this, tr("Error"),
+        tr("The username has to be set."), VMessageBox::Ok);
+        modifyUser();
+        return;
+      }
+      if(enteredIntroPassword.isEmpty() && enteredAuthPassword.isEmpty()) {
+      	if(enteredPublicKey.isEmpty()) {
+      	  VMessageBox::warning(this, tr("Error"),
+          tr("Please fill out the public key field."), VMessageBox::Ok);
+          modifyUser();
+          return;
+      	}
+      } else if(enteredIntroPassword.isEmpty() || enteredAuthPassword.isEmpty()) {
+      		VMessageBox::warning(this, tr("Error"),
+            tr("Please fill out the neccesary fields."), VMessageBox::Ok);
+            modifyUser();
+      		return;
+      	}
+      delete userdialog;
+      if(enteredIntroPassword != enteredIntroConfirmation) {
+          VMessageBox::warning(this, tr("Error"),
+          tr("No matching for introduction password and confirmation."), 
+          VMessageBox::Ok);
+          modifyUser();
+          return;
+      } else if(enteredAuthPassword != enteredAuthConfirmation) {
+      	  VMessageBox::warning(this, tr("Error"),
+          tr("No matching for authentication password and confirmation."), 
+          VMessageBox::Ok);
+          modifyUser();
+          return;
+      }
+      if(_users->keys().contains(enteredName) == false || 
+            (_users->keys().contains(enteredName) 
+            == true && enteredName.compare(_selectedUser) == 0)) {
+            QList<Service> services = _services->values();
+            for(int i = 0; i < services.size(); ++i) {
+              Service tempService = services.value(i);
+              QList<Group> groups = tempService.groups();
+              for(int j = 0; j < groups.size(); ++j) {
+                Group tempGroup = groups.takeAt(j);
+                QList<User> users = tempGroup.groupMembers();
+                for(int o = 0; o < users.size(); ++o) {
+                  User tempUser = users.takeAt(o);
+                  if(tempUser.userName().compare(oldName) == 0) {
+                    //user found, change values
+                    tempUser.setUserName(enteredName);
+                    tempUser.setIntroductionPassword(enteredIntroPassword);
+                    tempUser.setAuthenticationPassword(enteredAuthPassword);
+                    tempUser.setPublicKey(enteredPublicKey);
+                  }
+                  users.push_front(tempUser);
+                  tempGroup.setGroupMembers(users);
+                }
+                groups.push_front(tempGroup);    
+              }
+              tempService.setGroups(groups);
+              _services->insert(tempService.serviceName(), tempService); 
+            }
+            initDataStructures();
+            showUsers();
+            } else  {
+                VMessageBox::warning(this, tr("Error"),
+                  tr("Name already in use please try another one."), 
+                    VMessageBox::Ok);
+              }
+    } 
+  } else {
+      VMessageBox::warning(this, tr("Error"),
+        tr("Please select service, group and user."), VMessageBox::Ok);
+    }
+}
+
+/** copy userdata to Clipboard */ 
+void HiddenservicePage::copyToClipboard(){
+  if (_selectedUser.isEmpty()){
+  VMessageBox::warning(this, tr("Error"),
+     "Please select a User.", VMessageBox::Ok);
+     return;
+  }
+  Service tempService = _services->value(_selectedService);
+  QClipboard *clipboard = QApplication::clipboard();  
+  QString clipboardText;
+  QString dataDirectory;  
+  dataDirectory = Vidalia::dataDirectory();
+  dataDirectory.append("/");
+  dataDirectory.append(tempService.serviceName());
+  dataDirectory.append("/");
+  QString hostnamePath = dataDirectory;
+  hostnamePath.append("hostname");
+
+  /* read HiddenServiceID from hostname file */  
+  QString processline;
+  QFile file(hostnamePath);
+  if (!file.open(QIODevice::ReadOnly | QIODevice::Text)){
+    VMessageBox::warning(this, tr("Error"),
+    tr("Hostname file of selected service not found, please redeploy."), VMessageBox::Ok);
+    return;
+  }
+  QTextStream in(&file);
+  while (!in.atEnd()) {
+    processline = in.readLine();              
+  }
+  QString serviceID = processline.section('.', 0, 0);  
+  clipboardText.append("HiddenServiceID " +serviceID +"\n");
+  QList<Group> groupList= tempService.groups();
+  foreach(Group group,  groupList){
+    if(group.groupName() == _selectedGroup){
+      clipboardText.append("SecretCookieKey ");
+      clipboardText.append(group.cookieKey() + "\n");
+      QList<User> userList=  group.groupMembers();
+      foreach(User user, userList){
+        if (user.userName() == _selectedUser){
+          if(!user.introductionPassword().isEmpty()){ 
+            clipboardText.append("IntroductionPointAuthentication " );
+            clipboardText.append(user.introductionPassword() + "\n");
+          }
+          if(!user.authenticationPassword().isEmpty()){
+            clipboardText.append("HiddenServiceAuthentication " );
+            clipboardText.append(user.authenticationPassword() + "\n");
+          }
+        }
+      }
+    }
+  }
+  /* write content to clipboard */
+  clipboard->setText(clipboardText);
+  VMessageBox::information(this, tr("Clipboard"),
+    tr("Data copied to clipboard."), VMessageBox::Ok);
+}
+
+
+
+

Modified: branches/hidden-services/src/gui/config/userdialog.cpp
===================================================================
--- branches/hidden-services/src/gui/config/userdialog.cpp	2007-10-12 07:49:28 UTC (rev 2011)
+++ branches/hidden-services/src/gui/config/userdialog.cpp	2007-10-12 12:24:22 UTC (rev 2012)
@@ -36,6 +36,11 @@
 	setupUi(this);
 	userline->setText("");
 	userline->setFocus();
+	userline->setValidator( new QRegExpValidator( QRegExp( "^[0-9a-zA-Z_-]+"), this));
+	introductionpwline->setValidator( new QRegExpValidator( QRegExp( "^[0-9a-zA-Z_-]+"), this));
+	introductionconfirmationline->setValidator( new QRegExpValidator( QRegExp( "^[0-9a-zA-Z_-]+"), this));
+	authenticationpwline->setValidator( new QRegExpValidator( QRegExp( "^[0-9a-zA-Z_-]+"), this));
+	authenticationconfirmationline->setValidator( new QRegExpValidator( QRegExp( "^[0-9a-zA-Z_-]+"), this));
 }
 
 void 

Modified: branches/hidden-services/src/gui/help/content/de/config.html
===================================================================
--- branches/hidden-services/src/gui/help/content/de/config.html	2007-10-12 07:49:28 UTC (rev 2011)
+++ branches/hidden-services/src/gui/help/content/de/config.html	2007-10-12 12:24:22 UTC (rev 2012)
@@ -100,11 +100,12 @@
     <li><b>Service Konfiguration: </b></li>
     <ul>
     <li><b><u>Grundeinstellungen:</u></b></li>
-    Hierbei handelt es sich um Einstellungen, die grunds&auml;tzlich f&uuml;r jeden Service gesetzt werden m&uuml;ssen.
+    Hierbei handelt es sich um Einstellungen, die grunds&auml;tzlich f&uuml;r jeden Service gesetzt werden m&uuml;ssen. In diesem Panel
+    können neue Services angelegt, bzw. bereits vorhandene modifiziert werden.
     </ul>
     <ul>
     <p><li><b>Service Name:</b>
-    Der Name des Services. Dieser gilt nur innerhalb von Vidalia zur     
+    Der Name des Services. Dieser gilt nur innerhalb von Vidalia.
     </li>
     </ul>  
     <ul>
@@ -112,11 +113,14 @@
     Hier muss der Port eingestellt werden, auf dem auch der HiddenService l&auml;uft.</li>
     <p><li><b>Service Adresse: </b>IP Adresse unter der der Service erreichbar ist (z.B. IP Adresse ihres File Servers)</li>
     <p><li><b>Listening Port:</b>
-    Port auf dem HiddenService Anfragen eingehen.</li><br>
-    </ul>
+    Port auf dem HiddenService Anfragen eingehen.</li>
+    <p><li><b>V0/V2 Service:</b>
+    Hier kann eingestellt werden, ob es sich um einen V0 oder V2 Service handelt. Achtung: Die Fortgeschrittenen Einstellungen sind nur für 
+    V2 Services verfügbar.</li><br>
+    </ul>    
     <ul>
     <li><b><u>Fortgeschrittene Einstellungen:</u></b></li>
-    Diese Einstellungen werden nur aktiv, wenn es sich um einen v2 Service handelt.   
+    Diese Einstellungen werden nur aktiv, wenn es sich um einen V2 Service handelt.   
     </ul>
     <ul>
     <p><li><b>Gruppen:</b>
@@ -127,8 +131,9 @@
     </ul>
     <ul>  
     <p><li><b>Benutzer:</b> &nbsp;Hier k&ouml;nnen Sie Vidalia veranlassen, zu einer Gruppe Benutzer&nbsp;anzulegen.
-    Jeder Benutzer&nbsp;wird mit steht dabei f&uuml;r einen Secret Cookie. Die Bedienelemente f&uuml;r das Gruppenmanagement
-    befinden sich direkt unter dem BenutzerFenster.
+    Die Bedienelemente f&uuml;r das Benutzermanagement befinden sich direkt unter dem Benutzerfenster. Der Button "In Zwischenablage.."
+    ermöglicht es dem Betreiber eines Hidden Service alle Daten die dem Enduser übergeben werden müssen, in die Zwischenablage des Betriebsystems
+    zu kopieren. Diese Daten können dann and den Benutzer z.B. per Email übergeben werden.
     </li>
 </ul>
 </body>

Modified: branches/hidden-services/src/gui/help/content/en/config.html
===================================================================
--- branches/hidden-services/src/gui/help/content/en/config.html	2007-10-12 07:49:28 UTC (rev 2011)
+++ branches/hidden-services/src/gui/help/content/en/config.html	2007-10-12 12:24:22 UTC (rev 2012)
@@ -100,7 +100,7 @@
     <li><b>Service Configuration </b></li>
     <ul>
         <li><b><u>General Settings:</u></b></li>
-       These are settings which have to be configured for every service.
+       These are settings which have to be configured for every service. In this panel, you can create and modify a service.
     </ul>
     <ul>
         <p><li><b>Service Name</b>:
@@ -113,11 +113,14 @@
     The Port of the services which will be published</li>
         <p><li><b>Service Adress: </b>The IP Adress of the service (e.g the file server you want to publish)</li>
         <p><li><b>Listening Port</b>:
-    The Port which is requested by users of the hidden service.</li><br>
+    The Port which is requested by users of the hidden service.</li>
+     <p><li><b>V0/V2 Service:</b>
+    Here you can configure, whether a hidden service should be published as V0 or V2. Note: The advanced settings panel is only available
+    for v2 services.</li><br>
     </ul>
     <ul>
         <li><b><u>Advanced Settings:</u></b></li>
-        &nbsp;These settings will only be active, if the service is published as a v2 service.   
+        &nbsp;These settings will only be active, if the service is published as a V2 service.   
     </ul>
     <ul>
         <p><li><b>Groups:</b>
@@ -130,8 +133,8 @@
     <ul>
         <p><li><b>User:</b> Here you can publish users with vidalia which belong to groups.
 	Every user represents an introduction point authentifcation. The control elements for the usermanagement are 
-	located below the usermanagement window.
-
+	located below the usermanagement window. The Button "Copy to Clipboard" allows the carrier of the hidden service
+        to copy all data which have to be transfered to the user to the clipboard of the operating system. 
  </li>
 
 </body>

Modified: branches/hidden-services/src/lang/vidalia_de.ts
===================================================================
--- branches/hidden-services/src/lang/vidalia_de.ts	2007-10-12 07:49:28 UTC (rev 2011)
+++ branches/hidden-services/src/lang/vidalia_de.ts	2007-10-12 12:24:22 UTC (rev 2012)
@@ -1044,6 +1044,21 @@
         <source>Confirmation:</source>
         <translation>Bestätigung:</translation>
     </message>
+    <message>
+        <location filename="../gui/config/groupdialog.ui" line="419"/>
+        <source>Confirmation of the cookie key</source>
+        <translation>Bestätigung des Cookie Keys</translation>
+    </message>
+    <message>
+        <location filename="../gui/config/groupdialog.ui" line="449"/>
+        <source>Cookie key of the group</source>
+        <translation>Cookie Key der Gruppe</translation>
+    </message>
+    <message>
+        <location filename="../gui/config/groupdialog.ui" line="472"/>
+        <source>Name of the group</source>
+        <translation>Name der Gruppe</translation>
+    </message>
 </context>
 <context>
     <name>Userdialog</name>
@@ -1055,7 +1070,7 @@
     <message>
         <location filename="../gui/config/userdialog.ui" line="420"/>
         <source>Authentication password of the user</source>
-        <translation>Passwort für Authentifikation</translation>
+        <translation>Passwort für Hidden Service</translation>
     </message>
     <message>
         <location filename="../gui/config/userdialog.ui" line="482"/>
@@ -1080,7 +1095,7 @@
     <message>
         <location filename="../gui/config/userdialog.ui" line="501"/>
         <source>Authentication Password:</source>
-        <translation>Authentication Passwort:</translation>
+        <translation>Passwort für Hidden Service :</translation>
     </message>
     <message>
         <location filename="../gui/config/userdialog.ui" line="496"/>
@@ -1098,9 +1113,9 @@
         <translation>Public Key:</translation>
     </message>
     <message>
-        <location filename="../gui/config/userdialog.ui" line="517"/>
-        <source>Confirmation of the authentication password </source>
-        <translation>Bestätigung des Athentifizierungs Passwortes</translation>
+        <location filename="../gui/config/userdialog.ui" line="574"/>
+        <source>Confirmation of the authentication password</source>
+        <translation>Bestätigung des Hidden Service Passwortes</translation>
     </message>
     <message>
         <location filename="../gui/config/userdialog.ui" line="533"/>
@@ -1119,7 +1134,7 @@
 password, a public key, or both.</source>
         <translation>Um einen neuen Benutzer anzulegen haben Sie die 
 Möglichkeit, entweder ein Introduction- und 
-Authentifizierungs-Passwort, einen Public Key 
+Hidden Service-Passwort, einen Public Key 
 oder beides anulegen.</translation>
     </message>
 </context>
@@ -1171,6 +1186,11 @@
         <translation>Fehler beim Speichern der Daten.</translation>
     </message>
     <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="293"/>
+        <source>Please select the service you want to modify.</source>
+        <translation>Bitte wählen Sie zuerst einen Service aus.</translation>
+    </message>
+    <message>
     <location filename="../gui/config/hiddenservicepage.cpp" line="453"/>
         <source>Please set all fields.</source>
         <translation>Bitte alle benötigten Felder ausfüllen.</translation>
@@ -1213,7 +1233,7 @@
     <message>
     <location filename="../gui/config/hiddenservicepage.cpp" line="733"/>
         <source>No matching for authentication password and confirmation.</source>
-        <translation>Keine Übereinstimmung beim Passwort für Authentifikation.</translation>
+        <translation>Keine Übereinstimmung beim Passwort für Hidden Service.</translation>
     </message>
     <message>
     <location filename="../gui/config/hiddenservicepage.cpp" line="767"/>
@@ -1276,17 +1296,17 @@
         <translation>Bitte wähle einen service, eine Gruppe und einen Benutzer aus.</translation>
     </message> 
     <message>
-    <location filename="../gui/config/hiddenservicepage.cpp" line="1084"/>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="1132"/>
         <source>Please select a User.</source>
         <translation>Bitte wähles Sie einen Benutzer aus.</translation>
     </message>
     <message>
-    <location filename="../gui/config/hiddenservicepage.cpp" line="1103"/>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="1151"/>
         <source>Hostname file of selected service not found, please redeploy.</source>
         <translation>Datei für selektierten Service nicht gefunden, bitte erneut veröffentlichen.</translation>
     </message>
     <message>
-    <location filename="../gui/config/hiddenservicepage.cpp" line="1134"/>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="1182"/>
         <source>Data copied to clipboard.</source>
         <translation>Daten erfolgreich in die Zwischenablage kopiert.</translation>
     </message>

Modified: branches/hidden-services/src/lang/vidalia_en.ts
===================================================================
--- branches/hidden-services/src/lang/vidalia_en.ts	2007-10-12 07:49:28 UTC (rev 2011)
+++ branches/hidden-services/src/lang/vidalia_en.ts	2007-10-12 12:24:22 UTC (rev 2012)
@@ -763,6 +763,538 @@
     </message>
 </context>
 <context>
+    <name>HiddenservicePage</name>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="89"/>
+        <source>Service Management</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="101"/>
+        <source>Publish/Unpublish Service</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="114"/>
+        <source>Delete Service</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="181"/>
+        <source>Publish/Unpublish the selected Services</source>
+        <translation type="unfinished"></translation>
+    </message> 
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="197"/>
+        <source>Delete the selected service</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="207"/>
+        <source>Create new Service</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="219"/>
+        <source>Service name:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="219"/>
+        <source>Add Service</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="219"/>
+        <source>Local Port:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="260"/>
+        <source>General Settings</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="301"/>
+        <source>Service adress:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="301"/>
+        <source>Listn. Port:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="330"/>
+        <source>Publish as normal V0 service, group and user settings will be ignored</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="336"/>
+        <source>Start as V0</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="346"/>
+        <source>Publish as V2 service, group and user settings are active</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="349"/>
+        <source>Start as V2</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="356"/>
+        <source>Start as V0/V2</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="366"/>
+        <source>Advanced Settings</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="378"/>
+        <source>Create Group</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="378"/>
+        <source>Groups:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="404"/>
+        <source>Users:</source>
+        <translation type="unfinished"></translation>
+    </message>
+        <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="414"/>
+        <source>Local Port of the service e.g. your fileserver</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="417"/>
+        <source>Delete Group</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="427"/>
+        <source>IP Adress of the service e.g. your fileserver</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="430"/>
+        <source>Modify Group</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="437"/>
+        <source>Port to connect to the service</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="447"/>
+        <source>Add a new service to Vidalia</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="456"/>
+        <source>Modify User</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="457"/>
+        <source>Modify an alredy existing service</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="467"/>
+        <source>Name of the service in Vidalia</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="469"/>
+        <source>Delete User</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="474"/>
+        <source>Service Name</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="477"/>
+        <source>Create a new group</source>
+        <translation type="unfinished"></translation>
+    </message> 
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="482"/>
+        <source>Add User</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="508"/>
+        <source>Modify Service</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="508"/>
+        <source>Create User</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="551"/>
+        <source>Delete the selected group vom the groups table</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="561"/>
+        <source>Modify an already existing group</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="562"/>
+        <source>Group Name</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="569"/>
+        <source>Active</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="571"/>
+        <source>Delete the selected user from the userlist</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="600"/>
+        <source>Create a new User which is not known to vidalia</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="631"/>
+        <source>All Groups which are known to the selected Service</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="687"/>
+        <source>All Users which are known to the selected Group</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="703"/>
+        <source>Modify an already existing user</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="719"/>
+        <source>Add a User which alredy exists in another service</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="735"/>
+        <source>Copy user data to clipboard. You need to send the user this data by e.g by mail</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/hiddenservicepage.ui" line="801"/>
+        <source>Copy to Clipboard</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>Adduserdialog</name>
+    <message>
+        <location filename="../gui/config/adduserdialog.ui" line="747"/>
+        <source>All Users</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/adduserdialog.ui" line="1142"/>
+        <source>Ok</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/adduserdialog.ui" line="1510"/>
+        <source>Cancel</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>Groupdialog</name>    
+    <message>
+        <location filename="../gui/config/groupdialog.ui" line="380"/>
+        <source>Group Data</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/groupdialog.ui" line="420"/>
+        <source>Groupname:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/groupdialog.ui" line="447"/>
+        <source>CookieKey:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/groupdialog.ui" line="427"/>
+        <source>Confirmation:</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>Userdialog</name>
+    <message>
+        <location filename="../gui/config/userdialog.ui" line="377"/>
+        <source>User Data</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/userdialog.ui" line="420"/>
+        <source>Authentication password of the user</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/userdialog.ui" line="482"/>
+        <source>Username:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/userdialog.ui" line="488"/>
+        <source>Public key of the user</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/userpdialog.ui" line="489"/>
+        <source>Introduction Password:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/userpdialog.ui" line="496"/>
+        <source>Confirmation:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/userdialog.ui" line="501"/>
+        <source>Authentication Password:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/userdialog.ui" line="496"/>
+        <source>Confirmation of the introduction password</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/userdialog.ui" line="510"/>
+        <source>Confirmation:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/userdialog.ui" line="517"/>
+        <source>Public Key:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/userdialog.ui" line="517"/>
+        <source>Confirmation of the authentication password </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/userdialog.ui" line="533"/>
+        <source>Introduction password of the user</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/userdialog.ui" line="549"/>
+        <source>Name of the user</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../gui/config/userdialog.ui" line="601"/>
+        <source>In order to create a new User you can choose to
+either type in a introduction and authentication
+password, a public key, or both.</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>HiddenservicePage</name>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="135"/>
+        <source>Error</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="141"/>
+        <source>Please set all fields.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="163"/>
+        <source>Service name already in use, select a different one.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="182"/>
+        <source>Please note that deleting this service will cause its undeployment.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="230"/>
+        <source>Old Tor Version</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="231"/>
+        <source>Your Version of Tor does not support V2.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="254"/>
+        <source>Error while trying to unpublish hidden service.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="289"/>
+        <source>Error while trying to publish hidden service.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="293"/>
+        <source>Problems while trying to store data.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="293"/>
+        <source>Please select the service you want to modify.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="453"/>
+        <source>Please set all fields.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="475"/>
+        <source>Service name already in use, please select a different one.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="677"/>
+        <source>Please select service and group.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="703"/>
+        <source>The username has to be set.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="707"/>
+        <source>Please fill out the public key field.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="713"/>
+        <source>Please fill out the neccesary fields.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="721"/>
+        <source>The entered user name already exists. Please select a </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="727"/>
+        <source>No matching for introduction password and confirmation.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="733"/>
+        <source>No matching for authentication password and confirmation.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="767"/>
+        <source>Please select a service and a group.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="812"/>
+        <source>Please select the user you want to delete.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="832"/>
+        <source>Please fill out all fields.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="839"/>
+        <source>No match for cookieKey and confirmation field.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="869"/>
+        <source>Group name already in use, please select a different one.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="876"/>
+        <source>Please select a service associated with the new group.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="906"/>
+        <source>Please select service and group.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="933"/>
+        <source>The groupname has to be set.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="968"/>
+        <source>Please select a different group name.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="973"/>
+        <source>Group name has to be entered.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="1070"/>
+        <source>Name already in use please try another one.</source>
+        <translation type="unfinished"></translation>
+    </message>  
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="1076"/>
+        <source>Please select service, group and user.</source>
+        <translation type="unfinished"></translation>
+    </message> 
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="1132"/>
+        <source>Please select a User.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="1151"/>
+        <source>Hostname file of selected service not found, please redeploy.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+    <location filename="../gui/config/hiddenservicepage.cpp" line="1182"/>
+        <source>Data copied to clipboard.</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
     <name>LogEvent</name>
     <message>
         <location filename="../control/logevent.cpp" line="68"/>