• R/O
  • HTTP
  • SSH
  • HTTPS

open-tween: 提交

開発に使用するリポジトリ


Commit MetaInfo

修订版6ad4a7c61bd9058b0fd1a868a1f11dcfb24cfe79 (tree)
时间2014-04-20 02:04:45
作者Kimura Youichi <kim.upsilon@bucy...>
CommiterKimura Youichi

Log Message

設定画面から「FoursquareのURLからプレビューを表示する」の項目を削除

ベニュー情報の取得が非同期に行えるようになり動作に支障を来す恐れが無くなったため

更改概述

差异

--- a/OpenTween.Tests/Thumbnail/Services/FoursquareCheckinTest.cs
+++ b/OpenTween.Tests/Thumbnail/Services/FoursquareCheckinTest.cs
@@ -42,15 +42,9 @@ namespace OpenTween.Thumbnail.Services
4242 {
4343 public FoursquareCheckinTest()
4444 {
45- this.SettingsSetup();
4645 this.MyCommonSetup();
4746 }
4847
49- public void SettingsSetup()
50- {
51- AppendSettingDialog.Instance.IsPreviewFoursquare = true;
52- }
53-
5448 public void MyCommonSetup()
5549 {
5650 var mockAssembly = Substitute.For<_Assembly>();
@@ -155,32 +149,6 @@ namespace OpenTween.Thumbnail.Services
155149 }
156150
157151 [Fact]
158- public async Task GetThumbnailInfoAsync_DisabledTest()
159- {
160- var handler = new HttpMessageHandlerMock();
161- var service = new FoursquareCheckin(new HttpClient(handler));
162-
163- handler.Queue.Enqueue(async x =>
164- {
165- // このリクエストは実行されないはず
166- Assert.True(false);
167- return new HttpResponseMessage(HttpStatusCode.NotFound);
168- });
169-
170- var post = new PostClass
171- {
172- PostGeo = new PostClass.StatusGeo { },
173- };
174-
175- // 設定により無効化されている場合は何もしない
176- AppendSettingDialog.Instance.IsPreviewFoursquare = false;
177-
178- var thumb = await service.GetThumbnailInfoAsync(
179- "https://foursquare.com/checkin/hogehoge/xxxxxxxx",
180- post, CancellationToken.None);
181- }
182-
183- [Fact]
184152 public void ParseInLocation_Test()
185153 {
186154 var json = @"{
--- a/OpenTween/AppendSettingDialog.cs
+++ b/OpenTween/AppendSettingDialog.cs
@@ -56,7 +56,6 @@ namespace OpenTween
5656
5757 public bool EnableImgAzyobuziNet { get; set; }
5858 public bool ImgAzyobuziNetDisabledInDM { get; set; }
59- public bool IsPreviewFoursquare;
6059 public MapProvider MapThumbnailProvider;
6160 public int MapThumbnailHeight;
6261 public int MapThumbnailWidth;
@@ -475,7 +474,6 @@ namespace OpenTween
475474 this.HideDuplicatedRetweets = this.TweetPrvPanel.HideDuplicatedRetweetsCheck.Checked;
476475 this.EnableImgAzyobuziNet = this.CooperatePanel.EnableImgAzyobuziNetCheckBox.Checked;
477476 this.ImgAzyobuziNetDisabledInDM = this.CooperatePanel.ImgAzyobuziNetDisabledInDMCheckBox.Checked;
478- this.IsPreviewFoursquare = this.CooperatePanel.IsPreviewFoursquareCheckBox.Checked;
479477 this.MapThumbnailProvider = (MapProvider)this.CooperatePanel.MapThumbnailProviderComboBox.SelectedIndex;
480478 this.MapThumbnailHeight = int.Parse(this.CooperatePanel.MapThumbnailHeightTextBox.Text);
481479 this.MapThumbnailWidth = int.Parse(this.CooperatePanel.MapThumbnailWidthTextBox.Text);
@@ -856,7 +854,6 @@ namespace OpenTween
856854 this.TweetPrvPanel.HideDuplicatedRetweetsCheck.Checked = this.HideDuplicatedRetweets;
857855 this.CooperatePanel.EnableImgAzyobuziNetCheckBox.Checked = this.EnableImgAzyobuziNet;
858856 this.CooperatePanel.ImgAzyobuziNetDisabledInDMCheckBox.Checked = this.ImgAzyobuziNetDisabledInDM;
859- this.CooperatePanel.IsPreviewFoursquareCheckBox.Checked = this.IsPreviewFoursquare;
860857 this.CooperatePanel.MapThumbnailProviderComboBox.SelectedIndex = (int)this.MapThumbnailProvider;
861858 this.CooperatePanel.MapThumbnailHeightTextBox.Text = this.MapThumbnailHeight.ToString();
862859 this.CooperatePanel.MapThumbnailWidthTextBox.Text = this.MapThumbnailWidth.ToString();
--- a/OpenTween/Resources/ChangeLog.txt
+++ b/OpenTween/Resources/ChangeLog.txt
@@ -10,6 +10,9 @@
1010 * CHG: 使用する.NET Frameworkのバージョンが 4.0 から 4.5.1 に変更されました
1111 * CHG: 画像ファイルをD&Dした際の動作を変更しました
1212 - 投稿先がD&Dしたファイルに対応していない場合、勝手に投稿先を切り替えず、エラーダイアログを表示するだけにします
13+ * CHG: 設定画面から「FoursquareのURLからプレビューを表示する」の項目を削除しました
14+ - ベニュー情報の取得が非同期に行えるようになり動作に支障を来す恐れが無くなったため
15+ - 以前の設定に関わらずチェックインURLが含まれているツイートはサムネイルに地図が表示されるようになります
1316 * FIX: PublicSearchタブでの再検索時に、特定の条件下でエラーが発生する問題を修正 (thx @Lolitapple!)
1417 * FIX: FoursquareのチェックインURLのサムネイル表示が動作しなくなっていたのを修正
1518
--- a/OpenTween/Setting/Panel/CooperatePanel.Designer.cs
+++ b/OpenTween/Setting/Panel/CooperatePanel.Designer.cs
@@ -29,7 +29,6 @@
2929 private void InitializeComponent()
3030 {
3131 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CooperatePanel));
32- this.IsPreviewFoursquareCheckBox = new System.Windows.Forms.CheckBox();
3332 this.MapThumbnailGroupBox = new System.Windows.Forms.GroupBox();
3433 this.MapThumbnailProviderComboBox = new System.Windows.Forms.ComboBox();
3534 this.label48 = new System.Windows.Forms.Label();
@@ -49,12 +48,6 @@
4948 this.MapThumbnailGroupBox.SuspendLayout();
5049 this.SuspendLayout();
5150 //
52- // IsPreviewFoursquareCheckBox
53- //
54- resources.ApplyResources(this.IsPreviewFoursquareCheckBox, "IsPreviewFoursquareCheckBox");
55- this.IsPreviewFoursquareCheckBox.Name = "IsPreviewFoursquareCheckBox";
56- this.IsPreviewFoursquareCheckBox.UseVisualStyleBackColor = true;
57- //
5851 // MapThumbnailGroupBox
5952 //
6053 this.MapThumbnailGroupBox.Controls.Add(this.MapThumbnailProviderComboBox);
@@ -287,7 +280,6 @@
287280 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
288281 this.Controls.Add(this.ImgAzyobuziNetDisabledInDMCheckBox);
289282 this.Controls.Add(this.EnableImgAzyobuziNetCheckBox);
290- this.Controls.Add(this.IsPreviewFoursquareCheckBox);
291283 this.Controls.Add(this.MapThumbnailGroupBox);
292284 this.Controls.Add(this.Label39);
293285 this.Controls.Add(this.UserAppointUrlText);
@@ -304,7 +296,6 @@
304296
305297 #endregion
306298
307- internal System.Windows.Forms.CheckBox IsPreviewFoursquareCheckBox;
308299 internal System.Windows.Forms.GroupBox MapThumbnailGroupBox;
309300 private System.Windows.Forms.Label label48;
310301 internal System.Windows.Forms.Label Label42;
--- a/OpenTween/Setting/Panel/CooperatePanel.en.resx
+++ b/OpenTween/Setting/Panel/CooperatePanel.en.resx
@@ -118,12 +118,6 @@
118118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119 </resheader>
120120 <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
121- <data name="IsPreviewFoursquareCheckBox.Size" type="System.Drawing.Size, System.Drawing">
122- <value>239, 16</value>
123- </data>
124- <data name="IsPreviewFoursquareCheckBox.Text" xml:space="preserve">
125- <value>Get map thumbnails from Foursquare urls.</value>
126- </data>
127121 <data name="label48.Size" type="System.Drawing.Size, System.Drawing">
128122 <value>72, 12</value>
129123 </data>
--- a/OpenTween/Setting/Panel/CooperatePanel.resx
+++ b/OpenTween/Setting/Panel/CooperatePanel.resx
@@ -118,38 +118,8 @@
118118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119 </resheader>
120120 <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
121- <data name="IsPreviewFoursquareCheckBox.AutoSize" type="System.Boolean, mscorlib">
122- <value>True</value>
123- </data>
124121 <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
125- <data name="IsPreviewFoursquareCheckBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
126- <value>NoControl</value>
127- </data>
128122 <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
129- <data name="IsPreviewFoursquareCheckBox.Location" type="System.Drawing.Point, System.Drawing">
130- <value>23, 181</value>
131- </data>
132- <data name="IsPreviewFoursquareCheckBox.Size" type="System.Drawing.Size, System.Drawing">
133- <value>327, 16</value>
134- </data>
135- <data name="IsPreviewFoursquareCheckBox.TabIndex" type="System.Int32, mscorlib">
136- <value>7</value>
137- </data>
138- <data name="IsPreviewFoursquareCheckBox.Text" xml:space="preserve">
139- <value>FoursquareのURLからプレビューを表示する(非常に重くなります)</value>
140- </data>
141- <data name="&gt;&gt;IsPreviewFoursquareCheckBox.Name" xml:space="preserve">
142- <value>IsPreviewFoursquareCheckBox</value>
143- </data>
144- <data name="&gt;&gt;IsPreviewFoursquareCheckBox.Type" xml:space="preserve">
145- <value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
146- </data>
147- <data name="&gt;&gt;IsPreviewFoursquareCheckBox.Parent" xml:space="preserve">
148- <value>$this</value>
149- </data>
150- <data name="&gt;&gt;IsPreviewFoursquareCheckBox.ZOrder" xml:space="preserve">
151- <value>2</value>
152- </data>
153123 <data name="MapThumbnailProviderComboBox.Items" xml:space="preserve">
154124 <value>OpenStreetMap</value>
155125 </data>
@@ -370,7 +340,7 @@
370340 <value>473, 80</value>
371341 </data>
372342 <data name="MapThumbnailGroupBox.TabIndex" type="System.Int32, mscorlib">
373- <value>8</value>
343+ <value>7</value>
374344 </data>
375345 <data name="MapThumbnailGroupBox.Text" xml:space="preserve">
376346 <value>地図サムネイル</value>
@@ -385,7 +355,7 @@
385355 <value>$this</value>
386356 </data>
387357 <data name="&gt;&gt;MapThumbnailGroupBox.ZOrder" xml:space="preserve">
388- <value>3</value>
358+ <value>2</value>
389359 </data>
390360 <data name="Label39.AutoSize" type="System.Boolean, mscorlib">
391361 <value>True</value>
@@ -415,7 +385,7 @@
415385 <value>$this</value>
416386 </data>
417387 <data name="&gt;&gt;Label39.ZOrder" xml:space="preserve">
418- <value>4</value>
388+ <value>3</value>
419389 </data>
420390 <data name="UserAppointUrlText.Location" type="System.Drawing.Point, System.Drawing">
421391 <value>218, 102</value>
@@ -436,7 +406,7 @@
436406 <value>$this</value>
437407 </data>
438408 <data name="&gt;&gt;UserAppointUrlText.ZOrder" xml:space="preserve">
439- <value>5</value>
409+ <value>4</value>
440410 </data>
441411 <data name="ComboBoxTranslateLanguage.Items" xml:space="preserve">
442412 <value>Afrikaans</value>
@@ -829,7 +799,7 @@
829799 <value>$this</value>
830800 </data>
831801 <data name="&gt;&gt;ComboBoxTranslateLanguage.ZOrder" xml:space="preserve">
832- <value>6</value>
802+ <value>5</value>
833803 </data>
834804 <data name="Label29.AutoSize" type="System.Boolean, mscorlib">
835805 <value>True</value>
@@ -859,7 +829,7 @@
859829 <value>$this</value>
860830 </data>
861831 <data name="&gt;&gt;Label29.ZOrder" xml:space="preserve">
862- <value>7</value>
832+ <value>6</value>
863833 </data>
864834 <data name="CheckNicoms.AutoSize" type="System.Boolean, mscorlib">
865835 <value>True</value>
@@ -889,7 +859,7 @@
889859 <value>$this</value>
890860 </data>
891861 <data name="&gt;&gt;CheckNicoms.ZOrder" xml:space="preserve">
892- <value>8</value>
862+ <value>7</value>
893863 </data>
894864 <data name="EnableImgAzyobuziNetCheckBox.AutoSize" type="System.Boolean, mscorlib">
895865 <value>True</value>
--- a/OpenTween/Setting/SettingCommon.cs
+++ b/OpenTween/Setting/SettingCommon.cs
@@ -205,7 +205,6 @@ namespace OpenTween
205205 public bool HideDuplicatedRetweets = false;
206206 public bool EnableImgAzyobuziNet = true;
207207 public bool ImgAzyobuziNetDisabledInDM = true;
208- public bool IsPreviewFoursquare = false;
209208 public int MapThumbnailHeight = 200;
210209 public int MapThumbnailWidth = 200;
211210 public int MapThumbnailZoom = 15;
--- a/OpenTween/Thumbnail/Services/FoursquareCheckin.cs
+++ b/OpenTween/Thumbnail/Services/FoursquareCheckin.cs
@@ -53,9 +53,6 @@ namespace OpenTween.Thumbnail.Services
5353
5454 public override async Task<ThumbnailInfo> GetThumbnailInfoAsync(string url, PostClass post, CancellationToken token)
5555 {
56- if (!AppendSettingDialog.Instance.IsPreviewFoursquare)
57- return null;
58-
5956 // ツイートに位置情報が付与されている場合は何もしない
6057 if (post.PostGeo.Lat != 0 || post.PostGeo.Lng != 0)
6158 return null;
--- a/OpenTween/Tween.cs
+++ b/OpenTween/Tween.cs
@@ -921,7 +921,6 @@ namespace OpenTween
921921
922922 SettingDialog.EnableImgAzyobuziNet = _cfgCommon.EnableImgAzyobuziNet;
923923 SettingDialog.ImgAzyobuziNetDisabledInDM = _cfgCommon.ImgAzyobuziNetDisabledInDM;
924- SettingDialog.IsPreviewFoursquare = _cfgCommon.IsPreviewFoursquare;
925924 SettingDialog.MapThumbnailProvider = _cfgCommon.MapThumbnailProvider;
926925 SettingDialog.MapThumbnailHeight = _cfgCommon.MapThumbnailHeight;
927926 SettingDialog.MapThumbnailWidth = _cfgCommon.MapThumbnailWidth;
@@ -7859,7 +7858,6 @@ namespace OpenTween
78597858 _cfgCommon.HideDuplicatedRetweets = SettingDialog.HideDuplicatedRetweets;
78607859 _cfgCommon.EnableImgAzyobuziNet = SettingDialog.EnableImgAzyobuziNet;
78617860 _cfgCommon.ImgAzyobuziNetDisabledInDM = SettingDialog.ImgAzyobuziNetDisabledInDM;
7862- _cfgCommon.IsPreviewFoursquare = SettingDialog.IsPreviewFoursquare;
78637861 _cfgCommon.MapThumbnailProvider = SettingDialog.MapThumbnailProvider;
78647862 _cfgCommon.MapThumbnailHeight = SettingDialog.MapThumbnailHeight;
78657863 _cfgCommon.MapThumbnailWidth = SettingDialog.MapThumbnailWidth;
Show on old repository browser