Turn off the drafts live-query menu update when viewing existing e-mail
messages. It limits the number of open windows to an annoyingly small quantity and makes opening mail files slow. That's because EACH window starts up a bunch of queries to find drafts, one for each disk volume. Comments about design alternatives to this kludge welcome. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14158 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1221,13 +1221,24 @@ TMailWindow::TMailWindow(BRect rect, const char *title, const entry_ref *ref, co
|
|||||||
"New Mail Message", "N) 新規メッセージ作成"), msg, 'N'));
|
"New Mail Message", "N) 新規メッセージ作成"), msg, 'N'));
|
||||||
item->SetTarget(be_app);
|
item->SetTarget(be_app);
|
||||||
|
|
||||||
QueryMenu *queryMenu;
|
// Cheap hack - only show the drafts menu when composing messages. Insert
|
||||||
queryMenu = new QueryMenu(MDR_DIALECT_CHOICE ("Open Draft", "O) ドラフトを開く"), false);
|
// a "true || " in the following IF statement if you want the old BeMail
|
||||||
queryMenu->SetTargetForItems(be_app);
|
// behaviour. The difference is that without live draft menu updating you
|
||||||
|
// can open around 100 e-mails (the BeOS maximum number of open files)
|
||||||
|
// rather than merely around 20, since each open draft-monitoring query
|
||||||
|
// sucks up one file handle per mounted BFS disk volume. Plus mail file
|
||||||
|
// opening speed is noticably improved! Possible ToDo: change this to pop
|
||||||
|
// up a Tracker query for drafts rather than populating the menu item with
|
||||||
|
// file names, then we can always have a draft menu turned on.
|
||||||
|
|
||||||
queryMenu->SetPredicate("MAIL:draft==1");
|
if (!fIncoming) {
|
||||||
menu->AddItem(queryMenu);
|
QueryMenu *queryMenu;
|
||||||
|
queryMenu = new QueryMenu(MDR_DIALECT_CHOICE ("Open Draft", "O) ドラフトを開く"), false);
|
||||||
|
queryMenu->SetTargetForItems(be_app);
|
||||||
|
|
||||||
|
queryMenu->SetPredicate("MAIL:draft==1");
|
||||||
|
menu->AddItem(queryMenu);
|
||||||
|
}
|
||||||
menu->AddSeparatorItem();
|
menu->AddSeparatorItem();
|
||||||
|
|
||||||
if (!resending && fIncoming) {
|
if (!resending && fIncoming) {
|
||||||
|
|||||||
Reference in New Issue
Block a user