Добавил кнопку включить

pull/24/head
Igor Belitskiy 2 years ago
parent dce6b32d10
commit 78b5c4df7d

@ -43,13 +43,18 @@ char* template_format_save(vector* vec_temp) {
char* save_format_status_cmd_all(vector* vec_temp, vector* vec_status_disk) {
char* cmd = yon_char_new("");
char* str_cmd_format = NULL;
if (vec_temp->vectorList.total > 0 && vec_status_disk->vectorList.total > 0) {
for (int i=0; i < vec_temp->vectorList.total; i++) {
config_u_g_p* _config = (config_u_g_p*)vec_temp->pfVectorGet(vec_temp, i);
for (int j=0; j < vec_status_disk->vectorList.total;j++) {
disk_status* config_disk_status = (disk_status*)vec_status_disk->pfVectorGet(vec_status_disk, j);
if (strstr(config_disk_status->device, _config->UNIX_file) && strstr(config_disk_status->device, _config->type_arr) ) {
cmd = yon_char_unite(cmd, " ", save_format_status_cmd(config_disk_status, _config));
str_cmd_format = save_format_status_cmd(config_disk_status, _config);
if (str_cmd_format) {
cmd = yon_char_unite(cmd, " ", str_cmd_format, NULL);
free(cmd);
}
}
}
}
@ -65,11 +70,16 @@ char* wrapper_save_format_status_cmd_all(config_all* _all_config) {
char* save_format_status_cmd(disk_status* config_disk_status, config_u_g_p* config) {
char* cmd = yon_char_unite("DISK_QUOTA[", config->type_arr, ":", config->UNIX_file,"]=", NULL);;
if (config_disk_status->status) {
if (config_disk_status->status == 1) {
cmd = yon_char_unite(cmd,"enable", NULL);
return cmd;
}
return yon_char_unite(cmd,"disable", NULL);
else if (config_disk_status->status == 0) {
return yon_char_unite(cmd,"disable", NULL);
}
else {
return NULL;
}
}
char* wrapper_template_format_save(config_all* _all_config, char* source_set_cmd) {

@ -2393,6 +2393,7 @@ limit
<property name="margin-end">5</property>
<items>
<item translatable="yes">Off</item>
<item translatable="yes">On</item>
<item translatable="yes">Not set</item>
</items>
</object>
@ -3327,6 +3328,7 @@ limit
<property name="margin-end">5</property>
<items>
<item translatable="yes">Off</item>
<item translatable="yes">On</item>
<item translatable="yes">Not set</item>
</items>
</object>

@ -385,3 +385,6 @@ msgstr ""
msgid "Postponing the hard limit (files)"
msgstr ""
msgid "On"
msgstr ""

@ -387,3 +387,6 @@ msgstr "Жёсткое ограничение (файлы)"
msgid "Postponing the hard limit (files)"
msgstr "Отсрочка жёсткого ограничения (файлы)"
msgid "On"
msgstr "Включено"

Loading…
Cancel
Save