Skip to content

Commit f25e4e5

Browse files
author
Humdinger
committed
Save/restore encoding settings
1 parent 6194b0b commit f25e4e5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/FTPWindow.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,11 @@ TFTPWindow::TFTPWindow(BRect frame, const char *name)
257257

258258
v.SetTo(""); app_config->Read("collaps_bottom", &v, "false");
259259
fSplitView->SetItemCollapsed(1, (v.ICompare("true") == 0) ? true : false);
260+
261+
v.SetTo(""); app_config->Read("encoding", &v, B_TRANSLATE("None"));
262+
BMenuItem* item = fEncodingMenu->FindItem(v);
263+
if (item != NULL)
264+
item->SetMarked(true);
260265
}
261266

262267

@@ -273,6 +278,10 @@ TFTPWindow::~TFTPWindow()
273278
s.SetTo(""); s << fSplitView->IsItemCollapsed((bool)0); app_config->Write("collaps_top", s.String());
274279
s.SetTo(""); s << fSplitView->IsItemCollapsed((bool)1); app_config->Write("collaps_bottom", s.String());
275280

281+
BMenuItem* item = fEncodingMenu->FindMarked();
282+
if (item != NULL)
283+
s.SetTo(""); s << item->Label(); app_config->Write("encoding", s.String());
284+
276285
Clear();
277286
}
278287

0 commit comments

Comments
 (0)