comparison src/xs_config.c @ 349:b5e54614b35a

More unused argument warning removal, bit of code for filter editor.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 19 Oct 2005 23:02:02 +0000
parents 5fe452765b8b
children b1a858b8cb1a
comparison
equal deleted inserted replaced
348:d1558ecb94f9 349:b5e54614b35a
480 480
481 481
482 /* 482 /*
483 * Reset filter settings to defaults 483 * Reset filter settings to defaults
484 */ 484 */
485 void xs_cfg_filter_reset(void) 485 void xs_cfg_filter_reset(GtkButton *button, gpointer user_data)
486 { 486 {
487 (void)button; (void)user_data;
488
487 gtk_adjustment_set_value( 489 gtk_adjustment_set_value(
488 gtk_range_get_adjustment(GTK_RANGE(LUW("cfg_emu_filt_fs"))), 490 gtk_range_get_adjustment(GTK_RANGE(LUW("cfg_emu_filt_fs"))),
489 XS_SIDPLAY1_FS); 491 XS_SIDPLAY1_FS);
490 492
491 gtk_adjustment_set_value( 493 gtk_adjustment_set_value(
496 gtk_range_get_adjustment(GTK_RANGE(LUW("cfg_emu_filt_ft"))), 498 gtk_range_get_adjustment(GTK_RANGE(LUW("cfg_emu_filt_ft"))),
497 XS_SIDPLAY1_FT); 499 XS_SIDPLAY1_FT);
498 } 500 }
499 501
500 502
501 void xs_cfg_filter2_reset(void)
502 {
503 }
504 503
505 504
506 /* 505 /*
507 * HVSC songlength-database file selector response-functions 506 * HVSC songlength-database file selector response-functions
508 */ 507 */
657 } 656 }
658 657
659 658
660 void xs_cfg_emu_sidplay1_toggled(GtkToggleButton *togglebutton, gpointer user_data) 659 void xs_cfg_emu_sidplay1_toggled(GtkToggleButton *togglebutton, gpointer user_data)
661 { 660 {
662 gboolean isActive = GTK_TOGGLE_BUTTON(togglebutton)->active; 661 (void)togglebutton; (void)user_data;
663
664 (void)user_data;
665 } 662 }
666 663
667 664
668 void xs_cfg_emu_sidplay2_toggled(GtkToggleButton *togglebutton, gpointer user_data) 665 void xs_cfg_emu_sidplay2_toggled(GtkToggleButton *togglebutton, gpointer user_data)
669 { 666 {
813 if (tmpValue < tmpAdj->value) 810 if (tmpValue < tmpAdj->value)
814 gtk_adjustment_set_value(tmpAdj, tmpValue); 811 gtk_adjustment_set_value(tmpAdj, tmpValue);
815 } 812 }
816 813
817 814
815 void xs_cfg_filter2_reset(GtkButton *button, gpointer user_data)
816 {
817 gfloat cv[] = {0, 0, 25, 25, 50, 50, 75, 50, 85, 55, 100, 100};
818 GtkCurve *c = GTK_CURVE(LUW("cfg_filter2_curve"));
819
820 (void)button; (void)user_data;
821
822 gtk_curve_set_range(c, 0, 256, 0, 256);
823 gtk_curve_set_vector (c, 6, cv);
824 // gtk_curve_set_curve_type(c, GTK_CURVE_TYPE_SPLINE);
825 }
826
818 /* 827 /*
819 * Execute the configuration panel 828 * Execute the configuration panel
820 */ 829 */
821 void xs_configure(void) 830 void xs_configure(void)
822 { 831 {
823 gint i; 832 gint i;
824 gfloat tmpValue; 833 gfloat tmpValue;
834 GtkWidget *c;
825 835
826 /* Check if the window already exists */ 836 /* Check if the window already exists */
827 if (xs_configwin != NULL) 837 if (xs_configwin != NULL)
828 { 838 {
829 gdk_window_raise(xs_configwin->window); 839 gdk_window_raise(xs_configwin->window);
830 return; 840 return;
831 } 841 }
832 842
833 /* Create the window */ 843 /* Create the window */
834 xs_configwin = create_xs_configwin(); 844 xs_configwin = create_xs_configwin();
845
846 /* Create the custom filter curve widget for libSIDPlay2 */
847 c = gtk_curve_new();
848
849 gtk_widget_set_name (c, "cfg_filter2_curve");
850 gtk_widget_ref (c);
851 gtk_object_set_data_full (GTK_OBJECT (xs_configwin),
852 "cfg_filter2_curve", c, (GtkDestroyNotify) gtk_widget_unref);
853 gtk_widget_show (c);
854 gtk_box_pack_start (GTK_BOX(LUW("cfg_box_sidplay2")), c, TRUE, TRUE, 4);
855
856 xs_cfg_filter2_reset(NULL, NULL);
835 857
836 /* Get lock on configuration */ 858 /* Get lock on configuration */
837 XS_MUTEX_LOCK(xs_cfg); 859 XS_MUTEX_LOCK(xs_cfg);
838 860
839 /* Based on available optional parts, gray out options */ 861 /* Based on available optional parts, gray out options */