Update of /cvsroot/mahogany/M/src/gui
In directory usw-pr-cvs1:/tmp/cvs-serv29130/src/gui
Modified Files:
wxFolderView.cpp
Log Message:
show the number of the selected messages in the status bar
Index: wxFolderView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxFolderView.cpp,v
retrieving revision 1.601
retrieving revision 1.602
diff -b -u -2 -r1.601 -r1.602
--- wxFolderView.cpp 8 Aug 2002 16:31:01 -0000 1.601
+++ wxFolderView.cpp 29 Aug 2002 00:24:27 -0000 1.602
@@ -629,4 +629,7 @@
void UpdateUniqueSelFlag();
+ /// update the informational message shown in the status bar
+ void UpdateStatusBar();
+
/// update the number of items in the list control
void UpdateItemCount() { SetItemCount(GetHeadersCount()); }
@@ -726,4 +729,7 @@
bool m_enableOnSelect;
+ /// the number of currently selected items
+ int m_countSelected;
+
/// the popup menu
wxMenu *m_menu;
@@ -1374,4 +1380,5 @@
m_FolderView = fv;
m_enableOnSelect = true;
+ m_countSelected = 0;
m_menu = NULL;
m_menuFolders = NULL;
@@ -2420,4 +2427,7 @@
}
+ // update the message in the status bar
+ UpdateStatusBar();
+
// check if we [still] have exactly one selection
UpdateUniqueSelFlag();
@@ -2660,4 +2670,23 @@
}
+void wxFolderListCtrl::UpdateStatusBar()
+{
+ int countNew = GetSelectedItemCount();
+ if ( countNew != m_countSelected )
+ {
+ m_countSelected = countNew;
+
+ String msg;
+ if ( m_countSelected )
+ msg.Printf(_("%lu messages selected"), (unsigned long)m_countSelected);
+ else
+ msg = "";
+
+ wxFrame *frame = mApplication->TopLevelFrame();
+ frame->SetStatusText(msg,
+ mApplication->GetStatusField(MAppBase::SF_FOLDER));
+ }
+}
+
long wxFolderListCtrl::GetUniqueSelection() const
{
@@ -3636,4 +3665,7 @@
// disable the message menu as we have no folder
EnableMMenu(MMenu_Message, m_FolderCtrl, false);
+
+ // remove the status bar pane used for showing the folder status
+ mApplication->RemoveStatusField(MAppBase::SF_FOLDER);
}
-------------------------------------------------------
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