Skip to content

Commit 8814689

Browse files
committed
Improved handling of appman installs and notifications.
1 parent 0e365a2 commit 8814689

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

External/Tools/AppMan/MainForm.Designer.cs

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

External/Tools/AppMan/MainForm.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public partial class MainForm : Form, IMessageFilter
3636
private LocaleData localeData;
3737
private Boolean localeOverride;
3838
private String[] notifyPaths;
39-
private Boolean shouldNotify;
4039
private Boolean haveUpdates;
4140
private Boolean checkOnly;
4241

@@ -65,7 +64,6 @@ public MainForm(String[] args)
6564
this.CheckArgs(args);
6665
this.isLoading = false;
6766
this.haveUpdates = false;
68-
this.shouldNotify = false;
6967
this.InitializeSettings();
7068
this.InitializeLocalization();
7169
this.InitializeComponent();
@@ -351,11 +349,11 @@ private void MainFormHelpButtonClicked(Object sender, CancelEventArgs e)
351349
/// <summary>
352350
/// Save notification files to the notify paths.
353351
/// </summary>
354-
private void MainFormClosed(Object sender, FormClosedEventArgs e)
352+
private void NotifyPaths()
355353
{
356354
try
357355
{
358-
if (!this.shouldNotify || this.notifyPaths == null) return;
356+
if (this.notifyPaths == null) return;
359357
foreach (String nPath in this.notifyPaths)
360358
{
361359
try
@@ -442,7 +440,6 @@ private void DeleteButtonClick(Object sender, EventArgs e)
442440
{
443441
try
444442
{
445-
this.shouldNotify = true;
446443
String title = this.localeData.ConfirmTitle;
447444
String message = this.localeData.DeleteSelectedConfirm;
448445
if (MessageBox.Show(message, title, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
@@ -469,6 +466,7 @@ private void DeleteButtonClick(Object sender, EventArgs e)
469466
this.TryDeleteEntryDir(entry);
470467
}
471468
}
469+
this.NotifyPaths();
472470
}
473471
}
474472
catch (Exception ex)
@@ -938,9 +936,12 @@ private void RunExecutableProcess(String file)
938936
if (file.ToLower().EndsWith(".fdz"))
939937
{
940938
String fd = Path.Combine(PathHelper.GetExeDirectory(), @"..\..\FlashDevelop.exe");
939+
Boolean wait = Process.GetProcessesByName("FlashDevelop").Length == 0;
941940
if (File.Exists(fd))
942941
{
943942
Process.Start(Path.GetFullPath(fd), file + " -silent -reuse");
943+
// If FD was not running, give it a little time to start...
944+
if (wait) Thread.Sleep(500);
944945
return;
945946
}
946947
}
@@ -1336,8 +1337,8 @@ private void WorkerDoCompleted(Object sender, RunWorkerCompletedEventArgs e)
13361337
#endif
13371338
Thread.Sleep(100); // Wait for files...
13381339
this.LoadInstalledEntries();
1339-
this.shouldNotify = true;
13401340
this.UpdateEntryStates();
1341+
this.NotifyPaths();
13411342
}
13421343
else this.RunExecutableProcess(this.tempFile);
13431344
if (this.downloadQueue.Count > 0) this.DownloadNextFromQueue();
29.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)