void update_info() { mixer_info minfo; if (ioctl(mixer_device, SOUND_MIXER_INFO, &minfo) < 0) fprintf(stderr, "Read device info failed.\n"); else { char *title = fl_strdup_printf(_("Volume control: [%s]"), minfo.name); main_window->label(title); } }
void fillItems() { char *file; Fl_String path(fl_homedir()); path += "/.ede/schemes"; dirent **files; int count = fl_filename_list(path, &files); if (count > 0) { new Fl_Item("Active"); schemeListBox->value("Active"); for(int n=0; n<count; n++) { file = files[n]->d_name; if( strcmp(file, ".") && strcmp(file, "..")) { char *filename = fl_strdup_printf("%s/%s", (char*)path, file); if (!fl_is_dir(filename) && fl_file_match(file, "*.scheme") && strcmp(file, "Active.scheme")!=0) { new Fl_Item(strdup(fl_file_filename(filename))); } delete [] filename; } free(files[n]); } free(files); getSchemeColors(); //we apply first scheme - active.scheme } }