[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : luke
Repository : xara
Revision   : 743
Date       : Thu Mar 30 13:55:49 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/aboutdlg.cpp
   M /Trunk/XaraLX/Kernel/aboutdlg.h
   M /Trunk/XaraLX/Kernel/main2.cpp
   M /Trunk/XaraLX/wxOil/camelot.cpp
   M /Trunk/XaraLX/wxOil/camelot.h
   M /Trunk/XaraLX/wxOil/camframe.cpp
   M /Trunk/XaraLX/wxOil/camframe.h

Reinstate AboutDlg, BUT note this does not use DialogOP it's just a normal messagebox


Diff:
Index: Trunk/XaraLX/Kernel/aboutdlg.h
===================================================================
--- Trunk/XaraLX/Kernel/aboutdlg.h	(revision 742)
+++ Trunk/XaraLX/Kernel/aboutdlg.h	(revision 743)
@@ -104,7 +104,6 @@
 
 #define OPTOKEN_ABOUTDLG _T("AboutDlg")    
    
-
 /********************************************************************************************
 
 >	class AboutDlg: public DialogOp
@@ -117,6 +116,7 @@
 
 ********************************************************************************************/
 
+#if defined(DIALOGOP_ABOUT_BOX)
 class AboutDlg: public DialogOp
 {         
 	CC_DECLARE_DYNCREATE( AboutDlg )  
@@ -144,6 +144,21 @@
 private:
 	static AboutDlg *TheDlg;
 	static double CurrentAngle;
-}; 
+};
+#else
+class AboutDlg: public Operation
+{         
+	CC_DECLARE_DYNCREATE( AboutDlg )  
 
+public:
+	AboutDlg();		// The constructor
+	~AboutDlg();	// and it's friend
+
+	void Do(OpDescriptor*);		// "Do" function        
+	static BOOL Init();                        
+
+	static OpState GetState(String_256*, OpDescriptor*);	
+};
+#endif//
+
 #endif
Index: Trunk/XaraLX/Kernel/main2.cpp
===================================================================
--- Trunk/XaraLX/Kernel/main2.cpp	(revision 742)
+++ Trunk/XaraLX/Kernel/main2.cpp	(revision 743)
@@ -272,10 +272,10 @@
 #ifdef VECTOR_STROKING
 			OpMakeStroke::Init() &&				// Register MakeStroke operation
 #endif // VECTOR_STROKING
+			AboutDlg::Init() &&					// Register "About Camelot" Dialog
 #ifndef EXCLUDE_FROM_XARALX
 			OpUpdate::Init() &&					// Register Update Operation
 			OpRegister::Init() &&				// Register Register Operation
-			AboutDlg::Init() &&					// Register "About Camelot" Dialog
 			TipsDlg::Init() &&					// Register "Tip of the Day" Dialog
 			OpSlice::Init() &&					// Register Image Slicing
 			BarStatesDlg::Init() &&				// Register the Bar States Creation Dlg
Index: Trunk/XaraLX/Kernel/aboutdlg.cpp
===================================================================
--- Trunk/XaraLX/Kernel/aboutdlg.cpp	(revision 742)
+++ Trunk/XaraLX/Kernel/aboutdlg.cpp	(revision 743)
@@ -125,7 +125,7 @@
 #include "cversion.h"
 #include "product.h"
 // Added by Craig Hamilton 21/12/00.
-#include "registry.h"
+//#include "registry.h"
 // End added.
 
 #include "menuops.h"
@@ -136,18 +136,19 @@
 // This line MUST go after all CC_IMPLEMENT lines
 #define new CAM_DEBUG_NEW
 
-
-const CDlgMode AboutDlg::Mode = MODELESS; 		// The dialog is modeless  
-
+#if defined(DIALOGOP_ABOUT_BOX)
 #ifndef STANDALONE
-const INT32      AboutDlg::IDD = _R(IDD_ABOUTDLG);	// The dialogs id
+const INT32			AboutDlg::IDD = _R(IDD_ABOUTDLG);	// The dialogs id
 #else
-const INT32      AboutDlg::IDD = _R(IDD_ABOUTDLG_SA);	// The dialogs id
+const INT32			AboutDlg::IDD = _R(IDD_ABOUTDLG_SA);	// The dialogs id
 #endif
 
-AboutDlg *AboutDlg::TheDlg = NULL;
-double AboutDlg::CurrentAngle = -1.0;
+const CDlgMode		AboutDlg::Mode = MODELESS; 		// The dialog is modeless  
 
+AboutDlg*			AboutDlg::TheDlg = NULL;
+double				AboutDlg::CurrentAngle = -1.0;
+#endif
+
 /********************************************************************************************
 >	AboutDlg::AboutDlg()
 	virtual AboutDlg::~AboutDlg()
@@ -164,6 +165,7 @@
 
 ********************************************************************************************/
 
