Mercurial > audlegacy-plugins
annotate src/cdaudio-ng/configure.c @ 2051:d8e453d09ee4
unbreak song_change
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Sat, 13 Oct 2007 20:12:45 -0500 |
parents | 627e1069ef33 |
children | e5401b6c4665 |
rev | line source |
---|---|
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
1 #include <stdio.h> |
1303 | 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> |
1382
28766475ca0a
More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
1339
diff
changeset
|
5 #include <audacious/i18n.h> |
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 |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
10 |
2037 | 11 static GtkWidget *configwindow, |
12 *okbutton, | |
13 *cancelbutton, | |
14 *maintable, | |
15 *daeframe, | |
16 *titleinfoframe, | |
17 *miscframe, | |
18 *daetable, | |
19 *titleinfotable, | |
20 *misctable, | |
21 *limitcheckbutton, | |
22 *usecdtextcheckbutton, | |
23 *usecddbcheckbutton, | |
24 *cddbserverlabel, | |
25 *cddbportlabel, | |
26 *cddbserverentry, | |
27 *cddbportentry, | |
28 *usedevicecheckbutton, | |
29 *buttonbox, | |
30 *limitspinbutton, | |
31 *deviceentry, | |
32 *debugcheckbutton; | |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
33 |
2046 | 34 |
35 static void configure_values_to_gui(void) | |
36 { | |
37 gchar portstr[16]; | |
38 | |
39 /*gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(usedaecheckbutton), cdng_cfg.use_dae);*/ | |
40 | |
41 /*gtk_widget_set_sensitive(limitcheckbutton, cdng_cfg.use_dae);*/ | |
42 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(limitcheckbutton), cdng_cfg.limitspeed > 0); | |
43 | |
44 /*gtk_widget_set_sensitive(limitspinbutton, cdng_cfg.use_dae && cdng_cfg.limitspeed > 0);*/ | |
45 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
|
46 |
2046 | 47 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(usecdtextcheckbutton), cdng_cfg.use_cdtext); |
48 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(usecddbcheckbutton), cdng_cfg.use_cddb); | |
49 | |
50 gtk_entry_set_text(GTK_ENTRY(cddbserverentry), cdng_cfg.cddb_server); | |
51 g_snprintf(portstr, sizeof(portstr), "%d", cdng_cfg.cddb_port); | |
52 gtk_entry_set_text(GTK_ENTRY(cddbportentry), portstr); | |
53 gtk_widget_set_sensitive(cddbserverentry, cdng_cfg.use_cddb); | |
54 gtk_widget_set_sensitive(cddbportentry, cdng_cfg.use_cddb); | |
55 | |
56 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(usedevicecheckbutton), strlen(cdng_cfg.device) > 0); | |
57 | |
58 gtk_widget_set_sensitive(deviceentry, strlen(cdng_cfg.device) > 0); | |
59 gtk_entry_set_text(GTK_ENTRY(deviceentry), cdng_cfg.device); | |
60 | |
61 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(debugcheckbutton), cdng_cfg.debug); | |
62 } | |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
63 |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
64 |
2046 | 65 static void configure_gui_to_values(void) |
66 { | |
67 /*usedae = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usedaecheckbutton));*/ | |
68 | |
69 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(limitcheckbutton))) | |
70 cdng_cfg.limitspeed = gtk_spin_button_get_value(GTK_SPIN_BUTTON(limitspinbutton)); | |
71 else | |
72 cdng_cfg.limitspeed = 0; | |
73 | |
74 cdng_cfg.use_cdtext = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usecdtextcheckbutton)); | |
75 cdng_cfg.use_cddb = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usecddbcheckbutton)); | |
76 pstrcpy(&cdng_cfg.cddb_server, gtk_entry_get_text(GTK_ENTRY(cddbserverentry))); | |
77 cdng_cfg.cddb_port = strtol(gtk_entry_get_text(GTK_ENTRY(cddbportentry)), NULL, 10); | |
78 | |
79 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usedevicecheckbutton))) | |
80 pstrcpy(&cdng_cfg.device, gtk_entry_get_text(GTK_ENTRY(deviceentry))); | |
81 else | |
82 pstrcpy(&cdng_cfg.device, ""); | |
83 | |
84 cdng_cfg.debug = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(debugcheckbutton)); | |
85 } | |
86 | |
87 | |
88 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
|
89 { |
2046 | 90 (void) widget; (void) event; (void) data; |
91 gtk_widget_hide(configwindow); | |
92 return TRUE; | |
93 } | |
94 | |
95 | |
96 static void button_clicked(GtkWidget *widget, gpointer data) | |
97 { | |
98 (void) data; | |
99 gtk_widget_hide(configwindow); | |
100 if (widget == okbutton) | |
101 configure_gui_to_values(); | |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
102 } |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
103 |
2046 | 104 |
105 static void checkbutton_toggled(GtkWidget *widget, gpointer data) | |
106 { | |
107 (void) widget; (void) data; | |
108 | |
109 /*gtk_widget_set_sensitive(limitcheckbutton, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usedaecheckbutton)));*/ | |
110 | |
111 gtk_widget_set_sensitive(limitspinbutton, | |
112 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(limitcheckbutton)) && | |
113 GTK_WIDGET_IS_SENSITIVE(limitcheckbutton)); | |
114 | |
115 gtk_widget_set_sensitive(cddbserverentry, | |
116 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usecddbcheckbutton))); | |
117 | |
118 gtk_widget_set_sensitive(cddbportentry, | |
119 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usecddbcheckbutton))); | |
120 | |
121 gtk_widget_set_sensitive(deviceentry, | |
122 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(usedevicecheckbutton))); | |
123 } | |
124 | |
125 | |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
126 void configure_create_gui() |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
127 { |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
128 configwindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
1382
28766475ca0a
More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
1339
diff
changeset
|
129 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
|
130 gtk_window_set_resizable(GTK_WINDOW(configwindow), FALSE); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
131 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
|
132 gtk_container_set_border_width(GTK_CONTAINER(configwindow), 10); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
133 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
|
134 |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
135 maintable = gtk_table_new(4, 2, TRUE); |
1303 | 136 gtk_table_set_homogeneous(GTK_TABLE(maintable), FALSE); |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
137 gtk_container_add(GTK_CONTAINER(configwindow), maintable); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
138 |
1382
28766475ca0a
More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
1339
diff
changeset
|
139 daeframe = gtk_frame_new(_("Digital audio extraction")); |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
140 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
|
141 daetable = gtk_table_new(1, 2, TRUE); |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
142 gtk_container_add(GTK_CONTAINER(daeframe), daetable); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
143 |
1382
28766475ca0a
More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
1339
diff
changeset
|
144 titleinfoframe = gtk_frame_new(_("Title information")); |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
145 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
|
146 titleinfotable = gtk_table_new(2, 2, TRUE); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
147 gtk_container_add(GTK_CONTAINER(titleinfoframe), titleinfotable); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
148 |
1382
28766475ca0a
More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
1339
diff
changeset
|
149 miscframe = gtk_frame_new(_("Misc")); |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
150 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
|
151 misctable = gtk_table_new(2, 2, TRUE); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
152 gtk_container_add(GTK_CONTAINER(miscframe), misctable); |
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 |
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
|
155 /* |
1382
28766475ca0a
More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
1339
diff
changeset
|
156 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
|
157 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
|
158 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
|
159 */ |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
160 |
1382
28766475ca0a
More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
1339
diff
changeset
|
161 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
|
162 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
|
163 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
|
164 |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
165 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
|
166 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
|
167 |
1382
28766475ca0a
More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
1339
diff
changeset
|
168 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
|
169 g_signal_connect(G_OBJECT(usecdtextcheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
170 gtk_table_attach_defaults(GTK_TABLE(titleinfotable), usecdtextcheckbutton, 0, 2, 0, 1); |
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 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
|
173 g_signal_connect(G_OBJECT(usecddbcheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
174 gtk_table_attach_defaults(GTK_TABLE(titleinfotable), usecddbcheckbutton, 0, 2, 1, 2); |
1382
28766475ca0a
More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
1339
diff
changeset
|
175 |
28766475ca0a
More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
1339
diff
changeset
|
176 cddbserverlabel = gtk_label_new(_("Server: ")); |
1303 | 177 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
|
178 |
28766475ca0a
More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
1339
diff
changeset
|
179 cddbportlabel = gtk_label_new(_("Port: ")); |
1303 | 180 gtk_table_attach_defaults(GTK_TABLE(titleinfotable), cddbportlabel, 0, 1, 3, 4); |
1382
28766475ca0a
More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
1339
diff
changeset
|
181 |
1303 | 182 cddbserverentry = gtk_entry_new(); |
183 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
|
184 |
1303 | 185 cddbportentry = gtk_entry_new(); |
186 gtk_table_attach_defaults(GTK_TABLE(titleinfotable), cddbportentry, 1, 2, 3, 4); | |
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 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
|
190 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
|
191 gtk_table_attach_defaults(GTK_TABLE(misctable), usedevicecheckbutton, 0, 1, 0, 1); |
1193 | 192 |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
193 deviceentry = gtk_entry_new(); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
194 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
|
195 |
1382
28766475ca0a
More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
1339
diff
changeset
|
196 debugcheckbutton = gtk_check_button_new_with_label(_("Print debug information")); |
1193 | 197 g_signal_connect(G_OBJECT(debugcheckbutton), "toggled", G_CALLBACK(checkbutton_toggled), NULL); |
198 gtk_table_attach_defaults(GTK_TABLE(misctable), debugcheckbutton, 0, 1, 1, 2); | |
199 | |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
200 |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
201 buttonbox = gtk_hbutton_box_new(); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
202 gtk_hbutton_box_set_layout_default(GTK_BUTTONBOX_END); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
203 gtk_hbutton_box_set_spacing_default(10); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
204 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
|
205 |
1382
28766475ca0a
More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
1339
diff
changeset
|
206 okbutton = gtk_button_new_with_label(_("Ok")); |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
207 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
|
208 gtk_container_add(GTK_CONTAINER(buttonbox), okbutton); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
209 |
1382
28766475ca0a
More and more translatable strings... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
1339
diff
changeset
|
210 cancelbutton = gtk_button_new_with_label(_("Cancel")); |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
211 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
|
212 gtk_container_add(GTK_CONTAINER(buttonbox), cancelbutton); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
213 |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
214 |
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
|
215 /*gtk_widget_show(usedaecheckbutton);*/ |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
216 gtk_widget_show(limitcheckbutton); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
217 gtk_widget_show(limitspinbutton); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
218 gtk_widget_show(usecdtextcheckbutton); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
219 gtk_widget_show(usecddbcheckbutton); |
1303 | 220 gtk_widget_show(cddbserverentry); |
221 gtk_widget_show(cddbportentry); | |
222 gtk_widget_show(cddbserverlabel); | |
223 gtk_widget_show(cddbportlabel); | |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
224 gtk_widget_show(usedevicecheckbutton); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
225 gtk_widget_show(deviceentry); |
1193 | 226 gtk_widget_show(debugcheckbutton); |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
227 |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
228 gtk_widget_show(daetable); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
229 gtk_widget_show(daeframe); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
230 gtk_widget_show(titleinfotable); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
231 gtk_widget_show(titleinfoframe); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
232 gtk_widget_show(misctable); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
233 gtk_widget_show(miscframe); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
234 |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
235 gtk_widget_show(buttonbox); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
236 gtk_widget_show(okbutton); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
237 gtk_widget_show(cancelbutton); |
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 gtk_widget_show(maintable); |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
240 } |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
241 |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
242 |
2046 | 243 void configure_show_gui(void) |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
244 { |
2046 | 245 configure_values_to_gui(); |
246 gtk_widget_show(configwindow); | |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
247 } |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
248 |
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
249 |
2046 | 250 gint pstrcpy(gchar **res, const gchar *str) |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
251 { |
2046 | 252 if (!res || !str) return -1; |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
253 |
2047 | 254 g_free(*res); |
2046 | 255 if ((*res = (gchar *) g_malloc(strlen(str) + 1)) == NULL) |
256 return -2; | |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
257 |
2046 | 258 strcpy(*res, str); |
259 return 0; | |
1189
af5bd4592100
Added cdaudio-ng.h; added a configure dialog
zither@litestep.network
parents:
diff
changeset
|
260 } |