Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7893/src/gui
Modified Files:
wxMFolderDialogs.cpp
Log Message:
handle folders ending with '.messages' suffix
Index: wxMFolderDialogs.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMFolderDialogs.cpp,v
retrieving revision 1.191
retrieving revision 1.192
diff -b -u -2 -r1.191 -r1.192
--- wxMFolderDialogs.cpp 30 Jun 2005 23:39:47 -0000 1.191
+++ wxMFolderDialogs.cpp 6 Jul 2005 22:00:49 -0000 1.192
@@ -87,5 +87,4 @@
// ----------------------------------------------------------------------------
-extern const MOption MP_FOLDER_COMMENT;
extern const MOption MP_FOLDER_FILE_DRIVER;
extern const MOption MP_FOLDER_LOGIN;
@@ -838,5 +837,5 @@
// this is one of rare cases where persistent controls are more painful than
// useful - when we create the folder, we always want to start with the
- // "Access" page, but the persistent notebook restores thep age we used the
+ // "Access" page, but the persistent notebook restores the page we used the
// last time. We still do use it, because it's nice that "Properties" dialog
// will open on the page where we were last when it's opened the next time -
@@ -1053,10 +1052,10 @@
#ifdef USE_SSL
gettext_noop("SS&L/TLS usage"),
- gettext_noop("Accept &unsigned (self-signed) certificates"),
+ gettext_noop("Accept &unsigned certificates"),
#endif // USE_SSL
- gettext_noop("&Keep server connection when idle"),
+ gettext_noop("&Keep connection when idle"),
gettext_noop("Anon&ymous access"),
#ifdef USE_LOCAL_CHECKBOX
- gettext_noop("Folder can be accessed &without network"),
+ gettext_noop("Can be accessed &without network"),
#endif // USE_LOCAL_CHECKBOX
gettext_noop("&Hide folder in tree"),
@@ -1131,5 +1130,5 @@
m_acceptUnsignedSSL->SetToolTip(_("Accept unsigned (self-signed) SSL
certificates?"));
#endif // USE_SSL
-#endif // wxUSE_PRINTING_ARCHITECTURE
+#endif // wxUSE_TOOLTIPS
wxFolderBaseDialog *dlgParent = GET_PARENT_OF_CLASS(this,
wxFolderBaseDialog);
@@ -1329,5 +1328,5 @@
if ( parent )
- folderName = parent->GetPath();
+ folderName =
MailFolder::GetLogicalMailboxName(parent->GetPath());
if ( !folderName.empty() )
@@ -2023,9 +2022,6 @@
}
- // we want to read settings from the default section under
- // M_FOLDER_CONFIG_SECTION or from M_PROFILE_CONFIG_SECTION if the section
- // is empty (i.e. we have no parent folder)
-
- Profile_obj profile(m_folderPath);
+ MFolder_obj folder(m_folderPath);
+ CHECK_RET( folder, _T("can't create MFolder to read initial values") );
RadioIndex selRadio = (RadioIndex)m_radio->GetSelection();
@@ -2035,47 +2031,18 @@
if ( FolderTypeHasUserName(folderType) )
{
- value = READ_CONFIG_TEXT(profile, MP_FOLDER_LOGIN);
- if ( !value )
- value = READ_APPCONFIG_TEXT(MP_USERNAME);
+ value = folder->GetLogin();
m_login->SetValue(value);
m_originalValues[Username] = value;
- String pwd = strutil_decrypt(READ_CONFIG(profile, MP_FOLDER_PASSWORD));
- m_password->SetValue(pwd);
- m_originalValues[Password] = pwd;
+ value = folder->GetPassword();
+ m_password->SetValue(value);
+ m_originalValues[Password] = value;
}
if ( FolderTypeHasServer(folderType) )
{
- // take the global server setting for this protocol
- switch ( folderType )
- {
- case MF_NNTP:
- value = READ_CONFIG_TEXT(profile, MP_NNTPHOST);
- break;
- case MF_POP:
- value = READ_CONFIG_TEXT(profile, MP_POPHOST);
- break;
- case MF_IMAP:
- value = READ_CONFIG_TEXT(profile, MP_IMAPHOST);
- break;
-
- default:
- FAIL_MSG(_T("new remote foldertype was added"));
- // fall through
-
- case MF_GROUP:
- // we will read the correct value below from MP_HOSTNAME
- value.clear();
- break;
- }
-
- if ( !value )
- {
- // set to this host by default
- value = READ_CONFIG_TEXT(profile, MP_HOSTNAME);
- }
-
+ value = folder->GetServer();
m_server->SetValue(value);
+
switch ( folderType )
{
@@ -2098,5 +2065,5 @@
wxTextCtrl *textToSet;
- value = READ_CONFIG_TEXT(profile, MP_FOLDER_PATH);
+ value = MailFolder::GetLogicalMailboxName(folder->GetPath());
switch ( selRadio )
{
@@ -2155,17 +2122,12 @@
if ( !IsCreating() )
- m_comment->SetValue(READ_CONFIG(profile, MP_FOLDER_COMMENT));
+ m_comment->SetValue(folder->GetComment());
// remember the original folder type
- m_originalMboxFormat = (FileMailboxFormat)
- profile->readEntryFromHere
- (
- GetOptionName(MP_FOLDER_FILE_DRIVER),
- FileMbox_Max
- );
+ m_originalMboxFormat = folder->GetFileMboxFormat();
// set the initial values for all checkboxes and remember them: we will only
// write it back if it changes later
- int flags = GetFolderFlags(READ_CONFIG(profile, MP_FOLDER_TYPE));
+ const int flags = folder->GetFlags();
m_originalIsHiddenValue = (flags & MF_FLAGS_HIDDEN) != 0;
@@ -2202,10 +2164,10 @@
#ifdef USE_SSL
- m_originalIntValues[SSL] = READ_CONFIG(profile, MP_USE_SSL);
+ SSLCert certAcceped;
+ m_originalIntValues[SSL] = folder->GetSSL(&certAcceped);
m_useSSL->SetSelection(m_originalIntValues[SSL]);
- m_originalIntValues[AcceptUnsigned] = READ_CONFIG(profile,
- MP_USE_SSL_UNSIGNED);
- m_acceptUnsignedSSL->SetValue(m_originalIntValues[AcceptUnsigned] != 0);
+ m_originalIntValues[AcceptUnsigned] = certAcceped;
+ m_acceptUnsignedSSL->SetValue(certAcceped == SSLCert_AcceptUnsigned);
#endif // USE_SSL
@@ -2219,5 +2181,4 @@
{
// use the folders icon
- MFolder_obj folder(m_folderPath);
m_originalFolderIcon = GetFolderIconForDisplay(folder);
}
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates