* Set "openAnyway" argument of BPopUpMenu::Go() to true, fixing bug #1493,

thanks to Edwin for the hint!
* Removed about menu item, as that's a bit superfluous in such a tiny app
  (you can still use "hey" to get the window from the running app).
* It was leaking the menu, as it didn't set it to auto-destruct.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28832 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-12-29 22:07:54 +00:00
parent fd95a7e124
commit a31688d23d
+4 -3
View File
@@ -342,6 +342,7 @@ void
NetworkStatusView::MouseDown(BPoint point)
{
BPopUpMenu *menu = new BPopUpMenu(B_EMPTY_STRING, false, false);
menu->SetAsyncAutoDestruct(true);
menu->SetFont(be_plain_font);
for (int32 i = 0; i < fInterfaces.CountItems(); i++) {
@@ -358,8 +359,8 @@ NetworkStatusView::MouseDown(BPoint point)
}
menu->AddSeparatorItem();
menu->AddItem(new BMenuItem("About NetworkStatus" B_UTF8_ELLIPSIS,
new BMessage(B_ABOUT_REQUESTED)));
//menu->AddItem(new BMenuItem("About NetworkStatus" B_UTF8_ELLIPSIS,
// new BMessage(B_ABOUT_REQUESTED)));
menu->AddItem(new BMenuItem("Open Networks Preferences" B_UTF8_ELLIPSIS,
new BMessage(kMsgOpenNetworkPreferences)));
@@ -368,7 +369,7 @@ NetworkStatusView::MouseDown(BPoint point)
menu->SetTargetForItems(this);
ConvertToScreen(&point);
menu->Go(point, true, false, true);
menu->Go(point, true, true, true);
}