+#if defined(DIALOGOP_ABOUT_BOX)
 AboutDlg::AboutDlg()
   : DialogOp(AboutDlg::IDD, AboutDlg::Mode) 
 {   
@@ -182,8 +184,17 @@
 	else
 		CurrentAngle = 0.0;
 }
+#else
+AboutDlg::AboutDlg()
+{   
+}
 
+AboutDlg::~AboutDlg()
+{   
+}
+#endif
 
+#if defined(DIALOGOP_ABOUT_BOX)
 /********************************************************************************************
 
 >	MsgResult AboutDlg::Message(Msg* Message);
@@ -232,7 +243,8 @@
 
 				pRender->SaveContext();
 
-				pRender->SetLineColour(DocColour(COLOUR_TRANS));
+				DocColour	colTrans( COLOUR_TRANS );
+				pRender->SetLineColour( colTrans );
 
 				LinearFillAttribute GradFill;
 				ColourHSVT ColDef;
@@ -305,6 +317,7 @@
 
 	return TRUE;
 }
+#endif
 
 
 /********************************************************************************************
@@ -325,9 +338,11 @@
 OpState	AboutDlg::GetState(String_256*, OpDescriptor*)
 {    
 	OpState OpSt;
+	OpSt.Greyed = false;
+	
 	return(OpSt);
 }
-		 
+
 /********************************************************************************************
 
 >	BOOL AboutDlg::Init()
@@ -365,6 +380,7 @@
 
 }   
  
+#if defined(DIALOGOP_ABOUT_BOX)
 /********************************************************************************************
 
 >	BOOL AboutDlg::Create()
@@ -390,9 +406,9 @@
 
 	return FALSE;
 }           
+#endif
 
 
-
 /********************************************************************************************
 
 >	void AboutDlg::Do(OpDescriptor*)
@@ -411,11 +427,18 @@
 
 void AboutDlg::Do(OpDescriptor*)
 {
+#if defined(DIALOGOP_ABOUT_BOX)
 	Create();
 	Open();
+#else	
+	CCamApp::DoAboutBox();
+	End();
+#endif
 }
 
 
+#if defined(DIALOGOP_ABOUT_BOX)
+
 /********************************************************************************************
 
 >	BOOL AboutDlg::InitDialog()
@@ -434,7 +457,6 @@
 
 BOOL AboutDlg::InitDialog()
 {	
-	CCamApp*	Application = (CCamApp*) AfxGetApp();	// Find our main application object
 	String_64	Text1, Text2, ProdDetailed;
 
 	// add the static RETAIL version number that the user sees and that is used 
@@ -445,25 +467,26 @@
 	// the product name we display here should be the more detailed name of this product
 	// (e.g. Xara Xtreme Plus, Xara Xtreme Pro.)
 
-	ProdDetailed = _T(PRODUCT_NAME_LONG);
+	ProdDetailed = _T("Banana hammock");
 
 	Text2.MakeMsg(_R(IDS_CAMVERSION), &ProdDetailed, &Text1);
 
 	SetStringGadgetValue(_R(IDC_CAMVERSION), &Text2);		// (Camelot program version number)
 
-#ifndef STANDALONE
+/*#ifndef STANDALONE
 	Text1 = (LPCTSTR) ReleaseInfo::GetLicensee();		// (Licensee)
 	SetStringGadgetValue(_R(IDC_LICENSEE), &Text1);
 
 	Text1 = (LPCTSTR) ReleaseInfo::GetCompany();		// (Organisation)
 	SetStringGadgetValue(_R(IDC_COMPANY), &Text1);
 
-	CString		serialNumber = OpRegister::GetSerialNumber();
+	wxString	serialNumber = OpRegister::GetSerialNumber();
 	Text1 = (LPCTSTR) serialNumber;
 	SetStringGadgetValue(_R(IDC_SERIAL), &Text1);
 	// End altered.
 
-#endif
+#endif */
 
   	return TRUE; 
 }
+#endif
Index: Trunk/XaraLX/wxOil/camelot.h
===================================================================
--- Trunk/XaraLX/wxOil/camelot.h	(revision 742)
+++ Trunk/XaraLX/wxOil/camelot.h	(revision 743)
@@ -118,6 +118,9 @@
     static void EnableSystem();
 	static inline bool IsDisabled() {return s_bIsDisabled;}
 
+    // Display our about box             
+	static void DoAboutBox();
+	
     // Used to access the dialog manager             
     static DialogManager *GetDlgManager();
 
Index: Trunk/XaraLX/wxOil/camelot.cpp
===================================================================
--- Trunk/XaraLX/wxOil/camelot.cpp	(revision 742)
+++ Trunk/XaraLX/wxOil/camelot.cpp	(revision 743)
@@ -794,7 +794,29 @@
 }
 
 
