Skip to content

Commit 81fd18b

Browse files
committed
ShortcutDialog update 4
Removed viewCustom check box from the dialog.
1 parent 5ef3872 commit 81fd18b

File tree

2 files changed

+5
-34
lines changed

2 files changed

+5
-34
lines changed

FlashDevelop/Dialogs/ShortcutDialog.cs

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public class ShortcutDialog : SmartForm
2828
private System.Windows.Forms.ColumnHeader idHeader;
2929
private System.Windows.Forms.ColumnHeader keyHeader;
3030
private System.Windows.Forms.TextBox filterTextBox;
31-
private System.Windows.Forms.CheckBox viewCustom;
3231
private System.Windows.Forms.Button clearButton;
3332
private System.Windows.Forms.Button closeButton;
3433
private System.Windows.Forms.Button openButton;
@@ -67,7 +66,6 @@ private void InitializeComponent()
6766
this.searchLabel = new System.Windows.Forms.Label();
6867
this.clearButton = new System.Windows.Forms.Button();
6968
this.filterTextBox = new System.Windows.Forms.TextBox();
70-
this.viewCustom = new System.Windows.Forms.CheckBox();
7169
this.openButton = new System.Windows.Forms.Button();
7270
this.saveButton = new System.Windows.Forms.Button();
7371
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
@@ -89,10 +87,10 @@ private void InitializeComponent()
8987
this.listView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {this.idHeader, this.keyHeader});
9088
this.listView.GridLines = true;
9189
this.listView.FullRowSelect = true;
92-
this.listView.Location = new System.Drawing.Point(12, 87);
90+
this.listView.Location = new System.Drawing.Point(12, 70);
9391
this.listView.MultiSelect = false;
9492
this.listView.Name = "listView";
95-
this.listView.Size = new System.Drawing.Size(562, 287);
93+
this.listView.Size = new System.Drawing.Size(562, 304);
9694
this.listView.TabIndex = 4;
9795
this.listView.UseCompatibleStateImageBehavior = false;
9896
this.listView.View = System.Windows.Forms.View.Details;
@@ -158,14 +156,6 @@ private void InitializeComponent()
158156
this.filterTextBox.ForeColor = System.Drawing.SystemColors.GrayText;
159157
this.filterTextBox.TextChanged += new System.EventHandler(this.FilterTextChanged);
160158
//
161-
// viewCustom
162-
//
163-
this.viewCustom.AutoSize = true;
164-
this.viewCustom.CheckAlign = ContentAlignment.MiddleRight;
165-
this.viewCustom.Anchor = ((System.Windows.Forms.AnchorStyles)(System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right));
166-
this.viewCustom.Location = new System.Drawing.Point(471, 67);
167-
this.viewCustom.CheckedChanged += new System.EventHandler(this.ViewCustomCheckedChanged);
168-
//
169159
// openButton
170160
//
171161
this.openButton.Location = new System.Drawing.Point(369, 12);
@@ -203,7 +193,6 @@ private void InitializeComponent()
203193
this.Controls.Add(this.infoLabel);
204194
this.Controls.Add(this.pictureBox);
205195
this.Controls.Add(this.closeButton);
206-
this.Controls.Add(this.viewCustom);
207196
this.Controls.Add(this.listView);
208197
this.Controls.Add(this.searchLabel);
209198
this.FormClosing += new FormClosingEventHandler(this.DialogClosing);
@@ -258,7 +247,6 @@ private void ApplyLocalizedTexts()
258247
this.keyHeader.Text = TextHelper.GetString("Label.Shortcut");
259248
this.infoLabel.Text = TextHelper.GetString("Info.ShortcutEditInfo");
260249
this.closeButton.Text = TextHelper.GetString("Label.Close");
261-
this.viewCustom.Text = TextHelper.GetString("Label.ViewCustom");
262250
this.openButton.Text = TextHelper.GetString("Label.Open");
263251
this.saveButton.Text = TextHelper.GetString("Label.SaveAs");
264252
this.searchLabel.Text = TextHelper.GetString("Label.Search").Replace("&", "") + ":";
@@ -444,23 +432,6 @@ private static void ResetConflicts(ShortcutListItem item)
444432
UpdateItemHighlightFont(item);
445433
}
446434
}
447-
448-
/// <summary>
449-
/// Filter the list view for custom items
450-
/// </summary>
451-
private void ViewCustomCheckedChanged(Object sender, EventArgs e)
452-
{
453-
if (this.filterTextBox.Text.StartsWith(ViewCustomKey))
454-
{
455-
if (!this.viewCustom.Checked)
456-
this.filterTextBox.Text = this.filterTextBox.Text.Substring(ViewCustomKey.Length);
457-
}
458-
else
459-
{
460-
if (this.viewCustom.Checked)
461-
this.filterTextBox.Text = ViewCustomKey + this.filterTextBox.Text;
462-
}
463-
}
464435

465436
/// <summary>
466437
/// Gets a list of all conflicting entries. Returns null if the length is 0 or 1.
@@ -526,7 +497,6 @@ private void RemoveShortcutClick(Object sender, EventArgs e)
526497
/// </summary>
527498
private void ClearFilterClick(Object sender, EventArgs e)
528499
{
529-
this.viewCustom.Checked = false;
530500
this.filterTextBox.Text = "";
531501
}
532502

FlashDevelop/Managers/ShortcutManager.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Windows.Forms;
55
using FlashDevelop.Helpers;
66
using PluginCore;
7+
using PluginCore.Helpers;
78
using PluginCore.Managers;
89
using PluginCore.Utilities;
910
using ScintillaNet;
@@ -179,7 +180,7 @@ public static void ApplySecondaryShortcut(ToolStripItem item)
179180
public static void LoadCustomShortcuts()
180181
{
181182
ScintillaControl.InitShortcuts();
182-
String file = FileNameHelper.ShortcutData;
183+
String file = FileNameHelper.ShortcutData; //PathHelper.ShortcutsDir + "CURRENT";
183184
if (File.Exists(file))
184185
{
185186
List<Argument> shortcuts = new List<Argument>();
@@ -205,7 +206,7 @@ public static void SaveCustomShortcuts()
205206
shortcuts.Add(new Argument(item.Id, item.Custom.ToString()));
206207
}
207208
}
208-
String file = FileNameHelper.ShortcutData;
209+
String file = FileNameHelper.ShortcutData; //PathHelper.ShortcutsDir + "CURRENT";
209210
ObjectSerializer.Serialize(file, shortcuts);
210211
}
211212

0 commit comments

Comments
 (0)