Update of /cvsroot/mahogany/M/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25116/include

Modified Files:
        MessageView.h 
Log Message:
change the viewer for the current message only when the user selects it from 
the viewer menu; show accelerators in this menu

Index: MessageView.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MessageView.h,v
retrieving revision 1.63
retrieving revision 1.64
diff -b -u -2 -r1.63 -r1.64
--- MessageView.h       13 Jul 2005 16:20:00 -0000      1.63
+++ MessageView.h       16 Jul 2005 19:46:43 -0000      1.64
@@ -275,4 +275,17 @@
 
    /**
+      Change the viewer to the one with the specified name or the default one.
+
+      Note that the viewer is changed only for the current message and will
+      revert back to the default one when the user switches to another message.
+      To change the viewer permanently the appropriate value must be written
+      into Profile.
+
+      @param viewer the name of the viewer to use
+      @return true if the viewer was set successfully or false on error
+    */
+   bool ChangeViewer(const String& viewer);
+
+   /**
       Called when view filter state is toggled.
 
@@ -692,4 +705,7 @@
       Set the viewer.
 
+      Notice that this method automatically deletes the old viewer, use
+      DoSetViewer() if this is undesirable.
+
       @param viewer the viewer to use, may be NULL, then CreateDefaultViewer()
                     is used; this viewer will be deleted automatically when
@@ -705,4 +721,18 @@
 
    /**
+      Initializes and sets the given non-NULL viewer.
+
+      Unlike SetViewer(), this method has no side effects (except for calling
+      OnViewerChange()).
+
+      @param viewer non-NULL viewer
+      @param viewerName its name
+      @param parent the parent window or NULL if we already have it
+    */
+   void DoSetViewer(MessageViewer *viewer,
+                    const String& viewerName,
+                    wxWindow *parent = NULL);
+
+   /**
       Reset the viewer to the default one.
 
@@ -715,4 +745,18 @@
 
    /**
+      Creates the viewer for the given name and sets it as the current one
+      remembering the original viewer.
+
+      This method doesn't update the display, use ChangeViewer() for this.
+
+      It rememebers the current viewer and its name in m_viewerOld and
+      m_viewerNameOld so that they can restored by RestoreOldViewer() later.
+
+      @param viewer the name of the viewer to use
+      @return true if the viewer was set successfully or false on error
+    */
+   bool ChangeViewerWithoutUpdate(const String& viewer);
+
+   /**
       Default viewer creation: we must always have at least this viewer
       available even if no others can be found (they live in modules). This is
@@ -724,4 +768,12 @@
    bool HasRealViewer() const { return m_viewer && !m_usingDefViewer; }
 
+   /**
+      Display the message in the current viewer.
+
+      This function does just this and so shouldn't be called directly, it's
+      used by Update() (which does the rest) and ChangeViewer().
+    */
+   void DisplayMessageInViewer();
+
    /// this is a private function used to study what kind of contents we have
    int DeterminePartContent(const MimePart *mimepart);
@@ -738,4 +790,7 @@
    void AutoAdjustViewer(const MimePart *mimepart);
 
+   /// Restore the old viewer if we had changed it
+   void RestoreOldViewer();
+
 
    /// the viewer we use



-------------------------------------------------------
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

Reply via email to