mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Warn about removing packages
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@911 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -264,9 +264,23 @@ void PackagesWindow::onOk(wxCommandEvent& ev) {
|
||||
// count number of packages to change
|
||||
int to_change = 0;
|
||||
int to_download = 0;
|
||||
int to_remove = 0;
|
||||
int with_modifications = 0;
|
||||
FOR_EACH(ip, installable_packages) {
|
||||
if (!ip->has(PACKAGE_NOTHING)) ++to_change;
|
||||
if ((ip->action & PACKAGE_INSTALL) && ip->installer && !ip->installer->installer) ++to_download;
|
||||
if (ip->action & PACKAGE_REMOVE) {
|
||||
to_remove++;
|
||||
if (ip->status & PACKAGE_MODIFIED) with_modifications++;
|
||||
}
|
||||
}
|
||||
// Warn about removing
|
||||
if (to_remove) {
|
||||
int result = wxMessageBox(
|
||||
with_modifications == 0 ? _ERROR_1_("remove packages", String()<<to_remove)
|
||||
: _ERROR_2_("remove packages modified", String()<<to_remove, String()<<with_modifications),
|
||||
_TITLE_("packages window"), wxICON_EXCLAMATION | wxYES_NO);
|
||||
if (result == wxNO) return;
|
||||
}
|
||||
// progress dialog
|
||||
wxProgressDialog progress(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# This file contains the keys expected to be in MSE locales
|
||||
# It was automatically generated by tools/locale/locale.pl
|
||||
# Generated on Sat May 31 18:40:22 2008
|
||||
# Generated on Sat May 31 19:21:25 2008
|
||||
|
||||
action:
|
||||
add control point: 0
|
||||
@@ -115,8 +115,8 @@ error:
|
||||
package not found: 1
|
||||
package out of date: 3
|
||||
package too new: 4
|
||||
remove packages: optional, 1
|
||||
remove packages modified: optional, 2
|
||||
remove packages: 1
|
||||
remove packages modified: 2
|
||||
remove packages successful: 1
|
||||
stylesheet and set refer to different game: 0
|
||||
successful install: optional, 2
|
||||
|
||||
Reference in New Issue
Block a user