|
|
|
@ -217,8 +217,10 @@ void yon_get_devices(quota_window *window){
|
|
|
|
|
config_str devices_parsed = yon_config_load(get_devices_command,&size);
|
|
|
|
|
for (int i=0; i<size;i++){
|
|
|
|
|
yon_char_remove_last_symbol(devices_parsed[i],'\n');
|
|
|
|
|
yon_dictionary_add_or_create_if_exists_with_data(window->devices,devices_parsed[i],NULL);
|
|
|
|
|
char *pa = strstr(devices_parsed[i],"/");
|
|
|
|
|
yon_dictionary_add_or_create_if_exists_with_data(window->devices,pa,NULL);
|
|
|
|
|
}
|
|
|
|
|
yon_char_parsed_free(devices_parsed,size);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_device_current_changed(GtkWidget *, quota_window *window){
|
|
|
|
@ -761,8 +763,8 @@ void on_add_open(GtkWidget *, main_window *widgets){
|
|
|
|
|
g_signal_connect(G_OBJECT(window->DeviceLimitWriteCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),window->DeviceLimitWriteCombo);
|
|
|
|
|
g_signal_connect(G_OBJECT(window->DeviceLimitWriteCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),window->DeviceLimitWriteSpin);
|
|
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(window->DeviceLimitCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),window->DeviceLimitReadCheck);
|
|
|
|
|
g_signal_connect(G_OBJECT(window->DeviceLimitCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),window->DeviceLimitWriteCheck);
|
|
|
|
|
g_signal_connect(G_OBJECT(window->DeviceLimitCombo),"changed",G_CALLBACK(yon_widget_set_sensitive),window->DeviceLimitReadCheck);
|
|
|
|
|
g_signal_connect(G_OBJECT(window->DeviceLimitCombo),"changed",G_CALLBACK(yon_widget_set_sensitive),window->DeviceLimitWriteCheck);
|
|
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(window->SoftRestrictionSpin),"output",G_CALLBACK(on_quota_configuration_update),window);
|
|
|
|
|
g_signal_connect(G_OBJECT(window->SoftRestrictionCombo),"changed",G_CALLBACK(on_quota_configuration_update),window);
|
|
|
|
@ -902,6 +904,14 @@ void on_quotas_edit(GtkWidget *self, dictionary *windows){
|
|
|
|
|
else yon_ubl_status_box_render(NOTHING_CHOSEN_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void yon_widget_set_sensitive(GtkComboBox *toggle, GtkWidget *target){
|
|
|
|
|
if (gtk_combo_box_get_active(toggle)>-1){
|
|
|
|
|
gtk_widget_set_sensitive(target,1);
|
|
|
|
|
} else {
|
|
|
|
|
gtk_widget_set_sensitive(target,0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_edit_open(GtkWidget *, main_window *widgets){
|
|
|
|
|
GtkTreeModel *model = GTK_TREE_MODEL(main_config.list);
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
@ -1024,8 +1034,8 @@ void on_edit_open(GtkWidget *, main_window *widgets){
|
|
|
|
|
g_signal_connect(G_OBJECT(window->DeviceLimitWriteCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),window->DeviceLimitWriteCombo);
|
|
|
|
|
g_signal_connect(G_OBJECT(window->DeviceLimitWriteCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),window->DeviceLimitWriteSpin);
|
|
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(window->DeviceLimitCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),window->DeviceLimitReadCheck);
|
|
|
|
|
g_signal_connect(G_OBJECT(window->DeviceLimitCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),window->DeviceLimitWriteCheck);
|
|
|
|
|
g_signal_connect(G_OBJECT(window->DeviceLimitCombo),"changed",G_CALLBACK(yon_widget_set_sensitive),window->DeviceLimitReadCheck);
|
|
|
|
|
g_signal_connect(G_OBJECT(window->DeviceLimitCombo),"changed",G_CALLBACK(yon_widget_set_sensitive),window->DeviceLimitWriteCheck);
|
|
|
|
|
|
|
|
|
|
yon_get_devices(window);
|
|
|
|
|
dictionary *dict;
|
|
|
|
|