Added restrictions to log entry

pull/129/head
Ivan Yartsev 6 months ago
parent b970ec9e8b
commit 322539dcea

@ -2101,6 +2101,12 @@ void on_log_save(GtkWidget *self, dictionary *dict){
for (guint i=0;i<g_list_length(list);i++){
GList *paths = gtk_container_get_children((GtkContainer*)g_list_nth_data(list,i));
char *cur = (char*)gtk_entry_get_text((GtkEntry*)g_list_nth_data(paths,1));
char *error = yon_gtk_entry_check_restricted((GtkEntry*)g_list_nth_data(paths,1));
if (!yon_char_is_empty(error)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),error,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect((GtkWidget*)g_list_nth_data(paths,1));
return;
}
if (strcmp(cur,""))
pathse=yon_char_unite(pathse ? yon_char_append(pathse,"\n"):"",cur,NULL);
}
@ -2332,8 +2338,6 @@ void on_log_path_append(GtkWidget *self, add_log_window *window){
GtkWidget *AppendButton = yon_gtk_builder_get_widget(builder,"AppendButton");
GtkWidget *SearchButton = yon_gtk_builder_get_widget(builder,"SearchButton");
GtkWidget *RemoveButton = yon_gtk_builder_get_widget(builder,"RemoveButton");
GtkWidget *PathEntry = yon_gtk_builder_get_widget(builder,"PathEntry");
yon_entry_set_entry_type(GTK_ENTRY(PathEntry),GTK_BOX(window->StatusBox));
g_signal_connect(G_OBJECT(AppendButton),"clicked",G_CALLBACK(on_log_path_append),window);
g_signal_connect(G_OBJECT(RemoveButton),"clicked",G_CALLBACK(on_log_path_remove),window);
g_signal_connect(G_OBJECT(SearchButton),"clicked",G_CALLBACK(on_log_path_choose),window);
@ -2452,7 +2456,6 @@ void on_log_edit(GtkWidget *,main_window *widgets){
GtkWidget *AppendButton = yon_gtk_builder_get_widget(builder,"AppendButton");
GtkWidget *SearchButton = yon_gtk_builder_get_widget(builder,"SearchButton");
GtkWidget *RemoveButton = yon_gtk_builder_get_widget(builder,"RemoveButton");
yon_entry_set_entry_type(GTK_ENTRY(entry),GTK_BOX(window->StatusBox));
if (protected<protect){
gtk_widget_set_sensitive(RemoveButton,0);
gtk_widget_set_sensitive(entry,0);

Loading…
Cancel
Save