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

Modified Files:
        MessageView.cpp 
Log Message:
use filter descriptions, not names, in the 'View|Filters' menu

Index: MessageView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MessageView.cpp,v
retrieving revision 1.127
retrieving revision 1.128
diff -b -u -2 -r1.127 -r1.128
--- MessageView.cpp     19 Aug 2003 00:06:03 -0000      1.127
+++ MessageView.cpp     13 Sep 2003 23:04:55 -0000      1.128
@@ -277,6 +277,8 @@
                   int prio,
                   const String& name,
+                  const String& desc,
                   ViewFilterNode *next)
-      : m_name(name)
+      : m_name(name),
+        m_desc(desc)
    {
       m_filter = filter;
@@ -294,4 +296,5 @@
    int GetPriority() const { return m_prio; }
    const String& GetName() const { return m_name; }
+   const String& GetDescription() const { return m_desc; }
    ViewFilterNode *GetNext() const { return m_next; }
 
@@ -305,5 +308,6 @@
    ViewFilter *m_filter;
    int m_prio;
-   String m_name;
+   String m_name,
+          m_desc;
    ViewFilterNode *m_next;
 };
@@ -682,4 +686,5 @@
                      ViewFilter::Priority_Lowest,
                      _T(""),
+                     _T(""),
                      NULL
                    );
@@ -724,9 +729,11 @@
 
                   // and insert it here
-                  ViewFilterNode *nodeNew = new ViewFilterNode
+                  ViewFilterNode *
+                     nodeNew = new ViewFilterNode
                                                 (
                                                    filter,
                                                    prio,
                                                    name,
+                                       filterFactory->GetDescription(),
                                                    node
                                                 );
@@ -795,17 +802,23 @@
 
 bool
-MessageView::GetFirstViewFilter(String *name, bool *enabled, void **cookie)
+MessageView::GetFirstViewFilter(String *name,
+                                String *desc,
+                                bool *enabled,
+                                void **cookie)
 {
-   CHECK( cookie, false, _T("NULL cookie in GetFirstFilter") );
+   CHECK( cookie, NULL, _T("NULL cookie in GetFirstFilter") );
 
    *cookie = m_filters;
 
-   return GetNextViewFilter(name, enabled, cookie);
+   return GetNextViewFilter(name, desc, enabled, cookie);
 }
 
 bool
-MessageView::GetNextViewFilter(String *name, bool *enabled, void **cookie)
+MessageView::GetNextViewFilter(String *name,
+                               String *desc,
+                               bool *enabled,
+                               void **cookie)
 {
-   CHECK( name && enabled && cookie, false,
+   CHECK( name && desc && enabled && cookie, NULL,
           _T("NULL parameter in GetNextFilter") );
 
@@ -824,4 +837,5 @@
 
    *name = filter->GetName();
+   *desc = filter->GetDescription();
    *enabled = filter->GetFilter()->IsEnabled();
    *cookie = filter->GetNext();



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to