Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9612/src/gui

Modified Files:
        wxComposeView.cpp 
Log Message:
retain the compose template after identity change if it was specified manually 
and not read from profile (bug 915)

Index: wxComposeView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxComposeView.cpp,v
retrieving revision 1.397
retrieving revision 1.398
diff -b -u -2 -r1.397 -r1.398
--- wxComposeView.cpp   12 Feb 2006 16:50:05 -0000      1.397
+++ wxComposeView.cpp   12 Feb 2006 17:19:47 -0000      1.398
@@ -1668,4 +1668,5 @@
    m_sending =
    m_closing = false;
+   m_customTemplate = false;
    m_OriginalMessage = NULL;
    m_DraftMessage = NULL;
@@ -2733,6 +2734,6 @@
    {
       // writing a new message/article: wait until the headers are filled
-      // before evacuating the template
-      if ( !m_template )
+      // before evaluating the template
+      if ( m_template.empty() )
       {
          m_template = GetMessageTemplate(m_mode == Mode_Mail
@@ -2848,8 +2849,9 @@
    {
       // get the template value
-      String templateValue = !m_template ? GetMessageTemplate(kind, m_Profile)
+      String templateValue = m_template.empty()
+                                 ? GetMessageTemplate(kind, m_Profile)
                                          : m_template;
 
-      if ( !templateValue )
+      if ( templateValue.empty() )
       {
          // if there is no template just don't do anything
@@ -2929,5 +2931,5 @@
             // fixes
 
-            if ( !m_template )
+            if ( m_template.empty() )
             {
                // invoke the template configuration dialog and if something
@@ -3161,6 +3163,9 @@
          DoClear();
 
-         // forget previously read template, it could have changed
+         // forget previously read template if we read it from profile, it
+         // could have changed
+         if ( !m_customTemplate )
          m_template.clear();
+
          DoInitText();
       }



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to