[Tween-svn] [1606] 再認証後に、認証した情報を上書きできておらず実質認証されないバグ修正

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 9月 28日 (水) 22:21:37 JST


Revision: 1606
          http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1606
Author:   kiri_feather
Date:     2011-09-28 22:21:36 +0900 (Wed, 28 Sep 2011)

Log Message:
-----------
再認証後に、認証した情報を上書きできておらず実質認証されないバグ修正
t.coと他の短縮URLが混ざると、他の短縮URLが展開されないバグ修正
タブの右クリックがマウス位置で対象タブを判断できない、タブロックによるエンバグ修正

Modified Paths:
--------------
    trunk/Tween/AppendSettingDialog.vb
    trunk/Tween/ShortUrl.vb
    trunk/Tween/Tween.vb
    trunk/Tween/Tween.vbproj


-------------- next part --------------
Modified: trunk/Tween/AppendSettingDialog.vb
===================================================================
--- trunk/Tween/AppendSettingDialog.vb	2011-09-27 16:32:31 UTC (rev 1605)
+++ trunk/Tween/AppendSettingDialog.vb	2011-09-28 13:21:36 UTC (rev 1606)
@@ -2313,23 +2313,23 @@
             MessageBox.Show(My.Resources.AuthorizeButton_Click1, "Authenticate", MessageBoxButtons.OK)
             'Me.AuthStateLabel.Text = My.Resources.AuthorizeButton_Click3
             'Me.AuthUserLabel.Text = tw.Username
-            Dim flg As Boolean = False
-            For Each u In Me.AuthUserCombo.Items
-                If DirectCast(u, UserAccount).UserId = tw.UserId Then
-                    u = New UserAccount() With {.Username = tw.Username,
+            Dim idx As Integer = -1
+            Dim user = New UserAccount() With {.Username = tw.Username,
                                               .UserId = tw.UserId,
                                               .Token = tw.AccessToken,
                                               .TokenSecret = tw.AccessTokenSecret}
-                    Me.AuthUserCombo.SelectedItem = u
-                    flg = True
+            For Each u In Me.AuthUserCombo.Items
+                If DirectCast(u, UserAccount).Username.ToLower = tw.Username.ToLower Then
+                    idx = Me.AuthUserCombo.Items.IndexOf(u)
                     Exit For
                 End If
             Next
-            If Not flg Then
-                Me.AuthUserCombo.SelectedIndex = Me.AuthUserCombo.Items.Add(New UserAccount() With {.Username = tw.Username,
-                                                                   .UserId = tw.UserId,
-                                                                   .Token = tw.AccessToken,
-                                                                   .TokenSecret = tw.AccessTokenSecret})
+            If idx > -1 Then
+                Me.AuthUserCombo.Items.RemoveAt(idx)
+                Me.AuthUserCombo.Items.Insert(idx, user)
+                Me.AuthUserCombo.SelectedIndex = idx
+            Else
+                Me.AuthUserCombo.SelectedIndex = Me.AuthUserCombo.Items.Add(user)
             End If
             'If TwitterApiInfo.AccessLevel = ApiAccessLevel.ReadWrite Then
             '    Me.AuthStateLabel.Text += "(xAuth)"

Modified: trunk/Tween/ShortUrl.vb
===================================================================
--- trunk/Tween/ShortUrl.vb	2011-09-27 16:32:31 UTC (rev 1605)
+++ trunk/Tween/ShortUrl.vb	2011-09-28 13:21:36 UTC (rev 1606)
@@ -125,7 +125,7 @@
             Dim orgUrlPath As String = orgUrlMatch.Result("${path}")
             If (_isForceResolve OrElse Array.IndexOf(_ShortUrlService, orgUrl) > -1) AndAlso _
                Not urlList.Contains(orgUrl + orgUrlPath) AndAlso orgUrl <> "http://twitter.com/" Then
-                If Not tcoResolve AndAlso (orgUrl = "http://t.co/" OrElse orgUrl = "https://t.co") Then Return orgData
+                If Not tcoResolve AndAlso (orgUrl = "http://t.co/" OrElse orgUrl = "https://t.co") Then Continue For
                 SyncLock _lockObj
                     urlList.Add(orgUrl + orgUrlPath)
                 End SyncLock

Modified: trunk/Tween/Tween.vb
===================================================================
--- trunk/Tween/Tween.vb	2011-09-27 16:32:31 UTC (rev 1605)
+++ trunk/Tween/Tween.vb	2011-09-28 13:21:36 UTC (rev 1606)
@@ -3921,10 +3921,8 @@
 
     Private Sub ListTab_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListTab.MouseMove
         'タブのD&D
-        If SettingDialog.TabMouseLock Then Exit Sub
-        Dim cpos As New Point(e.X, e.Y)
 
-        If e.Button = Windows.Forms.MouseButtons.Left AndAlso _tabDrag Then
+        If Not SettingDialog.TabMouseLock AndAlso e.Button = Windows.Forms.MouseButtons.Left AndAlso _tabDrag Then
             Dim tn As String = ""
             Dim dragEnableRectangle As New Rectangle(CInt(_tabMouseDownPoint.X - (SystemInformation.DragSize.Width / 2)), CInt(_tabMouseDownPoint.Y - (SystemInformation.DragSize.Height / 2)), SystemInformation.DragSize.Width, SystemInformation.DragSize.Height)
             If Not dragEnableRectangle.Contains(e.Location) Then
@@ -3944,6 +3942,7 @@
             _tabDrag = False
         End If
 
+        Dim cpos As New Point(e.X, e.Y)
         For i As Integer = 0 To ListTab.TabPages.Count - 1
             Dim rect As Rectangle = ListTab.GetTabRect(i)
             If rect.Left <= cpos.X And cpos.X <= rect.Right And _

Modified: trunk/Tween/Tween.vbproj
===================================================================
--- trunk/Tween/Tween.vbproj	2011-09-27 16:32:31 UTC (rev 1605)
+++ trunk/Tween/Tween.vbproj	2011-09-28 13:21:36 UTC (rev 1606)
@@ -331,6 +331,7 @@
     </EmbeddedResource>
     <EmbeddedResource Include="EventViewerDialog.resx">
       <DependentUpon>EventViewerDialog.vb</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="DialogAsShieldIcon.resx">
       <DependentUpon>DialogAsShieldIcon.vb</DependentUpon>



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