|
|
|
|
@ -533,14 +533,21 @@ void on_melody_toggled(GtkCellRenderer *, char *path, main_window *widgets){
|
|
|
|
|
GtkTreePath *cur_path = gtk_tree_path_new_from_string(path);
|
|
|
|
|
|
|
|
|
|
for_iter(model,&iter){
|
|
|
|
|
int status;
|
|
|
|
|
gtk_tree_model_get(model,&iter,0,&status,-1);
|
|
|
|
|
GtkTreePath *compare_path = gtk_tree_model_get_path(model,&iter);
|
|
|
|
|
if (gtk_tree_path_compare(cur_path,compare_path)){
|
|
|
|
|
gtk_list_store_set(widgets->BootRingtoneList,&iter,0,0,-1);
|
|
|
|
|
} else {
|
|
|
|
|
gtk_list_store_set(widgets->BootRingtoneList,&iter,0,1,-1);
|
|
|
|
|
char *code;
|
|
|
|
|
gtk_tree_model_get(model,&iter,2,&code,-1);
|
|
|
|
|
yon_config_register(GRUB_PLAY_parameter,GRUB_PLAY_command,(char*)code);
|
|
|
|
|
gtk_list_store_set(widgets->BootRingtoneList,&iter,0,!status,-1);
|
|
|
|
|
if (status){
|
|
|
|
|
yon_config_remove_by_key(GRUB_PLAY_parameter);
|
|
|
|
|
} else {
|
|
|
|
|
char *code;
|
|
|
|
|
gtk_tree_model_get(model,&iter,2,&code,-1);
|
|
|
|
|
yon_config_register(GRUB_PLAY_parameter,GRUB_PLAY_command,(char*)code);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
gtk_tree_path_free(compare_path);
|
|
|
|
|
}
|
|
|
|
|
|