[Tween-svn] [1275] Shift + ] で候補が無い場合に ] と同じ動作をするように変更したが、何もしないように変更。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 12月 29日 (水) 08:54:31 JST


Revision: 1275
          http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1275
Author:   anis774
Date:     2010-12-29 08:54:31 +0900 (Wed, 29 Dec 2010)

Log Message:
-----------
Shift + ]で候補が無い場合に]と同じ動作をするように変更したが、何もしないように変更。

Modified Paths:
--------------
    trunk/Tween/Tween.vb


-------------- next part --------------
Modified: trunk/Tween/Tween.vb
===================================================================
--- trunk/Tween/Tween.vb	2010-12-28 12:38:58 UTC (rev 1274)
+++ trunk/Tween/Tween.vb	2010-12-28 23:54:31 UTC (rev 1275)
@@ -5614,69 +5614,73 @@
         Dim curTabClass As TabClass = _statuses.Tabs(_curTab.Text)
         Dim curTabPosts As Dictionary(Of Long, PostClass) = DirectCast(IIf(curTabClass.IsInnerStorageTabType, curTabClass.Posts, _statuses.Posts), Dictionary(Of Long, PostClass))
 
-        If isShiftKeyPress AndAlso _curPost.InReplyToId <> 0 Then
-            Dim posts = From t In _statuses.Tabs
-                        From p In DirectCast(IIf(t.Value.IsInnerStorageTabType, t.Value.Posts, _statuses.Posts), Dictionary(Of Long, PostClass))
-                        Where p.Value.Id <> _curPost.Id AndAlso p.Value.InReplyToId = _curPost.InReplyToId
-                        Let indexOf = t.Value.IndexOf(p.Value.Id)
-                        Where indexOf > -1
-                        Order By indexOf
-                        Order By t.Value IsNot curTabClass
-                        Select New With {.Tab = t.Value, .Post = p.Value, .Index = indexOf}
-            Try
-                Dim postList = posts.ToList()
-                For i As Integer = postList.Count - 1 To 0 Step -1
-                    Dim index As Integer = i
-                    If postList.FindIndex(Function(pst) pst.Post.Id = postList(index).Post.Id) <> index Then
-                        postList.RemoveAt(index)
+        If isShiftKeyPress Then
+            If _curPost.InReplyToId <> 0 Then
+                Dim posts = From t In _statuses.Tabs
+                            From p In DirectCast(IIf(t.Value.IsInnerStorageTabType, t.Value.Posts, _statuses.Posts), Dictionary(Of Long, PostClass))
+                            Where p.Value.Id <> _curPost.Id AndAlso p.Value.InReplyToId = _curPost.InReplyToId
+                            Let indexOf = t.Value.IndexOf(p.Value.Id)
+                            Where indexOf > -1
+                            Order By indexOf
+                            Order By t.Value IsNot curTabClass
+                            Select New With {.Tab = t.Value, .Post = p.Value, .Index = indexOf}
+                Try
+                    Dim postList = posts.ToList()
+                    For i As Integer = postList.Count - 1 To 0 Step -1
+                        Dim index As Integer = i
+                        If postList.FindIndex(Function(pst) pst.Post.Id = postList(index).Post.Id) <> index Then
+                            postList.RemoveAt(index)
+                        End If
+                    Next
+                    Dim post = postList.FirstOrDefault(Function(pst) pst.Tab Is curTabClass AndAlso pst.Index > _curItemIndex)
+                    If post Is Nothing Then post = postList.FirstOrDefault(Function(pst) pst.Tab IsNot curTabClass)
+                    If post Is Nothing Then post = postList.First()
+                    Me.ListTab.SelectTab(Me.ListTab.TabPages.Cast(Of TabPage).First(Function(tp) tp.Text = post.Tab.TabName))
+                    Dim listView = DirectCast(Me.ListTab.SelectedTab.Tag, DetailsListView)
+                    SelectListItem(listView, post.Index)
+                    listView.EnsureVisible(post.Index)
+                Catch ex As InvalidOperationException
+                    Exit Sub
+                End Try
+            End If
+        Else
+            If replyChains Is Nothing OrElse replyChains.Count < 1 Then
+                Dim posts = From t In _statuses.Tabs
+                            From p In DirectCast(IIf(t.Value.IsInnerStorageTabType, t.Value.Posts, _statuses.Posts), Dictionary(Of Long, PostClass))
+                            Where p.Value.InReplyToId = _curPost.Id
+                            Let indexOf = t.Value.IndexOf(p.Value.Id)
+                            Where indexOf > -1
+                            Order By indexOf
+                            Order By t.Value IsNot curTabClass
+                            Select New With {.Tab = t.Value, .Index = indexOf}
+                Try
+                    Dim post = posts.First()
+                    Me.ListTab.SelectTab(Me.ListTab.TabPages.Cast(Of TabPage).First(Function(tp) tp.Text = post.Tab.TabName))
+                    Dim listView = DirectCast(Me.ListTab.SelectedTab.Tag, DetailsListView)
+                    SelectListItem(listView, post.Index)
+                    listView.EnsureVisible(post.Index)
+                Catch ex As InvalidOperationException
+                    Exit Sub
+                End Try
+            Else
+                Dim chainHead As ReplyChain = replyChains.Pop()
+                If chainHead.InReplyToId = _curPost.Id Then
+                    Dim idx As Integer = _statuses.Tabs(chainHead.OriginalTab.Text).IndexOf(chainHead.OriginalId)
+                    If idx = -1 Then
+                        replyChains = Nothing
+                    Else
+                        Try
+                            ListTab.SelectTab(chainHead.OriginalTab)
+                        Catch ex As Exception
+                            replyChains = Nothing
+                        End Try
+                        SelectListItem(_curList, idx)
+                        _curList.EnsureVisible(idx)
                     End If
