Index: trunk/MagicSoft/Mars/mmain/MBrowser.cc
===================================================================
--- trunk/MagicSoft/Mars/mmain/MBrowser.cc	(revision 1050)
+++ trunk/MagicSoft/Mars/mmain/MBrowser.cc	(revision 1052)
@@ -32,4 +32,5 @@
 #include <TGButton.h>       // TGTextButton
 #include <TGMsgBox.h>       // TGMsgBox
+#include <TBrowser.h>       // TBrowser
 #include <TGListBox.h>      // TGListBox
 #include <TGTextEntry.h>    // TGTextEntry
@@ -48,4 +49,5 @@
 
 enum {
+    kFileTBrowser,
     kFileClose,
     kButDirUp,
@@ -62,5 +64,8 @@
     //
     TGPopupMenu *filemenu = new TGPopupMenu(gClient->GetRoot());
-    filemenu->AddEntry("Close", kFileClose);
+    filemenu->AddEntry("Open &TBrowser", kFileTBrowser);
+    filemenu->AddSeparator();
+    filemenu->AddEntry("&Close", kFileClose);
+    filemenu->Associate(this);
     fList->Add(filemenu);
 
@@ -75,5 +80,5 @@
 
     TGMenuBar *menubar = new TGMenuBar(this, 1, 1, kHorizontalFrame);
-    menubar->AddPopup("File", filemenu, laymenuitem);
+    menubar->AddPopup("&File", filemenu, laymenuitem);
     AddFrame(menubar, laymenubar);
     fList->Add(menubar);
@@ -320,4 +325,5 @@
     ChangeDir();
     SetWMSizeHints(400, 350, 1000, 1000, 10, 10); // set the smallest and biggest size of the Main frame
+    Move(rand()%100+50, rand()%100+50);
 }
 
@@ -450,99 +456,103 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Process events generated by the gui elements in the frame.
+//
 Bool_t MBrowser::ProcessMessage(Long_t msg, Long_t parm1, Long_t)
