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

[XaraXtreme-commits] Commit Complete



Commit by  : luke
Repository : xara
Revision   : 1729
Date       : Wed Aug 30 13:48:49 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/docview.cpp
   M /Trunk/XaraLX/Kernel/helpuser.h
   M /Trunk/XaraLX/wxOil/camelot.cpp
   M /Trunk/XaraLX/wxOil/dlgevt.cpp
   M /Trunk/XaraLX/wxOil/helpuser.cpp

Enable help in galleries (fixes BZ #1265)


Diff:
Index: Trunk/XaraLX/Kernel/docview.cpp
===================================================================
--- Trunk/XaraLX/Kernel/docview.cpp	(revision 1728)
+++ Trunk/XaraLX/Kernel/docview.cpp	(revision 1729)
@@ -5392,6 +5392,9 @@
 	
 	dcToReturn.x = dcTopLeft.x - rectSpread.lo.x; 
 	dcToReturn.y = dcTopLeft.y - rectSpread.lo.y;
+
+	TRACEUSER( "luke", _T("rcToReturn (%x, %x), dcTopLeft (%x, %x), rectSpead (%x, %x)"),
+		dcToReturn.x, dcToReturn.y, dcTopLeft.x, dcTopLeft.y, rectSpread.lo.x, rectSpread.lo.y );
 																						
 	//And return that DocCoord
 	return dcToReturn;
Index: Trunk/XaraLX/Kernel/helpuser.h
===================================================================
--- Trunk/XaraLX/Kernel/helpuser.h	(revision 1728)
+++ Trunk/XaraLX/Kernel/helpuser.h	(revision 1729)
@@ -113,7 +113,7 @@
 // These overloaded functions are passed various Camelot objects to provide user help on.
 // Each version knows how to associate a help topic index with the given object.
 BOOL HelpUser(const DialogOp& dlgop);
-BOOL HelpUser(const CDialog& dlg);
+BOOL HelpUser(const wxDialog& dlg);
 BOOL HelpUser(const OpDescriptor& opdesc);
 BOOL HelpUser(UINT32 nMessageID);
 BOOL HelpUserPropertyPage(UINT32 PageID);
Index: Trunk/XaraLX/wxOil/dlgevt.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dlgevt.cpp	(revision 1728)
+++ Trunk/XaraLX/wxOil/dlgevt.cpp	(revision 1729)
@@ -573,7 +573,7 @@
 	// as more controls come online). If so just return allowing focus to stay
 	wxWindow*	pWnd = (wxWindow*)event.GetEventObject();
 
-	TRACEUSER("amb", _T("DialogEventHandler::OnSetFocus %s"), pWnd->GetClassInfo()->GetClassName());
+	TRACEUSER("luke", _T("DialogEventHandler::OnSetFocus %s"), pWnd->GetClassInfo()->GetClassName());
 
 	if( pWnd->IsKindOf( CLASSINFO(wxTextCtrl) ) ||
 		pWnd->IsKindOf( CLASSINFO(wxSliderCombo) ) ||
@@ -581,7 +581,7 @@
 		pWnd->IsKindOf( CLASSINFO(wxOwnerDrawnComboBox) ) ||
 		pWnd->IsKindOf( CLASSINFO(wxComboCtrl) ) )
 	{
-		TRACEUSER("amb", _T("DialogEventHandler::OnSetFocus Focus undisturbed 1"));
+		TRACEUSER("luke", _T("DialogEventHandler::OnSetFocus Focus undisturbed 1"));
 		return;
 	}
 
@@ -594,7 +594,7 @@
 		{
 			if( ((wxDialog*)pWnd)->IsModal() )
 			{
-				TRACEUSER("amb", _T("Focus undisturbed 2"));
+				TRACEUSER("luke", _T("Focus undisturbed 2"));
 				return;
 			}
 
@@ -605,9 +605,9 @@
 		pWnd = pWnd->GetParent();
 	}
 
-	TRACEUSER("amb", _T("DialogEventHandler::OnSetFocus Focus back to canvas"));
+	TRACEUSER("luke", _T("DialogEventHandler::OnSetFocus Focus back to canvas"));
 	// Put the focus back into active view
-	TRACEUSER( "jlh92", _T("NO, that control is not allowed focus") );
+	TRACEUSER( "luke", _T("NO, that control is not allowed focus") );
 	AfxGetApp().GiveActiveCanvasFocus();
 }
 
@@ -630,6 +630,8 @@
 
 void DialogEventHandler::OnSetFocus(wxFocusEvent &event)
 {
+	TRACEUSER( "luke", _T("OnSetFocus") );
+	
 	// Do nothing for the time being
 	event.Skip();
 }
