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:
@@ -203,6 +203,8 @@ add_query_menu_items(BMenu* menu, const char* attribute, uint32 what,
|
|||||||
if (file.ReadAttrString(attribute, &value) < B_OK)
|
if (file.ReadAttrString(attribute, &value) < B_OK)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
message->AddString("attribute", value.String());
|
||||||
|
|
||||||
char name[256];
|
char name[256];
|
||||||
if (format != NULL)
|
if (format != NULL)
|
||||||
snprintf(name, sizeof(name), format, value.String());
|
snprintf(name, sizeof(name), format, value.String());
|
||||||
@@ -2284,10 +2286,12 @@ TMailWindow::MessageReceived(BMessage *msg)
|
|||||||
|
|
||||||
case M_STATUS:
|
case M_STATUS:
|
||||||
{
|
{
|
||||||
BMenuItem *menu;
|
const char* attribute;
|
||||||
msg->FindPointer("source", (void **)&menu);
|
if (msg->FindString("attribute", &attribute) != B_OK)
|
||||||
|
break;
|
||||||
|
|
||||||
BMessage message(B_CLOSE_REQUESTED);
|
BMessage message(B_CLOSE_REQUESTED);
|
||||||
message.AddString("status", menu->Label());
|
message.AddString("status", attribute);
|
||||||
PostMessage(&message);
|
PostMessage(&message);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user