pull/129/head
Ivan Yartsev 6 months ago
parent b0553794a4
commit e321578a08

@ -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); gtk_combo_box_set_active(GTK_COMBO_BOX(window->RotationPeriodMainCombo),3);
}else if (!strcmp(parsed[i],"yearly")){ }else if (!strcmp(parsed[i],"yearly")){
gtk_combo_box_set_active(GTK_COMBO_BOX(window->RotationPeriodMainCombo),4); 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]," "); 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_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")){ }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")){ }else if (strstr(parsed[i],"su")){
char *value = strstr(parsed[i]," "); char *value = strstr(parsed[i]," ");
if (value) value++; if (value) value++;
@ -2679,13 +2682,11 @@ void on_log_remove(GtkWidget *, main_window *widgets){
int stay_paths=0; int stay_paths=0;
char *paths; char *paths;
gtk_tree_model_get(model,&iter,1,&paths,4,&stay_paths,-1); gtk_tree_model_get(model,&iter,1,&paths,4,&stay_paths,-1);
char *stay = ""; int size;
for (int i=0;i<stay_paths;i++){ config_str parsed = yon_char_parse(paths,&size,"\n");
stay++; char *stay = yon_char_parsed_to_string_for_iters(parsed,size,"\n",stay_paths);
stay = strstr(paths,"\n"); yon_char_parsed_free(parsed,size);
} gtk_list_store_set(widgets->list,&iter,1,stay,3,1,-1);
paths = yon_char_divide(paths,strlen(paths)-strlen(stay));
gtk_list_store_set(widgets->list,&iter,1,paths,3,1,-1);
gtk_widget_set_sensitive(widgets->RemoveButton,0); gtk_widget_set_sensitive(widgets->RemoveButton,0);
} }
} }

@ -34,6 +34,7 @@
<property name="page-increment">10</property> <property name="page-increment">10</property>
</object> </object>
<object class="GtkAdjustment" id="adjustment6"> <object class="GtkAdjustment" id="adjustment6">
<property name="lower">1</property>
<property name="upper">999999999</property> <property name="upper">999999999</property>
<property name="step-increment">1</property> <property name="step-increment">1</property>
<property name="page-increment">10</property> <property name="page-increment">10</property>

Loading…
Cancel
Save