annotate src/cdaudio-ng/configure.c @ 3118:07701f0ae8e5

Add type hint to CD Audio preferences window.
author John Lindgren <john.lindgren@tds.net>
date Mon, 04 May 2009 16:57:36 -0400
parents 13a0e4377c20
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
1 #include <stdio.h>
1303
2a7c9e0b9c0f Added configure options for cddb
zither@litestep.network
parents: 1193
diff changeset
2 #include <stdlib.h>
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
3 #include <string.h>
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
4 #include <gtk/gtk.h>
2971
3134a0987162 - changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 2558
diff changeset
5 #include <audlegacy/i18n.h>
1382
28766475ca0a More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents: 1339
diff changeset
6 #include "config.h"
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
7
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
8 #include "configure.h"
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
9
2384
0824c92b6132 - fixed a bug which writes TRUE as the default port number.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2326
diff changeset
10 extern cdng_cfg_t cdng_cfg;
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
11
2458
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
12 static GtkWidget *configwindow = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
13 *okbutton = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
14 *cancelbutton = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
15 *maintable = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
16 *daeframe = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
17 *titleinfoframe = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
18 *miscframe = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
19 *daetable = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
20 *titleinfotable = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
21 *misctable = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
22 *limitcheckbutton = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
23 *usecdtextcheckbutton = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
24 *usecddbcheckbutton = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
25 *cddbserverlabel = NULL,
2558
fb2856249629 now path can be specified for cddb lookup via http.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2458
diff changeset
26 *cddbpathlabel = NULL,
2458
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
27 *cddbportlabel = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
28 *cddbserverentry = NULL,
2558
fb2856249629 now path can be specified for cddb lookup via http.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2458
diff changeset
29 *cddbpathentry = NULL,
2458
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
30 *cddbportentry = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
31 *cddbhttpcheckbutton = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
32 *usedevicecheckbutton = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
33 *buttonbox = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
34 *limitspinbutton = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
35 *deviceentry = NULL,
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
36 *debugcheckbutton = NULL;
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
37
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
38
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
39 static void configure_values_to_gui(void)
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
40 {
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
41 gchar portstr[16];
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
42
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
43 /*gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(usedaecheckbutton), cdng_cfg.use_dae);*/
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
44
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
45 /*gtk_widget_set_sensitive(limitcheckbutton, cdng_cfg.use_dae);*/
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
46 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(limitcheckbutton), cdng_cfg.limitspeed > 0);
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
47
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
48 /*gtk_widget_set_sensitive(limitspinbutton, cdng_cfg.use_dae && cdng_cfg.limitspeed > 0);*/
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
49 gtk_spin_button_set_value(GTK_SPIN_BUTTON(limitspinbutton), cdng_cfg.limitspeed);
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
50
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
51 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(usecdtextcheckbutton), cdng_cfg.use_cdtext);
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
52 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(usecddbcheckbutton), cdng_cfg.use_cddb);
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
53
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
54 gtk_entry_set_text(GTK_ENTRY(cddbserverentry), cdng_cfg.cddb_server);
2558
fb2856249629 now path can be specified for cddb lookup via http.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2458
diff changeset
55 gtk_entry_set_text(GTK_ENTRY(cddbpathentry), cdng_cfg.cddb_path);
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
56 g_snprintf(portstr, sizeof(portstr), "%d", cdng_cfg.cddb_port);
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
57 gtk_entry_set_text(GTK_ENTRY(cddbportentry), portstr);
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
58 gtk_widget_set_sensitive(cddbserverentry, cdng_cfg.use_cddb);
2558
fb2856249629 now path can be specified for cddb lookup via http.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2458
diff changeset
59 gtk_widget_set_sensitive(cddbpathentry, cdng_cfg.use_cddb);
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
60 gtk_widget_set_sensitive(cddbportentry, cdng_cfg.use_cddb);
3118
07701f0ae8e5 Add type hint to CD Audio preferences window.
John Lindgren <john.lindgren@tds.net>
parents: 3035
diff changeset
61
2256
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
62 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cddbhttpcheckbutton), cdng_cfg.cddb_http);
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
63 gtk_widget_set_sensitive(cddbhttpcheckbutton, cdng_cfg.use_cddb);
3118
07701f0ae8e5 Add type hint to CD Audio preferences window.
John Lindgren <john.lindgren@tds.net>
parents: 3035
diff changeset
64
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
65 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(usedevicecheckbutton), strlen(cdng_cfg.device) > 0);
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
66
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
67 gtk_widget_set_sensitive(deviceentry, strlen(cdng_cfg.device) > 0);
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
68 gtk_entry_set_text(GTK_ENTRY(deviceentry), cdng_cfg.device);
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
69
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
70 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(debugcheckbutton), cdng_cfg.debug);
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
71 }
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
72
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
73
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
74 static void configure_gui_to_values(void)
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
75 {
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
76 /*usedae = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usedaecheckbutton));*/
3118
07701f0ae8e5 Add type hint to CD Audio preferences window.
John Lindgren <john.lindgren@tds.net>
parents: 3035
diff changeset
77
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
78 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(limitcheckbutton)))
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
79 cdng_cfg.limitspeed = gtk_spin_button_get_value(GTK_SPIN_BUTTON(limitspinbutton));
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
80 else
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
81 cdng_cfg.limitspeed = 0;
3118
07701f0ae8e5 Add type hint to CD Audio preferences window.
John Lindgren <john.lindgren@tds.net>
parents: 3035
diff changeset
82
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
83 cdng_cfg.use_cdtext = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usecdtextcheckbutton));
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
84 cdng_cfg.use_cddb = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usecddbcheckbutton));
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
85 pstrcpy(&cdng_cfg.cddb_server, gtk_entry_get_text(GTK_ENTRY(cddbserverentry)));
2558
fb2856249629 now path can be specified for cddb lookup via http.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2458
diff changeset
86 pstrcpy(&cdng_cfg.cddb_path, gtk_entry_get_text(GTK_ENTRY(cddbpathentry)));
2256
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
87 cdng_cfg.cddb_http = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cddbhttpcheckbutton));
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
88 cdng_cfg.cddb_port = strtol(gtk_entry_get_text(GTK_ENTRY(cddbportentry)), NULL, 10);
3118
07701f0ae8e5 Add type hint to CD Audio preferences window.
John Lindgren <john.lindgren@tds.net>
parents: 3035
diff changeset
89
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
90 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usedevicecheckbutton)))
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
91 pstrcpy(&cdng_cfg.device, gtk_entry_get_text(GTK_ENTRY(deviceentry)));
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
92 else
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
93 pstrcpy(&cdng_cfg.device, "");
3118
07701f0ae8e5 Add type hint to CD Audio preferences window.
John Lindgren <john.lindgren@tds.net>
parents: 3035
diff changeset
94
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
95 cdng_cfg.debug = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(debugcheckbutton));
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
96 }
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
97
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
98
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
99 static gboolean delete_window(GtkWidget *widget, GdkEvent *event, gpointer data)
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
100 {
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
101 (void) widget; (void) event; (void) data;
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
102 gtk_widget_hide(configwindow);
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
103 return TRUE;
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
104 }
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
105
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
106
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
107 static void button_clicked(GtkWidget *widget, gpointer data)
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
108 {
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
109 (void) data;
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
110 gtk_widget_hide(configwindow);
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
111 if (widget == okbutton)
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
112 configure_gui_to_values();
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
113 }
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
114
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
115
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
116 static void checkbutton_toggled(GtkWidget *widget, gpointer data)
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
117 {
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
118 (void) widget; (void) data;
3118
07701f0ae8e5 Add type hint to CD Audio preferences window.
John Lindgren <john.lindgren@tds.net>
parents: 3035
diff changeset
119
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
120 /*gtk_widget_set_sensitive(limitcheckbutton, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usedaecheckbutton)));*/
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
121
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
122 gtk_widget_set_sensitive(limitspinbutton,
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
123 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(limitcheckbutton)) &&
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
124 GTK_WIDGET_IS_SENSITIVE(limitcheckbutton));
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
125
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
126 gtk_widget_set_sensitive(cddbserverentry,
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
127 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usecddbcheckbutton)));
2256
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
128
2558
fb2856249629 now path can be specified for cddb lookup via http.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2458
diff changeset
129 gtk_widget_set_sensitive(cddbpathentry,
fb2856249629 now path can be specified for cddb lookup via http.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2458
diff changeset
130 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usecddbcheckbutton)));
fb2856249629 now path can be specified for cddb lookup via http.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2458
diff changeset
131
2256
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
132 gtk_widget_set_sensitive(cddbhttpcheckbutton,
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
133 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usecddbcheckbutton)));
3118
07701f0ae8e5 Add type hint to CD Audio preferences window.
John Lindgren <john.lindgren@tds.net>
parents: 3035
diff changeset
134
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
135 gtk_widget_set_sensitive(cddbportentry,
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
136 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usecddbcheckbutton)));
3118
07701f0ae8e5 Add type hint to CD Audio preferences window.
John Lindgren <john.lindgren@tds.net>
parents: 3035
diff changeset
137
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
138 gtk_widget_set_sensitive(deviceentry,
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
139 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usedevicecheckbutton)));
2256
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
140
3118
07701f0ae8e5 Add type hint to CD Audio preferences window.
John Lindgren <john.lindgren@tds.net>
parents: 3035
diff changeset
141 /*
2256
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
142 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cddbhttpcheckbutton)) && (widget CDDEBUG("use_dae = %d, limitspeed = %d, use_cdtext = %d, use_cddb = %d, cddbserver = \"%s\", cddbport = %d, cddbhttp = %d, device = \"%s\", debug = %d\n",
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
143 cdng_cfg.use_dae, cdng_cfg.limitspeed, cdng_cfg.use_cdtext, cdng_cfg.use_cddb,
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
144 cdng_cfg.cddb_server, cdng_cfg.cddb_port, cdng_cfg.cddb_http, cdng_cfg.device, cdng_cfg.debug);== cddbhttpcheckbutton))
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
145 gtk_entry_set_text(GTK_ENTRY(cddbportentry), _("80"));
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
146 else
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
147 gtk_entry_set_text(GTK_ENTRY(cddbportentry), _("8880"));
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
148 */
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
149 }
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
150
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
151
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
152 void configure_create_gui()
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
153 {
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
154 configwindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
3118
07701f0ae8e5 Add type hint to CD Audio preferences window.
John Lindgren <john.lindgren@tds.net>
parents: 3035
diff changeset
155 gtk_window_set_type_hint (GTK_WINDOW (configwindow),
07701f0ae8e5 Add type hint to CD Audio preferences window.
John Lindgren <john.lindgren@tds.net>
parents: 3035
diff changeset
156 GDK_WINDOW_TYPE_HINT_DIALOG);
1382
28766475ca0a More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents: 1339
diff changeset
157 gtk_window_set_title(GTK_WINDOW(configwindow), _("CD Audio Plugin Configuration"));
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
158 gtk_window_set_resizable(GTK_WINDOW(configwindow), FALSE);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
159 gtk_window_set_position(GTK_WINDOW(configwindow), GTK_WIN_POS_CENTER_ALWAYS);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
160 gtk_container_set_border_width(GTK_CONTAINER(configwindow), 10);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
161 g_signal_connect(G_OBJECT(configwindow), "delete_event", G_CALLBACK(delete_window), NULL);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
162
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
163 maintable = gtk_table_new(4, 2, TRUE);
1303
2a7c9e0b9c0f Added configure options for cddb
zither@litestep.network
parents: 1193
diff changeset
164 gtk_table_set_homogeneous(GTK_TABLE(maintable), FALSE);
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
165 gtk_container_add(GTK_CONTAINER(configwindow), maintable);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
166
1382
28766475ca0a More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents: 1339
diff changeset
167 daeframe = gtk_frame_new(_("Digital audio extraction"));
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
168 gtk_table_attach_defaults(GTK_TABLE(maintable), daeframe, 0, 2, 0, 1);
1339
83cbc6968a0b Set DAE the default and non-optional play method; Configuring the plugin no longer stops the playback;
Calin Crisan ccrisan@gmail.com
parents: 1303
diff changeset
169 daetable = gtk_table_new(1, 2, TRUE);
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
170 gtk_container_add(GTK_CONTAINER(daeframe), daetable);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
171
1382
28766475ca0a More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents: 1339
diff changeset
172 titleinfoframe = gtk_frame_new(_("Title information"));
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
173 gtk_table_attach_defaults(GTK_TABLE(maintable), titleinfoframe, 0, 2, 1, 2);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
174 titleinfotable = gtk_table_new(2, 2, TRUE);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
175 gtk_container_add(GTK_CONTAINER(titleinfoframe), titleinfotable);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
176
1382
28766475ca0a More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents: 1339
diff changeset
177 miscframe = gtk_frame_new(_("Misc"));
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
178 gtk_table_attach_defaults(GTK_TABLE(maintable), miscframe, 0, 2, 2, 3);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
179 misctable = gtk_table_new(2, 2, TRUE);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
180 gtk_container_add(GTK_CONTAINER(miscframe), misctable);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
181
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
182
1339
83cbc6968a0b Set DAE the default and non-optional play method; Configuring the plugin no longer stops the playback;
Calin Crisan ccrisan@gmail.com
parents: 1303
diff changeset
183 /*
1382
28766475ca0a More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents: 1339
diff changeset
184 usedaecheckbutton = gtk_check_button_new_with_label(_("Use digital audio extraction"));
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
185 g_signal_connect(G_OBJECT(usedaecheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
186 gtk_table_attach_defaults(GTK_TABLE(daetable), usedaecheckbutton, 0, 2, 0, 1);
1339
83cbc6968a0b Set DAE the default and non-optional play method; Configuring the plugin no longer stops the playback;
Calin Crisan ccrisan@gmail.com
parents: 1303
diff changeset
187 */
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
188
1382
28766475ca0a More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents: 1339
diff changeset
189 limitcheckbutton = gtk_check_button_new_with_label(_("Limit read speed to: "));
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
190 g_signal_connect(G_OBJECT(limitcheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL);
1339
83cbc6968a0b Set DAE the default and non-optional play method; Configuring the plugin no longer stops the playback;
Calin Crisan ccrisan@gmail.com
parents: 1303
diff changeset
191 gtk_table_attach_defaults(GTK_TABLE(daetable), limitcheckbutton, 0, 1, 0, 1);
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
192
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
193 limitspinbutton = gtk_spin_button_new_with_range(1.0, 24.0, 1.0);
1339
83cbc6968a0b Set DAE the default and non-optional play method; Configuring the plugin no longer stops the playback;
Calin Crisan ccrisan@gmail.com
parents: 1303
diff changeset
194 gtk_table_attach_defaults(GTK_TABLE(daetable), limitspinbutton, 1, 2, 0, 1);
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
195
1382
28766475ca0a More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents: 1339
diff changeset
196 usecdtextcheckbutton = gtk_check_button_new_with_label(_("Use cd-text if available"));
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
197 g_signal_connect(G_OBJECT(usecdtextcheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL);
2256
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
198 gtk_table_attach_defaults(GTK_TABLE(titleinfotable), usecdtextcheckbutton, 0, 1, 0, 1);
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
199
1382
28766475ca0a More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents: 1339
diff changeset
200 usecddbcheckbutton = gtk_check_button_new_with_label(_("Use CDDB if available"));
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
201 g_signal_connect(G_OBJECT(usecddbcheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL);
2256
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
202 gtk_table_attach_defaults(GTK_TABLE(titleinfotable), usecddbcheckbutton, 0, 1, 1, 2);
1382
28766475ca0a More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents: 1339
diff changeset
203
28766475ca0a More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents: 1339
diff changeset
204 cddbserverlabel = gtk_label_new(_("Server: "));
1303
2a7c9e0b9c0f Added configure options for cddb
zither@litestep.network
parents: 1193
diff changeset
205 gtk_table_attach_defaults(GTK_TABLE(titleinfotable), cddbserverlabel, 0, 1, 2, 3);
1382
28766475ca0a More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents: 1339
diff changeset
206
2558
fb2856249629 now path can be specified for cddb lookup via http.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2458
diff changeset
207 cddbpathlabel = gtk_label_new(_("Path: "));
fb2856249629 now path can be specified for cddb lookup via http.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2458
diff changeset
208 gtk_table_attach_defaults(GTK_TABLE(titleinfotable), cddbpathlabel, 0, 1, 3, 4);
fb2856249629 now path can be specified for cddb lookup via http.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2458
diff changeset
209
1382
28766475ca0a More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents: 1339
diff changeset
210 cddbportlabel = gtk_label_new(_("Port: "));
2558
fb2856249629 now path can be specified for cddb lookup via http.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2458
diff changeset
211 gtk_table_attach_defaults(GTK_TABLE(titleinfotable), cddbportlabel, 0, 1, 4, 5);
1382
28766475ca0a More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents: 1339
diff changeset
212
1303
2a7c9e0b9c0f Added configure options for cddb
zither@litestep.network
parents: 1193
diff changeset
213 cddbserverentry = gtk_entry_new();
2a7c9e0b9c0f Added configure options for cddb
zither@litestep.network
parents: 1193
diff changeset
214 gtk_table_attach_defaults(GTK_TABLE(titleinfotable), cddbserverentry, 1, 2, 2, 3);
1382
28766475ca0a More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents: 1339
diff changeset
215
2558
fb2856249629 now path can be specified for cddb lookup via http.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2458
diff changeset
216 cddbpathentry = gtk_entry_new();
fb2856249629 now path can be specified for cddb lookup via http.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2458
diff changeset
217 gtk_table_attach_defaults(GTK_TABLE(titleinfotable), cddbpathentry, 1, 2, 3, 4);
fb2856249629 now path can be specified for cddb lookup via http.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2458
diff changeset
218
2256
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
219 cddbhttpcheckbutton = gtk_check_button_new_with_label(_("Use HTTP instead of CDDBP"));
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
220 g_signal_connect(G_OBJECT(cddbhttpcheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL);
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
221 gtk_table_attach_defaults(GTK_TABLE(titleinfotable), cddbhttpcheckbutton, 1, 2, 1, 2);
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
222
1303
2a7c9e0b9c0f Added configure options for cddb
zither@litestep.network
parents: 1193
diff changeset
223 cddbportentry = gtk_entry_new();
2558
fb2856249629 now path can be specified for cddb lookup via http.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2458
diff changeset
224 gtk_table_attach_defaults(GTK_TABLE(titleinfotable), cddbportentry, 1, 2, 4, 5);
1303
2a7c9e0b9c0f Added configure options for cddb
zither@litestep.network
parents: 1193
diff changeset
225
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
226
1382
28766475ca0a More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents: 1339
diff changeset
227 usedevicecheckbutton = gtk_check_button_new_with_label(_("Override default device: "));
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
228 g_signal_connect(G_OBJECT(usedevicecheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
229 gtk_table_attach_defaults(GTK_TABLE(misctable), usedevicecheckbutton, 0, 1, 0, 1);
1193
483b8d900d5e Added enable/disable debug option
calin.crisan@ldev-006
parents: 1189
diff changeset
230
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
231 deviceentry = gtk_entry_new();
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
232 gtk_table_attach_defaults(GTK_TABLE(misctable), deviceentry, 1, 2, 0, 1);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
233
1382
28766475ca0a More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents: 1339
diff changeset
234 debugcheckbutton = gtk_check_button_new_with_label(_("Print debug information"));
1193
483b8d900d5e Added enable/disable debug option
calin.crisan@ldev-006
parents: 1189
diff changeset
235 g_signal_connect(G_OBJECT(debugcheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL);
483b8d900d5e Added enable/disable debug option
calin.crisan@ldev-006
parents: 1189
diff changeset
236 gtk_table_attach_defaults(GTK_TABLE(misctable), debugcheckbutton, 0, 1, 1, 2);
483b8d900d5e Added enable/disable debug option
calin.crisan@ldev-006
parents: 1189
diff changeset
237
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
238
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
239 buttonbox = gtk_hbutton_box_new();
3035
13a0e4377c20 Don't use deprecated gtk functions
Tomasz Mon <desowin@gmail.com>
parents: 2971
diff changeset
240 gtk_button_box_set_layout(GTK_BUTTON_BOX(buttonbox), GTK_BUTTONBOX_END);
13a0e4377c20 Don't use deprecated gtk functions
Tomasz Mon <desowin@gmail.com>
parents: 2971
diff changeset
241 gtk_box_set_spacing(GTK_BOX(buttonbox), 10);
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
242 gtk_table_attach_defaults(GTK_TABLE(maintable), buttonbox, 0, 2, 3, 4);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
243
1382
28766475ca0a More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents: 1339
diff changeset
244 okbutton = gtk_button_new_with_label(_("Ok"));
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
245 g_signal_connect(G_OBJECT(okbutton), "clicked", G_CALLBACK(button_clicked), NULL);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
246 gtk_container_add(GTK_CONTAINER(buttonbox), okbutton);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
247
1382
28766475ca0a More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents: 1339
diff changeset
248 cancelbutton = gtk_button_new_with_label(_("Cancel"));
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
249 g_signal_connect(G_OBJECT(cancelbutton), "clicked", G_CALLBACK(button_clicked), NULL);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
250 gtk_container_add(GTK_CONTAINER(buttonbox), cancelbutton);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
251
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
252
1339
83cbc6968a0b Set DAE the default and non-optional play method; Configuring the plugin no longer stops the playback;
Calin Crisan ccrisan@gmail.com
parents: 1303
diff changeset
253 /*gtk_widget_show(usedaecheckbutton);*/
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
254 gtk_widget_show(limitcheckbutton);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
255 gtk_widget_show(limitspinbutton);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
256 gtk_widget_show(usecdtextcheckbutton);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
257 gtk_widget_show(usecddbcheckbutton);
1303
2a7c9e0b9c0f Added configure options for cddb
zither@litestep.network
parents: 1193
diff changeset
258 gtk_widget_show(cddbserverentry);
2558
fb2856249629 now path can be specified for cddb lookup via http.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2458
diff changeset
259 gtk_widget_show(cddbpathentry);
2256
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
260 gtk_widget_show(cddbhttpcheckbutton);
1303
2a7c9e0b9c0f Added configure options for cddb
zither@litestep.network
parents: 1193
diff changeset
261 gtk_widget_show(cddbportentry);
2a7c9e0b9c0f Added configure options for cddb
zither@litestep.network
parents: 1193
diff changeset
262 gtk_widget_show(cddbserverlabel);
2558
fb2856249629 now path can be specified for cddb lookup via http.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 2458
diff changeset
263 gtk_widget_show(cddbpathlabel);
1303
2a7c9e0b9c0f Added configure options for cddb
zither@litestep.network
parents: 1193
diff changeset
264 gtk_widget_show(cddbportlabel);
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
265 gtk_widget_show(usedevicecheckbutton);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
266 gtk_widget_show(deviceentry);
1193
483b8d900d5e Added enable/disable debug option
calin.crisan@ldev-006
parents: 1189
diff changeset
267 gtk_widget_show(debugcheckbutton);
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
268
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
269 gtk_widget_show(daetable);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
270 gtk_widget_show(daeframe);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
271 gtk_widget_show(titleinfotable);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
272 gtk_widget_show(titleinfoframe);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
273 gtk_widget_show(misctable);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
274 gtk_widget_show(miscframe);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
275
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
276 gtk_widget_show(buttonbox);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
277 gtk_widget_show(okbutton);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
278 gtk_widget_show(cancelbutton);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
279
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
280 gtk_widget_show(maintable);
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
281 }
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
282
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
283
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
284 void configure_show_gui(void)
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
285 {
2458
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
286 if (configwindow == NULL)
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
287 configure_create_gui();
853c7686e922 initialize configuration GUI only if needed
mf0102 <0102@gmx.at>
parents: 2384
diff changeset
288
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
289 configure_values_to_gui();
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
290 gtk_widget_show(configwindow);
2326
854b5fae995e 1) cdaudio-ng tries to fetch cd information in a background thread, and 2) cdaudio-ng no longer queries the cddb if cdtext is available
Calin Crisan ccrisan@gmail.com
parents: 2256
diff changeset
291 gtk_window_present(GTK_WINDOW(configwindow));
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
292 }
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
293
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
294
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
295 gint pstrcpy(gchar **res, const gchar *str)
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
296 {
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
297 if (!res || !str) return -1;
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
298
2047
627e1069ef33 Cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 2046
diff changeset
299 g_free(*res);
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
300 if ((*res = (gchar *) g_malloc(strlen(str) + 1)) == NULL)
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
301 return -2;
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
302
2046
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
303 strcpy(*res, str);
040827f0b083 Primary cleanup pass.
Matti Hamalainen <ccr@tnsp.org>
parents: 2037
diff changeset
304 return 0;
1189
af5bd4592100 Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff changeset
305 }
2256
dc92a550179e cddb may use http instead of cddbp now; the global proxy settings are used if enabled
Calin Crisan ccrisan@gmail.com
parents: 2192
diff changeset
306