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

[XaraXtreme-commits] Commit Complete



Commit by  : luke
Repository : xara
Revision   : 780
Date       : Thu Apr  6 10:01:45 BST 2006

Changed paths:
   M /Trunk/XaraLX/wxOil/camdoc.cpp
   M /Trunk/XaraLX/wxOil/camdoc.h
   M /Trunk/XaraLX/wxOil/menucmds.cpp

Imform user of the unimplementedness of Save & SaveAs


Diff:
Index: Trunk/XaraLX/wxOil/menucmds.cpp
===================================================================
--- Trunk/XaraLX/wxOil/menucmds.cpp	(revision 779)
+++ Trunk/XaraLX/wxOil/menucmds.cpp	(revision 780)
@@ -467,6 +467,9 @@
  			((AfxGetApp())->m_pMainWnd))->MDIGetActive()   	//Get Active Child Window
  					)->GetActiveDocument()                  	//Get Active Document
  						)->OnFileSaveAs();                   		//SaveAs Active Document
+#else
+	wxCommandEvent		event;
+	AfxGetApp().GetDocumentManager()->OnFileSaveAs( event );
 #endif
 }
 
Index: Trunk/XaraLX/wxOil/camdoc.h
===================================================================
--- Trunk/XaraLX/wxOil/camdoc.h	(revision 779)
+++ Trunk/XaraLX/wxOil/camdoc.h	(revision 780)
@@ -209,6 +209,7 @@
 	virtual bool OnSaveModified();
 	virtual bool DoSave(LPCTSTR lpszPathName, BOOL bReplace = TRUE);
 	virtual bool DeleteContents();
+	virtual bool SaveAs();
 
 	BOOL RemoveExistingDocs();
 
Index: Trunk/XaraLX/wxOil/camdoc.cpp
===================================================================
--- Trunk/XaraLX/wxOil/camdoc.cpp	(revision 779)
+++ Trunk/XaraLX/wxOil/camdoc.cpp	(revision 780)
@@ -1625,8 +1625,26 @@
 	return true;
 }
 
+
 /********************************************************************************************
 
+This overrides the default wxDocument SaveAs behaviour, initially to tell user that save 
+doesn't work, but in the longer term it will play host to the real SaveAs code
+
+********************************************************************************************/
+
+bool CCamDoc::SaveAs()
+{
+#if defined(_DEBUG)
+	return wxDocument::SaveAs();
+#else
+	wxMessageBox( _T("Save functionality has not been implemented yet. Operation not performed."), _T("Unimplemented"),
+		wxOK | wxICON_EXCLAMATION );
+#endif	
+}
+
+/********************************************************************************************
+
 >	BOOL CCamDoc::DoSave(LPCTSTR lpszPathName, BOOL bReplace)
 
 	Author:		Rik_Heywood (Xara Group Ltd) <camelotdev@xxxxxxxx>


Xara