Index: Trunk/XaraLX/wxOil/helpuser.cpp
===================================================================
--- Trunk/XaraLX/wxOil/helpuser.cpp	(revision 1728)
+++ Trunk/XaraLX/wxOil/helpuser.cpp	(revision 1729)
@@ -257,10 +257,8 @@
 	SeeAlso:	HelpUser
 ********************************************************************************************/
 
-#if !defined(EXCLUDE_FROM_XARALX)
 static DWORD LookupOperationTopic(LPCTSTR lpcszOpName)
 {
-PORTNOTETRACE("help", "Help function unimplemented!");
 	// Check for junk.
 	ERROR3IF(lpcszOpName == NULL, "No valid OpToken in LookupOperationTopic");
 
@@ -279,7 +277,6 @@
 	// No help topic, so sorry.
 	return 0;
 }
-#endif
 
 
 
@@ -296,10 +293,8 @@
 	SeeAlso:	HelpUser
 ********************************************************************************************/
 
-#if !defined(EXCLUDE_FROM_XARALX)
 static DWORD LookupMessageTopic(UINT32 nMessageID)
 {
-PORTNOTETRACE("help", "Help function unimplemented!");
 #ifndef STANDALONE
 	// If we have no message ID then use the last one passed to MakeMsg.
 	if (nMessageID == 0) nMessageID = nNextMessageHelpContext;
@@ -325,7 +320,6 @@
 	// No help topic for this message, so sorry.
 	return 0;
 }
-#endif
 
 
 /********************************************************************************************
@@ -659,25 +653,20 @@
 	SeeAlso:	RunOilHelp; LookupDialogTopic
 ********************************************************************************************/
 
-BOOL HelpUser(const CDialog& dlg)
+BOOL HelpUser(const wxDialog& dlg)
 {
-PORTNOTETRACE("help", "Help function unimplemented!");
-#if !defined(EXCLUDE_FROM_XARALX)
 	// Look-up the class name/page ID in our list of help topics.  If we can't find it
 	// then we return a failure code.
-	DWORD dwHelpIndex = LookupDialogTopic(dlg.GetRuntimeClass()->m_lpszClassName, 0);
+	DWORD dwHelpIndex = LookupDialogTopic(dlg.GetClassInfo()->GetClassName(), 0);
 	if (dwHelpIndex == 0)
 	{
 		TRACEUSER( "Ollie", _T("Can't find help topic for the %s MFC dialog
"),
-								(LPCTSTR) dlg.GetRuntimeClass()->m_lpszClassName);
+								(LPCTSTR) dlg.GetClassInfo()->GetClassName());
 		return FALSE;
 	}
 
 	// Show this topic in the help system and return a success code.
 	return ShowHelp(HELP_CONTEXT, dwHelpIndex);
-#else
-	return FALSE;
-#endif
 }
 
 
@@ -696,8 +685,6 @@
 
 BOOL HelpUser(const OpDescriptor& opdesc)
 {
-PORTNOTETRACE("help", "Help function unimplemented!");
-#if !defined(EXCLUDE_FROM_XARALX)
 	// Check if a help topic is already recorded within the OpDescriptor.  If it isn't
 	// then we will have to look it up instead.
 /*
@@ -715,9 +702,6 @@
 
 	// Show the topic we have found.
 	return ShowHelp(HELP_CONTEXT, dwHelpIndex);
-#else
-	return FALSE;
-#endif
 }
 
 
@@ -737,8 +721,6 @@
 
 BOOL HelpUser(UINT32 nMessageID)
 {
-PORTNOTETRACE("help", "Help function unimplemented!");
-#if !defined(EXCLUDE_FROM_XARALX)
 	// Look-up the message ID in our list of help topics.  If we can't find it
 	// then return a failure code.
 	DWORD dwHelpIndex = LookupMessageTopic(nMessageID);
@@ -751,9 +733,6 @@
 
 	// Show this topic in the help system and return a success code.
 	return ShowHelp(HELP_CONTEXT, dwHelpIndex);
-#else
-	return FALSE;
-#endif
 }
 
 /********************************************************************************************
@@ -772,13 +751,8 @@
 
 BOOL HelpUserPropertyPage(UINT32 PageID)
 {
-PORTNOTETRACE("help", "Help function unimplemented!");
-#if !defined(EXCLUDE_FROM_XARALX)
 	DWORD dwHelpIndex = LookupDialogTopic(NULL, PageID);
 	return (HelpUserTopic(dwHelpIndex));
-#else
-	return FALSE;
-#endif
 }
 
 /********************************************************************************************
@@ -797,16 +771,11 @@
 
 BOOL HelpUserTopic(DWORD dwHelpIndex)
 {
-PORTNOTETRACE("help", "Help function unimplemented!");
-#if !defined(EXCLUDE_FROM_XARALX)
 	if (dwHelpIndex == 0)
 		return FALSE;
 	
 	// Show this topic in the help system and return a success code.
 	return ShowHelp(HELP_CONTEXT, dwHelpIndex);
-#else
-	return FALSE;
-#endif
 }
 
 
@@ -829,8 +798,6 @@
 
 BOOL _HelpUser(LPCTSTR lpcszClassName, UINT32 nSubTopic /* = 0 */)
 {
-PORTNOTETRACE("help", "Help function unimplemented!");
-#if !defined(EXCLUDE_FROM_XARALX)
 	DWORD dwHelpIndex = LookupDialogTopic(lpcszClassName, nSubTopic);
 	if (dwHelpIndex == 0)
 	{
@@ -840,9 +807,6 @@
 	}
 
 	return ShowHelp(HELP_CONTEXT, dwHelpIndex);
-#else
-	return FALSE;
-#endif
 }
 
 