+void CCamApp::DoAboutBox()
+{
+	wxString			strMessage;
 
+#if defined(__WXMSW__) || defined(__WXMAC__)
+	strMessage = wxString::Format( wxT("Xara LX
Version: %s
CDraw Version: %d.%d
Usage: XaraLX.exe [xar-file...]"), 
+		g_pszAppVersion, HIWORD(GDraw_GetVersion()), LOWORD(GDraw_GetVersion()) );
+#else
+#if FALSE == wxUSE_UNICODE
+	TCHAR*			pszCDrawVer = GDraw_GetSvnVersion();
+#else
+	TCHAR			pszCDrawVer[32];
+	mbstowcs( pszCDrawVer, GDraw_GetSvnVersion(), 31 );
+#endif
+	strMessage = wxString::Format( wxT("Xara LX
Version: " PERCENT_S " (" PERCENT_S ")
CDraw Version: %d.%d (" PERCENT_S 
+		")
Usage: XaraLX [xar-file...]"), 
+		g_pszAppVersion, g_pszSvnVersion, HIWORD(GDraw_GetVersion()), LOWORD(GDraw_GetVersion()), pszCDrawVer );
+#endif
+
+	(void)wxMessageBox( strMessage, wxT("About Xara LX") );
+}
+
+
 /***************************************************************************************************************************/
 //
 // The following is class is needed to ensure that the file menu is removed
Index: Trunk/XaraLX/wxOil/camframe.h
===================================================================
--- Trunk/XaraLX/wxOil/camframe.h	(revision 742)
+++ Trunk/XaraLX/wxOil/camframe.h	(revision 743)
@@ -168,7 +168,6 @@
 
 	void OnMenuCommand			( wxCommandEvent& event );
 
-	void OnAbout				( wxCommandEvent& event );
 	void OnZoomIn				( wxCommandEvent& event );
 	void OnZoomOut				( wxCommandEvent& event );
 	void OnZoomDrawing			( wxCommandEvent& event );
Index: Trunk/XaraLX/wxOil/camframe.cpp
===================================================================
--- Trunk/XaraLX/wxOil/camframe.cpp	(revision 742)
+++ Trunk/XaraLX/wxOil/camframe.cpp	(revision 743)
@@ -101,14 +101,6 @@
 
 #include "camtypes.h"
 
-#if defined(__WXMSW__)
-#include "wx/sysopt.h"
-#include "staticversion.h"
-#else
-#include "svnversion.h"
-#endif
-#include "gdraw.h"
-
 #include "camelot.h"
 #include "camframe.h"
 #include "camresource.h"
@@ -180,7 +172,6 @@
 
 	EVT_MENU_RANGE( AUTO_MENU_ID_MIN, AUTO_MENU_ID_MAX, CCamFrame::OnMenuCommand			)
 
-	EVT_MENU( _R(DOCVIEW_ABOUT),					CCamFrame::OnAbout						)
 	EVT_MENU( _R(DOCVIEW_ZOOMIN),					CCamFrame::OnZoomIn						)
 	EVT_MENU( _R(DOCVIEW_ZOOMOUT),					CCamFrame::OnZoomOut					)
 	EVT_MENU( _R(DOCVIEW_ZOOMDRAWING),				CCamFrame::OnZoomDrawing				)
@@ -701,28 +692,7 @@
 	event.Skip();
 }
 
-void CCamFrame::OnAbout( wxCommandEvent &WXUNUSED(event) )
-{
-	wxString			strMessage;
 
-#if defined(__WXMSW__) || defined(__WXMAC__)
-	strMessage = wxString::Format( wxT("Xara LX
Version: %s
CDraw Version: %d.%d
Usage: XaraLX.exe [xar-file...]"), 
-		g_pszAppVersion, HIWORD(GDraw_GetVersion()), LOWORD(GDraw_GetVersion()) );
-#else
-#if FALSE == wxUSE_UNICODE
-	TCHAR*			pszCDrawVer = GDraw_GetSvnVersion();
-#else
-	TCHAR			pszCDrawVer[32];
-	mbstowcs( pszCDrawVer, GDraw_GetSvnVersion(), 31 );
-#endif
-	strMessage = wxString::Format( wxT("Xara LX
Version: " PERCENT_S " (" PERCENT_S ")
CDraw Version: %d.%d (" PERCENT_S 
-		")
Usage: XaraLX [xar-file...]"), 
-		g_pszAppVersion, g_pszSvnVersion, HIWORD(GDraw_GetVersion()), LOWORD(GDraw_GetVersion()), pszCDrawVer );
-#endif
-
-	(void)wxMessageBox( strMessage, wxT("About Xara LX") );
-}
-
 /***************************************************************************************************************************/
 //
 // These event handlers are probably temporary. They are here just


Xara