-                Next
-                Dim post = postList.FirstOrDefault(Function(pst) pst.Tab Is curTabClass AndAlso pst.Index > _curItemIndex)
-                If post Is Nothing Then post = postList.FirstOrDefault(Function(pst) pst.Tab IsNot curTabClass)
-                If post Is Nothing Then post = postList.First()
-                Me.ListTab.SelectTab(Me.ListTab.TabPages.Cast(Of TabPage).First(Function(tp) tp.Text = post.Tab.TabName))
-                Dim listView = DirectCast(Me.ListTab.SelectedTab.Tag, DetailsListView)
-                SelectListItem(listView, post.Index)
-                listView.EnsureVisible(post.Index)
-            Catch ex As InvalidOperationException
-                Exit Sub
-            End Try
-        ElseIf replyChains Is Nothing OrElse replyChains.Count < 1 Then
-            Dim posts = From t In _statuses.Tabs
-                        From p In DirectCast(IIf(t.Value.IsInnerStorageTabType, t.Value.Posts, _statuses.Posts), Dictionary(Of Long, PostClass))
-                        Where p.Value.InReplyToId = _curPost.Id
-                        Let indexOf = t.Value.IndexOf(p.Value.Id)
-                        Where indexOf > -1
-                        Order By indexOf
-                        Order By t.Value IsNot curTabClass
-                        Select New With {.Tab = t.Value, .Index = indexOf}
-            Try
-                Dim post = posts.First()
-                Me.ListTab.SelectTab(Me.ListTab.TabPages.Cast(Of TabPage).First(Function(tp) tp.Text = post.Tab.TabName))
-                Dim listView = DirectCast(Me.ListTab.SelectedTab.Tag, DetailsListView)
-                SelectListItem(listView, post.Index)
-                listView.EnsureVisible(post.Index)
-            Catch ex As InvalidOperationException
-                Exit Sub
-            End Try
-        Else
-            Dim chainHead As ReplyChain = replyChains.Pop()
-            If chainHead.InReplyToId = _curPost.Id Then
-                Dim idx As Integer = _statuses.Tabs(chainHead.OriginalTab.Text).IndexOf(chainHead.OriginalId)
-                If idx = -1 Then
+                Else
                     replyChains = Nothing
-                Else
-                    Try
-                        ListTab.SelectTab(chainHead.OriginalTab)
-                    Catch ex As Exception
-                        replyChains = Nothing
-                    End Try
-                    SelectListItem(_curList, idx)
-                    _curList.EnsureVisible(idx)
+                    Me.GoBackInReplyToPost(isShiftKeyPress)
                 End If
-            Else
-                replyChains = Nothing
-                Me.GoBackInReplyToPost(isShiftKeyPress)
             End If
         End If
     End Sub



Tween-svn メーリングリストの案内
Back to archive index