[Amis-vcs] SF.net SVN: amis: [2437] branches/amis3/AmisGuiMFC2
Brought to you by:
julienq,
marisademeglio
From: <dan...@us...> - 2008-03-18 17:32:32
|
Revision: 2437 http://amis.svn.sourceforge.net/amis/?rev=2437&view=rev Author: daniel_weck Date: 2008-03-18 10:32:37 -0700 (Tue, 18 Mar 2008) Log Message: ----------- * Search for books is self-voiced now * a few fixes Modified Paths: -------------- branches/amis3/AmisGuiMFC2/include/gui/dialogs/SearchForBooksDialog.h branches/amis3/AmisGuiMFC2/include/gui/self-voicing/AudioSequencePlayer.h branches/amis3/AmisGuiMFC2/src/gui/MainFrm.cpp branches/amis3/AmisGuiMFC2/src/gui/dialogs/PreferencesDialog.cpp branches/amis3/AmisGuiMFC2/src/gui/dialogs/PublicationSummaryDialog.cpp branches/amis3/AmisGuiMFC2/src/gui/dialogs/SearchForBooksDialog.cpp branches/amis3/AmisGuiMFC2/src/gui/self-voicing/AudioSequencePlayer.cpp branches/amis3/AmisGuiMFC2/src/gui/self-voicing/PreTranslateMessageHandler.cpp branches/amis3/AmisGuiMFC2/src/gui/self-voicing/datamodel/UiItem.cpp Modified: branches/amis3/AmisGuiMFC2/include/gui/dialogs/SearchForBooksDialog.h =================================================================== --- branches/amis3/AmisGuiMFC2/include/gui/dialogs/SearchForBooksDialog.h 2008-03-18 15:36:16 UTC (rev 2436) +++ branches/amis3/AmisGuiMFC2/include/gui/dialogs/SearchForBooksDialog.h 2008-03-18 17:32:37 UTC (rev 2437) @@ -54,6 +54,7 @@ DECLARE_MESSAGE_MAP() private: + int mFiles_found; void announceStatus(CString); //should be AccessibleUi::Label* as the parameter void populateListControl(); void loadBook(); Modified: branches/amis3/AmisGuiMFC2/include/gui/self-voicing/AudioSequencePlayer.h =================================================================== --- branches/amis3/AmisGuiMFC2/include/gui/self-voicing/AudioSequencePlayer.h 2008-03-18 15:36:16 UTC (rev 2436) +++ branches/amis3/AmisGuiMFC2/include/gui/self-voicing/AudioSequencePlayer.h 2008-03-18 17:32:37 UTC (rev 2437) @@ -76,12 +76,12 @@ static void playPromptItemFromStringId(string); static void playDialogInstructionsFromUiId(int nItemID); static void playDialogTextControlsFromUiId(int nItemID, PromptResolver* pResolver); - static AudioSequence * playDialogControlFromUiIds(int dlgID, int ctrlId, PromptResolver* pResolver, bool playNow = true); + static AudioSequence * playDialogControlFromUiIds(int dlgID, int ctrlId, PromptResolver* pResolver, bool playNow, string switchCondition); static void fillSequenceContainerPromptFromId(AudioSequence* seq, string id); static void fillSequencePrompt(AudioSequence* seq, Prompt* prompt, PromptResolver* pResolver); - static void fillSequenceCaptionAndDescription(AudioSequence* seq, UiItem* uiItem, PromptResolver * pResolver); - static void fillSequenceSwitch(AudioSequence* seq, UiItem* uiItem, string switchCondition = ""); + static void fillSequenceCaptionAndDescription(AudioSequence* seq, UiItem* uiItem, PromptResolver * pResolver, string switchCondition); + static void fillSequenceSwitch(AudioSequence* seq, UiItem* uiItem, PromptResolver * pResolver, string switchCondition); static void fillSequenceContentAndPrompt(AudioSequence* seq, Label* label, PromptResolver * pResolver); static void fillSequenceContentAndPrompt(AudioSequence* seq, LabelList * p_list, PromptResolver * pResolver); Modified: branches/amis3/AmisGuiMFC2/src/gui/MainFrm.cpp =================================================================== --- branches/amis3/AmisGuiMFC2/src/gui/MainFrm.cpp 2008-03-18 15:36:16 UTC (rev 2436) +++ branches/amis3/AmisGuiMFC2/src/gui/MainFrm.cpp 2008-03-18 17:32:37 UTC (rev 2437) @@ -494,14 +494,14 @@ } void CMainFrame::OnUpdateCmdUiPlaySlower(CCmdUI* pCmdUi) { - if (theApp.isBookOpen() && theApp.canDecreasePlaybackSpeed()) + if (theApp.canDecreasePlaybackSpeed()) updateUiCommandState(pCmdUi, true); else updateUiCommandState(pCmdUi, false); } void CMainFrame::OnUpdateCmdUiPlayFaster(CCmdUI* pCmdUi) { - if (theApp.isBookOpen() && theApp.canIncreasePlaybackSpeed()) + if (theApp.canIncreasePlaybackSpeed()) updateUiCommandState(pCmdUi, true); else updateUiCommandState(pCmdUi, false); @@ -590,16 +590,9 @@ { bool b_is_book_open = theApp.isBookOpen(); //audio rate - if (b_is_book_open) - { pToolbar->enable(ID_AMIS_SLOWER, theApp.canDecreasePlaybackSpeed()); pToolbar->enable(ID_AMIS_FASTER, theApp.canIncreasePlaybackSpeed()); - } - else - { - pToolbar->enable(ID_AMIS_SLOWER, false); - pToolbar->enable(ID_AMIS_FASTER, false); - } + //page navigation if (b_is_book_open) { Modified: branches/amis3/AmisGuiMFC2/src/gui/dialogs/PreferencesDialog.cpp =================================================================== --- branches/amis3/AmisGuiMFC2/src/gui/dialogs/PreferencesDialog.cpp 2008-03-18 15:36:16 UTC (rev 2436) +++ branches/amis3/AmisGuiMFC2/src/gui/dialogs/PreferencesDialog.cpp 2008-03-18 17:32:37 UTC (rev 2437) @@ -339,7 +339,11 @@ } void PreferencesDialog::triggerVirtualKeyStroke() { - + + if (amis::Preferences::Instance()->getIsSelfVoicing() == false) { + + return; + } CWnd* cwnd = this->GetFocus(); MSG * msg = new MSG(); Modified: branches/amis3/AmisGuiMFC2/src/gui/dialogs/PublicationSummaryDialog.cpp =================================================================== --- branches/amis3/AmisGuiMFC2/src/gui/dialogs/PublicationSummaryDialog.cpp 2008-03-18 15:36:16 UTC (rev 2436) +++ branches/amis3/AmisGuiMFC2/src/gui/dialogs/PublicationSummaryDialog.cpp 2008-03-18 17:32:37 UTC (rev 2437) @@ -32,6 +32,7 @@ #include "util/FilePathTools.h" #include "util/Log.h" #include "gui/self-voicing/datamodel/DataTree.h" +#include "Preferences.h" using namespace amis::gui::dialogs; @@ -215,8 +216,6 @@ } //TODO: figure out current timestamp - //TODO: get max TOC depth - //TODO: get number of TOC items return true; } @@ -307,6 +306,12 @@ void PublicationSummaryDialog::OnLvnItemchangedSummary(NMHDR *pNMHDR, LRESULT *pResult) { + + if (amis::Preferences::Instance()->getIsSelfVoicing() == false) { + + *pResult = 0; + return; + } LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR); if (pNMLV->iItem != -1) { if (pNMLV->uNewState == 3) { @@ -353,7 +358,7 @@ { p_var = (PromptVar*)pPrompt->getItem(i); - if (p_var->getName() == "META_TITLE") + if (p_var->getName().compare("META_TITLE") == 0) { amis::AudioNode * node = mpTitle->getAudio(0); @@ -372,7 +377,7 @@ p_var->setContents(str, node->clone()); } } - else if (p_var->getName() == "META_CREATOR") + else if (p_var->getName().compare("META_CREATOR") == 0) { wstring str; str = computeAuthor(); @@ -385,7 +390,7 @@ } } - else if (p_var->getName() == "META_PUBLISHER") + else if (p_var->getName().compare("META_PUBLISHER") == 0) { if (mPublisher.length() != 0) { p_var->setContents(mPublisher, ""); @@ -395,7 +400,7 @@ p_var->setContents(promptNotAvailable->getContents()->clone()); } } - else if (p_var->getName() == "META_DESC") + else if (p_var->getName().compare("META_DESC") == 0) { if (mDescription.length() != 0) { p_var->setContents(mDescription, ""); @@ -405,7 +410,7 @@ p_var->setContents(promptNotAvailable->getContents()->clone()); } } - else if (p_var->getName() == "META_NARRATOR") + else if (p_var->getName().compare("META_NARRATOR") == 0) { if (mNarrator.length() != 0) { p_var->setContents(mNarrator, ""); @@ -415,7 +420,7 @@ p_var->setContents(promptNotAvailable->getContents()->clone()); } } - else if (p_var->getName() == "META_TOTALTIME") + else if (p_var->getName().compare("META_TOTALTIME") == 0) { if (mTotalTime.length() != 0) { p_var->setContents(mTotalTime, ""); @@ -425,7 +430,7 @@ p_var->setContents(promptNotAvailable->getContents()->clone()); } } - else if (p_var->getName() == "META_NUMPAGES") + else if (p_var->getName().compare("META_NUMPAGES") == 0) { CString value; value.Format(_T("%d"), mTotalNumPages); @@ -433,7 +438,7 @@ str = value; p_var->setContents(str, ""); } - else if (p_var->getName() == "META_DATE") + else if (p_var->getName().compare("META_DATE") == 0) { if (mDate.length() != 0) { p_var->setContents(mDate, ""); @@ -443,7 +448,7 @@ p_var->setContents(promptNotAvailable->getContents()->clone()); } } - else if (p_var->getName() == "META_FORMAT") + else if (p_var->getName().compare("META_FORMAT") == 0) { if (mFormat.length() != 0) { p_var->setContents(mFormat, ""); @@ -454,7 +459,7 @@ } } - else if (p_var->getName() == "META_TOCITEMS") + else if (p_var->getName().compare("META_TOCITEMS") == 0) { amis::dtb::nav::NavModel* p_nav = mpBook->getNavModel(); int max = p_nav->getNavMap()->getNumberOfNavPoints(); @@ -465,7 +470,7 @@ p_var->setContents(str, ""); //p_var->setContents(promptNotAvailable->getContents()->clone()); } - else if (p_var->getName() == "META_DEPTH") + else if (p_var->getName().compare("META_DEPTH") == 0) { amis::dtb::nav::NavModel* p_nav = mpBook->getNavModel(); int max = p_nav->getNavMap()->getMaxDepth(); @@ -476,7 +481,7 @@ p_var->setContents(str, ""); //p_var->setContents(promptNotAvailable->getContents()->clone()); } - else if (p_var->getName() == "TOC_CATEGORIES") + else if (p_var->getName().compare("TOC_CATEGORIES") == 0) { if (mNavigableItems.length() != 0) { @@ -520,19 +525,19 @@ } */ } - else if (p_var->getName() == "CURRENT_PAGE") + else if (p_var->getName().compare("CURRENT_PAGE") == 0) { amis::AudioNode * node = mpCurrentPage->getAudio(0); if (mpCurrentPage != NULL) { p_var->setContents(mpCurrentPage->getText()->getTextString(), (node != NULL ? node->clone() : NULL)); } } - else if (p_var->getName() == "CURRENT_TIME") + else if (p_var->getName().compare("CURRENT_TIME") == 0) { p_var->setContents(promptNotAvailable->getContents()->clone()); } - else if (p_var->getName() == "CURRENT_SECTION_TITLE") + else if (p_var->getName().compare("CURRENT_SECTION_TITLE") == 0) { amis::AudioNode * node = mpSectionName->getAudio(0); if (mpSectionName != NULL) @@ -541,7 +546,7 @@ } } - else if (p_var->getName() == "CURRENT_SECTION_NUM_SUBSECTIONS") + else if (p_var->getName().compare("CURRENT_SECTION_NUM_SUBSECTIONS") == 0) { CString value; value.Format(_T("%d"), mNumSubsections); @@ -550,7 +555,7 @@ p_var->setContents(str, ""); } - else if (p_var->getName() == "CURRENT_SECTION_NUM_PAGES") + else if (p_var->getName().compare("CURRENT_SECTION_NUM_PAGES") == 0) { CString value; value.Format(_T("%d"), mNumPagesForSection); Modified: branches/amis3/AmisGuiMFC2/src/gui/dialogs/SearchForBooksDialog.cpp =================================================================== --- branches/amis3/AmisGuiMFC2/src/gui/dialogs/SearchForBooksDialog.cpp 2008-03-18 15:36:16 UTC (rev 2436) +++ branches/amis3/AmisGuiMFC2/src/gui/dialogs/SearchForBooksDialog.cpp 2008-03-18 17:32:37 UTC (rev 2437) @@ -25,7 +25,10 @@ #include "../resource.h" #include "util/SearchForFilesMFC.h" #include "AmisCore.h" +#include "Preferences.h" +#include "gui/self-voicing/datamodel/DataTree.h" + using namespace amis::gui::dialogs; BEGIN_MESSAGE_MAP(SearchForBooksDialog, CDialog) @@ -39,7 +42,27 @@ void SearchForBooksDialog::resolvePromptVariables(Prompt* pPrompt) { - return; + + PromptVar* p_var = NULL; + PromptItem* promptNotAvailable = DataTree::Instance()->findPromptItem("not_available"); + + for (int i=0; i<pPrompt->getNumberOfItems(); i++) + { + if (pPrompt->getItem(i)->getPromptItemType() == PROMPT_VARIABLE) + { + p_var = (PromptVar*)pPrompt->getItem(i); + + if (p_var->getName().compare("NUM_FILES_FOUND") == 0) + { + CString value; + value.Format(_T("%d"), mFiles_found); + wstring str; + str = value; + p_var->setContents(str, ""); + } + } + } + AmisDialogBase::resolvePromptVariables(pPrompt); } SearchForBooksDialog::SearchForBooksDialog(CWnd* pParent /*=NULL*/) @@ -52,6 +75,7 @@ mpCaptionSearchCompleteNoFilesFound = _T("No files found"); mpCaptionSearchCompleteOneFileFound = _T("1 file found"); mpCaptionSearchCompleteFilesFound = _T("files found"); + mFiles_found = 0; mbShouldStopSearching = false; } @@ -92,6 +116,23 @@ p_label_widget->SetWindowText(status); p_label_widget->ShowWindow(SW_SHOW); } + if (amis::Preferences::Instance()->getIsSelfVoicing() == true) { + if (mpCaptionWhileSearching.Compare(status) == 0) { + AudioSequencePlayer::Instance()->playDialogControlFromUiIds(IDD_SEARCHDAISY, IDC_SEARCHING, this, true, "WhileSearching"); + } else + if (mpCaptionSearchCompleteNoFilesFound.Compare(status) == 0) { + AudioSequencePlayer::Instance()->playDialogControlFromUiIds(IDD_SEARCHDAISY, IDC_SEARCHING, this, true, "SearchCompleteNoFilesFound"); + } else + if (mpCaptionSearchCompleteOneFileFound.Compare(status) == 0) { + AudioSequencePlayer::Instance()->playDialogControlFromUiIds(IDD_SEARCHDAISY, IDC_SEARCHING, this, true, "SearchCompleteOneFileFound"); + } else + if (mpCaptionSearchCompleteFilesFound.Compare(status) == 0) { + AudioSequencePlayer::Instance()->playDialogControlFromUiIds(IDD_SEARCHDAISY, IDC_SEARCHING, this, true, "SearchCompleteFilesFound"); + } else + if (mpCaptionSearchAborted.Compare(status) == 0) { + AudioSequencePlayer::Instance()->playDialogControlFromUiIds(IDD_SEARCHDAISY, IDC_SEARCHING, this, true, "SearchAborted"); + } + } } //TODO: fill in titles, not URLs @@ -215,11 +256,11 @@ mSearcher.addSearchExclusionCriteria("_ncc.html"); mSearcher.setRecursiveSearch(true); //start the search - int files_found = mSearcher.startSearch(T2A(search_string)); + mFiles_found = mSearcher.startSearch(T2A(search_string)); populateListControl(); - if (files_found == 0) announceStatus(this->mpCaptionSearchCompleteNoFilesFound); - else if (files_found == 1) announceStatus(this->mpCaptionSearchCompleteOneFileFound); + if (mFiles_found == 0) announceStatus(this->mpCaptionSearchCompleteNoFilesFound); + else if (mFiles_found == 1) announceStatus(this->mpCaptionSearchCompleteOneFileFound); else announceStatus(this->mpCaptionSearchCompleteFilesFound); //reverse the gray-out button states @@ -256,6 +297,29 @@ if (p_wnd) { int id = p_wnd->GetDlgCtrlID(); + + if (amis::Preferences::Instance()->getIsSelfVoicing() == true && id == IDC_FILESFOUND && pMsg->message == WM_KEYUP && (pMsg->wParam == VK_UP || pMsg->wParam == VK_DOWN|| pMsg->wParam == VK_RIGHT || pMsg->wParam == VK_LEFT)) + { + //TODO: this list treatment removes the default XML prompts, needs improvement + CListBox* p_filelist = NULL; + p_filelist = (CListBox*)this->GetDlgItem(IDC_FILESFOUND); + + int sel = p_filelist->GetCurSel(); + if (sel >= 0) { + amis::UrlList* p_search_results = mSearcher.getSearchResults(); + if (sel > -1 && sel < p_search_results->size()) { + //mLoadBookOnDialogClose = (*p_search_results)[sel]; + AudioSequence * seq = new AudioSequence(); + CString str; + p_filelist->GetText(sel, str); + seq->append(str); + AudioSequencePlayer::Instance()->Play(seq); + } + } + + return CDialog::PreTranslateMessage(pMsg); + } + //inexplicably, the default behavior for pressing enter in a dialog is to close it. //we're overriding this here. if (pMsg->wParam == VK_RETURN) @@ -265,12 +329,14 @@ { pMsg->wParam = NULL; OnStartsearch(); + return CDialog::PreTranslateMessage(pMsg); } //if the files list has focus, open the selected book else if (id == IDC_FILESFOUND) { pMsg->wParam = NULL; loadBook(); + return CDialog::PreTranslateMessage(pMsg); } } } Modified: branches/amis3/AmisGuiMFC2/src/gui/self-voicing/AudioSequencePlayer.cpp =================================================================== --- branches/amis3/AmisGuiMFC2/src/gui/self-voicing/AudioSequencePlayer.cpp 2008-03-18 15:36:16 UTC (rev 2436) +++ branches/amis3/AmisGuiMFC2/src/gui/self-voicing/AudioSequencePlayer.cpp 2008-03-18 17:32:37 UTC (rev 2437) @@ -956,7 +956,7 @@ Container* p_container = DataTree::Instance()->findContainer(id); if (p_container != NULL) { - fillSequenceCaptionAndDescription(seq, p_container, NULL); + fillSequenceCaptionAndDescription(seq, p_container, NULL, "default"); Label* keyboardShortcutAccelerator = p_container->getKeyboardAccelerator(); if (keyboardShortcutAccelerator != NULL) { @@ -1043,8 +1043,8 @@ Dialog* p_dialog = DataTree::Instance()->findDialog(nItemID); if (p_dialog != NULL) { - fillSequenceCaptionAndDescription(seq, p_dialog, NULL); - fillSequenceSwitch(seq, p_dialog); + fillSequenceCaptionAndDescription(seq, p_dialog, presolver, "default"); + fillSequenceSwitch(seq, p_dialog, presolver, "default"); int count = p_dialog->getNumChildControls(); for (int i = 0 ; i < count; i++) { @@ -1052,7 +1052,7 @@ string strCat = control->getWidgetCategories(); int find = strCat.find("button"); if (-1 == find) { - fillSequenceCaptionAndDescription(seq, control, presolver); + fillSequenceCaptionAndDescription(seq, control, presolver, "default"); } LabelList* p_list = control->getLabelList(); @@ -1127,7 +1127,7 @@ //////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////// // This works for Dialogs -AudioSequence * AudioSequencePlayer::playDialogControlFromUiIds(int dlgID, int ctrlId, PromptResolver* pResolver, bool playNow) { +AudioSequence * AudioSequencePlayer::playDialogControlFromUiIds(int dlgID, int ctrlId, PromptResolver* pResolver, bool playNow, string switchCondition) { if ( (dlgID != -1 && ctrlId != -1) @@ -1144,10 +1144,7 @@ DialogControl* control = p_dialog->findControl(ctrlId); if (control != NULL) { - if (ctrlId == IDC_TTSVOICES) { - int i = 0; - } - fillSequenceCaptionAndDescription(seq, control, pResolver); + fillSequenceCaptionAndDescription(seq, control, pResolver, switchCondition); } } else { fillOK_CANCEL(seq, ctrlId); @@ -1199,7 +1196,7 @@ //////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////// -void AudioSequencePlayer::fillSequenceCaptionAndDescription(AudioSequence* seq, UiItem* uiItem, PromptResolver * pResolver) { +void AudioSequencePlayer::fillSequenceCaptionAndDescription(AudioSequence* seq, UiItem* uiItem, PromptResolver * pResolver, string switchCondition) { Label* label = uiItem->getCaption(); if (label != NULL) { @@ -1210,6 +1207,9 @@ if (label != NULL) { fillSequenceContentAndPrompt(seq, label, pResolver); } + + fillSequenceSwitch(seq, uiItem, pResolver, switchCondition); + LabelList * p_list = uiItem->getLabelList(); if (p_list != NULL) @@ -1229,7 +1229,7 @@ //////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////// -void AudioSequencePlayer::fillSequenceSwitch(AudioSequence* seq, UiItem* uiItem, string switchCondition) { +void AudioSequencePlayer::fillSequenceSwitch(AudioSequence* seq, UiItem* uiItem, PromptResolver * pResolver, string switchCondition) { Switch* zwitch; if ((zwitch = uiItem->getSwitch()) != NULL) { @@ -1238,7 +1238,7 @@ case ACTIONSWITCH: { Action* action = zwitch->getAction(switchCondition); if (action != NULL) { - fillSequenceCaptionAndDescription(seq, action, NULL); + fillSequenceCaptionAndDescription(seq, action, pResolver, switchCondition); } break; } @@ -1246,7 +1246,7 @@ case DESCRIPTIONSWITCH: { Label* label = zwitch->getLabel(switchCondition); if (label != NULL) { - fillSequenceContentAndPrompt(seq, label, NULL); + fillSequenceContentAndPrompt(seq, label, pResolver); } break; } @@ -1399,7 +1399,7 @@ { p_var = (PromptVar*)pPrompt->getItem(i); - if (p_var->getName() == "BOOK_PATH") + if (p_var->getName().compare("BOOK_PATH") == 0) { //CString file_path = A2CW(mFilePath.c_str()); //p_var->setContents(LPCTSTR(file_path), ""); Modified: branches/amis3/AmisGuiMFC2/src/gui/self-voicing/PreTranslateMessageHandler.cpp =================================================================== --- branches/amis3/AmisGuiMFC2/src/gui/self-voicing/PreTranslateMessageHandler.cpp 2008-03-18 15:36:16 UTC (rev 2436) +++ branches/amis3/AmisGuiMFC2/src/gui/self-voicing/PreTranslateMessageHandler.cpp 2008-03-18 17:32:37 UTC (rev 2437) @@ -307,17 +307,17 @@ if (idUiFocus == IDOK) { - AudioSequencePlayer::Instance()->playDialogControlFromUiIds(m_instructionsDialogID, IDOK, pResolver); + AudioSequencePlayer::Instance()->playDialogControlFromUiIds(m_instructionsDialogID, IDOK, pResolver, true, "default"); return; } else if (idUiFocus == IDCANCEL) { - AudioSequencePlayer::Instance()->playDialogControlFromUiIds(m_instructionsDialogID, IDCANCEL, pResolver); + AudioSequencePlayer::Instance()->playDialogControlFromUiIds(m_instructionsDialogID, IDCANCEL, pResolver, true, "default"); return; } else if (idUiFocus >= 0) { - AudioSequence * mSeq = AudioSequencePlayer::Instance()->playDialogControlFromUiIds(m_instructionsDialogID, idUiFocus, pResolver, false); + AudioSequence * mSeq = AudioSequencePlayer::Instance()->playDialogControlFromUiIds(m_instructionsDialogID, idUiFocus, pResolver, false, "default"); if (mSeq == NULL) { @@ -334,6 +334,7 @@ } } + if (! strTextField.IsEmpty()) { if (strTextField.GetLength() == 1) { strTextField = convertKeystrokeToSpeakableString(strTextField.GetAt(0)); Modified: branches/amis3/AmisGuiMFC2/src/gui/self-voicing/datamodel/UiItem.cpp =================================================================== --- branches/amis3/AmisGuiMFC2/src/gui/self-voicing/datamodel/UiItem.cpp 2008-03-18 15:36:16 UTC (rev 2436) +++ branches/amis3/AmisGuiMFC2/src/gui/self-voicing/datamodel/UiItem.cpp 2008-03-18 17:32:37 UTC (rev 2437) @@ -33,7 +33,6 @@ if ((uiItem = zwitch->getAction(switchCondition)) != NULL) { return uiItem; } - } return NULL; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |