437
set_option_from_entry(cddb_server_entry, options.cddb_server);
442
set_option_from_entry(cddb_server_entry, options.cddb_server, MAXLEN);
438
443
set_option_from_spin(cddb_tout_spinner, &options.cddb_timeout);
439
set_option_from_entry(cddb_email_entry, options.cddb_email);
440
set_option_from_entry(cddb_local_entry, options.cddb_local);
444
set_option_from_entry(cddb_email_entry, options.cddb_email, MAXLEN);
445
set_option_from_entry(cddb_local_entry, options.cddb_local, MAXLEN);
441
446
set_option_from_toggle(cddb_local_check, &options.cddb_cache_only);
442
set_option_from_toggle(cddb_radio_proxy, &options.cddb_use_proxy);
443
447
set_option_from_combo(cddb_proto_combo, &options.cddb_use_http);
444
set_option_from_entry(cddb_proxy_entry, options.cddb_proxy);
445
set_option_from_spin(cddb_proxy_port_spinner, &options.cddb_proxy_port);
446
448
#endif /* HAVE_CDDB */
453
set_option_from_toggle(inet_radio_proxy, &options.inet_use_proxy);
454
set_option_from_entry(inet_entry_proxy, options.inet_proxy, MAXLEN);
455
set_option_from_spin(inet_spinner_proxy_port, &options.inet_proxy_port);
456
set_option_from_entry(inet_entry_noproxy_domains, options.inet_noproxy_domains, MAXLEN);
457
set_option_from_spin(inet_spinner_timeout, &options.inet_timeout);
451
462
set_option_from_toggle(check_override_skin, &options.override_skin_settings);
463
set_option_from_entry(entry_pl_font, options.playlist_font, MAX_FONTNAME_LEN);
464
set_option_from_entry(entry_ms_font, options.browser_font, MAX_FONTNAME_LEN);
465
set_option_from_entry(entry_bt_font, options.bigtimer_font, MAX_FONTNAME_LEN);
466
set_option_from_entry(entry_st_font, options.smalltimer_font, MAX_FONTNAME_LEN);
467
set_option_from_entry(entry_songt_font, options.songtitle_font, MAX_FONTNAME_LEN);
468
set_option_from_entry(entry_si_font, options.songinfo_font, MAX_FONTNAME_LEN);
469
set_option_from_entry(entry_sb_font, options.statusbar_font, MAX_FONTNAME_LEN);
454
471
/* refresh GUI */
456
for (i = 0; i < 3; i++) {
458
474
GtkTreeIter iter;
459
GtkTreeViewColumn * cols[4];
462
cols[0] = track_column;
463
cols[1] = rva_column;
464
cols[2] = length_column;
467
gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(plistcol_store), &iter, NULL, i);
469
gtk_tree_model_get(GTK_TREE_MODEL(plistcol_store), &iter, 1, &pnumstr, -1);
473
gtk_tree_view_move_column_after(GTK_TREE_VIEW(play_list),
474
cols[n], cols[n_prev]);
476
options.plcol_idx[i] = n;
476
for (i = 0; i < 3; i++) {
477
gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(plistcol_store),
479
gtk_tree_model_get(GTK_TREE_MODEL(plistcol_store), &iter,
480
1, options.plcol_idx + i, -1);
482
playlist_reorder_columns_all(options.plcol_idx);
480
485
if (!track_name_in_bold_shadow && options.show_active_track_name_in_bold == 1) {
796
767
float volx, voly;
797
768
int px1, py1, px2, py2;
770
#if (GTK_CHECK_VERSION(2,8,0))
772
cairo_t *rva_cr = NULL;
775
rva_cr = gdk_cairo_create (rva_drawing_area->window);
777
if (rva_cr != NULL) {
779
cairo_set_source_rgb (rva_cr, 0.0, 0.0, 0.0);
780
cairo_paint (rva_cr);
782
cairo_set_line_width (rva_cr, 1.0);
784
if (rva_is_enabled_shadow) {
785
cairo_set_source_rgb (rva_cr, 10000 / 65536.0, 10000 / 65536.0, 10000 / 65536.0);
787
cairo_set_source_rgb (rva_cr, 5000 / 65536.0, 5000 / 65536.0, 5000 / 65536.0);
790
cairo_set_antialias (rva_cr, CAIRO_ANTIALIAS_NONE);
792
for (i = 0; i <= 24; i++) {
793
cairo_move_to (rva_cr, xoffs + i * dw, yoffs);
794
cairo_line_to (rva_cr, xoffs + i * dw, yoffs + 24 * dh);
795
cairo_move_to (rva_cr, xoffs, yoffs + i * dh);
796
cairo_line_to (rva_cr, xoffs + 24 * dw, yoffs + i * dh);
798
cairo_stroke (rva_cr);
800
cairo_set_antialias (rva_cr, CAIRO_ANTIALIAS_DEFAULT);
802
if (rva_is_enabled_shadow) {
803
cairo_set_source_rgb (rva_cr, 0.0, 0.0, 1.0);
805
cairo_set_source_rgb (rva_cr, 0.0, 0.0, 30000 / 65536.0);
808
cairo_move_to (rva_cr, xoffs, yoffs + 24 * dh);
809
cairo_line_to (rva_cr, xoffs + 24 * dw, yoffs);
810
cairo_stroke (rva_cr);
812
if (rva_is_enabled_shadow) {
813
cairo_set_source_rgb (rva_cr, 1.0, 0.0, 0.0);
815
cairo_set_source_rgb (rva_cr, 30000 / 65536.0, 0.0, 0.0);
819
voly = volx + (volx - rva_refvol_shadow) * (rva_steepness_shadow - 1.0f);
821
py1 = yoffs - (voly * dh);
824
voly = volx + (volx - rva_refvol_shadow) * (rva_steepness_shadow - 1.0f);
826
py2 = yoffs - (voly * dh);
828
cairo_move_to (rva_cr, px1, py1);
829
cairo_line_to (rva_cr, px2, py2);
830
cairo_stroke (rva_cr);
832
cairo_destroy (rva_cr);
800
840
gdk_draw_rectangle(rva_pixmap,
801
841
rva_drawing_area->style->black_gc,
997
1056
if (response == GTK_RESPONSE_OK) {
999
1058
s = gtk_font_selection_dialog_get_font_name (GTK_FONT_SELECTION_DIALOG(font_selector));
1000
strncpy(options.playlist_font, s, MAX_FONTNAME_LEN);
1001
gtk_entry_set_text(GTK_ENTRY(entry_pl_font), s);
1006
appearance_changed = 1;
1007
gtk_widget_destroy (font_selector);
1011
browser_font_select(GtkWidget *widget) {
1014
GtkWidget *font_selector;
1017
font_selector = gtk_font_selection_dialog_new ("Select a font...");
1018
gtk_window_set_modal(GTK_WINDOW(font_selector), TRUE);
1019
gtk_window_set_transient_for(GTK_WINDOW(font_selector), GTK_WINDOW(options_window));
1020
gtk_font_selection_dialog_set_font_name (GTK_FONT_SELECTION_DIALOG(font_selector), options.browser_font);
1021
gtk_widget_show (font_selector);
1022
response = aqualung_dialog_run (GTK_DIALOG (font_selector));
1024
if (response == GTK_RESPONSE_OK) {
1026
s = gtk_font_selection_dialog_get_font_name (GTK_FONT_SELECTION_DIALOG(font_selector));
1027
strncpy(options.browser_font, s, MAX_FONTNAME_LEN);
1028
gtk_entry_set_text(GTK_ENTRY(entry_ms_font), s);
1033
appearance_changed = 1;
1034
gtk_widget_destroy (font_selector);
1038
bigtimer_font_select(GtkWidget *widget) {
1041
GtkWidget *font_selector;
1044
font_selector = gtk_font_selection_dialog_new ("Select a font...");
1045
gtk_window_set_modal(GTK_WINDOW(font_selector), TRUE);
1046
gtk_window_set_transient_for(GTK_WINDOW(font_selector), GTK_WINDOW(options_window));
1047
gtk_font_selection_dialog_set_font_name (GTK_FONT_SELECTION_DIALOG(font_selector), options.bigtimer_font);
1048
gtk_widget_show (font_selector);
1049
response = aqualung_dialog_run (GTK_DIALOG (font_selector));
1051
if (response == GTK_RESPONSE_OK) {
1053
s = gtk_font_selection_dialog_get_font_name (GTK_FONT_SELECTION_DIALOG(font_selector));
1054
strncpy(options.bigtimer_font, s, MAX_FONTNAME_LEN);
1055
gtk_entry_set_text(GTK_ENTRY(entry_bt_font), s);
1060
appearance_changed = 1;
1061
gtk_widget_destroy (font_selector);
1065
smalltimer_font_select(GtkWidget *widget) {
1068
GtkWidget *font_selector;
1071
font_selector = gtk_font_selection_dialog_new ("Select a font...");
1072
gtk_window_set_modal(GTK_WINDOW(font_selector), TRUE);
1073
gtk_window_set_transient_for(GTK_WINDOW(font_selector), GTK_WINDOW(options_window));
1074
gtk_font_selection_dialog_set_font_name (GTK_FONT_SELECTION_DIALOG(font_selector), options.smalltimer_font);
1075
gtk_widget_show (font_selector);
1076
response = aqualung_dialog_run (GTK_DIALOG (font_selector));
1078
if (response == GTK_RESPONSE_OK) {
1080
s = gtk_font_selection_dialog_get_font_name (GTK_FONT_SELECTION_DIALOG(font_selector));
1081
strncpy(options.smalltimer_font, s, MAX_FONTNAME_LEN);
1082
gtk_entry_set_text(GTK_ENTRY(entry_st_font), s);
1087
appearance_changed = 1;
1088
gtk_widget_destroy (font_selector);
1092
songtitle_font_select(GtkWidget *widget) {
1095
GtkWidget *font_selector;
1098
font_selector = gtk_font_selection_dialog_new ("Select a font...");
1099
gtk_window_set_modal(GTK_WINDOW(font_selector), TRUE);
1100
gtk_window_set_transient_for(GTK_WINDOW(font_selector), GTK_WINDOW(options_window));
1101
gtk_font_selection_dialog_set_font_name (GTK_FONT_SELECTION_DIALOG(font_selector), options.songtitle_font);
1102
gtk_widget_show (font_selector);
1103
response = aqualung_dialog_run (GTK_DIALOG (font_selector));
1105
if (response == GTK_RESPONSE_OK) {
1107
s = gtk_font_selection_dialog_get_font_name (GTK_FONT_SELECTION_DIALOG(font_selector));
1108
strncpy(options.songtitle_font, s, MAX_FONTNAME_LEN);
1109
gtk_entry_set_text(GTK_ENTRY(entry_songt_font), s);
1114
appearance_changed = 1;
1115
gtk_widget_destroy (font_selector);
1119
songinfo_font_select(GtkWidget *widget) {
1122
GtkWidget *font_selector;
1125
font_selector = gtk_font_selection_dialog_new ("Select a font...");
1126
gtk_window_set_modal(GTK_WINDOW(font_selector), TRUE);
1127
gtk_window_set_transient_for(GTK_WINDOW(font_selector), GTK_WINDOW(options_window));
1128
gtk_font_selection_dialog_set_font_name (GTK_FONT_SELECTION_DIALOG(font_selector), options.songinfo_font);
1129
gtk_widget_show (font_selector);
1130
response = aqualung_dialog_run (GTK_DIALOG (font_selector));
1132
if (response == GTK_RESPONSE_OK) {
1134
s = gtk_font_selection_dialog_get_font_name (GTK_FONT_SELECTION_DIALOG(font_selector));
1135
strncpy(options.songinfo_font, s, MAX_FONTNAME_LEN);
1136
gtk_entry_set_text(GTK_ENTRY(entry_si_font), s);
1141
appearance_changed = 1;
1142
gtk_widget_destroy (font_selector);
1146
statusbar_font_select(GtkWidget *widget) {
1149
GtkWidget *font_selector;
1152
font_selector = gtk_font_selection_dialog_new ("Select a font...");
1153
gtk_window_set_modal(GTK_WINDOW(font_selector), TRUE);
1154
gtk_window_set_transient_for(GTK_WINDOW(font_selector), GTK_WINDOW(options_window));
1155
gtk_font_selection_dialog_set_font_name (GTK_FONT_SELECTION_DIALOG(font_selector), options.statusbar_font);
1156
gtk_widget_show (font_selector);
1157
response = aqualung_dialog_run (GTK_DIALOG (font_selector));
1159
if (response == GTK_RESPONSE_OK) {
1161
s = gtk_font_selection_dialog_get_font_name (GTK_FONT_SELECTION_DIALOG(font_selector));
1162
strncpy(options.statusbar_font, s, MAX_FONTNAME_LEN);
1163
gtk_entry_set_text(GTK_ENTRY(entry_sb_font), s);
1059
gtk_entry_set_text(GTK_ENTRY((GtkWidget *)data), s);
1193
browse_ms_pathlist_clicked(GtkWidget * widget, gpointer data) {
1196
const gchar * selected_filename = gtk_entry_get_text(GTK_ENTRY(data));
1199
dialog = gtk_file_chooser_dialog_new(_("Please select a Music Store database."),
1200
GTK_WINDOW(options_window),
1201
GTK_FILE_CHOOSER_ACTION_OPEN,
1202
GTK_STOCK_APPLY, GTK_RESPONSE_ACCEPT,
1203
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
1206
gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER_ON_PARENT);
1207
gtk_window_set_default_size(GTK_WINDOW(dialog), 580, 390);
1208
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT);
1210
if (strlen(selected_filename)) {
1211
char * locale = g_locale_from_utf8(selected_filename, -1, NULL, NULL, NULL);
1215
if (locale == NULL) {
1216
gtk_widget_destroy(dialog);
1220
normalize_filename(locale, tmp);
1221
gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), tmp);
1224
gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), options.currdir);
1227
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_show_hidden))) {
1228
gtk_file_chooser_set_show_hidden(GTK_FILE_CHOOSER(dialog), TRUE);
1231
if (aqualung_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
1235
selected_filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
1236
utf8 = g_locale_to_utf8(selected_filename, -1, NULL, NULL, NULL);
1239
gtk_widget_destroy(dialog);
1243
gtk_entry_set_text(GTK_ENTRY(entry_ms_pathlist), utf8);
1245
strncpy(options.currdir, selected_filename, MAXLEN-1);
1249
gtk_widget_destroy(dialog);
1302
1254
append_ms_pathlist(char * path, char * name) {
1304
1256
GtkTreeIter iter;
1415
browse_ms_pathlist_clicked(GtkWidget * widget, gpointer data) {
1418
const gchar * selected_filename = gtk_entry_get_text(GTK_ENTRY(data));
1421
dialog = gtk_file_chooser_dialog_new(_("Please select a Music Store database."),
1422
GTK_WINDOW(options_window),
1423
GTK_FILE_CHOOSER_ACTION_OPEN,
1424
GTK_STOCK_APPLY, GTK_RESPONSE_ACCEPT,
1425
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
1428
gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER_ON_PARENT);
1429
gtk_window_set_default_size(GTK_WINDOW(dialog), 580, 390);
1430
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT);
1432
if (strlen(selected_filename)) {
1433
char * locale = g_locale_from_utf8(selected_filename, -1, NULL, NULL, NULL);
1437
if (locale == NULL) {
1438
gtk_widget_destroy(dialog);
1442
normalize_filename(locale, tmp);
1443
gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), tmp);
1446
gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), options.currdir);
1449
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_show_hidden))) {
1450
gtk_file_chooser_set_show_hidden(GTK_FILE_CHOOSER(dialog), TRUE);
1453
if (aqualung_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
1457
selected_filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
1458
utf8 = g_locale_to_utf8(selected_filename, -1, NULL, NULL, NULL);
1461
gtk_widget_destroy(dialog);
1465
gtk_entry_set_text(GTK_ENTRY(entry_ms_pathlist), utf8);
1467
strncpy(options.currdir, selected_filename, MAXLEN-1);
1471
gtk_widget_destroy(dialog);
1476
1370
display_title_format_help(void) {
1478
1372
GtkWidget *help_dialog;
1723
1657
frame_title = gtk_frame_new(_("Title format"));
1724
1658
gtk_box_pack_start(GTK_BOX(vbox_general), frame_title, FALSE, TRUE, 0);
1726
hbox_title = gtk_hbox_new(FALSE, 3);
1727
gtk_container_set_border_width(GTK_CONTAINER(hbox_title), 5);
1728
gtk_container_add(GTK_CONTAINER(frame_title), hbox_title);
1660
table_title = gtk_table_new(8, 3, FALSE);
1661
gtk_container_set_border_width(GTK_CONTAINER(table_title), 5);
1662
gtk_container_add(GTK_CONTAINER(frame_title), table_title);
1665
hbox = gtk_hbox_new(FALSE, 0);
1666
label_title = gtk_label_new(_("Full:"));
1667
gtk_box_pack_start(GTK_BOX(hbox), label_title, FALSE, FALSE, 0);
1668
gtk_table_attach(GTK_TABLE(table_title), hbox, 0, 1, 0, 1,
1669
GTK_FILL, GTK_FILL, 5, 2);
1730
1671
entry_title = gtk_entry_new();
1731
1672
gtk_entry_set_max_length(GTK_ENTRY(entry_title), MAXLEN - 1);
1732
1673
gtk_entry_set_text(GTK_ENTRY(entry_title), options.title_format);
1733
gtk_box_pack_start(GTK_BOX(hbox_title), entry_title, TRUE, TRUE, 0);
1674
gtk_table_attach(GTK_TABLE(table_title), entry_title, 1, 2, 0, 1,
1675
GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 2);
1735
1677
help_btn_title = gtk_button_new_from_stock (GTK_STOCK_HELP);
1736
1678
g_signal_connect(help_btn_title, "clicked", G_CALLBACK(display_title_format_help), NULL);
1737
gtk_box_pack_start(GTK_BOX(hbox_title), help_btn_title, FALSE, FALSE, 0);
1679
gtk_table_attach(GTK_TABLE(table_title), help_btn_title, 2, 3, 0, 1,
1680
GTK_FILL, GTK_FILL, 5, 2);
1683
hbox = gtk_hbox_new(FALSE, 0);
1684
label_title = gtk_label_new(_("No album:"));
1685
gtk_box_pack_start(GTK_BOX(hbox), label_title, FALSE, FALSE, 0);
1686
gtk_table_attach(GTK_TABLE(table_title), hbox, 0, 1, 1, 2,
1687
GTK_FILL, GTK_FILL, 5, 2);
1689
entry_title_no_album = gtk_entry_new();
1690
gtk_entry_set_max_length(GTK_ENTRY(entry_title_no_album), MAXLEN - 1);
1691
gtk_entry_set_text(GTK_ENTRY(entry_title_no_album), options.title_format_no_album);
1692
gtk_table_attach(GTK_TABLE(table_title), entry_title_no_album, 1, 2, 1, 2,
1693
GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 5, 2);
1695
help_btn_title = gtk_button_new_from_stock (GTK_STOCK_HELP);
1696
g_signal_connect(help_btn_title, "clicked", G_CALLBACK(display_title_format_no_album_help), NULL);
1697
gtk_table_attach(GTK_TABLE(table_title), help_btn_title, 2, 3, 1, 2,
1698
GTK_FILL, GTK_FILL, 5, 2);
1739
1701
frame_param = gtk_frame_new(_("Implicit command line"));
1740
1702
gtk_box_pack_start(GTK_BOX(vbox_general), frame_param, FALSE, TRUE, 5);
2327
2323
rva_use_averaging_shadow = options.rva_use_averaging;
2328
2324
g_signal_connect(G_OBJECT(check_rva_use_averaging), "toggled",
2329
2325
G_CALLBACK(check_rva_use_averaging_toggled), NULL);
2330
gtk_table_attach(GTK_TABLE(table_rva), check_rva_use_averaging, 0, 2, 4, 5,
2326
gtk_table_attach(GTK_TABLE(table_rva), check_rva_use_averaging, 0, 2, 5, 6,
2331
2327
GTK_FILL, GTK_FILL, 5, 2);
2333
2329
hbox = gtk_hbox_new(FALSE, 0);
2334
2330
label_threshold = gtk_label_new(_("Drop statistical aberrations based on"));
2335
2331
gtk_box_pack_start(GTK_BOX(hbox), label_threshold, FALSE, FALSE, 0);
2336
gtk_table_attach(GTK_TABLE(table_rva), hbox, 0, 1, 5, 6,
2332
gtk_table_attach(GTK_TABLE(table_rva), hbox, 0, 1, 6, 7,
2337
2333
GTK_FILL, GTK_FILL, 5, 2);
2339
2335
combo_threshold = gtk_combo_box_new_text ();
2340
gtk_table_attach(GTK_TABLE(table_rva), combo_threshold, 1, 2, 5, 6,
2336
gtk_table_attach(GTK_TABLE(table_rva), combo_threshold, 1, 2, 6, 7,
2341
2337
GTK_FILL | GTK_EXPAND, GTK_FILL, 5, 2);
2694
2684
gtk_combo_box_set_active(GTK_COMBO_BOX(cddb_proto_combo), 0);
2696
gtk_table_attach(GTK_TABLE(table_cddb), cddb_proto_combo, 1, 2, 6, 7,
2697
GTK_FILL | GTK_EXPAND, GTK_FILL, 5, 3);
2699
cddb_radio_proxy = gtk_radio_button_new_with_label_from_widget(
2700
GTK_RADIO_BUTTON(cddb_radio_direct), _("HTTP tunneling through proxy"));
2701
gtk_widget_set_name(cddb_radio_proxy, "check_on_notebook");
2702
gtk_table_attach(GTK_TABLE(table_cddb), cddb_radio_proxy, 0, 2, 7, 8,
2703
GTK_FILL | GTK_EXPAND, GTK_FILL, 5, 3);
2705
cddb_label_proxy = gtk_label_new(_("HTTP proxy:"));
2706
hbox = gtk_hbox_new(FALSE, 0);
2707
gtk_box_pack_start(GTK_BOX(hbox), cddb_label_proxy, FALSE, FALSE, 0);
2708
gtk_table_attach(GTK_TABLE(table_cddb), hbox, 0, 1, 8, 9,
2709
GTK_FILL, GTK_FILL, 35, 3);
2711
cddb_proxy_entry = gtk_entry_new();
2712
gtk_entry_set_text(GTK_ENTRY(cddb_proxy_entry), options.cddb_proxy);
2713
gtk_table_attach(GTK_TABLE(table_cddb), cddb_proxy_entry, 1, 2, 8, 9,
2714
GTK_FILL | GTK_EXPAND, GTK_FILL, 5, 3);
2716
cddb_label_proxy_port = gtk_label_new(_("Port:"));
2717
hbox = gtk_hbox_new(FALSE, 0);
2718
gtk_box_pack_start(GTK_BOX(hbox), cddb_label_proxy_port, FALSE, FALSE, 0);
2719
gtk_table_attach(GTK_TABLE(table_cddb), hbox, 0, 1, 9, 10,
2720
GTK_FILL, GTK_FILL, 35, 3);
2722
cddb_proxy_port_spinner = gtk_spin_button_new_with_range(0, 65535, 1);
2723
gtk_spin_button_set_value(GTK_SPIN_BUTTON(cddb_proxy_port_spinner), options.cddb_proxy_port);
2724
gtk_table_attach(GTK_TABLE(table_cddb), cddb_proxy_port_spinner, 1, 2, 9, 10,
2725
GTK_FILL | GTK_EXPAND, GTK_FILL, 5, 3);
2727
if (options.cddb_use_proxy) {
2728
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cddb_radio_direct), TRUE);
2729
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cddb_radio_proxy), TRUE);
2686
gtk_table_attach(GTK_TABLE(table_cddb), cddb_proto_combo, 1, 2, 5, 6,
2687
GTK_FILL | GTK_EXPAND, GTK_FILL, 5, 3);
2689
#endif /* HAVE_CDDB */
2691
/* Internet notebook page */
2693
vbox_inet = gtk_vbox_new(FALSE, 3);
2694
gtk_container_set_border_width(GTK_CONTAINER(vbox_inet), 8);
2695
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox_inet, create_notebook_tab(_("Internet"), "inet.png"));
2697
inet_radio_direct = gtk_radio_button_new_with_label(NULL, _("Direct connection to the Internet"));
2698
gtk_widget_set_name(inet_radio_direct, "check_on_notebook");
2699
gtk_box_pack_start(GTK_BOX(vbox_inet), inet_radio_direct, FALSE, FALSE, 0);
2700
g_signal_connect(G_OBJECT(inet_radio_direct), "toggled",
2701
G_CALLBACK(inet_radio_direct_toggled), NULL);
2703
inet_radio_proxy = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(inet_radio_direct),
2704
_("Connect via HTTP proxy"));
2705
gtk_widget_set_name(inet_radio_proxy, "check_on_notebook");
2706
gtk_box_pack_start(GTK_BOX(vbox_inet), inet_radio_proxy, FALSE, FALSE, 0);
2708
inet_frame = gtk_frame_new(_("Proxy settings"));
2709
gtk_box_pack_start(GTK_BOX(vbox_inet), inet_frame, FALSE, FALSE, 0);
2711
table_inet = gtk_table_new(2/*row*/, 4, FALSE);
2712
gtk_container_set_border_width(GTK_CONTAINER(table_inet), 8);
2713
gtk_container_add(GTK_CONTAINER(inet_frame), table_inet);
2716
inet_label_proxy = gtk_label_new(_("Proxy host:"));
2717
hbox = gtk_hbox_new(FALSE, 0);
2718
gtk_box_pack_start(GTK_BOX(hbox), inet_label_proxy, FALSE, FALSE, 0);
2719
gtk_table_attach(GTK_TABLE(table_inet), hbox, 0, 1, 0, 1,
2720
GTK_FILL, GTK_FILL, 5, 3);
2722
inet_entry_proxy = gtk_entry_new();
2723
gtk_entry_set_text(GTK_ENTRY(inet_entry_proxy), options.inet_proxy);
2724
gtk_table_attach(GTK_TABLE(table_inet), inet_entry_proxy, 1, 2, 0, 1,
2725
GTK_FILL | GTK_EXPAND, GTK_FILL, 5, 3);
2727
inet_label_proxy_port = gtk_label_new(_("Port:"));
2728
hbox = gtk_hbox_new(FALSE, 0);
2729
gtk_box_pack_start(GTK_BOX(hbox), inet_label_proxy_port, FALSE, FALSE, 0);
2730
gtk_table_attach(GTK_TABLE(table_inet), hbox, 2, 3, 0, 1,
2731
GTK_FILL, GTK_FILL, 5, 3);
2733
inet_spinner_proxy_port = gtk_spin_button_new_with_range(0, 65535, 1);
2734
gtk_spin_button_set_value(GTK_SPIN_BUTTON(inet_spinner_proxy_port), options.inet_proxy_port);
2735
gtk_table_attach(GTK_TABLE(table_inet), inet_spinner_proxy_port, 3, 4, 0, 1,
2736
GTK_FILL, GTK_FILL, 5, 3);
2738
inet_label_noproxy_domains = gtk_label_new(_("No proxy for:"));
2739
hbox = gtk_hbox_new(FALSE, 0);
2740
gtk_box_pack_start(GTK_BOX(hbox), inet_label_noproxy_domains, FALSE, FALSE, 0);
2741
gtk_table_attach(GTK_TABLE(table_inet), hbox, 0, 1, 1, 2,
2742
GTK_FILL, GTK_FILL, 5, 3);
2744
inet_entry_noproxy_domains = gtk_entry_new();
2745
gtk_entry_set_text(GTK_ENTRY(inet_entry_noproxy_domains), options.inet_noproxy_domains);
2746
gtk_table_attach(GTK_TABLE(table_inet), inet_entry_noproxy_domains, 1, 3, 1, 2,
2747
GTK_FILL | GTK_EXPAND, GTK_FILL, 5, 3);
2749
inet_help_noproxy_domains = gtk_button_new_from_stock(GTK_STOCK_HELP);
2750
g_signal_connect(inet_help_noproxy_domains, "clicked", G_CALLBACK(display_inet_help_noproxy_domains), NULL);
2751
gtk_table_attach(GTK_TABLE(table_inet), inet_help_noproxy_domains, 3, 4, 1, 2, GTK_FILL, GTK_FILL, 5, 3);
2754
inet_hbox_timeout = gtk_hbox_new(FALSE, 0);
2755
gtk_box_pack_start(GTK_BOX(vbox_inet), inet_hbox_timeout, FALSE, FALSE, 5);
2757
inet_label_timeout = gtk_label_new(_("Timeout for socket I/O:"));
2758
hbox = gtk_hbox_new(FALSE, 0);
2759
gtk_box_pack_start(GTK_BOX(hbox), inet_label_timeout, FALSE, FALSE, 0);
2760
gtk_box_pack_start(GTK_BOX(inet_hbox_timeout), hbox, FALSE, FALSE, 5);
2762
inet_spinner_timeout = gtk_spin_button_new_with_range(1, 300, 1);
2763
gtk_spin_button_set_value(GTK_SPIN_BUTTON(inet_spinner_timeout), options.inet_timeout);
2764
gtk_box_pack_start(GTK_BOX(inet_hbox_timeout), inet_spinner_timeout, FALSE, FALSE, 5);
2766
inet_label_timeout = gtk_label_new(_("seconds"));
2767
hbox = gtk_hbox_new(FALSE, 0);
2768
gtk_box_pack_start(GTK_BOX(hbox), inet_label_timeout, FALSE, FALSE, 0);
2769
gtk_box_pack_start(GTK_BOX(inet_hbox_timeout), hbox, FALSE, FALSE, 5);
2771
if (options.inet_use_proxy) {
2772
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(inet_radio_direct), FALSE);
2773
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(inet_radio_proxy), TRUE);
2731
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cddb_radio_proxy), TRUE);
2732
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cddb_radio_direct), TRUE);
2775
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(inet_radio_direct), TRUE);
2776
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(inet_radio_proxy), FALSE);
2777
gtk_widget_set_sensitive(inet_frame, FALSE);
2735
#endif /* HAVE_CDDB */
2737
2781
/* Appearance notebook page */