diff --git a/source/ubl-settings-logging.c b/source/ubl-settings-logging.c
index 71096f3..2cd3deb 100644
--- a/source/ubl-settings-logging.c
+++ b/source/ubl-settings-logging.c
@@ -1104,12 +1104,14 @@ void on_logrotate_save(GtkWidget *, dictionary *dict){
}
}
- char *user_rotate = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->RotationAtUserCombo));
- char *group_rotate = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->RotationAtGroupCombo));
- if (!yon_char_is_empty(user_rotate)&&!yon_char_is_empty(group_rotate)){
- if (gtk_combo_box_get_active(GTK_COMBO_BOX(window->RotationAtUserCombo))==0) user_rotate = "root";
- if (gtk_combo_box_get_active(GTK_COMBO_BOX(window->RotationAtGroupCombo))==0) group_rotate = "root";
- su = yon_char_unite("su ",user_rotate," ",group_rotate,NULL);
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->RotationCheck))){
+ char *user_rotate = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->RotationAtUserCombo));
+ char *group_rotate = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->RotationAtGroupCombo));
+ if (!yon_char_is_empty(user_rotate)&&!yon_char_is_empty(group_rotate)){
+ if (gtk_combo_box_get_active(GTK_COMBO_BOX(window->RotationAtUserCombo))==0) user_rotate = "root";
+ if (gtk_combo_box_get_active(GTK_COMBO_BOX(window->RotationAtGroupCombo))==0) group_rotate = "root";
+ su = yon_char_unite("su ",user_rotate," ",group_rotate,NULL);
+ }
}
int error_processing = gtk_combo_box_get_active(GTK_COMBO_BOX(window->ErrorProcessingCombo));
@@ -1387,6 +1389,7 @@ logrotate_configure_window *yon_logrotate_window_new(char *paths, logrotate_wind
window->FileAmountCombo=yon_gtk_builder_get_widget(builder,"FileAmountCombo");
window->FileAmountEntry=yon_gtk_builder_get_widget(builder,"FileAmountEntry");
window->FileAmountButton=yon_gtk_builder_get_widget(builder,"FileAmountButton");
+ window->RotationCheck=yon_gtk_builder_get_widget(builder,"RotationCheck");
window->RotationAtUserCombo=yon_gtk_builder_get_widget(builder,"RotationAtUserCombo");
window->RotationAtGroupCombo=yon_gtk_builder_get_widget(builder,"RotationAtGroupCombo");
window->ErrorProcessingCombo=yon_gtk_builder_get_widget(builder,"ErrorProcessingCombo");
@@ -1496,6 +1499,8 @@ logrotate_configure_window *yon_logrotate_window_new(char *paths, logrotate_wind
g_signal_connect(G_OBJECT(window->RotateSizeMaxBeforeTimeCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),window->RotateSizeMaxBeforeTimeSpin);
g_signal_connect(G_OBJECT(window->RotateSizeMaxBeforeTimeCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),window->RotateSizeMaxBeforeTimeCombo);
+ g_signal_connect(G_OBJECT(window->RotationCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),window->RotationAtUserCombo);
+ g_signal_connect(G_OBJECT(window->RotationCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),window->RotationAtGroupCombo);
g_signal_connect(G_OBJECT(window->CreateLogCombo),"changed",G_CALLBACK(on_combo_activate_second),window->CreateLogUserCombo);
g_signal_connect(G_OBJECT(window->CreateLogCombo),"changed",G_CALLBACK(on_combo_activate_second),window->CreateGroupCombo);
diff --git a/source/ubl-settings-logging.h b/source/ubl-settings-logging.h
index 1e88364..d9fc736 100644
--- a/source/ubl-settings-logging.h
+++ b/source/ubl-settings-logging.h
@@ -316,6 +316,7 @@ typedef struct {
GtkWidget *FileAmountCombo;
GtkWidget *FileAmountEntry;
GtkWidget *FileAmountButton;
+ GtkWidget *RotationCheck;
GtkWidget *RotationAtUserCombo;
GtkWidget *RotationAtGroupCombo;
GtkWidget *ErrorProcessingCombo;
diff --git a/ubl-settings-logging-logrotate.glade b/ubl-settings-logging-logrotate.glade
index 169fe5c..3e37a6c 100644
--- a/ubl-settings-logging-logrotate.glade
+++ b/ubl-settings-logging-logrotate.glade
@@ -668,10 +668,12 @@
False
5
-