@@ -860,21 +824,14 @@
 
 BOOL HelpContents()
 {
-
-PORTNOTETRACE("help", "Help function unimplemented!");
-#if !defined(EXCLUDE_FROM_XARALX)
 #ifndef STANDALONE
 
-#if (_MFC_VER <= 0x300)
-	#define HELP_FINDER		0xB
-#endif // MFC_VER
-
 	// If F1 was pressed, popup help in the context of the current tool. Use the tool's OpToken (of 
 	// the form "TOOL<ToolId>") to look-up its help page. Fixes #10489
 	if (KeyPress::IsKeyPressed(CAMKEY(F1)))
 	{
 		String OpToken;
-		wsprintf(OpToken, "TOOL%u", (Tool::GetCurrentID()));
+		OpToken._MakeMsg( _T("TOOL%u"), Tool::GetCurrentID() );
 		DWORD dwHelpIndex = LookupOperationTopic(OpToken);
 		return ShowHelp(HELP_CONTEXT, dwHelpIndex);
 	}
@@ -889,10 +846,6 @@
 		return ShowHelp(HELP_CONTEXT, _R(IDH_Misc_Contents));
 	#endif // WEBSTER
 #endif // STANDALONE
-#else
-	return TRUE;
-#endif // EXCLUDE_FROM_XARALX
-
 }
 
 
@@ -910,12 +863,7 @@
 
 BOOL HelpUsingHelp()
 {
-PORTNOTETRACE("help", "Help function unimplemented!");
-#if !defined(EXCLUDE_FROM_XARALX)
 	return RunOilHelp(NULL, HELP_HELPONHELP, 0);
-#else
-	return FALSE;
-#endif
 }
 
 
@@ -988,16 +936,11 @@
 
 BOOL HelpTechnicalSupport()
 {
-PORTNOTETRACE("help", "Help function unimplemented!");
-#if !defined(EXCLUDE_FROM_XARALX)
 #ifdef WEBSTER
 	return FALSE;
 #else
 	return ShowHelp(HELP_CONTEXT, _R(IDH_Misc_Tech_Support));
 #endif
-#else
-	return FALSE;
-#endif
 }
 
 
@@ -1018,13 +961,8 @@
 
 BOOL CanHelpUser(UINT32 nMessageID)
 {
-PORTNOTETRACE("help", "Help function unimplemented!");
-#if !defined(EXCLUDE_FROM_XARALX)
 	// Just return TRUE if a help topic for the message exists.
 	return LookupMessageTopic(nMessageID) != 0;
-#else
-	return FALSE;
-#endif
 }
 
 
Index: Trunk/XaraLX/wxOil/camelot.cpp
===================================================================
--- Trunk/XaraLX/wxOil/camelot.cpp	(revision 1728)
+++ Trunk/XaraLX/wxOil/camelot.cpp	(revision 1729)
@@ -290,16 +290,14 @@
 
 // useful code to see where focus events originate from. Set a breakpoint below and look
 // at the call stack
-#if 0 && defined(_DEBUG)
 	if ( event.GetEventType() == wxEVT_SET_FOCUS )
 	{
-		TRACEUSER("amb", _T("CCamApp::FilterEvent focus to %s"), pEventObject->GetClassInfo()->GetClassName());
-		if (pEventObject->IsKindOf(CLASSINFO(CRenderWnd)))
+		TRACEUSER("luke", _T("CCamApp::FilterEvent focus to %s"), pEventObject->GetClassInfo()->GetClassName());
+/*		if (pEventObject->IsKindOf(CLASSINFO(CRenderWnd)))
 		{
 			int i=1;
-		}
+		} */
 	}
-#endif
 
 	if ( event.GetEventType() == wxEVT_KILL_FOCUS )
 	{


Xara