Update of /cvsroot/mahogany/M/src/classes
In directory sc8-pr-cvs1:/tmp/cvs-serv22023/src/classes
Modified Files:
MessageView.cpp
Log Message:
user language selection in the menu overrides the automatic language detection (again)
Index: MessageView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MessageView.cpp,v
retrieving revision 1.137
retrieving revision 1.138
diff -b -u -2 -r1.137 -r1.138
--- MessageView.cpp 7 Oct 2003 22:48:44 -0000 1.137
+++ MessageView.cpp 10 Oct 2003 21:57:06 -0000 1.138
@@ -105,5 +105,4 @@
extern const MOption MP_INLINE_GFX_SIZE;
extern const MOption MP_MAX_MESSAGE_SIZE;
-extern const MOption MP_MSGVIEW_AUTO_ENCODING;
extern const MOption MP_MSGVIEW_DEFAULT_ENCODING;
extern const MOption MP_MSGVIEW_HEADERS;
@@ -1562,6 +1561,11 @@
{
// get the encoding of the text
- wxFontEncoding encPart = wxFONTENCODING_SYSTEM;
- if ( READ_CONFIG(GetProfile(), MP_MSGVIEW_AUTO_ENCODING) )
+ wxFontEncoding encPart;
+ if( m_encodingUser != wxFONTENCODING_DEFAULT )
+ {
+ // user-specified encoding overrides everything
+ encPart = m_encodingUser;
+ }
+ else // determine the encoding ourselves
{
encPart = textEnc;
@@ -1590,9 +1594,9 @@
if ( encPart == wxFONTENCODING_SYSTEM )
{
- // autodetecting encoding is disabled or didn't work, use the users fall
- // back encoding, if any
+ // autodetecting encoding didn't work, use the fall back encoding, if any
if ( m_encodingUser != wxFONTENCODING_DEFAULT )
{
- encPart = m_encodingUser;
+ encPart = (wxFontEncoding)(long)
+ READ_CONFIG(GetProfile(), MP_MSGVIEW_DEFAULT_ENCODING);
}
}
@@ -2941,10 +2945,7 @@
{
// if the user had manually set the encoding for the old message, we
- // revert back to the default encoding for the new message
- //
- // note that if m_encodingUser will be wxFONTENCODING_DEFAULT (default),
- // we'll detect the encoding automatically
- m_encodingUser = (wxFontEncoding)(long)
- READ_CONFIG(GetProfile(), MP_MSGVIEW_DEFAULT_ENCODING);
+ // revert back to the default encoding for the new message (otherwise it is
+ // already wxFONTENCODING_DEFAULT and the line below does nothing at all)
+ m_encodingUser = wxFONTENCODING_DEFAULT;
}
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates