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

[XaraXtreme-commits] Commit Complete



Commit by  : luke
Repository : xara
Revision   : 982
Date       : Tue May  9 15:17:38 BST 2006

Changed paths:
   M /Trunk/XaraLX/wxOil/camelot.cpp
   M /Trunk/XaraLX/wxOil/fltrdisc.cpp
   M /Trunk/XaraLX/wxOil/fltrdisc.h

1) Timestamp base key de-duplication 2) More work on plugin discovery (only because it's in-seperable)


Diff:
Index: Trunk/XaraLX/wxOil/fltrdisc.cpp
===================================================================
--- Trunk/XaraLX/wxOil/fltrdisc.cpp	(revision 981)
+++ Trunk/XaraLX/wxOil/fltrdisc.cpp	(revision 982)
@@ -110,6 +110,11 @@
 	m_pSingleInst = this;
 }
 
+void CDiscoverPlugin::ReadConfig( const wxString& strFile )
+{
+	TRACEUSER( "jlh92", _T("Read %s
"), (PCTSTR)strFile );
+}
+
 bool CDiscoverPlugin::Init()
 {
 	wxDir	dir( g_strConfigPath );
Index: Trunk/XaraLX/wxOil/fltrdisc.h
===================================================================
--- Trunk/XaraLX/wxOil/fltrdisc.h	(revision 981)
+++ Trunk/XaraLX/wxOil/fltrdisc.h	(revision 982)
@@ -110,6 +110,11 @@
 	CDiscoverPlugin();
 
 	bool Init();
+
+	static CDiscoverPlugin* GetInstance()
+	{
+		return m_pSingleInst;
+	}
 };
 
 #endif//INC_FLTRDISC_H_
Index: Trunk/XaraLX/wxOil/camelot.cpp
===================================================================
--- Trunk/XaraLX/wxOil/camelot.cpp	(revision 981)
+++ Trunk/XaraLX/wxOil/camelot.cpp	(revision 982)
@@ -120,6 +120,7 @@
 #include "camelot.h"
 
 #include "keypress.h"
+#include "fltrdisc.h"
 #include "ccdc.h"
 #include "camprofile.h"
 #include "dlgevt.h"
@@ -212,9 +213,24 @@
 
 int CCamApp::FilterEvent( wxEvent& event )
 {
+	static long	lLastTimeStamp = 0;
+
+	if( event.GetEventType() == wxEVT_CHAR )
+	{
+		wxObject* pEventObject = event.GetEventObject();
+		TRACEUSER( "jlh92", _T("KeyEvent 4 %s CH
"), 
+			((wxWindow*)pEventObject)->GetClassInfo()->GetClassName() );
+	}
+
 	if( event.GetEventType() == wxEVT_KEY_DOWN ||
 		event.GetEventType() == wxEVT_KEY_UP )
 	{
+		// Use timestamp to detect events which are passing
+		// down the chain (which we've tested)
+		if( lLastTimeStamp == event.GetTimestamp() )
+			return -1;
+		lLastTimeStamp = event.GetTimestamp();
+
 		wxObject* pEventObject = event.GetEventObject();
 		TRACEUSER( "jlh92", _T("KeyEvent 4 %s %s
"), 
 			((wxWindow*)pEventObject)->GetClassInfo()->GetClassName(),
@@ -428,6 +444,8 @@
  	if( !Camelot.Init() )
 		return false;
 
+	CDiscoverPlugin::GetInstance()->Init();
+
 	TRACET(_T("CCamApp::Calling InitKernel"));
 	// then initialise the kernel (and almost everything else)	
 	if( !InitKernel() )


Xara