Subject: Patch: Encoding dialog
From: Andrew Dunbar (hippietrail@yahoo.com)
Date: Thu Jun 07 2001 - 21:03:22 CDT
This brings the Windows encoding dialog back into line
with the way things were actually committed. Compiles on
Windows again.
Andrew Dunbar.
-- http://linguaphile.sourceforge.net
Index: src/af/xap/win/xap_Win32Dlg_Encoding.cpp =================================================================== RCS file: /cvsroot/abi/src/af/xap/win/xap_Win32Dlg_Encoding.cpp,v retrieving revision 1.1 diff -u -r1.1 xap_Win32Dlg_Encoding.cpp --- src/af/xap/win/xap_Win32Dlg_Encoding.cpp 2001/06/07 15:52:18 1.1 +++ src/af/xap/win/xap_Win32Dlg_Encoding.cpp 2001/06/08 01:51:34 @@ -112,15 +112,15 @@ HWND hwndList = GetDlgItem(hWnd, XAP_RID_DIALOG_ENCODING_LBX_ENCODING); // load each string name into the list - for ( UT_uint32 i=0; i < m_iEncCount; i++ ) + for ( UT_uint32 i=0; i < _getEncodingsCount(); i++ ) { - const XML_Char* s = m_ppEncodings[i]; + const XML_Char* s = _getAllEncodings()[i]; SendMessage(hwndList, LB_ADDSTRING, 0, (LPARAM) s); SendMessage(hwndList, LB_SETITEMDATA, i, (LPARAM) i); } // Set to default or guessed encoding - SendMessage(hwndList, LB_SETCURSEL, m_iSelIndex, 0); + SendMessage(hwndList, LB_SETCURSEL, _getSelectionIndex(), 0); } return 1; // 1 == we did not call SetFocus() @@ -145,8 +145,8 @@ case LBN_DBLCLK: nItem = SendMessage(hWndCtrl, LB_GETCURSEL, 0, 0); - _setEncoding( m_ppEncodings[nItem] ); - m_answer = a_OK; + _setEncoding( _getAllEncodings()[nItem] ); + _setAnswer(a_OK); EndDialog(hWnd,0); return 1; @@ -156,7 +156,7 @@ break; case IDCANCEL: // also XAP_RID_DIALOG_ENCODING_BTN_CANCEL - m_answer = a_CANCEL; + _setAnswer(a_CANCEL); EndDialog(hWnd,0); return 1; @@ -165,12 +165,12 @@ nItem = SendMessage(hWndList, LB_GETCURSEL, 0, 0); if( nItem != LB_ERR) { - _setEncoding( m_ppEncodings[nItem] ); - m_answer = a_OK; + _setEncoding( _getAllEncodings()[nItem] ); + _setAnswer(a_OK); } else { - m_answer = a_CANCEL; + _setAnswer(a_CANCEL); } EndDialog(hWnd,0); return 1;
_________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
This archive was generated by hypermail 2b25 : Thu Jun 07 2001 - 21:01:27 CDT