Index: /orxonox/trunk/src/lib/gui/gui/Makefile.am
===================================================================
--- /orxonox/trunk/src/lib/gui/gui/Makefile.am	(revision 3623)
+++ /orxonox/trunk/src/lib/gui/gui/Makefile.am	(revision 3624)
@@ -21,5 +21,5 @@
 
 #AM_LDFLAGS=$(GTK2_LIBS)   $(GTHREAD_LIBS)
-LIBS=$(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
+AM_LDFLAGS=$(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
 
 bin_PROGRAMS=gui
Index: /orxonox/trunk/src/lib/gui/gui/Makefile.in
===================================================================
--- /orxonox/trunk/src/lib/gui/gui/Makefile.in	(revision 3623)
+++ /orxonox/trunk/src/lib/gui/gui/Makefile.in	(revision 3624)
@@ -131,7 +131,5 @@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
-
-#AM_LDFLAGS=$(GTK2_LIBS)   $(GTHREAD_LIBS)
-LIBS = $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
+LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
@@ -195,4 +193,7 @@
 MAINSRCDIR = ../../..
 AM_CXXFLAGS = $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS) -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/gaphics -I$(MAINSRCDIR)/lib/graphics/font -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai
+
+#AM_LDFLAGS=$(GTK2_LIBS)   $(GTHREAD_LIBS)
+AM_LDFLAGS = $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
 gui_SOURCES = orxonox_gui.cc \
 	    orxonox_gui_gtk.cc \
Index: /orxonox/trunk/src/lib/gui/gui/orxonox_gui_gtk.cc
===================================================================
--- /orxonox/trunk/src/lib/gui/gui/orxonox_gui_gtk.cc	(revision 3623)
+++ /orxonox/trunk/src/lib/gui/gui/orxonox_gui_gtk.cc	(revision 3624)
@@ -168,4 +168,16 @@
 
 /**
+   \brief sets a new Title to a Widget
+   \param title The new Title to set to the Widget
+*/
+void Widget::setTitle(const char* title)
+{
+  if (this->title)
+    delete []this->title;
+  this->title = new char[strlen(title)+1];
+  strcpy(this->title, title);
+}
+
+/**
    \brief makes the widget visible.
 */
@@ -692,5 +704,5 @@
    \param title title the Window should get.
 */
-void Window::setTitle(char* title)
+void Window::setTitle(const char* title)
 {
   if (this->title)
@@ -806,5 +818,5 @@
    \param title The title the Frame should get.
 */
-void Frame::setTitle(char* title)
+void Frame::setTitle(const char* title)
 {
   if (this->title)
@@ -859,16 +871,4 @@
   gtk_container_set_border_width(GTK_CONTAINER(this->widget), 3);
 #endif /* HAVE_GTK2 */
-}
-
-/**
-   \brief Sets the Title of the EventBox(not implemented)
-   \param title Name the EventBox should get(only datastructure-internal).
-*/
-void EventBox::setTitle(char* title)
-{
-  if (this->title)
-    delete []this->title;
-  this->title = new char[strlen(title)+1];
-  strcpy(this->title, title);
 }
 
@@ -949,16 +949,4 @@
 }
 
-/**
-   \brief Sets the Title of a Box.
-   \param title the new Title to set.
-*/
-void Box::setTitle(char* title)
-{
-  if (this->title)
-    delete []this->title;
-  this->title = new char[strlen(title)+1];
-  strcpy(this->title, title);
-}
-
 /* OPTION */
 
@@ -1105,5 +1093,5 @@
    \param title The name the Button should get
 */
-void Button::setTitle(char *title)
+void Button::setTitle(const char *title)
 {
   if (this->title)
@@ -1177,5 +1165,5 @@
    \param title The new Name the CheckButton should display.
 */
-void CheckButton::setTitle(char* title)
+void CheckButton::setTitle(const char* title)
 {
   if (this->title)
@@ -1270,16 +1258,4 @@
 
 /**
-   \brief Sets a new Title to the Slider
-   \param title The new Name of the slider
-*/
-void Slider::setTitle(char* title)
-{
-  if (this->title)
-    delete []this->title;
-  this->title = new char[strlen(title)+1];
-  strcpy(this->title, title);
-}
-
-/**
    \brief Setting a new value to the Slider.
    Maybe you also require a Slider::redraw() for this to display
@@ -1323,4 +1299,14 @@
 /* MENU */
 
+/**
+   \brief constructs a new Menu, without adding any items to it.
+   \param menuName the Name the Menu gets.
+*/
+Menu::Menu(const char* menuName)
+{
+  this->init();
+  this->setTitle(menuName);
+}
+
 /** 
     \brief Creates a Menu-Item-list out of multiple input.
@@ -1336,5 +1322,4 @@
   char *itemName;
 
-#ifdef HAVE_GTK2             /////////////////////// REINPLEMENT
   va_start(itemlist, menuname);
   while(strcmp(itemName = va_arg(itemlist, char*), "lastItem"))
@@ -1343,10 +1328,4 @@
     }
   va_end(itemlist);
-#endif /* HAVE_GTK2 */
-
-#ifdef HAVE_GTK2
-  gtk_option_menu_set_menu(GTK_OPTION_MENU(this->widget), menu);
-  this->connectSignal("changed", this->OptionChange);
-#endif /* HAVE_GTK2 */
 }
 
@@ -1361,5 +1340,16 @@
     PRINTF(3)("deleting the Menu.\n");
   //! \todo destroy menu
-
+  this->currItem = this->firstItem;
+  while(this->currItem)
+    {
+      delete []this->currItem->name;
+      /*
+	#ifdef HAVE_GTK2
+	free(this->currItem->item);
+	#endif /* HAVE_GTK2 */
+      MenuItem* tmpItem = this->currItem;
+      this->currItem = this->currItem->next;
+      delete tmpItem;
+    }
 }
 
@@ -1370,22 +1360,12 @@
 {
   this->isOption = 2;
+  this->firstItem = NULL;
 
 #ifdef HAVE_GTK2
   this->widget = gtk_option_menu_new();
   this->menu = gtk_menu_new();
-#endif /* HAVE_GTK2 */
-
-}
-
-/**
- * Sets the Database-Name of this Menu
- \param title Database-Name to be set.
-*/
-void Menu::setTitle(char* title)
-{
-  if (this->title)
-    delete []this->title;
-  this->title = new char[strlen(title)+1];
-  strcpy(this->title, title);
+  gtk_option_menu_set_menu(GTK_OPTION_MENU(this->widget), menu);
+  this->connectSignal("changed", this->OptionChange);
+#endif /* HAVE_GTK2 */
 }
 
@@ -1393,13 +1373,19 @@
    \brief appends a new Item to the Menu-List.
    \param itemName the itemName to be appendet.
-
-   \todo make the item-list readable without GTK
 */
 void Menu::addItem(char* itemName)
 {
-#ifdef HAVE_GTK2
-  this->item = gtk_menu_item_new_with_label(itemName);
-  gtk_menu_shell_append(GTK_MENU_SHELL(this->menu), this->item);
-#endif /* HAVE_GTK2 */
+  if (!this->firstItem)
+    this->firstItem = this->currItem = new MenuItem;
+  else
+    this->currItem = this->currItem->next = new MenuItem;
+
+  this->currItem->name = new char[strlen(itemName)+1];
+  strcpy(this->currItem->name, itemName);
+#ifdef HAVE_GTK2
+  this->currItem->item = gtk_menu_item_new_with_label(itemName);
+  gtk_menu_shell_append(GTK_MENU_SHELL(this->menu), this->currItem->item);
+#endif /* HAVE_GTK2 */
+  this->currItem->next = NULL;
 }
 
@@ -1488,17 +1474,4 @@
 
 /**
-   \brief Sets a ned Title to the OptionLabel.
-   \param title The now title of the OptionLabel.
-*/
-void OptionLabel::setTitle(char* title)
-{
-  if (this->title)
-    delete []this->title;
-  this->title = new char [strlen(title)+1];
-  strcpy(this->title, title);
-  this->redraw();
-}
-
-/**
    \brief Redraws an OptionLabel(not implemented yet, but it works).
 */
@@ -1683,16 +1656,4 @@
 
 /**
-   \brief Sets a ned Title to the ProgressBar.
-   \param title The now title of the ProgressBar.
-*/
-void ProgressBar::setTitle(char* title)
-{
-  if (this->title)
-    delete []this->title;
-  this->title = new char [strlen(title)+1];
-  strcpy(this->title, title);
-}
-
-/**
    \brief Sets the Total size of the Bar.(ex. The maximum one can download)
 */
@@ -1763,14 +1724,2 @@
   isOption = 0;
 }