-{     
-  // Process events generated by the buttons in the frame.
-  
-  switch (GET_MSG(msg))
-  {
-  case kC_TEXTENTRY:
-      if (GET_SUBMSG(msg)!=kTE_ENTER)
-          return kTRUE;
-
-      SetFileName(fEntry->GetText());
-      return kTRUE;
-
-  case kC_COMMAND:
-      switch (GET_SUBMSG(msg))
-      {
-      case kCM_BUTTON:
-
-          switch (parm1)
-          {
-          case kButDirUp :
-              //
-	      //  goto the parent directory
-              //
-              ChangeDir("..");
-	      return kTRUE;
-	    
-	    case kButListMode:
-	      fFileView->SetViewMode(kLVList);
-              fDetail->SetState(kButtonUp) ;
-              return kTRUE;
-	      
-          case kButDetailMode:
-              fFileView->SetViewMode(kLVDetails);
-              fListMode->SetState(kButtonUp);
-              return kTRUE;
-          }
-          return kTRUE;
-
-      case kCM_COMBOBOX:
-          //
-          // FIXME: Don't add the new entry to the list!
-          // But to do this we need the number of entries in the list.
-          //
-          if (parm1 != kCBDirectory)
-              return kTRUE;
-
-          ChangeDir(((TGTreeLBEntry*)fDir->GetSelectedEntry())->GetPath()->GetString());
-          return kTRUE;
-
-	case kCM_MENU:
-	  if (parm1==kFileClose)
-              CloseWindow();
-          return kTRUE;
-      }
-      return kTRUE;
-      
-  case kC_CONTAINER:
-      switch (GET_SUBMSG(msg))
-      {
-
-          //      case kCT_ITEMCLICK:
-          // 	printf ("itemclick\n");
-          //      break;
-
-      case kCT_ITEMDBLCLICK:
-          //
-          //  process the double click in the file view container
-          //
-
-          if (parm1 != kButton1 || fFileCont->NumSelected() != 1)
-              return kTRUE;
-
-          //
-          //  one file selected
-          //
-          void *dummy = NULL;
-          const TGFileItem *item = (TGFileItem *)fFileCont->GetNextSelected(&dummy);
-
-          const char *str = item->GetItemName()->GetString();
-
-          //
-          // if the user choose a directory
-          // change to this directory
-          //
-          if (S_ISDIR(item->GetType())) 
-          {
-              ChangeDir(str);
-              return kTRUE;
-          }
-
-          SetFileName(str);
-          return kTRUE;
-      }
-  }
-  return kTRUE;
-} 
+{
+    switch (GET_MSG(msg))
+    {
+    case kC_TEXTENTRY:
+        if (GET_SUBMSG(msg)!=kTE_ENTER)
+            return kTRUE;
+
+        SetFileName(fEntry->GetText());
+        return kTRUE;
+
+    case kC_COMMAND:
+        switch (GET_SUBMSG(msg))
+        {
+        case kCM_MENU:
+            switch (parm1)
+            {
+            case kFileClose:
+                CloseWindow();
+                return kTRUE;
+
+            case kFileTBrowser:
+                new TBrowser();
+                return kTRUE;
+            }
+            return kTRUE;
+
+        case kCM_BUTTON:
+            switch (parm1)
+            {
+            case kButDirUp:
+                //
+                //  goto the parent directory
+                //
+                ChangeDir("..");
+                return kTRUE;
+
+            case kButListMode:
+                fFileView->SetViewMode(kLVList);
+                fDetail->SetState(kButtonUp);
+                return kTRUE;
+
+            case kButDetailMode:
+                fFileView->SetViewMode(kLVDetails);
+                fListMode->SetState(kButtonUp);
+                return kTRUE;
+            }
+            return kTRUE;
+
+        case kCM_COMBOBOX:
+            if (parm1 != kCBDirectory)
+                return kTRUE;
+
+            ChangeDir(((TGTreeLBEntry*)fDir->GetSelectedEntry())->GetPath()->GetString());
+            return kTRUE;
+        }
+        return kTRUE;
+
+    case kC_CONTAINER:
+        switch (GET_SUBMSG(msg))
+        {
+
+            //      case kCT_ITEMCLICK:
+            // 	printf ("itemclick\n");
+            //      break;
+
+        case kCT_ITEMDBLCLICK:
+            //
+            //  process the double click in the file view container
+            //
+            if (parm1 != kButton1 || fFileCont->NumSelected() != 1)
+                return kTRUE;
+
+            //
+            //  one file selected
+            //
+            void *dummy = NULL;
+            const TGFileItem *item = (TGFileItem *)fFileCont->GetNextSelected(&dummy);
+
+            const char *str = item->GetItemName()->GetString();
+
+            //
+            // if the user choose a directory
+            // change to this directory
+            //
+            if (S_ISDIR(item->GetType()))
+            {
+                ChangeDir(str);
+                return kTRUE;
+            }
+
+            SetFileName(str);
+            return kTRUE;
+        }
+    }
+    return kTRUE;
+}
Index: trunk/MagicSoft/Mars/mmain/MMars.cc
===================================================================
--- trunk/MagicSoft/Mars/mmain/MMars.cc	(revision 1050)
+++ trunk/MagicSoft/Mars/mmain/MMars.cc	(revision 1052)
@@ -44,15 +44,15 @@
 
 enum {
-    M_FILE_EXIT,
-    M_FILE_ABOUT,
-
-    M_PICTURE_MAGIC,
-    M_PICTURE_MARS,
-
-    M_BUTTON_EVTDISP,
-    M_BUTTON_DATACHECK,
-    M_BUTTON_ANALYSE,
-    M_BUTTON_MONTECARLO,
-    M_BUTTON_CAMDISPLAY
+    kFileExit,
+    kFileAbout,
+
+    kPicMagic,
+    kPicMars,
+
+    kButEvtDisplay,
+    kButDataCheck,
+    kButAnalysis,
+    kButMonteCarlo,
+    kButCameraDisplay
 };
 
@@ -68,9 +68,9 @@
 
     TGPopupMenu *filemenu = new TGPopupMenu(gClient->GetRoot());
-    filemenu->AddEntry("Exit", M_FILE_EXIT);
-    //fFileMenu->Associate(this);
+    filemenu->AddEntry("E&xit", kFileExit);
+    filemenu->Associate(this);
 
     TGMenuBar *menubar = new TGMenuBar(this, 1, 1, kHorizontalFrame);
-    menubar->AddPopup("File", filemenu, laymenuitem);
+    menubar->AddPopup("&File", filemenu, laymenuitem);
     AddFrame(menubar, laymenubar);
 
@@ -88,6 +88,6 @@
     fPic2 = gClient->GetPicture("marslogo.xpm");
 
-    TGPictureButton *magic = new TGPictureButton(top, fPic1, M_PICTURE_MAGIC);
-    TGPictureButton *mars  = new TGPictureButton(top, fPic2, M_PICTURE_MARS);
+    TGPictureButton *magic = new TGPictureButton(top, fPic1, kPicMagic);
+    TGPictureButton *mars  = new TGPictureButton(top, fPic2, kPicMars);
 
     fList->Add(magic);
