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

[XaraXtreme-commits] Commit Complete



Commit by  : luke
Repository : xara
Revision   : 1739
Date       : Tue Sep  5 12:07:17 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/main2.cpp
   M /Trunk/XaraLX/Kernel/menuops.cpp
   M /Trunk/XaraLX/Kernel/menuops.h
   M /Trunk/XaraLX/wxOil/menucmds.cpp
   M /Trunk/XaraLX/wxOil/menucmds.h
   M /Trunk/XaraLX/wxOil/xrc/STANDARD_HOTKEYS.res

Make Ctrl+Tab shortcut for prev
ext document


Diff:
Index: Trunk/XaraLX/Kernel/menuops.h
===================================================================
--- Trunk/XaraLX/Kernel/menuops.h	(revision 1738)
+++ Trunk/XaraLX/Kernel/menuops.h	(revision 1739)
@@ -138,6 +138,8 @@
 #define OPTOKEN_HELPPLAYER		_T("HelpPlayer")
 #define OPTOKEN_HELPDEMOS_NATIVE _T("HelpDemosNative")
 #define OPTOKEN_HELPTECHSUPPORT	_T("HelpTechSupport")
+#define OPTOKEN_NEXTDOCUMENT	_T("NextDocument")
+#define OPTOKEN_LASTDOCUMENT	_T("LastDocument")
 
 //Graham 20/10/97
 #define OPTOKEN_FILENEW_DRAWING		_T("FileNewDrawing")
Index: Trunk/XaraLX/Kernel/menuops.cpp
===================================================================
--- Trunk/XaraLX/Kernel/menuops.cpp	(revision 1738)
+++ Trunk/XaraLX/Kernel/menuops.cpp	(revision 1739)
@@ -1587,10 +1587,14 @@
 
 void WindowOps::Do(OpDescriptor* WhichOp)
 {
-
+	if( WhichOp->Token == String( OPTOKEN_NEXTDOCUMENT ) )
+		WindowNextDcocument( true );
+	else if( WhichOp->Token == String( OPTOKEN_LASTDOCUMENT ) )
+		WindowNextDcocument( false );
+	
 	PORTNOTETRACE("other","WindowOps::Do - do nothing");
 #ifndef EXCLUDE_FROM_XARALX
-	if ((WhichOp->Token) ==  String(OPTOKEN_WINDOWNEWVIEW))
+	else if ((WhichOp->Token) ==  String(OPTOKEN_WINDOWNEWVIEW))
 		WindowNewAction(); 
 	else if ((WhichOp->Token) == String(OPTOKEN_WINDOWARRANGE))
 		WindowArrangeAction(); 
@@ -1704,7 +1708,33 @@
 												0);
 	ERRORIF(!TileOp, _R(IDE_NOMORE_MEMORY), FALSE);*/
 #endif
+	
+	// REGOP(HELP, PLAYER, HelpPlayer);
+	OpDescriptor* NextDocumentOp = new OpDescriptor(
+												0, 
+												_R(IDS_NEXTDOCUMENT),
+												CC_RUNTIME_CLASS(WindowOps), 
+												OPTOKEN_NEXTDOCUMENT,
+												WindowOps::GetState,
+												0,
+												_R(IDBBL_NEXTDOCUMENT),
+												0 );
 
+	ERRORIF(!NextDocumentOp, _R(IDE_NOMORE_MEMORY), FALSE);
+
+	// REGOP(HELP, PLAYER, HelpPlayer);
+	OpDescriptor* LastDocumentOp = new OpDescriptor(
+												0, 
+												_R(IDS_LASTDOCUMENT),
+												CC_RUNTIME_CLASS(WindowOps), 
+												OPTOKEN_LASTDOCUMENT,
+												WindowOps::GetState,
+												0,
+												_R(IDBBL_LASTDOCUMENT),
+												0 );
+
+	ERRORIF(!LastDocumentOp, _R(IDE_NOMORE_MEMORY), FALSE);
+
 	return TRUE;
 }
 
Index: Trunk/XaraLX/Kernel/main2.cpp
===================================================================
--- Trunk/XaraLX/Kernel/main2.cpp	(revision 1738)
+++ Trunk/XaraLX/Kernel/main2.cpp	(revision 1739)
@@ -370,9 +370,9 @@
 
 #ifndef EXCLUDE_FROM_XARALX
 			OpWhatsThis::Init() &&				// Register the "What's This?" help mode Operation
-			WindowOps::Init() &&				// Register Window Operations
 #endif //EXCLUDE_FROM_XARALX
 			ViewOps::Init() &&					// Register View Operations
+			WindowOps::Init() &&				// Register Window Operations
 //WEBSTER-ranbirr-12/11/96
 #ifndef WEBSTER
 #ifndef STANDALONE
Index: Trunk/XaraLX/wxOil/menucmds.cpp
===================================================================
--- Trunk/XaraLX/wxOil/menucmds.cpp	(revision 1738)
+++ Trunk/XaraLX/wxOil/menucmds.cpp	(revision 1739)
@@ -685,8 +685,37 @@
 #endif
 }
 
+
 /********************************************************************************************
 
+>	void WindowTileVertAction(); 	
+
+	Author:		Luke_Hart (Xara Group Ltd) <lukehcamelotdev@xxxxxxxx>
+	Created:	01/08/06
+	Inputs:		None
+	Outputs:	None
+	Returns:	None
+	Purpose:	Performs Window menu function switch next\last document.
+	Errors:		None
+	SeeAlso:	MenuCmds
+
+********************************************************************************************/
+
+void WindowNextDcocument( bool fForward )
+{
+// This is only needed for Linux (and maybe Mac, we'll see)
+#if defined(__WXGTK__)
+	CCamFrame*			pFrame = (CCamFrame*)AfxGetApp().GetTopWindow();
+	if( fForward )
+		pFrame->ActivateNext();
+	else
+		pFrame->ActivatePrevious();
+#endif
+}
+
+
+/********************************************************************************************
+
 >	OpState WindowCmdState()
 
 	Author:		Mario_Shamtani (Xara Group Ltd) <camelotdev@xxxxxxxx>
Index: Trunk/XaraLX/wxOil/xrc/STANDARD_HOTKEYS.res
===================================================================
--- Trunk/XaraLX/wxOil/xrc/STANDARD_HOTKEYS.res	(revision 1738)
+++ Trunk/XaraLX/wxOil/xrc/STANDARD_HOTKEYS.res	(revision 1739)
@@ -1,3 +1,6 @@
+HotKey	0x09		Constrain				"Ctrl+Tab"		"NextDocument"
+HotKey	0x09		Adjust Constrain		"Ctrl+Shift+Tab" "LastDocument"
+
 HotKey	0x41		Constrain				"Ctrl+A"		"SelectAll"
 HotKey	0x41		Adjust Constrain		"Ctrl+Shift+A"	"PasteAttributes"
 HotKey	0x42		Constrain				"Ctrl+B"		"PutToBack"
Index: Trunk/XaraLX/wxOil/menucmds.h
===================================================================
--- Trunk/XaraLX/wxOil/menucmds.h	(revision 1738)
+++ Trunk/XaraLX/wxOil/menucmds.h	(revision 1739)
@@ -180,7 +180,8 @@
 void WindowArrangeAction(); 
 void WindowCascadeAction(); 
 void WindowTileHorzAction(); 
-void WindowTileVertAction(); 
+void WindowTileVertAction();
+void WindowNextDcocument( bool fForward );
 OpState WindowCmdState(); 
 
 


Xara