Fixed user's ability to choose disk space quotas more than avaliable

pull/70/head
Ivan Yartsev 2 years ago
parent 0dbeb71580
commit 4c0d6c689b

@ -339,6 +339,10 @@ void update_max_size_spin(GtkWidget *self, int* flag) {
for (int i = 0; i < get_device_vec()->vectorList.total; i++) { for (int i = 0; i < get_device_vec()->vectorList.total; i++) {
device_config* _config = (device_config*)get_device_vec()->pfVectorGet(get_device_vec(), i); device_config* _config = (device_config*)get_device_vec()->pfVectorGet(get_device_vec(), i);
if (strstr(str_disk, _config->name_disk)) { if (strstr(str_disk, _config->name_disk)) {
if (self==temp_widgets->quotegroupSizeSoftLimitCombo)
gtk_spin_button_set_value(GTK_SPIN_BUTTON(temp_widgets->quotegroupSizeSoftLimitSpin),0.0);
else if (self==temp_widgets->quotegroupSizeHardLimitCombo)
gtk_spin_button_set_value(GTK_SPIN_BUTTON(temp_widgets->quotegroupSizeHardLimitSpin),0.0);
philos_set_spin_adjustment(temp_widgets->quotegroupSizeSoftLimitCheck, philos_set_spin_adjustment(temp_widgets->quotegroupSizeSoftLimitCheck,
temp_widgets->quotegroupSizeSoftLimitSpin, temp_widgets->quotegroupSizeSoftLimitSpin,
temp_widgets->quotegroupSizeSoftLimitCombo, _config->size_disk); temp_widgets->quotegroupSizeSoftLimitCombo, _config->size_disk);

Loading…
Cancel
Save