Changeset 7613


Ignore:
Timestamp:
02/28/19 07:42:50 (4 months ago)
Author:
rohit_tandon
Message:

-> Comment can now be added only on a TODO phrase.

Location:
trunk/Obi/Obi
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Obi/Obi/ObiForm.Designer.cs

    r7609 r7613  
    138138            this.mSkippableMoveToEndNoteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 
    139139            this.mSkippableClearRoleFromNoteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 
     140            this.m_CommentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 
     141            this.m_AddViewCommentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 
     142            this.m_ClearCommentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 
    140143            this.mAutoPageGenerationMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 
    141144            this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); 
     
    166169            this.mCheckForPhrasesWithImproperAudioMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 
    167170            this.mDeleteFollowingPhrasesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 
    168             this.m_CommentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 
    169             this.m_AddViewCommentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 
    170             this.m_ClearCommentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 
    171171            this.transportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 
    172172            this.mPlayToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 
     
    816816            this.MultiPhraseOperationMenuItem, 
    817817            this.mSkippableNoteToolStripMenuItem, 
     818            this.m_CommentToolStripMenuItem, 
    818819            this.mAutoPageGenerationMenuItem, 
    819820            this.toolStripSeparator6, 
     
    826827            this.mGoToToolStripMenuItem, 
    827828            this.mCheckForPhrasesWithImproperAudioMenuItem, 
    828             this.mDeleteFollowingPhrasesToolStripMenuItem, 
    829             this.m_CommentToolStripMenuItem}); 
     829            this.mDeleteFollowingPhrasesToolStripMenuItem}); 
    830830            this.mPhrasesToolStripMenuItem.Name = "mPhrasesToolStripMenuItem"; 
    831831            resources.ApplyResources(this.mPhrasesToolStripMenuItem, "mPhrasesToolStripMenuItem"); 
     
    10231023            this.mSkippableClearRoleFromNoteToolStripMenuItem.Click += new System.EventHandler(this.mSkippableClearRoleFromNoteToolStripMenuItem_Click); 
    10241024            //  
     1025            // m_CommentToolStripMenuItem 
     1026            //  
     1027            this.m_CommentToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 
     1028            this.m_AddViewCommentToolStripMenuItem, 
     1029            this.m_ClearCommentToolStripMenuItem}); 
     1030            this.m_CommentToolStripMenuItem.Name = "m_CommentToolStripMenuItem"; 
     1031            resources.ApplyResources(this.m_CommentToolStripMenuItem, "m_CommentToolStripMenuItem"); 
     1032            //  
     1033            // m_AddViewCommentToolStripMenuItem 
     1034            //  
     1035            this.m_AddViewCommentToolStripMenuItem.Name = "m_AddViewCommentToolStripMenuItem"; 
     1036            resources.ApplyResources(this.m_AddViewCommentToolStripMenuItem, "m_AddViewCommentToolStripMenuItem"); 
     1037            this.m_AddViewCommentToolStripMenuItem.Click += new System.EventHandler(this.m_AddViewCommentToolStripMenuItem_Click); 
     1038            //  
     1039            // m_ClearCommentToolStripMenuItem 
     1040            //  
     1041            this.m_ClearCommentToolStripMenuItem.Name = "m_ClearCommentToolStripMenuItem"; 
     1042            resources.ApplyResources(this.m_ClearCommentToolStripMenuItem, "m_ClearCommentToolStripMenuItem"); 
     1043            this.m_ClearCommentToolStripMenuItem.Click += new System.EventHandler(this.m_ClearCommentToolStripMenuItem_Click); 
     1044            //  
    10251045            // mAutoPageGenerationMenuItem 
    10261046            //  
     
    12041224            this.mDeleteFollowingPhrasesToolStripMenuItem.Name = "mDeleteFollowingPhrasesToolStripMenuItem"; 
    12051225            this.mDeleteFollowingPhrasesToolStripMenuItem.Click += new System.EventHandler(this.mDeleteFollowingPhrasesToolStripMenuItem_Click); 
    1206             //  
    1207             // m_CommentToolStripMenuItem 
    1208             //  
    1209             this.m_CommentToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 
    1210             this.m_AddViewCommentToolStripMenuItem, 
    1211             this.m_ClearCommentToolStripMenuItem}); 
    1212             this.m_CommentToolStripMenuItem.Name = "m_CommentToolStripMenuItem"; 
    1213             resources.ApplyResources(this.m_CommentToolStripMenuItem, "m_CommentToolStripMenuItem"); 
    1214             //  
    1215             // m_AddViewCommentToolStripMenuItem 
    1216             //  
    1217             this.m_AddViewCommentToolStripMenuItem.Name = "m_AddViewCommentToolStripMenuItem"; 
    1218             resources.ApplyResources(this.m_AddViewCommentToolStripMenuItem, "m_AddViewCommentToolStripMenuItem"); 
    1219             this.m_AddViewCommentToolStripMenuItem.Click += new System.EventHandler(this.m_AddViewCommentToolStripMenuItem_Click); 
    1220             //  
    1221             // m_ClearCommentToolStripMenuItem 
    1222             //  
    1223             this.m_ClearCommentToolStripMenuItem.Name = "m_ClearCommentToolStripMenuItem"; 
    1224             resources.ApplyResources(this.m_ClearCommentToolStripMenuItem, "m_ClearCommentToolStripMenuItem"); 
    1225             this.m_ClearCommentToolStripMenuItem.Click += new System.EventHandler(this.m_ClearCommentToolStripMenuItem_Click); 
    12261226            //  
    12271227            // transportToolStripMenuItem 
  • trunk/Obi/Obi/ObiForm.cs

    r7609 r7613  
    23182318                                                          && !mProjectView.TransportBar.IsRecorderActive; 
    23192319                m_pasteMultiplePhrasesToolStripMenuItem.Enabled = !mProjectView.TransportBar.IsRecorderActive &&  mProjectView.CanPasteMultiplePhrases; 
    2320                 m_CommentToolStripMenuItem.Enabled =  m_AddViewCommentToolStripMenuItem.Enabled = m_ClearCommentToolStripMenuItem.Enabled = mProjectView.IsBlockSelected;                 
     2320                m_CommentToolStripMenuItem.Enabled = m_AddViewCommentToolStripMenuItem.Enabled = m_ClearCommentToolStripMenuItem.Enabled = mProjectView.IsBlockSelected && mPhrases_PhraseIsTODOMenuItem.Checked;                 
    23212321            } 
    23222322 
  • trunk/Obi/Obi/ObiForm.resx

    r7609 r7613  
    12011201    <value>&amp;Clear role from note</value> 
    12021202  </data> 
     1203  <data name="m_CommentToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> 
     1204    <value>240, 22</value> 
     1205  </data> 
     1206  <data name="m_CommentToolStripMenuItem.Text" xml:space="preserve"> 
     1207    <value>&amp;TODO Comment</value> 
     1208  </data> 
     1209  <data name="m_AddViewCommentToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> 
     1210    <value>183, 22</value> 
     1211  </data> 
     1212  <data name="m_AddViewCommentToolStripMenuItem.Text" xml:space="preserve"> 
     1213    <value>&amp;Add/View Comment</value> 
     1214  </data> 
     1215  <data name="m_ClearCommentToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> 
     1216    <value>183, 22</value> 
     1217  </data> 
     1218  <data name="m_ClearCommentToolStripMenuItem.Text" xml:space="preserve"> 
     1219    <value>&amp;Clear Comment</value> 
     1220  </data> 
    12031221  <data name="mAutoPageGenerationMenuItem.Size" type="System.Drawing.Size, System.Drawing"> 
    12041222    <value>240, 22</value> 
     
    14461464  <data name="mDeleteFollowingPhrasesToolStripMenuItem.Text" xml:space="preserve"> 
    14471465    <value>Delete &amp;following phrases</value> 
    1448   </data> 
    1449   <data name="m_CommentToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> 
    1450     <value>240, 22</value> 
    1451   </data> 
    1452   <data name="m_CommentToolStripMenuItem.Text" xml:space="preserve"> 
    1453     <value>&amp;Comment</value> 
    1454   </data> 
    1455   <data name="m_AddViewCommentToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> 
    1456     <value>183, 22</value> 
    1457   </data> 
    1458   <data name="m_AddViewCommentToolStripMenuItem.Text" xml:space="preserve"> 
    1459     <value>&amp;Add/View Comment</value> 
    1460   </data> 
    1461   <data name="m_ClearCommentToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> 
    1462     <value>183, 22</value> 
    1463   </data> 
    1464   <data name="m_ClearCommentToolStripMenuItem.Text" xml:space="preserve"> 
    1465     <value>&amp;Clear Comment</value> 
    14661466  </data> 
    14671467  <data name="transportToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> 
     
    20902090  </data> 
    20912091  <data name="&gt;&gt;mProjectView.Type" xml:space="preserve"> 
    2092     <value>Obi.ProjectView.ProjectView, Obi, Version=4.3.0.20179, Culture=neutral, PublicKeyToken=null</value> 
     2092    <value>Obi.ProjectView.ProjectView, Obi, Version=4.3.0.22986, Culture=neutral, PublicKeyToken=null</value> 
    20932093  </data> 
    20942094  <data name="&gt;&gt;mProjectView.Parent" xml:space="preserve"> 
     
    30083008    <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
    30093009  </data> 
     3010  <data name="&gt;&gt;m_CommentToolStripMenuItem.Name" xml:space="preserve"> 
     3011    <value>m_CommentToolStripMenuItem</value> 
     3012  </data> 
     3013  <data name="&gt;&gt;m_CommentToolStripMenuItem.Type" xml:space="preserve"> 
     3014    <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
     3015  </data> 
     3016  <data name="&gt;&gt;m_AddViewCommentToolStripMenuItem.Name" xml:space="preserve"> 
     3017    <value>m_AddViewCommentToolStripMenuItem</value> 
     3018  </data> 
     3019  <data name="&gt;&gt;m_AddViewCommentToolStripMenuItem.Type" xml:space="preserve"> 
     3020    <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
     3021  </data> 
     3022  <data name="&gt;&gt;m_ClearCommentToolStripMenuItem.Name" xml:space="preserve"> 
     3023    <value>m_ClearCommentToolStripMenuItem</value> 
     3024  </data> 
     3025  <data name="&gt;&gt;m_ClearCommentToolStripMenuItem.Type" xml:space="preserve"> 
     3026    <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
     3027  </data> 
    30103028  <data name="&gt;&gt;mAutoPageGenerationMenuItem.Name" xml:space="preserve"> 
    30113029    <value>mAutoPageGenerationMenuItem</value> 
     
    31763194    <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
    31773195  </data> 
    3178   <data name="&gt;&gt;m_CommentToolStripMenuItem.Name" xml:space="preserve"> 
    3179     <value>m_CommentToolStripMenuItem</value> 
    3180   </data> 
    3181   <data name="&gt;&gt;m_CommentToolStripMenuItem.Type" xml:space="preserve"> 
    3182     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
    3183   </data> 
    3184   <data name="&gt;&gt;m_AddViewCommentToolStripMenuItem.Name" xml:space="preserve"> 
    3185     <value>m_AddViewCommentToolStripMenuItem</value> 
    3186   </data> 
    3187   <data name="&gt;&gt;m_AddViewCommentToolStripMenuItem.Type" xml:space="preserve"> 
    3188     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
    3189   </data> 
    3190   <data name="&gt;&gt;m_ClearCommentToolStripMenuItem.Name" xml:space="preserve"> 
    3191     <value>m_ClearCommentToolStripMenuItem</value> 
    3192   </data> 
    3193   <data name="&gt;&gt;m_ClearCommentToolStripMenuItem.Type" xml:space="preserve"> 
    3194     <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
    3195   </data> 
    31963196  <data name="&gt;&gt;transportToolStripMenuItem.Name" xml:space="preserve"> 
    31973197    <value>transportToolStripMenuItem</value> 
  • trunk/Obi/Obi/ProjectView/Block.Designer.cs

    r7609 r7613  
    5050            this.mLabel.Click += new System.EventHandler(this.Block_Click); 
    5151            //  
    52             // m_NotePictureBox 
     52            // m_CommentPictureBox 
    5353            //  
    54             this.m_CommentPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("m_NotePictureBox.Image"))); 
     54            this.m_CommentPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("m_CommentPictureBox.Image"))); 
    5555            this.m_CommentPictureBox.Location = new System.Drawing.Point(0, 0); 
    56             this.m_CommentPictureBox.Name = "m_NotePictureBox"; 
    57             this.m_CommentPictureBox.Size = new System.Drawing.Size(12, 19); 
     56            this.m_CommentPictureBox.Name = "m_CommentPictureBox"; 
     57            this.m_CommentPictureBox.Size = new System.Drawing.Size(12, 20); 
    5858            this.m_CommentPictureBox.TabIndex = 3; 
    5959            this.m_CommentPictureBox.TabStop = false; 
  • trunk/Obi/Obi/ProjectView/Block.cs

    r7609 r7613  
    190190            else 
    191191            { 
     192                if (Node.CommentText != null && mLabel.Text.Contains("TODO") && !Node.TODO) // When todo mark is removed then comment is also removed. 
     193                { 
     194                    m_CommentPictureBox.Visible = false; 
     195                    mLabel.Location = new Point(0, mLabel.Location.Y); 
     196                    Node.CommentText = null; 
     197                } 
    192198                mLabel.Text = Node.BaseStringShort(); 
    193199                //mLabel.AccessibleName = Node.BaseString(); // commented for removing update block label threads. 
     
    198204                    mToolTip.SetToolTip(mLabel, Node.BaseStringShort()); 
    199205                } 
    200                 if (Node.CommentText != null && Node.CommentText != string.Empty) 
     206                if (Node.CommentText != null && Node.CommentText != string.Empty)  
    201207                { 
    202208                    m_CommentPictureBox.Visible = true; 
     
    206212                    mLabel.AccessibleName = GetAccessibleName + Localizer.Message("CommentAttachedFlagForAccessibleName"); 
    207213                } 
    208                 else if (Node.CommentText != null && Node.CommentText == string.Empty) 
     214                else if (Node.CommentText != null && Node.CommentText == string.Empty) // when text in the comment is removed then comment is removed. 
    209215                { 
    210216                    m_CommentPictureBox.Visible = false; 
    211217                    mLabel.Location = new Point(0, mLabel.Location.Y); 
     218                    Node.CommentText = null; 
    212219                } 
    213220                AccessibleName = mLabel.AccessibleName; 
  • trunk/Obi/Obi/ProjectView/Block.resx

    r7607 r7613  
    122122  </metadata> 
    123123  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
    124   <data name="m_NotePictureBox.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> 
     124  <data name="m_CommentPictureBox.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> 
    125125    <value> 
    126         iVBORw0KGgoAAAANSUhEUgAAAA0AAAAPCAIAAACwQdIgAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO 
    127         wwAADsMBx2+oZAAAAHRJREFUKFOFj0EOgCAMBHmIntSTL+Dm/98i+IRa0lUotjjZBGknawhpWr3k5tvw 
    128         rnh0E86or031zmbahYhUn6myVDxz975AJKb05WWXqeQrMe47sH+AJ383mwTVJx42mpDm7VdiVB9mFtXD 
    129         wAEebj4B5xiiGyecdNUDuYJyAAAAAElFTkSuQmCC 
     126        iVBORw0KGgoAAAANSUhEUgAAABAAAAAUCAYAAACEYr13AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO 
     127        xAAADsQBlSsOGwAAAFpJREFUOE9jUNro859YrLwBRPtCMYSNYYAyGp8Qpr4BuDHM2aiYpDDAhkcNGDUA 
     128        hIkzYBMWMSimggvwmE4MJs0L4PIAFVPBgE3YsymxGLcL0MMGxgfRcDmf/wBh1aWtnLwdDgAAAABJRU5E 
     129        rkJggg== 
    130130</value> 
    131131  </data> 
  • trunk/Obi/Obi/ProjectView/ContentView.cs

    r7612 r7613  
    52655265            ContextEndMarkToolStripMenuItem.Enabled = mProjectView.CanEndSpecialNote; 
    52665266            ContextPasteMultiplePhrasesToolStripMenuItem.Enabled = !mProjectView.TransportBar.IsRecorderActive && mProjectView.CanPasteMultiplePhrases && !Settings.Project_ReadOnlyMode; 
    5267             Context_CommentMenuItem.Enabled = Context_AddViewCommentMenuItem.Enabled = Context_ClearCommentMenuItem.Enabled = mProjectView.IsBlockSelected; 
     5267            Context_CommentMenuItem.Enabled = Context_AddViewCommentMenuItem.Enabled = Context_ClearCommentMenuItem.Enabled = mProjectView.IsBlockSelected && this.Context_PhraseIsTODOMenuItem.Checked; 
    52685268            } 
    52695269 
     
    59895989        public bool ShowEditLabelToAddComment() 
    59905990        { 
    5991             if (mProjectView.Selection.Node is EmptyNode && mProjectView.IsBlockSelected) 
     5991            if (mProjectView.Selection.Node is EmptyNode && mProjectView.IsBlockSelected && this.Context_PhraseIsTODOMenuItem.Checked) 
    59925992            { 
    59935993                if (this.mProjectView.TransportBar.IsPlayerActive) 
  • trunk/Obi/Obi/ProjectView/ContentView.resx

    r7609 r7613  
    327327  </data> 
    328328  <data name="Context_CommentMenuItem.Text" xml:space="preserve"> 
    329     <value>Comment</value> 
     329    <value>TODO Comment</value> 
    330330  </data> 
    331331  <data name="Context_ApplyPhraseDetectionMenuItem.Size" type="System.Drawing.Size, System.Drawing"> 
     
    575575  </data> 
    576576  <data name="mContextMenuStrip.Size" type="System.Drawing.Size, System.Drawing"> 
    577     <value>209, 732</value> 
     577    <value>209, 754</value> 
    578578  </data> 
    579579  <data name="&gt;&gt;mContextMenuStrip.Name" xml:space="preserve"> 
     
    710710  </data> 
    711711  <data name="&gt;&gt;verticalScrollToolStripContainer1.Type" xml:space="preserve"> 
    712     <value>Obi.ProjectView.VerticalScrollToolStripContainer, Obi, Version=4.3.0.20259, Culture=neutral, PublicKeyToken=null</value> 
     712    <value>Obi.ProjectView.VerticalScrollToolStripContainer, Obi, Version=4.3.0.29620, Culture=neutral, PublicKeyToken=null</value> 
    713713  </data> 
    714714  <data name="&gt;&gt;verticalScrollToolStripContainer1.Parent" xml:space="preserve"> 
     
    743743  </data> 
    744744  <data name="&gt;&gt;contentViewLabel1.Type" xml:space="preserve"> 
    745     <value>Obi.ProjectView.ContentViewLabel, Obi, Version=4.3.0.20259, Culture=neutral, PublicKeyToken=null</value> 
     745    <value>Obi.ProjectView.ContentViewLabel, Obi, Version=4.3.0.29620, Culture=neutral, PublicKeyToken=null</value> 
    746746  </data> 
    747747  <data name="&gt;&gt;contentViewLabel1.Parent" xml:space="preserve"> 
Note: See TracChangeset for help on using the changeset viewer.