|
|
|
@ -1569,13 +1569,16 @@ logrotate_configure_window *yon_logrotate_window_new(char *paths, logrotate_wind
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->RotationPeriodMainCombo),3);
|
|
|
|
|
}else if (!strcmp(parsed[i],"yearly")){
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->RotationPeriodMainCombo),4);
|
|
|
|
|
}else if (!strcmp(parsed[i],"olddir")){
|
|
|
|
|
}else if (strstr(parsed[i],"olddir")){
|
|
|
|
|
char *value = strstr(parsed[i]," ");
|
|
|
|
|
if (value) value++;
|
|
|
|
|
if (value){ value++;
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->FileAmountCombo),2);
|
|
|
|
|
} else {
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->FileAmountCombo),1);
|
|
|
|
|
}
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(window->FileAmountEntry),value);
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->FileAmountCombo),1);
|
|
|
|
|
}else if (!strcmp(parsed[i],"noolddir")){
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->FileAmountCombo),2);
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->FileAmountCombo),0);
|
|
|
|
|
}else if (strstr(parsed[i],"su")){
|
|
|
|
|
char *value = strstr(parsed[i]," ");
|
|
|
|
|
if (value) value++;
|
|
|
|
@ -2679,13 +2682,11 @@ void on_log_remove(GtkWidget *, main_window *widgets){
|
|
|
|
|
int stay_paths=0;
|
|
|
|
|
char *paths;
|
|
|
|
|
gtk_tree_model_get(model,&iter,1,&paths,4,&stay_paths,-1);
|
|
|
|
|
char *stay = "";
|
|
|
|
|
for (int i=0;i<stay_paths;i++){
|
|
|
|
|
stay++;
|
|
|
|
|
stay = strstr(paths,"\n");
|
|
|
|
|
}
|
|
|
|
|
paths = yon_char_divide(paths,strlen(paths)-strlen(stay));
|
|
|
|
|
gtk_list_store_set(widgets->list,&iter,1,paths,3,1,-1);
|
|
|
|
|
int size;
|
|
|
|
|
config_str parsed = yon_char_parse(paths,&size,"\n");
|
|
|
|
|
char *stay = yon_char_parsed_to_string_for_iters(parsed,size,"\n",stay_paths);
|
|
|
|
|
yon_char_parsed_free(parsed,size);
|
|
|
|
|
gtk_list_store_set(widgets->list,&iter,1,stay,3,1,-1);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->RemoveButton,0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|