Mercurial > audlegacy
comparison src/audacious/audconfig.c @ 4804:cbaeab1f6378
revert 4769.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Tue, 25 Nov 2008 03:33:46 +0900 |
parents | f04094af8d57 |
children | 14da5037144f |
comparison
equal
deleted
inserted
replaced
4803:20f868cd576b | 4804:cbaeab1f6378 |
---|---|
633 playlist_get_position(playlist)); | 633 playlist_get_position(playlist)); |
634 } | 634 } |
635 | 635 |
636 hook_call("config save", db); | 636 hook_call("config save", db); |
637 | 637 |
638 /* FIXME: we're looking up SkinnedWindow::x &c ourselves here. | |
639 * this isn't exactly right. -nenolod | |
640 */ | |
641 if ( playlistwin && | |
642 SKINNED_WINDOW(playlistwin)->x != -1 && | |
643 SKINNED_WINDOW(playlistwin)->y != -1 ) | |
644 { | |
645 cfg_db_set_int(db, NULL, "playlist_x", | |
646 SKINNED_WINDOW(playlistwin)->x); | |
647 cfg_db_set_int(db, NULL, "playlist_y", | |
648 SKINNED_WINDOW(playlistwin)->y); | |
649 } | |
650 | |
651 if ( equalizerwin && | |
652 SKINNED_WINDOW(equalizerwin)->x != -1 && | |
653 SKINNED_WINDOW(equalizerwin)->y != -1 ) | |
654 { | |
655 cfg_db_set_int(db, NULL, "equalizer_x", | |
656 SKINNED_WINDOW(equalizerwin)->x); | |
657 cfg_db_set_int(db, NULL, "equalizer_y", | |
658 SKINNED_WINDOW(equalizerwin)->y); | |
659 } | |
660 | |
638 for (i = 0; i < ncfgsent; ++i) { | 661 for (i = 0; i < ncfgsent; ++i) { |
639 if (aud_strents[i].se_wrt) | 662 if (aud_strents[i].se_wrt) |
640 cfg_db_set_string(db, NULL, | 663 cfg_db_set_string(db, NULL, |
641 aud_strents[i].se_vname, | 664 aud_strents[i].se_vname, |
642 *aud_strents[i].se_vloc); | 665 *aud_strents[i].se_vloc); |
643 } | 666 } |
644 | 667 |
645 cfg_db_set_float(db, NULL, "equalizer_preamp", cfg.equalizer_preamp); | 668 cfg_db_set_float(db, NULL, "equalizer_preamp", cfg.equalizer_preamp); |
646 | 669 |
647 /* RG settings */ | 670 /* RG settings */ |
648 cfg_db_set_float(db, NULL, "replay_gain_preamp", cfg.replay_gain_preamp); | 671 cfg_db_set_float(db, NULL, "replay_gain_preamp", cfg.replay_gain_preamp); |
649 cfg_db_set_float(db, NULL, "default_gain", cfg.default_gain); | 672 cfg_db_set_float(db, NULL, "default_gain", cfg.default_gain); |
650 | 673 |
651 for (i = 0; i < 10; i++) { | 674 for (i = 0; i < 10; i++) { |
652 str = g_strdup_printf("equalizer_band%d", i); | 675 str = g_strdup_printf("equalizer_band%d", i); |
653 cfg_db_set_float(db, NULL, str, cfg.equalizer_bands[i]); | 676 cfg_db_set_float(db, NULL, str, cfg.equalizer_bands[i]); |
654 g_free(str); | 677 g_free(str); |
678 } | |
679 | |
680 cfg_db_set_float(db, NULL, "scale_factor", cfg.scale_factor); | |
681 | |
682 if (aud_active_skin != NULL) | |
683 { | |
684 if (aud_active_skin->path) | |
685 cfg_db_set_string(db, NULL, "skin", aud_active_skin->path); | |
686 else | |
687 cfg_db_unset_key(db, NULL, "skin"); | |
655 } | 688 } |
656 | 689 |
657 if (get_current_output_plugin()) | 690 if (get_current_output_plugin()) |
658 cfg_db_set_string(db, NULL, "output_plugin", | 691 cfg_db_set_string(db, NULL, "output_plugin", |
659 get_current_output_plugin()->filename); | 692 get_current_output_plugin()->filename); |
690 if (cfg.playlist_path) | 723 if (cfg.playlist_path) |
691 cfg_db_set_string(db, NULL, "playlist_path", cfg.playlist_path); | 724 cfg_db_set_string(db, NULL, "playlist_path", cfg.playlist_path); |
692 | 725 |
693 cfg_db_set_int(db, NULL, "url_history_length", | 726 cfg_db_set_int(db, NULL, "url_history_length", |
694 g_list_length(cfg.url_history)); | 727 g_list_length(cfg.url_history)); |
695 | 728 |
696 input_get_volume(&vol_l,&vol_r); | 729 input_get_volume(&vol_l,&vol_r); |
697 cfg_db_set_int(db, NULL, "saved_volume", (vol_l<<8) | vol_r ); | 730 cfg_db_set_int(db, NULL, "saved_volume", (vol_l<<8) | vol_r ); |
698 | 731 |
699 for (node = cfg.url_history, i = 1; node; node = g_list_next(node), i++) { | 732 for (node = cfg.url_history, i = 1; node; node = g_list_next(node), i++) { |
700 str = g_strdup_printf("url_history%d", i); | 733 str = g_strdup_printf("url_history%d", i); |
701 cfg_db_set_string(db, NULL, str, node->data); | 734 cfg_db_set_string(db, NULL, str, node->data); |
702 g_free(str); | 735 g_free(str); |
703 } | 736 } |