@@ -163,14 +163,13 @@
     fList->Add(laybut);
 
-    CreateTextButton(tab2, "Event Display",  M_BUTTON_EVTDISP,    laybut);
-    CreateTextButton(tab2, "Data Check",     M_BUTTON_DATACHECK,  laybut);
-    CreateTextButton(tab2, "Analysis",       M_BUTTON_ANALYSE,    laybut);
-    CreateTextButton(tab2, "Monte Carlo",    M_BUTTON_MONTECARLO, laybut);
-    CreateTextButton(tab2, "Camera Display", M_BUTTON_CAMDISPLAY, laybut);
-}
-
-MMars::MMars(/*const TGWindow *p,*/ UInt_t w, UInt_t h)
-: TGMainFrame(gClient->GetRoot(), w, h)
-//: MBrowser (gClient->GetRoot(), gClient->GetRoot(), w, h)
+    CreateTextButton(tab2, "Event Display",  kButEvtDisplay,    laybut);
+    CreateTextButton(tab2, "Data Check",     kButDataCheck,  laybut);
+    CreateTextButton(tab2, "Analysis",       kButAnalysis,    laybut);
+    CreateTextButton(tab2, "Monte Carlo",    kButMonteCarlo, laybut);
+    CreateTextButton(tab2, "Camera Display", kButCameraDisplay, laybut);
+}
+
+MMars::MMars()
+: TGMainFrame(gClient->GetRoot(), 330, 400, kVerticalFrame|kFixedSize)
 {
     //
@@ -212,6 +211,8 @@
     //
     //   Map the window, set up the layout, etc.
-    //
-    SetWMSizeHints(330, 410, 330, 410, 10, 10);  // set the smallest and biggest size of the Main frame
+    //   kFixedSize seems to be ignored
+    //
+    SetWMSizeHints(GetWidth(), GetHeight(), GetWidth(), GetHeight(), 0, 0);  // set the smallest and biggest size of the Main frame
+    Move(rand()%100, rand()%100);
 
     MapSubwindows();
@@ -269,29 +270,29 @@
             {
 
-            case M_BUTTON_EVTDISP:
+            case kButEvtDisplay:
                 new MEvtDisp(this);
                 return kTRUE;
 
-            case M_BUTTON_DATACHECK:
+            case kButDataCheck:
                 new MDataCheck(this);
                 return kTRUE;
 
-            case M_BUTTON_ANALYSE:
+            case kButAnalysis:
                 new MAnalysis(this);
                 return kTRUE;
 
-            case M_BUTTON_MONTECARLO:
+            case kButMonteCarlo:
                 new MMonteCarlo(this);
                 return kTRUE;
 
-            case M_BUTTON_CAMDISPLAY:
+            case kButCameraDisplay:
                 new MCameraDisplay(this);
                 return kTRUE;
 
-            case M_PICTURE_MAGIC:
+            case kPicMagic:
                 gSystem->Exec("netscape http://hegra1.mppmu.mpg.de/MAGICWeb/ &");
                 return kTRUE;
 
-            case M_PICTURE_MARS:
+            case kPicMars:
                 gSystem->Exec("netscape http://magic.uni-sw.gwdg.de/mars/ &");
                 return kTRUE;
@@ -299,5 +300,5 @@
 
 	case kCM_MENU:
-            if (parm1!=M_FILE_EXIT)
+            if (parm1!=kFileExit)
                 return kTRUE;
 
Index: trunk/MagicSoft/Mars/mmain/MMars.h
===================================================================
--- trunk/MagicSoft/Mars/mmain/MMars.h	(revision 1050)
+++ trunk/MagicSoft/Mars/mmain/MMars.h	(revision 1052)
@@ -33,6 +33,5 @@
 
 public:
-    MMars(UInt_t w=400, UInt_t h=500);
-
+    MMars();
     ~MMars();
 
Index: trunk/MagicSoft/Mars/mmain/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mmain/Makefile	(revision 1050)
+++ trunk/MagicSoft/Mars/mmain/Makefile	(revision 1052)
@@ -47,5 +47,5 @@
 include ../Makefile.rules
 
-clean:	rmlib rmcint rmobjs rmcore rmbin
+clean:	rmcint rmobjs rmcore rmlib
 
 mrproper:	clean rmbak
