Mercurial > audlegacy-plugins
changeset 1339:83cbc6968a0b
Set DAE the default and non-optional play method; Configuring the plugin no longer stops the playback;
author | Calin Crisan ccrisan@gmail.com |
---|---|
date | Mon, 23 Jul 2007 21:43:17 +0300 |
parents | 0d4450d66bd1 |
children | 7bb2692b3be9 |
files | src/cdaudio-ng/cdaudio-ng.c src/cdaudio-ng/configure.c src/cdaudio-ng/configure.h |
diffstat | 3 files changed, 24 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cdaudio-ng/cdaudio-ng.c Mon Jul 23 01:01:18 2007 +0300 +++ b/src/cdaudio-ng/cdaudio-ng.c Mon Jul 23 21:43:17 2007 +0300 @@ -121,8 +121,10 @@ ConfigDb *db = bmp_cfg_db_open(); gchar *string = NULL; + /* if (!bmp_cfg_db_get_bool(db, "CDDA", "use_dae", &use_dae)) use_dae = TRUE; + */ if (!bmp_cfg_db_get_int(db, "CDDA", "limitspeed", &limitspeed)) limitspeed = 1; if (!bmp_cfg_db_get_bool(db, "CDDA", "use_cdtext", &use_cdtext)) @@ -145,9 +147,9 @@ bmp_cfg_db_close(db); if (debug) - printf("cdaudio-ng: configuration: use_dae = %d, limitspeed = %d, use_cdtext = %d, use_cddb = %d, cddbserver = \"%s\", cddbport = %d, device = \"%s\", debug = %d\n", use_dae, limitspeed, use_cdtext, use_cddb, cddb_server, cddb_port, device, debug); + printf("cdaudio-ng: configuration: "/*use_dae = %d, */"limitspeed = %d, use_cdtext = %d, use_cddb = %d, cddbserver = \"%s\", cddbport = %d, device = \"%s\", debug = %d\n", /*use_dae, */limitspeed, use_cdtext, use_cddb, cddb_server, cddb_port, device, debug); - configure_set_variables(&use_dae, &limitspeed, &use_cdtext, &use_cddb, device, &debug, cddb_server, &cddb_port); + configure_set_variables(/*&use_dae, */&limitspeed, &use_cdtext, &use_cddb, device, &debug, cddb_server, &cddb_port); configure_create_gui(); } @@ -162,9 +164,10 @@ if (debug) printf("cdaudio-ng: cdaudio_configure()\n"); - /* if playback is started, we stop it */ + /* if (playing_track != -1) playback_stop(); + */ configure_show_gui(); } @@ -256,7 +259,7 @@ } /* limit read speed */ - if (limitspeed > 0 && !use_dae) { + if (limitspeed > 0 && use_dae) { if (debug) printf("cdaudio-ng: setting drive speed limit to %dx\n", limitspeed); if (cdio_set_speed(pcdio, limitspeed) != DRIVER_OP_SUCCESS) @@ -689,7 +692,7 @@ // todo: destroy the gui ConfigDb *db = bmp_cfg_db_open(); - bmp_cfg_db_set_bool(db, "CDDA", "use_dae", use_dae); + /*bmp_cfg_db_set_bool(db, "CDDA", "use_dae", use_dae);*/ bmp_cfg_db_set_int(db, "CDDA", "limitspeed", limitspeed); bmp_cfg_db_set_bool(db, "CDDA", "use_cdtext", use_cdtext); bmp_cfg_db_set_bool(db, "CDDA", "use_cddb", use_cddb);
--- a/src/cdaudio-ng/configure.c Mon Jul 23 01:01:18 2007 +0300 +++ b/src/cdaudio-ng/configure.c Mon Jul 23 21:43:17 2007 +0300 @@ -17,7 +17,7 @@ static GtkWidget *daetable; static GtkWidget *titleinfotable; static GtkWidget *misctable; -static GtkWidget *usedaecheckbutton; +/*static GtkWidget *usedaecheckbutton;*/ static GtkWidget *limitcheckbutton; static GtkWidget *usecdtextcheckbutton; static GtkWidget *usecddbcheckbutton; @@ -31,7 +31,7 @@ static GtkWidget *deviceentry; static GtkWidget *debugcheckbutton; -static gboolean *usedae; +/*static gboolean *usedae;*/ static int *limitspeed; static gboolean *usecdtext; static gboolean *usecddb; @@ -47,9 +47,9 @@ static void gui_to_values(); -void configure_set_variables(gboolean *_usedae, int *_limitspeed, gboolean *_usecdtext, gboolean *_usecddb, char *_device, gboolean *_debug, char *_cddbserver, int *_cddbport) +void configure_set_variables(/*gboolean *_usedae, */int *_limitspeed, gboolean *_usecdtext, gboolean *_usecddb, char *_device, gboolean *_debug, char *_cddbserver, int *_cddbport) { - usedae = _usedae; + /*usedae = _usedae;*/ limitspeed = _limitspeed; usecdtext = _usecdtext; usecddb = _usecddb; @@ -74,7 +74,7 @@ daeframe = gtk_frame_new("Digital audio extraction"); gtk_table_attach_defaults(GTK_TABLE(maintable), daeframe, 0, 2, 0, 1); - daetable = gtk_table_new(2, 2, TRUE); + daetable = gtk_table_new(1, 2, TRUE); gtk_container_add(GTK_CONTAINER(daeframe), daetable); titleinfoframe = gtk_frame_new("Title information"); @@ -88,16 +88,18 @@ gtk_container_add(GTK_CONTAINER(miscframe), misctable); + /* usedaecheckbutton = gtk_check_button_new_with_label("Use digital audio extraction"); g_signal_connect(G_OBJECT(usedaecheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL); gtk_table_attach_defaults(GTK_TABLE(daetable), usedaecheckbutton, 0, 2, 0, 1); + */ limitcheckbutton = gtk_check_button_new_with_label("Limit read speed to: "); g_signal_connect(G_OBJECT(limitcheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL); - gtk_table_attach_defaults(GTK_TABLE(daetable), limitcheckbutton, 0, 1, 1, 2); + gtk_table_attach_defaults(GTK_TABLE(daetable), limitcheckbutton, 0, 1, 0, 1); limitspinbutton = gtk_spin_button_new_with_range(1.0, 24.0, 1.0); - gtk_table_attach_defaults(GTK_TABLE(daetable), limitspinbutton, 1, 2, 1, 2); + gtk_table_attach_defaults(GTK_TABLE(daetable), limitspinbutton, 1, 2, 0, 1); usecdtextcheckbutton = gtk_check_button_new_with_label("Use cd-text if available"); g_signal_connect(G_OBJECT(usecdtextcheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL); @@ -146,7 +148,7 @@ gtk_container_add(GTK_CONTAINER(buttonbox), cancelbutton); - gtk_widget_show(usedaecheckbutton); + /*gtk_widget_show(usedaecheckbutton);*/ gtk_widget_show(limitcheckbutton); gtk_widget_show(limitspinbutton); gtk_widget_show(usecdtextcheckbutton); @@ -195,7 +197,7 @@ void checkbutton_toggled(GtkWidget *widget, gpointer data) { - gtk_widget_set_sensitive(limitcheckbutton, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usedaecheckbutton))); + /*gtk_widget_set_sensitive(limitcheckbutton, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usedaecheckbutton)));*/ gtk_widget_set_sensitive( limitspinbutton, @@ -210,12 +212,12 @@ void values_to_gui() { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(usedaecheckbutton), *usedae); + /*gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(usedaecheckbutton), *usedae);*/ - gtk_widget_set_sensitive(limitcheckbutton, *usedae); + /*gtk_widget_set_sensitive(limitcheckbutton, *usedae);*/ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(limitcheckbutton), *limitspeed > 0); - gtk_widget_set_sensitive(limitspinbutton, *usedae && *limitspeed > 0); + /*gtk_widget_set_sensitive(limitspinbutton, *usedae && *limitspeed > 0);*/ gtk_spin_button_set_value(GTK_SPIN_BUTTON(limitspinbutton), *limitspeed); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(usecdtextcheckbutton), *usecdtext); @@ -238,7 +240,7 @@ void gui_to_values() { - *usedae = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usedaecheckbutton)); + /*usedae = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usedaecheckbutton));*/ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(limitcheckbutton))) *limitspeed = gtk_spin_button_get_value(GTK_SPIN_BUTTON(limitspinbutton)); else
--- a/src/cdaudio-ng/configure.h Mon Jul 23 01:01:18 2007 +0300 +++ b/src/cdaudio-ng/configure.h Mon Jul 23 21:43:17 2007 +0300 @@ -2,7 +2,7 @@ #ifndef CONFIGURE_H #define CONFIGURE_H -void configure_set_variables(gboolean *usedae, int *limitspeed, gboolean *usecdtext, gboolean *usecddb, char *device, gboolean *debug, char *cddbserver, int *cddbport); +void configure_set_variables(/*gboolean *usedae, */int *limitspeed, gboolean *usecdtext, gboolean *usecddb, char *device, gboolean *debug, char *cddbserver, int *cddbport); void configure_create_gui(); void configure_show_gui();