-
-/**
-   \brief Sets a ned Title to the Image.
-   \param title The now title of the OptionLabel.
-*/
-void Image::setTitle(char* title)
-{
-  if (this->title)
-    delete []this->title;
-  this->title = new char [strlen(title)+1];
-  strcpy(this->title, title);
-}
Index: /orxonox/trunk/src/lib/gui/gui/orxonox_gui_gtk.h
===================================================================
--- /orxonox/trunk/src/lib/gui/gui/orxonox_gui_gtk.h	(revision 3623)
+++ /orxonox/trunk/src/lib/gui/gui/orxonox_gui_gtk.h	(revision 3624)
@@ -45,5 +45,5 @@
   void hide(void);
   void setSize(int width, int height);
-  virtual void setTitle(char* title) = 0;  //!< An abstract Function, that sets the title of Widgets.
+  virtual void setTitle(const char* title);  //!< An abstract Function, that sets the title of Widgets.
 
   Widget* findWidgetByName(char* name, unsigned int depth);
@@ -117,5 +117,4 @@
   virtual ~Container(void);
   //  void setBorderWidth(int borderwidth);
-  //  virtual void setTitle(char* title) = 0;
   void fill(Widget* lowerWidget);
 };
@@ -139,5 +138,5 @@
   void init(void);
   
