Skip to content

Commit

Permalink
- Prevent user from removing items from the list that are downloading or
Browse files Browse the repository at this point in the history
installing.
  • Loading branch information
philc committed Oct 24, 2006
1 parent 76ec571 commit 3175734
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions Changelog.txt
@@ -1,6 +1,7 @@


0.4
- Prevent user from removing items from the list that are downloading or installing.
- Massive refactoring of the application item UI. Not scary anymore =)
- Removing preference for "installation root" until we can figure out what to do with it
- UI cleanup for the add application dialog. Now it's sizable
Expand Down
6 changes: 1 addition & 5 deletions data/applists/testing.xml
Expand Up @@ -9,13 +9,9 @@
<Options>
<SilentInstall />
<InstallerArguments>&lt;&gt;^ -/s</InstallerArguments>
<Checked>false</Checked>
<Checked>false</Checked>
</Options>
</Application>
<Application>
<Name>FireFox</Name>
<FileUrl>http://ftp-mozilla.netscape.com/pub/mozilla.org/firefox/releases/1.5.0.7/win32/en-US/Firefox%20Setup%201.5.0.7.exe</FileUrl>
</Application>
<Application>
<Name>FireFox FTP</Name>
<FileUrl>ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5/win32/en-US/Firefox%20Setup%201.5.exe</FileUrl>
Expand Down
12 changes: 12 additions & 0 deletions src/InstallPad.ContextMenu.cs
Expand Up @@ -101,6 +101,18 @@ void removeItem_Click(object sender, EventArgs e)
{
ApplicationListItem item = (ApplicationListItem)highlightedControl;
string appTitle = item.ApplicationItem.Name;

if (item.State==ApplicationListItem.InstallState.Downloading){
MessageBox.Show(String.Format("{0} is currently being downloaded. Stop the download before removing the item.",appTitle));
return;
}
else if (item.State == ApplicationListItem.InstallState.Installing)
{
MessageBox.Show(String.Format("{0} is currently being installed. Stop the download before removing the item.", appTitle));
return;
}


DialogResult result = MessageBox.Show(this,
String.Format("Are you sure you want to remove '{0}' from the list of installable applications?", appTitle),
String.Format("Remove {0}?", appTitle),
Expand Down

0 comments on commit 3175734

Please sign in to comment.