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

Modified Files:
        MApplication.cpp Moptions.cpp 
Log Message:
added an option to avoid creating folder internal data message (Robert Vazan)

Index: MApplication.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MApplication.cpp,v
retrieving revision 1.272
retrieving revision 1.273
diff -b -u -2 -r1.272 -r1.273
--- MApplication.cpp    12 Jul 2003 19:02:40 -0000      1.272
+++ MApplication.cpp    16 Jul 2003 08:30:07 -0000      1.273
@@ -67,4 +67,6 @@
 #include "wx/persctrl.h"      // for wxPControls::SetSettingsPath
 
+#include "Mcclient.h"         // For env_parameters
+
 // ----------------------------------------------------------------------------
 // options we use here
@@ -95,4 +97,5 @@
 extern const MOption MP_USERDIR;
 extern const MOption MP_USER_MDIR;
+extern const MOption MP_CREATE_INTERNAL_MESSAGE;
 
 #ifdef OS_UNIX
@@ -483,4 +486,10 @@
    }
 
+   // Turn off "folder internal data" message. This must be done after
+   // profile is initialized and before any window is shown or folder
+   // manipulated. Macro name was contributed by c-client maintainer.
+   if(!READ_APPCONFIG(MP_CREATE_INTERNAL_MESSAGE))
+      env_parameters(SET_USERHASNOLIFE,(void *)1);
+   
    // extend path for commands, look in M's dirs first
    String pathEnv;
@@ -843,4 +852,5 @@
       SetupOnlineManager(); // make options change effective
 #endif // USE_DIALUP
+      OnChangeCreateInternalMessage(event);
    }
    else if (event.GetId() == MEventId_FolderUpdate)
@@ -862,4 +872,30 @@
 
    return TRUE;
+}
+
+void
+MAppBase::OnChangeCreateInternalMessage(MEventData& event)
+{
+   MEventOptionsChangeData *optionsChange
+      = (MEventOptionsChangeData *)&event;
+
+   if( optionsChange->GetChangeKind() == MEventOptionsChangeData::Ok
+         || optionsChange->GetChangeKind() == MEventOptionsChangeData::Apply )
+   {
+      bool original = !env_parameters(GET_USERHASNOLIFE, NULL);
+      bool current = READ_APPCONFIG_BOOL(MP_CREATE_INTERNAL_MESSAGE);
+      if ( original != current )
+      {
+         env_parameters(SET_USERHASNOLIFE, (void *)!current);
+         if ( !current )
+         {
+            MDialog_Message(_(
+               "Creating hidden \"folder internal data\" message is\n"
+               "disabled, but old such messages still appear in your\n"
+               "folders. Delete them using text editor. Keep in mind\n"
+               "that not all such messages were created by Mahogany."));
+         }
+      }
+   }
 }
 

Index: Moptions.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/Moptions.cpp,v
retrieving revision 1.56
retrieving revision 1.57
diff -b -u -2 -r1.56 -r1.57
--- Moptions.cpp        23 Jun 2003 01:23:46 -0000      1.56
+++ Moptions.cpp        16 Jul 2003 08:30:07 -0000      1.57
@@ -470,4 +470,5 @@
 const MOption MP_AWAY_REMEMBER;
 const MOption MP_AWAY_STATUS;
+const MOption MP_CREATE_INTERNAL_MESSAGE;
 
 // ----------------------------------------------------------------------------
@@ -862,4 +863,5 @@
     DEFINE_OPTION(MP_AWAY_REMEMBER),
     DEFINE_OPTION(MP_AWAY_STATUS),
+    DEFINE_OPTION(MP_CREATE_INTERNAL_MESSAGE),
 };
 



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to