Fixed the bug I introduced yesterday that all queried "Close and ..." items would
set the status to "_status" instead of the actual status. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20073 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
dcdc4f4b43
commit
805b68a926
@ -203,6 +203,8 @@ add_query_menu_items(BMenu* menu, const char* attribute, uint32 what,
|
||||
if (file.ReadAttrString(attribute, &value) < B_OK)
|
||||
continue;
|
||||
|
||||
message->AddString("attribute", value.String());
|
||||
|
||||
char name[256];
|
||||
if (format != NULL)
|
||||
snprintf(name, sizeof(name), format, value.String());
|
||||
@ -2284,10 +2286,12 @@ TMailWindow::MessageReceived(BMessage *msg)
|
||||
|
||||
case M_STATUS:
|
||||
{
|
||||
BMenuItem *menu;
|
||||
msg->FindPointer("source", (void **)&menu);
|
||||
const char* attribute;
|
||||
if (msg->FindString("attribute", &attribute) != B_OK)
|
||||
break;
|
||||
|
||||
BMessage message(B_CLOSE_REQUESTED);
|
||||
message.AddString("status", menu->Label());
|
||||
message.AddString("status", attribute);
|
||||
PostMessage(&message);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user