From f1c4053e3315afa3181b460cbeade77523827f3e Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Tue, 26 Feb 2013 04:31:03 +0000 Subject: options saving fix git-svn-id: http://svn.miranda-ng.org/main/trunk@3772 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/FTPFileYM/src/serverlist.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'plugins/FTPFileYM/src/serverlist.cpp') diff --git a/plugins/FTPFileYM/src/serverlist.cpp b/plugins/FTPFileYM/src/serverlist.cpp index 4374a08834..79aea87d29 100644 --- a/plugins/FTPFileYM/src/serverlist.cpp +++ b/plugins/FTPFileYM/src/serverlist.cpp @@ -56,9 +56,9 @@ void ServerList::saveToDb() const DB::setAStringF(0, MODULE, "Chmod%d", opt.selected, ftp->szChmod); DB::setWordF(0, MODULE, "FtpProto%d", opt.selected, ftp->ftpProto); DB::setWordF(0, MODULE, "Port%d", opt.selected, ftp->iPort); - DB::setByteF(0, MODULE, "Passive%d", opt.selected, ftp->bPassive); + DB::setByteF(0, MODULE, "Passive%d", opt.selected, ftp->bPassive); + DB::setByteF(0, MODULE, "Enabled%d", opt.selected, ftp->bEnabled); db_set_b(0, MODULE, "Selected", opt.selected); - db_set_b(0, MODULE, "Enabled", opt.enabled); db_set_b(0, MODULE, "Default", opt.defaultFTP); } @@ -66,8 +66,6 @@ ServerList::FTP::FTP(int index) { char buff[256]; - this->bEnabled = ((opt.enabled >> index) & 1); - if (DB::getStringF(0, MODULE, "Name%d", index, this->stzName)) mir_sntprintf(this->stzName, SIZEOF(this->stzName), TranslateT("FTP Server %d"), index + 1); @@ -82,6 +80,7 @@ ServerList::FTP::FTP(int index) this->ftpProto = (FTP::EProtoType)DB::getWordF(0, MODULE, "FtpProto%d", index, FTP::FT_STANDARD); this->iPort = DB::getWordF(0, MODULE, "Port%d", index, 21); this->bPassive = DB::getByteF(0, MODULE, "Passive%d", index, 0) ? true : false; + this->bEnabled = DB::getByteF(0, MODULE, "Enabled%d", index, 0) ? true : false; } ServerList::FTP *ServerList::getSelected() const -- cgit v1.2.3