|
|
|
@ -275,6 +275,11 @@ void temp_event(temp_set_window* temp_widgets) {
|
|
|
|
|
g_signal_connect(G_OBJECT(temp_widgets->quotegroupFilesSoftLimitCheck), "toggled", G_CALLBACK(event_toggled_all), NULL);
|
|
|
|
|
g_signal_connect(G_OBJECT(temp_widgets->quotegroupFilesHardLimitCheck), "toggled", G_CALLBACK(event_toggled_all), NULL);
|
|
|
|
|
g_signal_connect(G_OBJECT(temp_widgets->UserDeviceCombo), "changed", G_CALLBACK(temp_select_disk), NULL);
|
|
|
|
|
int flag = 3;
|
|
|
|
|
g_signal_connect(G_OBJECT(temp_widgets->quotegroupSizeSoftLimitCombo), "changed", G_CALLBACK(update_max_size_spin), &flag);
|
|
|
|
|
g_signal_connect(G_OBJECT(temp_widgets->quotegroupSizeHardLimitCombo), "changed", G_CALLBACK(update_max_size_spin), &flag);
|
|
|
|
|
g_signal_connect(G_OBJECT(temp_widgets->quotegroupSizeSoftLimitSpin), "changed", G_CALLBACK(update_max_size_spin), NULL);
|
|
|
|
|
g_signal_connect(G_OBJECT(temp_widgets->quotegroupSizeHardLimitSpin), "changed", G_CALLBACK(update_max_size_spin), NULL);
|
|
|
|
|
if (strstr(flag_temp_u_g_p,"prjquota")) {
|
|
|
|
|
g_signal_connect(G_OBJECT(temp_widgets->btnReviewProject),"clicked",G_CALLBACK(wrapper_show_file_manager),NULL);
|
|
|
|
|
g_signal_connect(G_OBJECT(temp_widgets->btnGenerateProject),"clicked",G_CALLBACK(generate_id),NULL);
|
|
|
|
@ -304,6 +309,36 @@ void temp_on_destroy_subwindow(GtkWidget *self) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void update_max_size_spin(GtkWidget *self, int* flag) {
|
|
|
|
|
if (flag) {
|
|
|
|
|
gtk_spin_button_set_digits(GTK_SPIN_BUTTON(temp_widgets->quotegroupSizeSoftLimitSpin), 0);
|
|
|
|
|
gtk_spin_button_set_digits(GTK_SPIN_BUTTON(temp_widgets->quotegroupSizeHardLimitSpin), 0);
|
|
|
|
|
}
|
|
|
|
|
char* str_disk = NULL;
|
|
|
|
|
if (strcmp(set_add_edit, "add")==0) {
|
|
|
|
|
str_disk = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(temp_widgets->UserDeviceCombo));
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
str_disk = (char*)gtk_label_get_label(GTK_LABEL(temp_widgets->lblSetQuotasStatus));
|
|
|
|
|
}
|
|
|
|
|
if (!str_disk) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
for (int i = 0; i < get_device_vec()->vectorList.total; i++) {
|
|
|
|
|
device_config* _config = (device_config*)get_device_vec()->pfVectorGet(get_device_vec(), i);
|
|
|
|
|
if (strstr(str_disk, _config->name_disk)) {
|
|
|
|
|
philos_set_spin_adjustment(temp_widgets->quotegroupSizeSoftLimitCheck,
|
|
|
|
|
temp_widgets->quotegroupSizeSoftLimitSpin,
|
|
|
|
|
temp_widgets->quotegroupSizeSoftLimitCombo, _config->size_disk);
|
|
|
|
|
philos_set_spin_adjustment(temp_widgets->quotegroupSizeHardLimitCheck,
|
|
|
|
|
temp_widgets->quotegroupSizeHardLimitSpin,
|
|
|
|
|
temp_widgets->quotegroupSizeHardLimitCombo, _config->size_disk);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void event_toggled_all() {
|
|
|
|
|
philos_set_active_widgets(temp_widgets->quotegroupSizeSoftLimitCheck,
|
|
|
|
|
temp_widgets->quotegroupSizeSoftLimitSpin,
|
|
|
|
@ -319,6 +354,7 @@ void event_toggled_all() {
|
|
|
|
|
philos_set_active_widgets(temp_widgets->quotegroupFilesHardLimitCheck,
|
|
|
|
|
temp_widgets->quotegroupFilesHardLimitSpin,
|
|
|
|
|
NULL);
|
|
|
|
|
update_max_size_spin(NULL, NULL); ;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void block_btn_save() {
|
|
|
|
@ -621,7 +657,8 @@ void table_u_g_event() {
|
|
|
|
|
g_signal_connect(G_OBJECT(get_widget_table_u_g()->Window), "destroy", G_CALLBACK(table_u_g_destroy), NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
config_u_g_p* get_temp_gui_data_base(config_u_g_p* _config) {
|
|
|
|
|
config_u_g_p* get_temp_gui_data_base(config_u_g_p* _config) {
|
|
|
|
|
update_max_size_spin(NULL, NULL);
|
|
|
|
|
set_widget_config(temp_widgets->quotegroupSizeSoftLimitCheck,
|
|
|
|
|
temp_widgets->quotegroupSizeSoftLimitSpin,
|
|
|
|
|
temp_widgets->quotegroupSizeSoftLimitCombo,
|
|
|
|
|