Index: /orxonox/branches/guiMerge/src/lib/gui/gui/gui.cc
===================================================================
--- /orxonox/branches/guiMerge/src/lib/gui/gui/gui.cc	(revision 4050)
+++ /orxonox/branches/guiMerge/src/lib/gui/gui/gui.cc	(revision 4051)
@@ -95,5 +95,6 @@
   }
   // Reading Values from File
-  exec->setConfFile(ORXONOX_GUI_DEFAULT_CONFIG_FILE);
+  exec->setConfDir(GUI_DEFAULT_CONF_DIR);
+  exec->setConfFile(GUI_DEFAULT_CONF_FILE);
   exec->readFromFile(Window::mainWindow);
   // Merging changes to the Options from appended flags.
@@ -125,4 +126,5 @@
 }
 
+bool OrxonoxGui::startOrxonox = false;
 
 /**
Index: /orxonox/branches/guiMerge/src/lib/gui/gui/gui.h
===================================================================
--- /orxonox/branches/guiMerge/src/lib/gui/gui/gui.h	(revision 4050)
+++ /orxonox/branches/guiMerge/src/lib/gui/gui/gui.h	(revision 4051)
@@ -16,5 +16,6 @@
 using namespace std;
 
-#define ORXONOX_GUI_DEFAULT_CONFIG_FILE "~/.orxonox/orxonox.conf"
+#define GUI_DEFAULT_CONF_DIR "~/.orxonox"
+#define GUI_DEFAULT_CONF_FILE "orxonox.conf"
 
 class OrxonoxGuiElement;
@@ -26,4 +27,6 @@
   OrxonoxGui(int argc, char *argv[]);
   ~OrxonoxGui(void);
+
+  static bool startOrxonox;
 };
 
Index: /orxonox/branches/guiMerge/src/lib/gui/gui/gui_banner.cc
===================================================================
--- /orxonox/branches/guiMerge/src/lib/gui/gui/gui_banner.cc	(revision 4050)
+++ /orxonox/branches/guiMerge/src/lib/gui/gui/gui_banner.cc	(revision 4051)
@@ -59,5 +59,5 @@
   }
   // Banner Window //
-  logoWindow = new Window("Logo");
+  logoWindow = new Window(PACKAGE_NAME " is:");
   {
   EventBox* logoEventBox;   //!< The EventBox that holds the Orxonox-CrewLogo. it has to be an eventbox, because Images can not receive clicks.
@@ -70,5 +70,5 @@
     logoEventBox = new EventBox();
     logoBox = new Box('v');
-    logoLabel = new Label("orxonox, version: " PACKAGE_VERSION);
+    logoLabel = new Label(PACKAGE_NAME " v." PACKAGE_VERSION);
     logoBox->fill(logoLabel);
     logoImage = new Image(logo_xpm);
@@ -76,5 +76,5 @@
 
     //! \todo add the names of all the guys working on orxonox
-    orxIsLabel = new Label("orxonox is:\nPatrick Boenzli - main Developer\nBenjamin Grauer - right Hand\n....");
+    orxIsLabel = new Label(PACKAGE_NAME " is:\nPatrick Boenzli - main Developer\nBenjamin Grauer - right Hand\n....");
     logoBox->fill(orxIsLabel);
     logoEventBox->fill(logoBox);
Index: /orxonox/branches/guiMerge/src/lib/gui/gui/gui_exec.cc
===================================================================
--- /orxonox/branches/guiMerge/src/lib/gui/gui/gui_exec.cc	(revision 4050)
+++ /orxonox/branches/guiMerge/src/lib/gui/gui/gui_exec.cc	(revision 4051)
@@ -26,4 +26,5 @@
 #include "gui_exec.h"
 
+#include "resource_manager.h"
 
 #include <string.h>
@@ -32,5 +33,4 @@
 #include <sys/types.h>
 
-
 HashTable* orxonoxFlagHash;
 
@@ -40,38 +40,49 @@
 OrxonoxGuiExec::OrxonoxGuiExec(void)
 {
-  configFile = new char[512];
-
-  this->execFrame = new Frame("Execute-Tags:");
-  this->execBox = new Box('v');
-  this->execFrame->setGroupName("misc");
-  
-  this->start = new Button("Start");
-#ifdef HAVE_GTK2
-  this->start->connectSignal("clicked", this, startOrxonox);
-#endif /* HAVE_GTK2 */
-  this->execBox->fill(start);
-  this->saveSettings = new CheckButton("Save Settings");
-  this->saveSettings->value = 1;
-  this->saveSettings->saveability();
-  this->execBox->fill(this->saveSettings);
-  this->verboseMode = new Menu("verbose mode", "nothing", "error", "warning", "info", "lastItem");
-  this->verboseMode->setFlagName("verbose", "v", 0);
-  this->verboseMode->saveability();
-  this->execBox->fill(this->verboseMode);
-  this->alwaysShow = new CheckButton("Always Show this Menu");
-  this->alwaysShow->setFlagName("gui", "g", 0);
-  this->alwaysShow->saveability();
-  this->execBox->fill(this->alwaysShow);
-  this->quit = new Button("Quit");
-#ifdef HAVE_GTK2
-  this->quit->connectSignal("clicked", this, OrxonoxGuiExec::quitGui);
-  //  Window::mainWindow->connectSignal("remove", this, OrxonoxGuiExec::quitGui);
-  Window::mainWindow->connectSignal("destroy", this, OrxonoxGuiExec::quitGui);
-#endif /* HAVE_GTK2 */
-  this->execBox->fill(this->quit);
-
-  this->execFrame->fill(this->execBox);
-
-  this->setMainWidget(execFrame);
+  Frame* execFrame;            //!< The Frame that holds the ExecutionOptions.
+
+  this->confFile = NULL;
+  this->confDir = NULL;
+
+  execFrame = new Frame("Execute-Tags:");
+  {
+    Box* execBox;                //!< The Box that holds the ExecutionOptions.
+
+    execBox = new Box('v');
+    execFrame->setGroupName("misc");
+    {
+      Button* start;               //!< The start Button of orxonox.
+      Menu* verboseMode;           //!< A Menu for setting the verbose-Mode. \todo setting up a verbose-class.
+      CheckButton* alwaysShow;     //!< A CheckButton, for if orxonox should start with or without gui.
+      Button* quit;                //!< A Button to quit the Gui without starting orxonox.
+      
+      start = new Button("Start");
+#ifdef HAVE_GTK2
+      start->connectSignal("clicked", this, startOrxonox);
+#endif /* HAVE_GTK2 */
+      execBox->fill(start);
+      this->saveSettings = new CheckButton("Save Settings");
+      this->saveSettings->value = 1;
+      this->saveSettings->saveability();
+      execBox->fill(this->saveSettings);
+      verboseMode = new Menu("verbose mode", "nothing", "error", "warning", "info", "lastItem");
+      verboseMode->setFlagName("verbose", "v", 0);
+      verboseMode->saveability();
+      execBox->fill(verboseMode);
+      alwaysShow = new CheckButton("Always Show this Menu");
+      alwaysShow->setFlagName("gui", "g", 0);
+      alwaysShow->saveability();
+      execBox->fill(alwaysShow);
+      quit = new Button("Quit");
+#ifdef HAVE_GTK2
+      quit->connectSignal("clicked", this, OrxonoxGuiExec::quitGui);
+      //  Window::mainWindow->connectSignal("remove", this, OrxonoxGuiExec::quitGui);
+      Window::mainWindow->connectSignal("destroy", this, OrxonoxGuiExec::quitGui);
+#endif /* HAVE_GTK2 */
+      execBox->fill(quit);
+    }
+    execFrame->fill(execBox);
+  }
+  setMainWidget(execFrame);
 }
 
