Update of /cvsroot/mahogany/M/include
In directory usw-pr-cvs1:/tmp/cvs-serv8585/include
Modified Files:
MApplication.h
Log Message:
first attempt at making status bar handling a bit more reasonable: in
particular, they should really be dynamic which was the purpose of the
original code but this never workd so far
Index: MApplication.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MApplication.h,v
retrieving revision 1.95
retrieving revision 1.96
diff -b -u -2 -r1.95 -r1.96
--- MApplication.h 22 Apr 2002 10:12:06 -0000 1.95
+++ MApplication.h 27 Aug 2002 23:48:57 -0000 1.96
@@ -398,14 +398,48 @@
//@}
+ /** @name Status bar stuff */
+ //@{
+
+ /// all defined status bar panes, not all of them are always used
enum StatusFields
{
- SF_STANDARD = 0,
+ SF_ILLEGAL = -1,
+
+ /// the main pane where all status messages go by default
+ SF_STANDARD,
+
+ /// folder view status
+ SF_FOLDER,
+
+#ifdef USE_DIALUP
+ /// online/offline status is shown here
SF_ONLINE,
+#endif // USE_DIALUP
+
+ /// outbox status is shown here
SF_OUTBOX,
+
+ /// total number of status bar fields
SF_MAXIMUM
};
- /// return the number of the status bar field to use for a given
- /// function
- virtual int GetStatusField(enum StatusFields function) const;
+
+ /**
+ return the number of the status bar pane to use for the given
+ field inserting a new pane in the status bar if necessary
+
+ @param field to find index for
+ @return the index of the field in the status bar, normally never -1
+ */
+ virtual int GetStatusField(StatusFields field);
+
+ /**
+ removes a field from the status bar
+
+ @param field to remove
+ */
+ virtual void RemoveStatusField(StatusFields field);
+
+ //@}
+
/// updates display of outbox status
virtual void UpdateOutboxStatus(class MailFolder *mf = NULL) const = 0;
@@ -429,6 +463,17 @@
virtual void UnloadModules(void) = 0;
- /// makes sure the status bar has enough fields
- virtual void UpdateStatusBar(int nfields, bool isminimum = FALSE) const = 0;
+
+ /**
+ m_statusPanes is a sorted array containing all the status bar fields
+ currently shown in their order of appearance
+ */
+ StatusFields m_statusPanes[SF_MAXIMUM];
+
+ /**
+ this method should be implemented at GUI level to recreate the status bar
+ to match m_statusPanes array and is called by Get/RemoveStatusField()
+ */
+ virtual void RecreateStatusBar() = 0;
+
/// Send all messages from the outbox "name"
-------------------------------------------------------
This sf.net email is sponsored by: Jabber - The world's fastest growing
real-time communications platform! Don't just IM. Build it in!
http://www.jabber.com/osdn/xim
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates