Fixed logrotate period interaction

pull/46/head
parent 7fd692cd3c
commit 1801dd0dd9

@ -568,6 +568,17 @@ void on_filechooser_open(GtkWidget *self, logrotate_configure_window *window){
gtk_widget_show(dialog->FileChooser);
}
void on_logrotate_period_check_toggled(GtkToggleButton *self,logrotate_configure_window *window){
if (gtk_toggle_button_get_active(self)){
if (gtk_combo_box_get_active(GTK_COMBO_BOX(window->RotationPeriodMainCombo))==2) gtk_widget_set_sensitive(window->RotationPeriodAdditionalCombo,1);
else gtk_widget_set_sensitive(window->RotationPeriodAdditionalCombo,0);
gtk_widget_set_sensitive(window->RotationPeriodMainCombo,1);
} else {
gtk_widget_set_sensitive(window->RotationPeriodMainCombo,0);
gtk_widget_set_sensitive(window->RotationPeriodAdditionalCombo,0);
}
}
void on_logrotate_save(GtkWidget *self, dictionary *dict){
logrotate_window *dialog = yon_dictionary_get_data(dict->first,logrotate_window*);
logrotate_configure_window *window = yon_dictionary_get_data(dict->first->next,logrotate_configure_window*);
@ -926,8 +937,7 @@ logrotate_configure_window *yon_logrotate_window_new(char *paths, logrotate_wind
g_signal_connect(G_OBJECT(window->LogPathEditButton),"clicked",G_CALLBACK(on_logrotate_configuration_path_edit),window);
g_signal_connect(G_OBJECT(window->LogPathRemoveButton),"clicked",G_CALLBACK(on_logrotate_configuration_path_remove),window);
g_signal_connect(G_OBJECT(window->RotationPeriodCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),window->RotationPeriodAdditionalCombo);
g_signal_connect(G_OBJECT(window->RotationPeriodCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),window->RotationPeriodMainCombo);
g_signal_connect(G_OBJECT(window->RotationPeriodCheck),"toggled",G_CALLBACK(on_logrotate_period_check_toggled),window);
g_signal_connect(G_OBJECT(window->JournalMaxSizeCheck),"clicked",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),window->JournalMaxSizeCombo);
g_signal_connect(G_OBJECT(window->JournalMaxSizeCheck),"clicked",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),window->JournalMaxSizeSpin);

Loading…
Cancel
Save