-  void setTitle(char* title);
+  void setTitle(const char* title);
   void showall(void);
   void open(void);
@@ -163,6 +162,6 @@
   virtual ~Frame(void);
   void init(void);
-  
-  void setTitle(char* title);
+
+  void setTitle(const char* title);
 };
 
@@ -178,6 +177,4 @@
   virtual ~EventBox(void);
   void init(void);
-  
-  void setTitle(char* title);
 };
 
@@ -197,6 +194,4 @@
   
   void fill(Widget* lowerWidget);
-
-  void setTitle(char* title);
 };
 
@@ -244,5 +239,5 @@
   void init(void);
 
-  void setTitle(char* title);
+  void setTitle(const char* title);
   void redraw(void);
   void changeOption(void);
@@ -259,5 +254,5 @@
   void init(void);
 
-  void setTitle(char* title);
+  void setTitle(const char* title);
   bool isActive(void);           //!< a Bool value to see, if this CheckButton is active.
   void redraw(void);
@@ -279,5 +274,4 @@
   void init(int start, int end);
 
-  void setTitle(char* title);
   void setValue(int value);
   void redraw(void);
@@ -291,14 +285,25 @@
 #ifdef HAVE_GTK2
   GtkWidget* menu;                      //!< The menu That will hold the Options.
-  GtkWidget* item;                      //!< One Item From a Menu.
 #endif /* HAVE_GTK2 */
   va_list itemlist;                     //!< The list to readin multiple Options.
   
