From 5deed364d0002715f7dbf0ff3e7503c4da8e2d4d Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Fri, 17 Apr 2026 15:35:22 +0600 Subject: [PATCH] Comma symbol is restricted from source --- source/ubinstall-gtk-source.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/source/ubinstall-gtk-source.c b/source/ubinstall-gtk-source.c index 77eb8e1..57924b9 100644 --- a/source/ubinstall-gtk-source.c +++ b/source/ubinstall-gtk-source.c @@ -174,6 +174,11 @@ void on_source_accept(GtkWidget *,source_window *window){ yon_ubl_status_highlight_incorrect(element->DeviceCombo); return; } + if (strstr(cur,",")){ + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),PATH_INVALID_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_highlight_incorrect(element->DeviceCombo); + return; + } char *temp = yon_char_append_element(sources_list,cur,","); if (!yon_char_is_empty(sources_list)) free(sources_list); sources_list = temp; @@ -187,7 +192,12 @@ void on_source_accept(GtkWidget *,source_window *window){ } if (yon_char_check_element(sources_list,cur,",")){ yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),VALUE_REPEAT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); - yon_ubl_status_highlight_incorrect(element->DeviceCombo); + yon_ubl_status_highlight_incorrect(element->PathEntry); + return; + } + if (strstr(cur,",")){ + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),PATH_INVALID_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_highlight_incorrect(element->PathEntry); return; } char *temp = yon_char_append_element(sources_list,cur,","); @@ -198,7 +208,12 @@ void on_source_accept(GtkWidget *,source_window *window){ char *cur = (char*)gtk_entry_get_text(GTK_ENTRY(element->PathEntry)); if (yon_char_check_element(sources_list,cur,",")){ yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),VALUE_REPEAT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); - yon_ubl_status_highlight_incorrect(element->DeviceCombo); + yon_ubl_status_highlight_incorrect(element->PathEntry); + return; + } + if (strstr(cur,",")){ + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),PATH_INVALID_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_highlight_incorrect(element->PathEntry); return; } char *temp = yon_char_append_element(sources_list,cur,",");