StyledEdit:EncodingMenu: autodetect on root menu entry

This commit is contained in:
Siarzhuk Zharski
2013-01-18 16:16:19 +01:00
parent 29155ba4de
commit ad834f7320
+3 -1
View File
@@ -1291,9 +1291,11 @@ StyledEditWindow::_InitWindow(uint32 encoding)
fWrapItem->SetMarked(true);
fWrapItem->SetShortcut('W', B_OPTION_KEY);
BMessage *message = new BMessage(MENU_RELOAD);
message->AddString("encoding", "auto");
menu->AddItem(fEncodingItem = new BMenuItem(PopulateEncodingMenu(
new BMenu(B_TRANSLATE("Text encoding")), "UTF-8"),
new BMessage(MENU_RELOAD)));
message));
fEncodingItem->SetEnabled(false);
menu->AddSeparatorItem();