@@ -81,38 +92,11 @@
 OrxonoxGuiExec::~OrxonoxGuiExec(void)
 {
-  if(this->configFile)
-    delete []this->configFile;
+  if(this->confFile)
+    delete []this->confFile;
+  if(this->confDir)
+    delete []this->confDir;
 }
 
 /* FILE HANDLING */
-
-/**
-   \brief sets the confDir and File-name out of an input-string
-*/
-void OrxonoxGuiExec::setConfFile(char* confFile)
-{
-  char splitter = 
-#ifdef __WIN32__ 
-    '\\';
-#else
-  '/';
-#endif
-  char* tmpConfFile = new char[strlen(confFile)+1];
-  strcpy(tmpConfFile, confFile);
-  char* tmp = strrchr(tmpConfFile, splitter);
-  if (tmp)
-    {
-      tmp[0] = '\0';
-      this->setConfDir(tmpConfFile);
-      this->setFileName(tmp+1);
-    }
-  else
-    {
-      this->setConfDir("~/");
-      this->setFileName(tmpConfFile);
-    }
-  delete []tmp;
-  delete []tmpConfFile;
-}
 
 /**
@@ -120,23 +104,10 @@
    \param confDir the Directory for the configuration files
 */
-void OrxonoxGuiExec::setConfDir(char* confDir)
-{
-  if (!strncmp(confDir, "~/", 2))
-    {
-      char tmp[500];
-#ifdef __WIN32__
-      strcpy(tmp, getenv("USERPROFILE"));
-#else
-      strcpy(tmp, getenv("HOME"));
-#endif
-      this->confDir = new char[strlen(tmp)+strlen(confDir)];
-      sprintf(this->confDir, "%s%s", tmp, confDir+1);
-    }
-  else
-    {
-      this->confDir = new char[strlen(confDir)+1];
-      strcpy(this->confDir, confDir);
-    }
+void OrxonoxGuiExec::setConfDir(const char* confDir)
+{
+  this->confDir = ResourceManager::homeDirCheck(confDir);
+
   PRINTF(3)("Config Directory is: %s.\n", this->confDir);
+  //! \todo F** Windows-support
   mkdir(this->confDir, 0755);
 }
@@ -146,15 +117,13 @@
    \param fileName the location of the configFile
 
-   \todo: memory allocation could be better.
-
    The name will be parsed from ~/ to /home/[username] on unix and c:/Documents and Settings/username/Settings/ on Windows
 */
-void OrxonoxGuiExec::setFileName(char* fileName)
+void OrxonoxGuiExec::setConfFile(const char* fileName)
 {
   if (!this->confDir)
     this->setConfDir("~/");
-  this->configFile = new char[strlen(this->confDir)+strlen(fileName)+2];
-  sprintf(this->configFile, "%s/%s", this->confDir, fileName);
-  PRINTF(3)("ConfigurationFile is %s.\n", this->configFile);
+  this->confFile = new char[strlen(this->confDir)+strlen(fileName)+2];
+  sprintf(this->confFile, "%s/%s", this->confDir, fileName);
+  PRINTF(3)("ConfigurationFile is %s.\n", this->confFile);
 }
 
@@ -162,7 +131,7 @@
    \returns The name of the Configuration-File
 */
-char* OrxonoxGuiExec::getConfigFile(void) const
-{
-  return this->configFile;
+const char* OrxonoxGuiExec::getConfigFile(void) const
+{
+  return this->confFile;
 }
 
@@ -184,5 +153,5 @@
 void OrxonoxGuiExec::writeToFile(Widget* widget)
 {
-  this->CONFIG_FILE = fopen(configFile, "w");
+  this->CONFIG_FILE = fopen(this->confFile, "w");
   if(this->CONFIG_FILE)
     this->writeFileText(widget, 0);
@@ -248,5 +217,5 @@
 void OrxonoxGuiExec::readFromFile(Widget* widget)
 {
-  this->CONFIG_FILE = fopen(configFile, "r");
+  this->CONFIG_FILE = fopen(this->confFile, "r");
   VarInfo varInfo;
   if(this->CONFIG_FILE)
@@ -302,5 +271,5 @@
       PRINT(5)("Located Option %s.\n", widget->title);
       if(widget->isOption >= 1)
-	  static_cast<Option*>(widget)->load(info->variableValue);
+	static_cast<Option*>(widget)->load(info->variableValue);
     }
 }
@@ -328,5 +297,6 @@
   if(widget->isOption < 0)
     {
-      if(static_cast<Packer*>(widget)->getGroupName() && !strcmp(groupName, static_cast<Packer*>(widget)->getGroupName()))
+      if(static_cast<Packer*>(widget)->getGroupName() &&
+	 !strcmp(groupName, static_cast<Packer*>(widget)->getGroupName()))
 	{
 	  return widget;
@@ -369,4 +339,5 @@
 
   PRINT(3)("Starting Orxonox\n");
+  OrxonoxGui::startOrxonox = true;
 }
 
Index: /orxonox/branches/guiMerge/src/lib/gui/gui/gui_exec.h
===================================================================
--- /orxonox/branches/guiMerge/src/lib/gui/gui/gui_exec.h	(revision 4050)
+++ /orxonox/branches/guiMerge/src/lib/gui/gui/gui_exec.h	(revision 4051)
@@ -9,6 +9,8 @@
 #include "gui.h"
 #include "gui_element.h"
+#include "gui_gtk.h"
 
-#include "gui_gtk.h"
+class Widget;
+class CheckButton;
 using namespace std;
 
@@ -17,15 +19,10 @@
 {
  private:
-  Frame* execFrame;            //!< The Frame that holds the ExecutionOptions.
-  Box* execBox;                //!< The Box that holds the ExecutionOptions.
-  Button* start;               //!< The start Button of orxonox.
   CheckButton* saveSettings;   //!< A CheckBox for if the Options should be saved.
-  Menu* verboseMode;           //!< A Menu for setting the verbose-Mode. \todo setting up a verbose-class.
-  CheckButton* alwaysShow;     //!< A CheckButton, for if orxonox should start with or without gui.
-  Button* quit;                //!< A Button to quit the Gui without starting orxonox.
+
   char* confDir;               //!< The directory of the orxonox-configuration-files.
-  char* configFile;            //!< The name of the .orxonox.conf(ig)-file.
+  char* confFile;              //!< The name of the .orxonox.conf(ig)-file.
   FILE* CONFIG_FILE;           //!< Filehandler for reading and writing.
-  
+
   //! A struct that holds informations about variables.
   struct VarInfo
@@ -39,8 +36,7 @@
   ~OrxonoxGuiExec(void);
   
-  void setConfFile(char* confFile);
-  void setConfDir(char* confDir);
-  void setFileName(char* fileName);
-  char* getConfigFile(void) const;
+  void setConfDir(const char* confDir);
+  void setConfFile(const char* confFile);
+  const char* getConfigFile(void) const;
   int shouldsave(void);
   void writeToFile(Widget* widget);
Index: /orxonox/branches/guiMerge/src/orxonox.cc
===================================================================
--- /orxonox/branches/guiMerge/src/orxonox.cc	(revision 4050)
+++ /orxonox/branches/guiMerge/src/orxonox.cc	(revision 4051)
@@ -342,4 +342,7 @@
       //      sprintf(guiExec,"%sGui --gui", argv[0]);
       OrxonoxGui* gui = new OrxonoxGui(argc, argv);
+      if (! gui->startOrxonox)
+	return 0;
+      
       delete gui;
       //      delete guiExec;
Index: /orxonox/branches/guiMerge/src/util/resource_manager.h
===================================================================
--- /orxonox/branches/guiMerge/src/util/resource_manager.h	(revision 4050)
+++ /orxonox/branches/guiMerge/src/util/resource_manager.h	(revision 4051)
@@ -81,4 +81,5 @@
   static bool touchFile(const char* fileName);
   static bool deleteFile(const char* fileName);
+  static char* homeDirCheck(const char* name);
 
  private:
@@ -94,5 +95,4 @@
   Resource* locateResourceByPointer(const void* pointer);
   
-  static char* homeDirCheck(const char* name);
 };
 
