first start encodings menu up for save as
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3852 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include <Window.h>
|
||||
|
||||
//****** Application defined header files************/.
|
||||
#include "CharacterSet.h"
|
||||
#include "Constants.h"
|
||||
#include "ColorMenuItem.h"
|
||||
#include "FindWindow.h"
|
||||
@@ -852,9 +853,25 @@ StyledEditWindow::SaveAs()
|
||||
|
||||
fSavePanelEncodingMenu= new BMenu("Encoding");
|
||||
menuBar->AddItem(fSavePanelEncodingMenu);
|
||||
fSavePanelEncodingMenu->SetRadioMode(true);
|
||||
|
||||
status_t status = B_OK;
|
||||
CharacterSetRoster * roster = CharacterSetRoster::Roster(&status);
|
||||
if (status == B_OK) {
|
||||
for (int id = 0; (id < roster->GetCharacterSetCount()) ; id++) {
|
||||
const CharacterSet * cs = roster->FindCharacterSetByConversionID(id);
|
||||
BString name(cs->GetPrintName());
|
||||
name.Append(" (");
|
||||
name.Append(cs->GetMIMEName());
|
||||
name.Append(")");
|
||||
BMenuItem * item = new BMenuItem(name.String(),new BMessage(SAVE_AS_ENCODING));
|
||||
item->SetTarget(this);
|
||||
fSavePanelEncodingMenu->AddItem(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// it's own scope allows the lock to be released before Show()
|
||||
// its own scope allows the lock to be released before Show()
|
||||
{
|
||||
// TODO: add encodings
|
||||
BAutolock lock(fSavePanel->Window());
|
||||
|
||||
Reference in New Issue
Block a user