From 6ccf02ccec04b2fe3fdb8628b4ebeb83ff373bc4 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 20 Nov 2023 17:54:34 +0600 Subject: [PATCH] Fixed errors --- source/ubl-settings-logging.c | 5 ----- source/ubl-utils.c | 11 ++++++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/source/ubl-settings-logging.c b/source/ubl-settings-logging.c index 58dc974..6fb80a6 100644 --- a/source/ubl-settings-logging.c +++ b/source/ubl-settings-logging.c @@ -809,11 +809,6 @@ void on_logrotate_save(GtkWidget *self, dictionary *dict){ char *endwork = (char*)gtk_entry_get_text(GTK_ENTRY(window->EndworkCommandEntry)); sharedscripts = "sharedscripts"; if (!yon_char_is_empty(before_once)) { - if (strcmp(before_once,",")){ - yon_ubl_status_highlight_incorrect(window->CommandBeforeOnceEntry); - yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); - return; - } before_once = yon_char_replace(before_once,"\"","=--"); before_once = yon_char_replace(before_once,"=--","\\\""); firstaction = yon_char_append("firstaction,",before_once); diff --git a/source/ubl-utils.c b/source/ubl-utils.c index 89518c8..1b38d8a 100644 --- a/source/ubl-utils.c +++ b/source/ubl-utils.c @@ -1689,6 +1689,11 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end g_key_file_set_integer(__yon_window_config_file,"window","WindowHeight",__yon_main_window_config.height); g_key_file_set_integer(__yon_window_config_file,"window","fullscreen",__yon_main_window_config.fullscreen); dictionary *dict=NULL; + if (__yon_main_window_config.deleted_parameters) + for_dictionaries(dict,__yon_main_window_config.deleted_parameters){ + __yon_custom_parameter *param = yon_dictionary_get_data(dict,__yon_custom_parameter*); + g_key_file_remove_key(__yon_window_config_file,param->section,param->parameter_name,NULL); + } if (__yon_main_window_config.custom_listeners) for_dictionaries(dict,__yon_main_window_config.custom_listeners){ __yon_listener_parameter *param = yon_dictionary_get_data(dict,__yon_listener_parameter*); @@ -1724,11 +1729,7 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end break; } } - if (__yon_main_window_config.deleted_parameters) - for_dictionaries(dict,__yon_main_window_config.deleted_parameters){ - __yon_custom_parameter *param = yon_dictionary_get_data(dict,__yon_custom_parameter*); - g_key_file_remove_key(__yon_window_config_file,param->section,param->parameter_name,NULL); - } + g_key_file_save_to_file(__yon_window_config_file,__yon_window_config_path,NULL); }