Skip to content

Commit 277975c

Browse files
committed
Don't allow loading streams by double-clicking files in batch mode, minor UI stuff
1 parent 3644409 commit 277975c

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

ff-utils-winforms/Forms/MainForm.FileList.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ partial class MainForm
2424

2525
public void RefreshFileListUi ()
2626
{
27-
bool mfm = RunTask.currentFileListMode == RunTask.FileListMode.MultiFileInput;
28-
29-
addTracksFromFileBtn.Visible = mfm && fileList.SelectedItems.Count > 0;
27+
addTracksFromFileBtn.Visible = RunTask.currentFileListMode == RunTask.FileListMode.MultiFileInput && fileList.SelectedItems.Count > 0;
3028
addTracksFromFileBtn.Text = AreAnyTracksLoaded() ? "Add Tracks To List" : "Load File";
3129
}
3230

@@ -107,7 +105,7 @@ private void fileList_MouseDoubleClick(object sender, MouseEventArgs e)
107105
{
108106
ListViewItem item = fileList.HitTest(e.X, e.Y).Item;
109107

110-
if (item != null)
108+
if (item != null && RunTask.currentFileListMode == RunTask.FileListMode.MultiFileInput)
111109
addTracksFromFileBtn_Click(null, null);
112110
}
113111
}

ff-utils-winforms/Forms/MainForm.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@
120120
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121121
<value>17, 17</value>
122122
</metadata>
123+
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
124+
<value>17, 17</value>
125+
</metadata>
123126
<metadata name="checkItemsContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
124127
<value>107, 17</value>
125128
</metadata>

ff-utils-winforms/OS/SuspendResume.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ public static void SuspendProcs(bool freeze, bool excludeCmd = false)
6565
if (excludeCmd && (process.ProcessName == "conhost" || process.ProcessName == "cmd"))
6666
continue;
6767

68+
if (freeze && (process.ProcessName == "av1an"))
69+
Logger.Log($"Warning: Pausing {process.ProcessName} might not work correctly. Use at your own risk.");
70+
6871
Logger.Log($"Suspending {process.ProcessName} {process.StartInfo.Arguments.Trunc(100)}", true);
6972

7073
process.Suspend();

0 commit comments

Comments
 (0)