From: <avn...@us...> - 2008-05-20 11:06:51
|
Revision: 3091 http://urakawa.svn.sourceforge.net/urakawa/?rev=3091&view=rev Author: avneeshsingh Date: 2008-05-20 04:06:18 -0700 (Tue, 20 May 2008) Log Message: ----------- Menu items updated for toggle TOC views/Content View function. Enabling / Disabling not looking perfect yet. Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ObiForm.cs trunk/urakawa/application/Obi/Obi/ObiForm.resx trunk/urakawa/application/Obi/Obi/ProjectView/ProjectView.cs Modified: trunk/urakawa/application/Obi/Obi/ObiForm.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ObiForm.cs 2008-05-20 07:26:09 UTC (rev 3090) +++ trunk/urakawa/application/Obi/Obi/ObiForm.cs 2008-05-20 11:06:18 UTC (rev 3091) @@ -326,8 +326,8 @@ mShowMetadataViewToolStripMenuItem.Enabled = mSession.HasProject; mShowTransportBarToolStripMenuItem.Enabled = mSession.HasProject; mShowStatusBarToolStripMenuItem.Enabled = true; - mFocusOnTOCViewToolStripMenuItem.Enabled = mProjectView.CanFocusOnTOCView; - mFocusOnStripsViewToolStripMenuItem.Enabled = mProjectView.CanFocusOnContentView; + mFocusOnTOCViewToolStripMenuItem.Enabled = mProjectView.CanFocusOnTOCView && !mProjectView.CanToggleFocusToContentsView ; + mFocusOnStripsViewToolStripMenuItem.Enabled = mProjectView.CanFocusOnContentView && mProjectView.CanToggleFocusToContentsView ; mFocusOnTransportBarToolStripMenuItem.Enabled = mSession.HasProject; mSynchronizeViewsToolStripMenuItem.Enabled = mSession.HasProject; mShowOnlySelectedSectionToolStripMenuItem.Enabled = mProjectView.CanShowOnlySelectedSection; @@ -358,12 +358,13 @@ private void mFocusOnTOCViewToolStripMenuItem_Click(object sender, EventArgs e) { - mProjectView.FocusOnTOCView(); + if (mProjectView != null) mProjectView.ToggleFocusBTWTOCViewAndContentsView(); } private void mFocusOnStripsViewToolStripMenuItem_Click(object sender, EventArgs e) { - mProjectView.FocusOnContentView(); + if (mProjectView != null) + mProjectView.ToggleFocusBTWTOCViewAndContentsView(); } private void mFocusOnTransportBarToolStripMenuItem_Click(object sender, EventArgs e) Modified: trunk/urakawa/application/Obi/Obi/ObiForm.resx =================================================================== --- trunk/urakawa/application/Obi/Obi/ObiForm.resx 2008-05-20 07:26:09 UTC (rev 3090) +++ trunk/urakawa/application/Obi/Obi/ObiForm.resx 2008-05-20 11:06:18 UTC (rev 3091) @@ -117,13 +117,13 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="mMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="mMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing"> <value>0, 0</value> - </metadata> + </data> <data name="mNewProjectToolStripMenuItem.AccessibleName" xml:space="preserve"> <value>New project Ctrl+N</value> </data> - <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="mNewProjectToolStripMenuItem.ImageTransparentColor" type="System.Drawing.Color, System.Drawing"> <value>Magenta</value> </data> @@ -498,10 +498,10 @@ <value>Focus on TO&C view</value> </data> <data name="mFocusOnStripsViewToolStripMenuItem.AccessibleName" xml:space="preserve"> - <value>Focus on content view F7</value> + <value>Focus on content view F6</value> </data> <data name="mFocusOnStripsViewToolStripMenuItem.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms"> - <value>F7</value> + <value>F6</value> </data> <data name="mFocusOnStripsViewToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <value>259, 22</value> @@ -1368,9 +1368,9 @@ <data name=">>mMenuStrip.ZOrder" xml:space="preserve"> <value>2</value> </data> - <metadata name="mStatusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <data name="mStatusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing"> <value>0, 606</value> - </metadata> + </data> <data name="mStatusLabel.Size" type="System.Drawing.Size, System.Drawing"> <value>0, 17</value> </data> @@ -1425,9 +1425,9 @@ <data name=">>mProjectView.ZOrder" xml:space="preserve"> <value>0</value> </data> - <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <data name="$this.Localizable" type="System.Boolean, mscorlib"> <value>True</value> - </metadata> + </data> <data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing"> <value>6, 13</value> </data> Modified: trunk/urakawa/application/Obi/Obi/ProjectView/ProjectView.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/ProjectView.cs 2008-05-20 07:26:09 UTC (rev 3090) +++ trunk/urakawa/application/Obi/Obi/ProjectView/ProjectView.cs 2008-05-20 11:06:18 UTC (rev 3091) @@ -1208,9 +1208,9 @@ { return (key == (Keys)(Keys.Control | Keys.Tab) && SelectViewsInCycle(true)) || (key == (Keys)(Keys.Control | Keys.Shift | Keys.Tab) && SelectViewsInCycle(false)) || - (key == (Keys)(Keys.F6) && ToggleFocusBTWTOCViewAndContentsView ()) || - (key == (Keys)(Keys.Shift | Keys.Space) && TogglePlayPause(UseSelection)) || - (key == Keys.Space && TogglePlayPause(UseAudioCursor)) || + (key == (Keys)(Keys.F6) && ToggleFocusBTWTOCViewAndContentsView() ) || + (key == (Keys)(Keys.Shift | Keys.Space) && TogglePlayPause(UseSelection)) || + (key == Keys.Space && TogglePlayPause(UseAudioCursor)) || base.ProcessCmdKey(ref msg, key); } @@ -1372,6 +1372,22 @@ mPanelInfoLabelButton.Text = ""; } + public bool CanToggleFocusToContentsView + { + get + { + if (mTOCView.ContainsFocus) + return true; + else if (mStripsView.ContainsFocus) + return false; + else if (mTOCView.Visible) // if neither of views has focus then check if toc is visible, if visible and focus on it + return false; + else // if neither of view has focus and TOC is not visible, focus on contents view. + return true; + } + } + + public bool ToggleFocusBTWTOCViewAndContentsView () { if (mTOCView.ContainsFocus) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |