Changeset 2491 for trunk/MagicSoft/Mars/mmain
- Timestamp:
- 11/10/03 11:25:13 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mmain
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mmain/MStatusDisplay.cc
r2484 r2491 107 107 108 108 // ------------ Workaround for a non working TGTextView::Search ------------- 109 #if ROOT_VERSION_CODE < ROOT_VERSION(3,02,05) 109 110 class MGTextView : public TGTextView 110 111 { … … 165 166 } 166 167 }; 168 #else 169 #define MGTextView TGTextView 170 #endif 167 171 // -------------------------------------------------------------------------- 168 172 … … 566 570 567 571 fFont = gVirtualX->LoadQueryFont("7x13bold"); 572 fMutex = new TMutex; 568 573 569 574 // … … 666 671 if (fFont) 667 672 gVirtualX->DeleteFont(fFont); 673 674 // 675 // Delete mutex 676 // 677 delete fMutex; 668 678 } 669 679 … … 820 830 821 831 // layout and map new tab 822 Layout(); 823 MapSubwindows(); 824 Layout(); 832 Layout(); // seems to layout the TGCompositeFrame 833 MapSubwindows(); // maps the TGCompositeFrame 834 Layout(); // layout the embedded canvas in the frame 825 835 826 836 // display new tab in the main frame … … 864 874 // the main thread. 865 875 // 866 // NOTE: Maybe there is still need to make sure, that only867 // one thread can update the canvas by calling UpdateTab868 // at the same time. Could be done by a TMutex.869 //870 876 if (gThreadXAR) 871 877 { … … 881 887 } 882 888 883 #if ROOT_VERSION_CODE < ROOT_VERSION(3,10,01) 889 // 890 // Secure calls to update the tabs against itself, at least 891 // c->Paint() or c->Flush() may crash X (bad drawable). 892 // This makes sure, that a X call is not interuppted by 893 // another X-call which was started from an gui interrrupt 894 // in the same thread 895 // 896 if (mutex->TryLock()==13) 897 return; 898 899 #if ROOT_VERSION_CODE < ROOT_VERSION(3,10,02) 884 900 TPad *padsav = (TPad*)gPad; 885 901 if (!gPad) … … 897 913 c->Flush(); // Copy all pad pixmaps to the screen 898 914 899 #if ROOT_VERSION_CODE < ROOT_VERSION(3,10,0 1)915 #if ROOT_VERSION_CODE < ROOT_VERSION(3,10,02) 900 916 if (padsav) 901 917 padsav->cd(); … … 903 919 gPad=NULL; 904 920 #endif 921 905 922 //c->SetCursor(kCross); 906 923 … … 909 926 //c->Update(); 910 927 //c->Paint(); 928 929 mutex->UnLock(); 911 930 } 912 931 … … 979 998 980 999 fTab->RemoveTab(i); 1000 fTab->SetTab(0); 1001 1002 // Looks strange... 1003 // const Int_t n = fTab->GetNumberOfTabs(); 1004 // fTab->SetTab(i<=n-1 ? i : i-1); 981 1005 982 1006 // layout and map new tab 983 #if ROOT_VERSION_CODE < ROOT_VERSION(3,03,00) 984 MapSubwindows(); 985 Layout(); 986 #else 987 Layout(); 988 MapSubwindows(); 989 #endif 1007 Layout(); // seems to layout the TGCompositeFrame 1008 MapSubwindows(); // maps the TGCompositeFrame 1009 Layout(); // layout the embedded canvas in the frame 990 1010 991 1011 // display new tab in the main frame … … 1858 1878 1859 1879 ps.Close(); 1860 1861 if (num<0)1862 *fLog << inf << " - ";1863 1864 SetStatusLine2("Updating Postscript header...");1865 *fLog << inf << "Updating Postscript header..." << flush;1866 1880 UpdatePSHeader(name); 1867 *fLog << inf << "done." << endl;1868 1869 1881 1870 1882 gVirtualPS = psave; -
trunk/MagicSoft/Mars/mmain/MStatusDisplay.h
r2477 r2491 20 20 class TPad; 21 21 class TTimer; 22 class TMutex; 22 23 class TCanvas; 23 24 … … 64 65 TGLayoutHints *fLayCanvas; 65 66 66 TTimer fTimer; 67 TTimer fTimer; 68 TMutex *fMutex; 67 69 68 70 TGStatusBar *fStatusBar; … … 122 124 123 125 void StartUpdate(Int_t millisec=-1); 124 void StopUpdate(); 125 void SetUpdateTime(Long_t t); 126 void StopUpdate(); 127 void SetUpdateTime(Long_t t); 126 128 127 129 void SetProgressBarPosition(Float_t p);
Note:
See TracChangeset
for help on using the changeset viewer.