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

[XaraXtreme-dev] [Fwd: [XaraXtreme-commits] Commit Complete]



Forgot to mention that this will force a re-build (new wx header in stdwx.h>
--- Begin Message ---
Commit by  : luke
Repository : xara
Revision   : 1281
Date       : Fri Jun  9 10:25:27 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/menuops.cpp
   M /Trunk/XaraLX/wxOil/menucmds.cpp
   M /Trunk/XaraLX/wxOil/stdwx.h

Add code to call mplayer from help menu


Diff:
Index: Trunk/XaraLX/Kernel/menuops.cpp
===================================================================
--- Trunk/XaraLX/Kernel/menuops.cpp	(revision 1280)
+++ Trunk/XaraLX/Kernel/menuops.cpp	(revision 1281)
@@ -1580,8 +1580,6 @@
 
 
 	// REGOP(HELP, DEMOS, HelpOps);
-PORTNOTE("movies", "Removed use of movies until we have some")
-#if 0
 	OpDescriptor* DemosOp = new OpDescriptor(
 												0, 
 												_R(IDS_HELP_MOVIES),
@@ -1593,7 +1591,6 @@
 												0 );
 
 	ERRORIF(!DemosOp, _R(IDE_NOMORE_MEMORY), FALSE);
-#endif
 
 	//Webster_Ranbir_12	\96
 #ifdef INC_WEB_MENU_ITEMS
Index: Trunk/XaraLX/wxOil/menucmds.cpp
===================================================================
--- Trunk/XaraLX/wxOil/menucmds.cpp	(revision 1280)
+++ Trunk/XaraLX/wxOil/menucmds.cpp	(revision 1281)
@@ -107,9 +107,11 @@
 #include "camtypes.h" 
 //#include <afxext.h>
 
+#include <wx/mediactrl.h>
+
 #include "menucmds.h"
 #include "camelot.h"
-//#include "mainfrm.h"
+#include "camframe.h"
 #include "camdoc.h"
 //#include "camvw.h"
 #include "ensure.h"
@@ -875,7 +877,36 @@
 
 void HelpDemosAction()
 {
-	HelpOnlineDemos();
+#if 1
+	wxString			strVideoPath( br_find_data_dir( "/usr/share" ), wxConvUTF8 );
+	if( !wxDir::Exists( strVideoPath ) )
+	{
+#if defined(_DEBUG)
+		// We'll try default location under debug to make life easier
+		strVideoPath = _T("/usr/share");
+#endif
+	}
+
+	wxString			strBinaryPath( strVideoPath );
+	strBinaryPath += _("/xaralx/bin");
+	strVideoPath += _("/xaralx/video");
+
+	wxString			strCommand( strBinaryPath + _T("/mplayer -slave \"") );
+	strCommand += strVideoPath + _T("/Part 1 master inc audio smaller_q35_fr15_hi.ogm\"");
+
+	TRACEUSER( "jlh92", _T("Executing %s
"), PCTSTR(strCommand) );
+
+	wxProcess* pProcess = new wxProcess;
+	wxExecute( strCommand, wxEXEC_SYNC, pProcess );
+#else
+	wxWindow*		pWnd	= new wxTopLevelWindow( CCamFrame::GetMainFrame(), wxID_ANY, _T("Demo Video") );
+	wxSizer*		pSizer	= new wxBoxSizer( wxHORIZONTAL );
+	wxMediaCtrl*	pMedia	= new wxMediaCtrl( pWnd, wxID_ANY, _T("AbsBegin.ogm") );
+	pSizer->Add( pMedia );
+	pMedia->Play();
+	pWnd->SetSizer( pSizer );
+#endif
+//	HelpOnlineDemos();
 }
 
 
Index: Trunk/XaraLX/wxOil/stdwx.h
===================================================================
--- Trunk/XaraLX/wxOil/stdwx.h	(revision 1280)
+++ Trunk/XaraLX/wxOil/stdwx.h	(revision 1281)
@@ -132,6 +132,7 @@
 #include <wx/wxchar.h>
 #include <wx/wxprec.h>
 #include <wx/propdlg.h>
+#include <wx/process.h>
 #include <wx/xrc/xh_all.h>
 #include <wx/xrc/xmlres.h>
 #if wxUSE_LISTBOOK


Xara

--- End Message ---