Index: trunk/MagicSoft/Mars/mbase/MLog.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MLog.cc	(revision 935)
+++ trunk/MagicSoft/Mars/mbase/MLog.cc	(revision 936)
@@ -71,5 +71,5 @@
 // which is used for the output (i)
 //
-MLog::MLog(int i) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(i), fout(NULL), fOutAllocated(kFALSE), fgui(NULL)
+MLog::MLog(int i) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(i), fGuiLineId(0), fout(NULL), fOutAllocated(kFALSE), fgui(NULL)
 {
     Init();
@@ -81,5 +81,5 @@
 // ofstream as the default output device
 //
-MLog::MLog(ofstream &out) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eFile), fout(&out), fOutAllocated(kFALSE), fgui(NULL)
+MLog::MLog(ofstream &out) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eFile), fGuiLineId(0),  fout(&out), fOutAllocated(kFALSE), fgui(NULL)
 {
     Init();
@@ -91,5 +91,5 @@
 // TGListBox as the default output device
 //
-MLog::MLog(TGListBox &out) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eGui), fout(NULL), fOutAllocated(kFALSE), fgui(&out)
+MLog::MLog(TGListBox &out) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eGui), fGuiLineId(0),  fout(NULL), fOutAllocated(kFALSE), fgui(&out)
 {
     Init();
@@ -102,5 +102,5 @@
 // or not.
 //
-MLog::MLog(const char *fname, int flag) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eFile), fgui(NULL)
+MLog::MLog(const char *fname, int flag) : ostream(this), fPPtr(fBase), fEPtr(fBase+bsz), fOutputLevel(0), fDebugLevel((unsigned)-1), fDevice(eFile), fGuiLineId(0),  fgui(NULL)
 {
     Init();
@@ -141,8 +141,10 @@
     if (fDevice&eGui && fgui)
     {
-        char dummy[bsz+1];
-        memcpy(dummy, fBase, bsz);
-        *(dummy+bsz)='\0';
-        fgui->AddEntry(dummy, -1);
+        char dummy[len+1];
+        memcpy(dummy, fBase, len);
+        *(dummy+len)='\0';
+        fgui->AddEntry(dummy, fGuiLineId);
+        fgui->SetTopEntry(fGuiLineId++);
+        fgui->SetBit(kHasChanged);
     }
 
Index: trunk/MagicSoft/Mars/mbase/MLog.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MLog.h	(revision 935)
+++ trunk/MagicSoft/Mars/mbase/MLog.h	(revision 936)
@@ -2,7 +2,7 @@
 #define MLOG_H
 
-#ifndef MAGIC_H
-#include "MAGIC.h"
-#endif
+//#ifndef MAGIC_H
+//#include "MAGIC.h"
+//#endif
 
 #include <TObject.h>
@@ -12,4 +12,9 @@
 
 #define bsz    160 // two standard lines
+
+enum ELogBits {
+   kHasChanged = BIT(14)  // if gui has changed
+};
+
 
 class TGListBox;
@@ -29,4 +34,6 @@
     UInt_t fDebugLevel;      //! Present global debug level
     UInt_t fDevice;          //! Flag to indicate the present streams
+
+    Int_t fGuiLineId;
 
     ofstream  *fout;          //! possible file output stream
@@ -65,4 +72,6 @@
     void operator=(ofstream &out)       { SetOutputFile(out); }
     void operator=(TGListBox *out)      { SetOutputGui(out);  }
+
+    Bool_t IsOutputDeviceEnabled(int i) const { return fDevice & i; }
 
     void SetOutputGui(TGListBox *out, int flag=-1)
Index: trunk/MagicSoft/Mars/mbase/MLogManip.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MLogManip.h	(revision 935)
+++ trunk/MagicSoft/Mars/mbase/MLogManip.h	(revision 936)
@@ -62,8 +62,9 @@
 // Remark:     All this is compiled into the code.
 //
+/*
 #ifndef __CINT__
 #define DEBUG(lvl)  flush << debug(lvl) << dbginf
 #endif
-
+*/
 /*
 class SMANIP(T) {
