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

[XaraXtreme-commits] Commit Complete



Commit by  : luke
Repository : xara
Revision   : 1194
Date       : Fri May 26 10:30:19 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/nativeop.cpp
   M /Trunk/XaraLX/wxOil/filedlgs.cpp

Half of fix for BZ #1095, Save template enabled


Diff:
Index: Trunk/XaraLX/Kernel/nativeop.cpp
===================================================================
--- Trunk/XaraLX/Kernel/nativeop.cpp	(revision 1193)
+++ Trunk/XaraLX/Kernel/nativeop.cpp	(revision 1194)
@@ -110,7 +110,7 @@
 //#include "nev.h"
 //#include "rik.h"
 #include "document.h"
-//#include "filedlgs.h"
+#include "filedlgs.h"
 //#include "oilfiles.h"
 #include <stdlib.h>
 #include <errno.h>
@@ -497,12 +497,10 @@
 	PathName pathToPutInDialog=pCamelot->GetTemplatesPath();
 	
 	//Now create the dialog
-PORTNOTE("commonfiledlg", "Removed use of Common File Dialog")
-#ifndef EXCLUDE_FROM_XARALX
 	SaveTemplateDialog dialogToDisplay(pathToPutInDialog);
 		
 	//And show it
-	if (dialogToDisplay.DoModal()==IDOK)
+	if (dialogToDisplay.ShowModal() == wxID_OK)
 	{
 		//Then get the path they specified, using this amazingly bad, confusing and
 		//undocumented file dialog code
@@ -511,7 +509,7 @@
 		PathName pathToSaveTo;
 		dialogToDisplay.GetChosenFileName(&pathToSaveTo);
 
-		String_256 cstrPathToSaveTo=pathToSaveTo.GetPath(FALSE);
+		wxString cstrPathToSaveTo=pathToSaveTo.GetPath(FALSE);
 		dialogToDisplay.AppendExtension(&cstrPathToSaveTo);
 
 		String_256 strPathToSaveTo=cstrPathToSaveTo;
@@ -548,7 +546,6 @@
 			pCamelot->SetTemplatesPath(strDefaultPath);
 		}
 	}
-#endif
 
 	// Finished the operation
 	End();
@@ -906,7 +903,7 @@
 
 OpState OpMenuSave::GetState( String_256* pUIDescription, OpDescriptor* pDesc )
 {
-	OpState OpSt( FALSE, FALSE, TRUE );
+	OpState OpSt;
 
 	return OpSt;
 }
Index: Trunk/XaraLX/wxOil/filedlgs.cpp
===================================================================
--- Trunk/XaraLX/wxOil/filedlgs.cpp	(revision 1193)
+++ Trunk/XaraLX/wxOil/filedlgs.cpp	(revision 1194)
@@ -4249,6 +4249,7 @@
 	// Select the desired path
 	if (!DefaultPath.IsEmpty())
 	{
+		TRACEUSER( "jlh92", _T("TemplDir = %s
"), PCTSTR(DefaultPath) );
 		// Set the default path
 		SetDirectory( DefaultPath );
 	}


Xara