Update of /cvsroot/mahogany/M/src/gui
In directory usw-pr-cvs1:/tmp/cvs-serv18077/src/gui
Modified Files:
wxRenameDialog.cpp
Log Message:
treat mailbox names for file folders properly by using file-specific function and
taking into account the current platform file name delimiter
Index: wxRenameDialog.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxRenameDialog.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -b -u -2 -r1.4 -r1.5
--- wxRenameDialog.cpp 26 Jan 2002 14:12:32 -0000 1.4
+++ wxRenameDialog.cpp 1 May 2002 22:12:00 -0000 1.5
@@ -35,4 +35,6 @@
#endif // USE_PCH
+#include <wx/filename.h>
+
#include "MFolder.h"
@@ -236,5 +238,20 @@
void wxFolderRenameDialog::DoUpdateMboxPath(const String& folderName)
{
- String mboxName = m_textMbox->GetValue().BeforeLast(m_chDelim);
+ String mboxName,
+ path = m_textMbox->GetValue();
+ switch ( m_folder->GetType() )
+ {
+ case MF_FILE:
+ case MF_MH:
+ // the file names are more complicated: we have to deal with different
+ // delimiters depending on platform and so on
+ wxFileName::SplitPath(path, &mboxName, NULL, NULL);
+ break;
+
+ default:
+ // just take all components but the last one
+ mboxName = path.BeforeLast(m_chDelim);
+ }
+
mboxName << m_chDelim << folderName;
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates