Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv2682/src/gui

Modified Files:
        wxComposeView.cpp 
Log Message:
don't forget that the composer text was modified after running external editor

Index: wxComposeView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxComposeView.cpp,v
retrieving revision 1.311
retrieving revision 1.312
diff -b -u -2 -r1.311 -r1.312
--- wxComposeView.cpp   6 Nov 2002 00:11:45 -0000       1.311
+++ wxComposeView.cpp   29 Nov 2002 21:31:57 -0000      1.312
@@ -2820,4 +2820,7 @@
             else if ( SaveMsgTextToFile(filename) )
             {
+               // we have been saved
+               ResetDirty();
+
                wxLogStatus(this, _("Message text saved to file '%s'."),
                            filename.c_str());
@@ -2970,5 +2973,4 @@
          }
 
-         // 'false' means that it's ok to leave the file empty
          if ( !SaveMsgTextToFile(tmpFileName.GetName()) )
          {
@@ -3095,4 +3097,6 @@
    else // exit code ok
    {
+      bool wasModified = m_editor->IsModified();
+
       if ( !InsertFileAsText(m_tmpFileName, MessageEditor::Insert_Replace) )
       {
@@ -3111,6 +3115,11 @@
          if ( ComputeTextHash() == m_oldTextHash )
          {
-            // assume it wasn't
-            ResetDirty();
+            // assume it wasn't and so restore the previous "modified" flag (if
+            // it had been modified before the ext editor was launched, it is
+            // still dirty, of course, but if it wasn't, it didn't become so)
+            if ( !wasModified )
+            {
+               m_editor->ResetDirty();
+            }
 
             // show it to the user so that he knows that there will be no
@@ -3937,6 +3946,4 @@
       part->DecRef();
    }
-
-   ((wxComposeView *)this)->ResetDirty(); // const_cast
 
    return true;



-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to