mirror of https://github.com/BOINC/boinc.git
MGR: Fix a few bugs in Exclusive Apps pane of Computing Prefs dialog
svn path=/trunk/boinc/; revision=23488
This commit is contained in:
parent
58b4589f96
commit
6edf908273
|
@ -2723,5 +2723,7 @@ David 29 Apr 2011
|
||||||
Charlie 29 Apr 2011
|
Charlie 29 Apr 2011
|
||||||
- MGR: Fix a few bugs in Exclusive Apps pane of Computing Prefs dialog.
|
- MGR: Fix a few bugs in Exclusive Apps pane of Computing Prefs dialog.
|
||||||
|
|
||||||
|
clientgui/
|
||||||
|
DlgAdvPreferences.cpp
|
||||||
lib/
|
lib/
|
||||||
cc_config.cpp
|
cc_config.cpp
|
||||||
|
|
|
@ -780,13 +780,13 @@ void CDlgAdvPreferences::OnAddExclusiveApp(wxCommandEvent& ev) {
|
||||||
#elif defined(__WXMSW__)
|
#elif defined(__WXMSW__)
|
||||||
//TODO: fill in the default directory for MSW
|
//TODO: fill in the default directory for MSW
|
||||||
wxFileDialog picker(this, _("Application to add"),
|
wxFileDialog picker(this, _("Application to add"),
|
||||||
wxT(""), wxT(""), wxT("*.exe"),
|
wxT("C:/Program Files"), wxT(""), wxT("*.exe"),
|
||||||
wxFD_OPEN|wxFD_FILE_MUST_EXIST|wxFD_CHANGE_DIR|wxFD_MULTIPLE|wxFD_CHANGE_DIR));
|
wxFD_OPEN|wxFD_FILE_MUST_EXIST|wxFD_CHANGE_DIR|wxFD_MULTIPLE|wxFD_CHANGE_DIR);
|
||||||
#else
|
#else
|
||||||
//TODO: fill in the default directory and wildcard for Linux
|
//TODO: fill in the default directory and wildcard for Linux
|
||||||
wxFileDialog picker(this, _("Application to add"),
|
wxFileDialog picker(this, _("Application to add"),
|
||||||
wxT(""), wxT(""), wxT("*.*"),
|
wxT(""), wxT(""), wxT("*.*"),
|
||||||
wxFD_OPEN|wxFD_FILE_MUST_EXIST|wxFD_CHANGE_DIR|wxFD_MULTIPLE|wxFD_CHANGE_DIR));
|
wxFD_OPEN|wxFD_FILE_MUST_EXIST|wxFD_CHANGE_DIR|wxFD_MULTIPLE|wxFD_CHANGE_DIR);
|
||||||
#endif
|
#endif
|
||||||
if (picker.ShowModal() == wxID_OK) {
|
if (picker.ShowModal() == wxID_OK) {
|
||||||
picker.GetFilenames(appNames);
|
picker.GetFilenames(appNames);
|
||||||
|
@ -796,6 +796,9 @@ void CDlgAdvPreferences::OnAddExclusiveApp(wxCommandEvent& ev) {
|
||||||
if (extension != wxNOT_FOUND) {
|
if (extension != wxNOT_FOUND) {
|
||||||
appNames[i].Truncate(extension);
|
appNames[i].Truncate(extension);
|
||||||
}
|
}
|
||||||
|
#elif defined(__WXMSW__)
|
||||||
|
wxString appNameOnly = appNames[i].AfterLast('/');
|
||||||
|
appNames[i] = appNameOnly;
|
||||||
#endif
|
#endif
|
||||||
// Skip requests for duplicate entries
|
// Skip requests for duplicate entries
|
||||||
isDuplicate = false;
|
isDuplicate = false;
|
||||||
|
@ -896,8 +899,8 @@ void CDlgAdvPreferences::OnClear(wxCommandEvent& ev) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CDlgAdvPreferences::ConfirmClear() {
|
bool CDlgAdvPreferences::ConfirmClear() {
|
||||||
int res = wxGetApp().SafeMessageBox(_("Do you really want to clear all local preferences ?\n"
|
int res = wxGetApp().SafeMessageBox(_(
|
||||||
"(This will not affect exclusive applications.)"),
|
"Do you really want to clear all local preferences?\n(This will not affect exclusive applications.)"),
|
||||||
_("Confirmation"),wxCENTER | wxICON_QUESTION | wxYES_NO | wxNO_DEFAULT,this);
|
_("Confirmation"),wxCENTER | wxICON_QUESTION | wxYES_NO | wxNO_DEFAULT,this);
|
||||||
|
|
||||||
return res==wxYES;
|
return res==wxYES;
|
||||||
|
|
Loading…
Reference in New Issue