Skip to content

Commit

Permalink
Save/restore encoding settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Humdinger committed Mar 20, 2018
1 parent 6194b0b commit f25e4e5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/FTPWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ TFTPWindow::TFTPWindow(BRect frame, const char *name)

v.SetTo(""); app_config->Read("collaps_bottom", &v, "false");
fSplitView->SetItemCollapsed(1, (v.ICompare("true") == 0) ? true : false);

v.SetTo(""); app_config->Read("encoding", &v, B_TRANSLATE("None"));
BMenuItem* item = fEncodingMenu->FindItem(v);
if (item != NULL)
item->SetMarked(true);
}


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

BMenuItem* item = fEncodingMenu->FindMarked();
if (item != NULL)
s.SetTo(""); s << item->Label(); app_config->Write("encoding", s.String());

Clear();
}

Expand Down

0 comments on commit f25e4e5

Please sign in to comment.