Skip to content

Commit

Permalink
Сохранение всех параметров диалога создания архива.
Browse files Browse the repository at this point in the history
  • Loading branch information
w17 committed Jul 6, 2016
1 parent 41c3c04 commit c40faab
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 9 deletions.
2 changes: 1 addition & 1 deletion plugins/arclite/archive.hpp
Expand Up @@ -143,7 +143,7 @@ class ArcAPI {
return get()->arc_formats;
}
static const ArcCodecs& codecs() {
return get()->arc_codecs;
return get()->arc_codecs;
}
static const SfxModules& sfx() {
return get()->sfx_modules;
Expand Down
4 changes: 4 additions & 0 deletions plugins/arclite/changelog
@@ -1,3 +1,7 @@
w17 06.07.2016 19:56:42 +0300 - build 240

1. ���������� ���� ���������� ������� �������� ������.

w17 06.06.2016 11:55:16 +0300 - build 239

1. 7z.dll ��������� �� ������ 16.02.
Expand Down
16 changes: 16 additions & 0 deletions plugins/arclite/options.cpp
Expand Up @@ -85,10 +85,14 @@ Options::Options():
update_level(5),
update_method(),
update_solid(true),
update_encrypt(false),
update_show_password(false),
update_encrypt_header(triUndef),
update_create_sfx(false),
update_sfx_options(),
update_enable_volumes(false),
update_volume_size(),
update_move_files(false),
update_ignore_errors(false),
update_overwrite(oaAsk),
update_append_ext(false),
Expand Down Expand Up @@ -176,10 +180,16 @@ void Options::load() {
GET_VALUE(update_level, int);
GET_VALUE(update_method, str);
GET_VALUE(update_solid, bool);
GET_VALUE(update_advanced, str);
GET_VALUE(update_encrypt, bool);
GET_VALUE(update_show_password, bool);
GET_VALUE(update_encrypt_header, int);
GET_VALUE(update_password, str);
GET_VALUE(update_create_sfx, bool);
load_sfx_options(key, update_sfx_options);
GET_VALUE(update_enable_volumes, bool);
GET_VALUE(update_volume_size, str);
GET_VALUE(update_move_files, bool);
GET_VALUE(update_ignore_errors, bool);
GET_VALUE(update_overwrite, int);
GET_VALUE(update_append_ext, bool);
Expand Down Expand Up @@ -220,10 +230,16 @@ void Options::save() const {
SET_VALUE(update_level, int);
SET_VALUE(update_method, str);
SET_VALUE(update_solid, bool);
SET_VALUE(update_advanced, str);
SET_VALUE(update_encrypt, bool);
SET_VALUE(update_show_password, bool);
SET_VALUE(update_encrypt_header, int);
SET_VALUE(update_password, str);
SET_VALUE(update_create_sfx, bool);
save_sfx_options(key, update_sfx_options);
SET_VALUE(update_enable_volumes, bool);
SET_VALUE(update_volume_size, str);
SET_VALUE(update_move_files, bool);
SET_VALUE(update_ignore_errors, bool);
SET_VALUE(update_overwrite, int);
SET_VALUE(update_append_ext, bool);
Expand Down
6 changes: 6 additions & 0 deletions plugins/arclite/options.hpp
Expand Up @@ -15,10 +15,16 @@ struct Options {
unsigned update_level;
wstring update_method;
bool update_solid;
wstring update_advanced;
bool update_encrypt;
bool update_show_password;
TriState update_encrypt_header;
wstring update_password;
bool update_create_sfx;
SfxOptions update_sfx_options;
bool update_enable_volumes;
wstring update_volume_size;
bool update_move_files;
bool update_ignore_errors;
OverwriteAction update_overwrite;
bool update_append_ext;
Expand Down
25 changes: 18 additions & 7 deletions plugins/arclite/plugin.cpp
Expand Up @@ -492,15 +492,26 @@ class Plugin {
options.arc_type = c_7z;
else
options.arc_type = arc_types.front();
options.sfx_options = g_options.update_sfx_options;
options.level = g_options.update_level;
options.method = g_options.update_method;
options.solid = g_options.update_solid;
options.encrypt = false;
options.append_ext = g_options.update_append_ext;

options.advanced = g_options.update_advanced;

options.encrypt = g_options.update_encrypt;
options.encrypt_header = g_options.update_encrypt_header;
if (options.encrypt)
options.password = g_options.update_password;

options.create_sfx = g_options.update_create_sfx;
options.sfx_options = g_options.update_sfx_options;

options.enable_volumes = g_options.update_enable_volumes;
options.volume_size = g_options.update_volume_size;
options.append_ext = g_options.update_append_ext;
}

options.move_files = g_options.update_move_files;
}
else {
options.arc_type = archive->arc_chain.back().type; // required to set update properties
archive->load_update_props();
Expand All @@ -513,11 +524,11 @@ class Plugin {
options.overwrite = g_options.update_overwrite;
if (op_mode & OPM_EDIT)
options.overwrite = oaOverwrite;
options.move_files = move != 0;
options.create_sfx = false;
options.enable_volumes = false;
}
options.create_sfx = false;
options.enable_volumes = false;
options.show_password = g_options.update_show_password;
options.move_files = move != 0;
CHECK(get_app_option(FSSF_SYSTEM, c_copy_opened_files_option, options.open_shared));

options.ignore_errors = g_options.update_ignore_errors;
Expand Down
2 changes: 1 addition & 1 deletion plugins/arclite/project.ini
Expand Up @@ -2,4 +2,4 @@
MODULE = arclite
VER_MAJOR = 3
VER_MINOR = 0
VER_BUILD = 239
VER_BUILD = 240
6 changes: 6 additions & 0 deletions plugins/arclite/ui.cpp
Expand Up @@ -1133,13 +1133,19 @@ class UpdateDialog: public Far::Dialog {
read_controls(options);
if (new_arc) {
g_options.update_arc_format_name = ArcAPI::formats().at(options.arc_type).name;
g_options.update_create_sfx = options.create_sfx;
g_options.update_sfx_options = options.sfx_options;
g_options.update_enable_volumes = options.enable_volumes;
g_options.update_volume_size = options.volume_size;
g_options.update_level = options.level;
g_options.update_method = options.method;
g_options.update_solid = options.solid;
g_options.update_advanced = options.advanced;
g_options.update_encrypt = options.encrypt;
g_options.update_encrypt_header = options.encrypt_header;
g_options.update_password = options.password;
g_options.update_append_ext = options.append_ext;
g_options.update_move_files = options.move_files;
}
else {
g_options.update_overwrite = options.overwrite;
Expand Down

0 comments on commit c40faab

Please sign in to comment.