- public:
+  //! A struct to handle the MenuItems
+  struct MenuItem
+  {
+    char* name;                         //!< The name of this entry. 
+#ifdef HAVE_GTK2
+    GtkWidget* item;                    //!< One Item From a Menu.
+#endif /* HAVE_GTK2 */
+    MenuItem* next;                     //!< Pointer to the next MenuItem.
+  };
+  MenuItem* firstItem;                  //!< Pointer to the first Item.
+  MenuItem* currItem;                   //!< Pointer to the current Item.
+  
+ public:
+  Menu(const char* menuName);
   Menu(char* menuname, ...);
   virtual ~Menu(void);
   void init(void);
   
-  void setTitle(char* title);
   void addItem(char* itemName);
   void redraw(void);
@@ -317,5 +322,4 @@
   
   void setValue(char* newValue);
-  void setTitle(char* title);
   void redraw(void);
   void changeOption(void);
@@ -350,5 +354,4 @@
   void init(void);
 
-  void setTitle(char* title);
   void setProgress(double progress);
   void setTotalSize(double totalSize);
@@ -374,6 +377,4 @@
   virtual ~Image(void);
   void init(void);
-
-  void setTitle(char* title);
 };
 
Index: /orxonox/trunk/src/lib/gui/gui/orxonox_gui_video.cc
===================================================================
--- /orxonox/trunk/src/lib/gui/gui/orxonox_gui_video.cc	(revision 3623)
+++ /orxonox/trunk/src/lib/gui/gui/orxonox_gui_video.cc	(revision 3624)
@@ -27,4 +27,6 @@
 #include "orxonox_gui_video.h"
 
+#include "glincl.h"
+
 /**
    \brief Creates the Video-Option-Frame
@@ -40,5 +42,6 @@
   this->fullscreen->saveability();
   this->videoBox->fill(this->fullscreen);
-  this->resolution = new Menu("Resolution", "640x480", "800x600", "1024x768", "1280x1024", "1400x1050", "1600x1200", "1920x1200", "lastItem");
+  this->resolution = new Menu("Resolution");
+  this->getResolutions(this->resolution);
   this->resolution->saveability();
   this->videoBox->fill(this->resolution);
@@ -146,2 +149,34 @@
 }
 
+void OrxonoxGuiVideo::getResolutions(Menu* menu)
+{
+  SDL_Init(SDL_INIT_VIDEO);
+  SDL_Rect **modes;
+  int i;
+  char tmpChar[100];
+  
+  /* Get available fullscreen/hardware modes */
+  modes=SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_HWSURFACE);
+  
+  /* Check is there are any modes available */
+  if(modes == (SDL_Rect **)0){
+    PRINTF(2)("No video-modes available!\n");
+    exit(-1);
+  }
+  
+  /* Check if our resolution is restricted */
+  if(modes == (SDL_Rect **)-1){
+    PRINTF(2)("All resolutions available.\n");
+  }
+  else{
+    /* Print valid modes */
+    PRINT(4)("Available Modes\n");
+    for(i = 0; modes[i] ;++i)
+      {
+	PRINT(4)("  %d x %d\n", modes[i]->w, modes[i]->h);
+	sprintf(tmpChar, "%dx%d", modes[i]->w, modes[i]->h);
+	menu->addItem(tmpChar);
+      }
+  }
+  SDL_Quit();
+}
Index: /orxonox/trunk/src/lib/gui/gui/orxonox_gui_video.h
===================================================================
--- /orxonox/trunk/src/lib/gui/gui/orxonox_gui_video.h	(revision 3623)
+++ /orxonox/trunk/src/lib/gui/gui/orxonox_gui_video.h	(revision 3624)
@@ -45,6 +45,10 @@
   OrxonoxGuiVideo(void);
   ~OrxonoxGuiVideo(void);
+
+  Widget* getWidget(void);
+
+  void getResolutions(Menu* menu);
   
-  Widget* getWidget(void);
+
 };
 #endif /* _ORXONOX_GUI_VIDEO_H */
