• R/O
  • HTTP
  • SSH
  • HTTPS

open-tween: Commit

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


Commit MetaInfo

Revisionae9706a48eddf7009ea54d9af333f43f8d974a3c (tree)
Time2018-10-28 10:43:54
AuthorKimura Youichi <kim.upsilon@bucy...>
CommiterKimura Youichi

Log Message

アップデート通知に「このバージョンを無視」機能を追加

Change Summary

Incremental Difference

--- a/OpenTween/Resources/ChangeLog.txt
+++ b/OpenTween/Resources/ChangeLog.txt
@@ -6,6 +6,7 @@
66 * NEW: Twemoji 11.2.0 に対応しました
77 - Unicode 11.0 で追加された絵文字が表示されるようになります
88 * NEW: ツイートの投稿に失敗し再試行せずにキャンセルした場合は、発言入力欄に未投稿のテキストを復元します
9+ * NEW: アップデート通知のダイアログに「このバージョンを無視」ボタンを追加しました
910 * FIX: ユーザー情報ダイアログでbioに絵文字を含む場合にハッシュタグやメンションのリンク範囲がずれる不具合を修正
1011 * FIX: 投稿時取得の設定がオンの場合に、投稿したRTがタイムラインに反映されないことがある不具合を修正
1112
--- a/OpenTween/Setting/SettingCommon.cs
+++ b/OpenTween/Setting/SettingCommon.cs
@@ -242,6 +242,17 @@ namespace OpenTween
242242
243243 /// <summary>pic.twitter.com への画像アップロード時に JPEG への変換を回避する</summary>
244244 public bool AlphaPNGWorkaround { get; set; } = false;
245+
246+ /// <summary>アップデート通知を無視するバージョン番号</summary>
247+ [XmlIgnore]
248+ public Version SkipUpdateVersion
249+ {
250+ get => string.IsNullOrEmpty(this.SkipUpdateVersionStr) ? null : Version.Parse(this.SkipUpdateVersionStr);
251+ set => this.SkipUpdateVersionStr = value == null ? "" : value.ToString();
252+ }
253+
254+ [XmlElement(ElementName = nameof(SkipUpdateVersion))]
255+ public string SkipUpdateVersionStr { get; set; }
245256 }
246257
247258 public class UserAccount
--- a/OpenTween/Tween.cs
+++ b/OpenTween/Tween.cs
@@ -5612,6 +5612,9 @@ namespace OpenTween
56125612 return;
56135613 }
56145614
5615+ if (startup && versionInfo.Version <= SettingManager.Common.SkipUpdateVersion)
5616+ return;
5617+
56155618 using (var dialog = new UpdateDialog())
56165619 {
56175620 dialog.SummaryText = string.Format(Properties.Resources.CheckNewVersionText3,
@@ -5622,6 +5625,11 @@ namespace OpenTween
56225625 {
56235626 await this.OpenUriInBrowserAsync(versionInfo.DownloadUri.OriginalString);
56245627 }
5628+ else if (dialog.SkipButtonPressed)
5629+ {
5630+ SettingManager.Common.SkipUpdateVersion = versionInfo.Version;
5631+ this.ModifySettingCommon = true;
5632+ }
56255633 }
56265634 }
56275635 catch (Exception)
--- a/OpenTween/UpdateDialog.Designer.cs
+++ b/OpenTween/UpdateDialog.Designer.cs
@@ -32,11 +32,10 @@
3232 this.TextDetail = new System.Windows.Forms.TextBox();
3333 this.LabelSummary = new System.Windows.Forms.Label();
3434 this.PictureBox1 = new System.Windows.Forms.PictureBox();
35- this.TableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
3635 this.YesButton = new System.Windows.Forms.Button();
3736 this.NoButton = new System.Windows.Forms.Button();
37+ this.SkipButton = new System.Windows.Forms.Button();
3838 ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).BeginInit();
39- this.TableLayoutPanel1.SuspendLayout();
4039 this.SuspendLayout();
4140 //
4241 // TextDetail
@@ -56,13 +55,6 @@
5655 this.PictureBox1.Name = "PictureBox1";
5756 this.PictureBox1.TabStop = false;
5857 //
59- // TableLayoutPanel1
60- //
61- resources.ApplyResources(this.TableLayoutPanel1, "TableLayoutPanel1");
62- this.TableLayoutPanel1.Controls.Add(this.YesButton, 0, 0);
63- this.TableLayoutPanel1.Controls.Add(this.NoButton, 1, 0);
64- this.TableLayoutPanel1.Name = "TableLayoutPanel1";
65- //
6658 // YesButton
6759 //
6860 resources.ApplyResources(this.YesButton, "YesButton");
@@ -77,16 +69,25 @@
7769 this.NoButton.Name = "NoButton";
7870 this.NoButton.Click += new System.EventHandler(this.NoButton_Click);
7971 //
72+ // SkipButton
73+ //
74+ resources.ApplyResources(this.SkipButton, "SkipButton");
75+ this.SkipButton.DialogResult = System.Windows.Forms.DialogResult.Ignore;
76+ this.SkipButton.Name = "SkipButton";
77+ this.SkipButton.Click += new System.EventHandler(this.SkipButton_Click);
78+ //
8079 // UpdateDialog
8180 //
8281 this.AcceptButton = this.YesButton;
8382 resources.ApplyResources(this, "$this");
8483 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
8584 this.CancelButton = this.NoButton;
85+ this.Controls.Add(this.SkipButton);
86+ this.Controls.Add(this.NoButton);
87+ this.Controls.Add(this.YesButton);
8688 this.Controls.Add(this.TextDetail);
8789 this.Controls.Add(this.LabelSummary);
8890 this.Controls.Add(this.PictureBox1);
89- this.Controls.Add(this.TableLayoutPanel1);
9091 this.MaximizeBox = false;
9192 this.MinimizeBox = false;
9293 this.Name = "UpdateDialog";
@@ -95,7 +96,6 @@
9596 this.TopMost = true;
9697 this.Shown += new System.EventHandler(this.UpdateDialog_Shown);
9798 ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).EndInit();
98- this.TableLayoutPanel1.ResumeLayout(false);
9999 this.ResumeLayout(false);
100100 this.PerformLayout();
101101
@@ -106,8 +106,8 @@
106106 internal System.Windows.Forms.TextBox TextDetail;
107107 internal System.Windows.Forms.Label LabelSummary;
108108 internal System.Windows.Forms.PictureBox PictureBox1;
109- internal System.Windows.Forms.TableLayoutPanel TableLayoutPanel1;
110109 internal System.Windows.Forms.Button YesButton;
111110 internal System.Windows.Forms.Button NoButton;
111+ internal System.Windows.Forms.Button SkipButton;
112112 }
113113 }
\ No newline at end of file
--- a/OpenTween/UpdateDialog.cs
+++ b/OpenTween/UpdateDialog.cs
@@ -50,6 +50,8 @@ namespace OpenTween
5050 set => this.TextDetail.Text = value;
5151 }
5252
53+ public bool SkipButtonPressed { get; set; } = false;
54+
5355 public UpdateDialog()
5456 {
5557 InitializeComponent();
@@ -66,5 +68,8 @@ namespace OpenTween
6668
6769 private void UpdateDialog_Shown(object sender, EventArgs e)
6870 => this.TextDetail.SelectionLength = 0; // デフォルトではテキストが全選択されるため抑制
71+
72+ private void SkipButton_Click(object sender, EventArgs e)
73+ => this.SkipButtonPressed = true;
6974 }
7075 }
--- a/OpenTween/UpdateDialog.en.resx
+++ b/OpenTween/UpdateDialog.en.resx
@@ -121,7 +121,10 @@
121121 <value>&amp;Yes</value>
122122 </data>
123123 <data name="NoButton.Text" xml:space="preserve">
124- <value>&amp;No</value>
124+ <value>Remind Me &amp;Later</value>
125+ </data>
126+ <data name="SkipButton.Text" xml:space="preserve">
127+ <value>&amp;Skip This Version</value>
125128 </data>
126129 <data name="$this.Text" xml:space="preserve">
127130 <value>%AppName% Update Check</value>
--- a/OpenTween/UpdateDialog.resx
+++ b/OpenTween/UpdateDialog.resx
@@ -125,6 +125,9 @@
125125 <data name="TextDetail.Location" type="System.Drawing.Point, System.Drawing">
126126 <value>13, 67</value>
127127 </data>
128+ <data name="TextDetail.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
129+ <value>3, 3, 3, 8</value>
130+ </data>
128131 <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
129132 <data name="TextDetail.Multiline" type="System.Boolean, mscorlib">
130133 <value>True</value>
@@ -133,10 +136,10 @@
133136 <value>Both</value>
134137 </data>
135138 <data name="TextDetail.Size" type="System.Drawing.Size, System.Drawing">
136- <value>427, 122</value>
139+ <value>535, 164</value>
137140 </data>
138141 <data name="TextDetail.TabIndex" type="System.Int32, mscorlib">
139- <value>0</value>
142+ <value>1</value>
140143 </data>
141144 <data name="TextDetail.Text" xml:space="preserve">
142145 <value>Details</value>
@@ -151,7 +154,7 @@
151154 <value>$this</value>
152155 </data>
153156 <data name="&gt;&gt;TextDetail.ZOrder" xml:space="preserve">
154- <value>0</value>
157+ <value>3</value>
155158 </data>
156159 <data name="LabelSummary.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
157160 <value>Top, Left, Right</value>
@@ -160,7 +163,7 @@
160163 <value>75, 13</value>
161164 </data>
162165 <data name="LabelSummary.Size" type="System.Drawing.Size, System.Drawing">
163- <value>365, 48</value>
166+ <value>473, 48</value>
164167 </data>
165168 <data name="LabelSummary.TabIndex" type="System.Int32, mscorlib">
166169 <value>0</value>
@@ -181,7 +184,7 @@
181184 <value>$this</value>
182185 </data>
183186 <data name="&gt;&gt;LabelSummary.ZOrder" xml:space="preserve">
184- <value>1</value>
187+ <value>4</value>
185188 </data>
186189 <data name="PictureBox1.Location" type="System.Drawing.Point, System.Drawing">
187190 <value>13, 13</value>
@@ -205,25 +208,19 @@
205208 <value>$this</value>
206209 </data>
207210 <data name="&gt;&gt;PictureBox1.ZOrder" xml:space="preserve">
208- <value>2</value>
209- </data>
210- <data name="TableLayoutPanel1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
211- <value>Bottom, Right</value>
212- </data>
213- <data name="TableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
214- <value>2</value>
211+ <value>5</value>
215212 </data>
216213 <data name="YesButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
217- <value>None</value>
214+ <value>Bottom, Right</value>
218215 </data>
219216 <data name="YesButton.Location" type="System.Drawing.Point, System.Drawing">
220- <value>5, 9</value>
217+ <value>194, 242</value>
221218 </data>
222219 <data name="YesButton.Size" type="System.Drawing.Size, System.Drawing">
223220 <value>80, 26</value>
224221 </data>
225222 <data name="YesButton.TabIndex" type="System.Int32, mscorlib">
226- <value>1</value>
223+ <value>2</value>
227224 </data>
228225 <data name="YesButton.Text" xml:space="preserve">
229226 <value>はい (&amp;Y)</value>
@@ -238,25 +235,25 @@
238235 <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
239236 </data>
240237 <data name="&gt;&gt;YesButton.Parent" xml:space="preserve">
241- <value>TableLayoutPanel1</value>
238+ <value>$this</value>
242239 </data>
243240 <data name="&gt;&gt;YesButton.ZOrder" xml:space="preserve">
244- <value>0</value>
241+ <value>2</value>
245242 </data>
246243 <data name="NoButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
247- <value>None</value>
244+ <value>Bottom, Right</value>
248245 </data>
249246 <data name="NoButton.Location" type="System.Drawing.Point, System.Drawing">
250- <value>95, 9</value>
247+ <value>430, 242</value>
251248 </data>
252249 <data name="NoButton.Size" type="System.Drawing.Size, System.Drawing">
253- <value>80, 26</value>
250+ <value>118, 26</value>
254251 </data>
255252 <data name="NoButton.TabIndex" type="System.Int32, mscorlib">
256- <value>2</value>
253+ <value>4</value>
257254 </data>
258255 <data name="NoButton.Text" xml:space="preserve">
259- <value>いいえ (&amp;N)</value>
256+ <value>後で通知 (&amp;L)</value>
260257 </data>
261258 <data name="&gt;&gt;NoButton.Name" xml:space="preserve">
262259 <value>NoButton</value>
@@ -265,37 +262,40 @@
265262 <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
266263 </data>
267264 <data name="&gt;&gt;NoButton.Parent" xml:space="preserve">
268- <value>TableLayoutPanel1</value>
265+ <value>$this</value>
269266 </data>
270267 <data name="&gt;&gt;NoButton.ZOrder" xml:space="preserve">
271268 <value>1</value>
272269 </data>
273- <data name="TableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
274- <value>259, 195</value>
270+ <data name="SkipButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
271+ <value>Bottom, Right</value>
275272 </data>
276- <data name="TableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
277- <value>1</value>
273+ <data name="SkipButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
274+ <value>NoControl</value>
278275 </data>
279- <data name="TableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
280- <value>181, 44</value>
276+ <data name="SkipButton.Location" type="System.Drawing.Point, System.Drawing">
277+ <value>280, 242</value>
281278 </data>
282- <data name="TableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
283- <value>1</value>
279+ <data name="SkipButton.Size" type="System.Drawing.Size, System.Drawing">
280+ <value>144, 26</value>
284281 </data>
285- <data name="&gt;&gt;TableLayoutPanel1.Name" xml:space="preserve">
286- <value>TableLayoutPanel1</value>
282+ <data name="SkipButton.TabIndex" type="System.Int32, mscorlib">
283+ <value>3</value>
287284 </data>
288- <data name="&gt;&gt;TableLayoutPanel1.Type" xml:space="preserve">
289- <value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
285+ <data name="SkipButton.Text" xml:space="preserve">
286+ <value>このバージョンを無視 (&amp;S)</value>
290287 </data>
291- <data name="&gt;&gt;TableLayoutPanel1.Parent" xml:space="preserve">
292- <value>$this</value>
288+ <data name="&gt;&gt;SkipButton.Name" xml:space="preserve">
289+ <value>SkipButton</value>
293290 </data>
294- <data name="&gt;&gt;TableLayoutPanel1.ZOrder" xml:space="preserve">
295- <value>3</value>
291+ <data name="&gt;&gt;SkipButton.Type" xml:space="preserve">
292+ <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
296293 </data>
297- <data name="TableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
298- <value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="YesButton" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="NoButton" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,50,Percent,50" /&gt;&lt;Rows Styles="Percent,50" /&gt;&lt;/TableLayoutSettings&gt;</value>
294+ <data name="&gt;&gt;SkipButton.Parent" xml:space="preserve">
295+ <value>$this</value>
296+ </data>
297+ <data name="&gt;&gt;SkipButton.ZOrder" xml:space="preserve">
298+ <value>0</value>
299299 </data>
300300 <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
301301 <value>True</value>
@@ -304,7 +304,7 @@
304304 <value>96, 96</value>
305305 </data>
306306 <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
307- <value>452, 250</value>
307+ <value>560, 280</value>
308308 </data>
309309 <data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
310310 <value>CenterScreen</value>
Show on old repository browser