📄 configure.c
字号:
static void resolution_normal_dither_24_to_16_cb(GtkWidget *widget, gpointer data){ (void)widget, (void)data; /* unused arguments */ flac_cfg.output.resolution.normal.dither_24_to_16 = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_normal_dither_24_to_16));}static void resolution_replaygain_dither_cb(GtkWidget *widget, gpointer data){ (void)widget, (void)data; /* unused arguments */ flac_cfg.output.resolution.replaygain.dither = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_dither)); gtk_widget_set_sensitive(resolution_replaygain_noise_shaping_frame, flac_cfg.output.resolution.replaygain.dither);}static void resolution_replaygain_noise_shaping_cb(GtkWidget *widget, gpointer data){ (void)widget, (void)data; /* unused arguments */ flac_cfg.output.resolution.replaygain.noise_shaping = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_none))? 0 : gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_low))? 1 : gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_medium))? 2 : gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_noise_shaping_radio_high))? 3 : 0 ;}static void resolution_replaygain_bps_out_cb(GtkWidget *widget, gpointer data){ (void)widget, (void)data; /* unused arguments */ flac_cfg.output.resolution.replaygain.bps_out = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_bps_out_radio_16bps))? 16 : gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resolution_replaygain_bps_out_radio_24bps))? 24 : 16 ;}static void proxy_use_cb(GtkWidget * w, gpointer data){ gboolean use_proxy, use_proxy_auth; (void) w; (void) data; use_proxy = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_use)); use_proxy_auth = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_auth_use)); gtk_widget_set_sensitive(streaming_proxy_hbox, use_proxy); gtk_widget_set_sensitive(streaming_proxy_auth_use, use_proxy); gtk_widget_set_sensitive(streaming_proxy_auth_hbox, use_proxy && use_proxy_auth);}static void proxy_auth_use_cb(GtkWidget *w, gpointer data){ gboolean use_proxy, use_proxy_auth; (void) w; (void) data; use_proxy = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_use)); use_proxy_auth = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_proxy_auth_use)); gtk_widget_set_sensitive(streaming_proxy_auth_hbox, use_proxy && use_proxy_auth);}static void streaming_save_dirbrowser_cb(gchar * dir){ gtk_entry_set_text(GTK_ENTRY(streaming_save_entry), dir);}static void streaming_save_browse_cb(GtkWidget * w, gpointer data){ (void) w; (void) data; if (!streaming_save_dirbrowser) { streaming_save_dirbrowser = xmms_create_dir_browser(_("Select the directory where you want to store the MPEG streams:"), flac_cfg.stream.save_http_path, GTK_SELECTION_SINGLE, streaming_save_dirbrowser_cb); gtk_signal_connect(GTK_OBJECT(streaming_save_dirbrowser), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &streaming_save_dirbrowser); gtk_window_set_transient_for(GTK_WINDOW(streaming_save_dirbrowser), GTK_WINDOW(flac_configurewin)); gtk_widget_show(streaming_save_dirbrowser); }}static void streaming_save_use_cb(GtkWidget * w, gpointer data){ gboolean save_stream; (void) w; (void) data; save_stream = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(streaming_save_use)); gtk_widget_set_sensitive(streaming_save_hbox, save_stream);}void FLAC_XMMS__configure(void){ GtkWidget *title_frame, *title_tag_vbox, *title_tag_label; GtkWidget *replaygain_frame, *resolution_frame, *output_vbox, *resolution_normal_frame, *resolution_replaygain_frame; GtkWidget *replaygain_vbox, *resolution_hbox, *resolution_normal_vbox, *resolution_replaygain_vbox; GtkWidget *resolution_replaygain_noise_shaping_vbox; GtkWidget *resolution_replaygain_bps_out_vbox; GtkWidget *label, *hbox; GtkWidget *bbox, *ok, *cancel; GList *list; GtkWidget *streaming_vbox; GtkWidget *streaming_buf_frame, *streaming_buf_hbox; GtkWidget *streaming_size_box, *streaming_size_label, *streaming_size_spin; GtkWidget *streaming_pre_box, *streaming_pre_label, *streaming_pre_spin; GtkWidget *streaming_proxy_frame, *streaming_proxy_vbox; GtkWidget *streaming_proxy_port_label, *streaming_proxy_host_label; GtkWidget *streaming_save_frame, *streaming_save_vbox; GtkWidget *streaming_save_label, *streaming_save_browse;#ifdef FLAC_ICECAST GtkWidget *streaming_cast_frame, *streaming_cast_vbox;#endif char *temp; if (flac_configurewin != NULL) { gdk_window_raise(flac_configurewin->window); return; } flac_configurewin = gtk_window_new(GTK_WINDOW_DIALOG); gtk_signal_connect(GTK_OBJECT(flac_configurewin), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &flac_configurewin); gtk_signal_connect(GTK_OBJECT(flac_configurewin), "destroy", GTK_SIGNAL_FUNC(configure_destroy), &flac_configurewin); gtk_window_set_title(GTK_WINDOW(flac_configurewin), _("Flac Configuration")); gtk_window_set_policy(GTK_WINDOW(flac_configurewin), FALSE, FALSE, FALSE); gtk_container_border_width(GTK_CONTAINER(flac_configurewin), 10); vbox = gtk_vbox_new(FALSE, 10); gtk_container_add(GTK_CONTAINER(flac_configurewin), vbox); notebook = gtk_notebook_new(); gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0); /* Title config.. */ title_frame = gtk_frame_new(_("Tag Handling")); gtk_container_border_width(GTK_CONTAINER(title_frame), 5); title_tag_vbox = gtk_vbox_new(FALSE, 10); gtk_container_border_width(GTK_CONTAINER(title_tag_vbox), 5); gtk_container_add(GTK_CONTAINER(title_frame), title_tag_vbox); /* Convert Char Set */ convert_char_set = gtk_check_button_new_with_label(_("Convert Character Set")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(convert_char_set), flac_cfg.title.convert_char_set); gtk_signal_connect(GTK_OBJECT(convert_char_set), "clicked", convert_char_set_cb, NULL); gtk_box_pack_start(GTK_BOX(title_tag_vbox), convert_char_set, FALSE, FALSE, 0); /* Combo boxes... */ hbox = gtk_hbox_new(FALSE,4); gtk_container_add(GTK_CONTAINER(title_tag_vbox),hbox); label = gtk_label_new(_("Convert character set from :")); gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,0); fileCharacterSetEntry = gtk_combo_new(); gtk_box_pack_start(GTK_BOX(hbox),fileCharacterSetEntry,TRUE,TRUE,0); label = gtk_label_new (_("to :")); gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,0); userCharacterSetEntry = gtk_combo_new(); gtk_box_pack_start(GTK_BOX(hbox),userCharacterSetEntry,TRUE,TRUE,0); gtk_entry_set_editable(GTK_ENTRY(GTK_COMBO(fileCharacterSetEntry)->entry),FALSE); gtk_entry_set_editable(GTK_ENTRY(GTK_COMBO(userCharacterSetEntry)->entry),FALSE); gtk_combo_set_value_in_list(GTK_COMBO(fileCharacterSetEntry),TRUE,FALSE); gtk_combo_set_value_in_list(GTK_COMBO(userCharacterSetEntry),TRUE,FALSE); list = Charset_Create_List(); gtk_combo_set_popdown_strings(GTK_COMBO(fileCharacterSetEntry),Charset_Create_List_UTF8_Only()); gtk_combo_set_popdown_strings(GTK_COMBO(userCharacterSetEntry),list); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(userCharacterSetEntry)->entry),Charset_Get_Title_From_Name(flac_cfg.title.user_char_set)); gtk_widget_set_sensitive(fileCharacterSetEntry, FALSE); gtk_widget_set_sensitive(userCharacterSetEntry, flac_cfg.title.convert_char_set); /* Override Tagging Format */ title_tag_override = gtk_check_button_new_with_label(_("Override generic titles")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(title_tag_override), flac_cfg.title.tag_override); gtk_signal_connect(GTK_OBJECT(title_tag_override), "clicked", title_tag_override_cb, NULL); gtk_box_pack_start(GTK_BOX(title_tag_vbox), title_tag_override, FALSE, FALSE, 0); title_tag_box = gtk_hbox_new(FALSE, 5); gtk_widget_set_sensitive(title_tag_box, flac_cfg.title.tag_override); gtk_box_pack_start(GTK_BOX(title_tag_vbox), title_tag_box, FALSE, FALSE, 0); title_tag_label = gtk_label_new(_("Title format:")); gtk_box_pack_start(GTK_BOX(title_tag_box), title_tag_label, FALSE, FALSE, 0); title_tag_entry = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(title_tag_entry), flac_cfg.title.tag_format); gtk_box_pack_start(GTK_BOX(title_tag_box), title_tag_entry, TRUE, TRUE, 0); title_desc = xmms_titlestring_descriptions("pafFetnygc", 2); gtk_widget_set_sensitive(title_desc, flac_cfg.title.tag_override); gtk_box_pack_start(GTK_BOX(title_tag_vbox), title_desc, FALSE, FALSE, 0); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), title_frame, gtk_label_new(_("Title"))); /* Output config.. */ output_vbox = gtk_vbox_new(FALSE, 10); gtk_container_border_width(GTK_CONTAINER(output_vbox), 5); /* replaygain */ replaygain_frame = gtk_frame_new(_("ReplayGain")); gtk_container_border_width(GTK_CONTAINER(replaygain_frame), 5); gtk_box_pack_start(GTK_BOX(output_vbox), replaygain_frame, TRUE, TRUE, 0); replaygain_vbox = gtk_vbox_new(FALSE, 10); gtk_container_border_width(GTK_CONTAINER(replaygain_vbox), 5); gtk_container_add(GTK_CONTAINER(replaygain_frame), replaygain_vbox); replaygain_enable = gtk_check_button_new_with_label(_("Enable ReplayGain processing")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(replaygain_enable), flac_cfg.output.replaygain.enable); gtk_signal_connect(GTK_OBJECT(replaygain_enable), "clicked", replaygain_enable_cb, NULL); gtk_box_pack_start(GTK_BOX(replaygain_vbox), replaygain_enable, FALSE, FALSE, 0); replaygain_album_mode = gtk_check_button_new_with_label(_("Album mode")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(replaygain_album_mode), flac_cfg.output.replaygain.album_mode); gtk_signal_connect(GTK_OBJECT(replaygain_album_mode), "clicked", replaygain_album_mode_cb, NULL); gtk_box_pack_start(GTK_BOX(replaygain_vbox), replaygain_album_mode, FALSE, FALSE, 0); hbox = gtk_hbox_new(FALSE,3); gtk_container_add(GTK_CONTAINER(replaygain_vbox),hbox); label = gtk_label_new(_("Preamp:")); gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,0); replaygain_preamp = gtk_adjustment_new(flac_cfg.output.replaygain.preamp, -24.0, +24.0, 1.0, 6.0, 0.0); gtk_signal_connect(GTK_OBJECT(replaygain_preamp), "value-changed", replaygain_preamp_cb, NULL); replaygain_preamp_hscale = gtk_hscale_new(GTK_ADJUSTMENT(replaygain_preamp)); gtk_scale_set_draw_value(GTK_SCALE(replaygain_preamp_hscale), FALSE); gtk_box_pack_start(GTK_BOX(hbox),replaygain_preamp_hscale,TRUE,TRUE,0); replaygain_preamp_label = gtk_label_new(_("0 dB")); gtk_box_pack_start(GTK_BOX(hbox),replaygain_preamp_label,FALSE,FALSE,0); gtk_adjustment_value_changed(GTK_ADJUSTMENT(replaygain_preamp)); replaygain_hard_limit = gtk_check_button_new_with_label(_("6dB hard limiting")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(replaygain_hard_limit), flac_cfg.output.replaygain.hard_limit); gtk_signal_connect(GTK_OBJECT(replaygain_hard_limit), "clicked", replaygain_hard_limit_cb, NULL); gtk_box_pack_start(GTK_BOX(replaygain_vbox), replaygain_hard_limit, FALSE, FALSE, 0); replaygain_enable_cb(replaygain_enable, NULL); /* resolution */ resolution_frame = gtk_frame_new(_("Resolution")); gtk_container_border_width(GTK_CONTAINER(resolution_frame), 5); gtk_box_pack_start(GTK_BOX(output_vbox), resolution_frame, TRUE, TRUE, 0); resolution_hbox = gtk_hbox_new(FALSE, 10); gtk_container_border_width(GTK_CONTAINER(resolution_hbox), 5); gtk_container_add(GTK_CONTAINER(resolution_frame), resolution_hbox); resolution_normal_frame = gtk_frame_new(_("Without ReplayGain")); gtk_container_border_width(GTK_CONTAINER(resolution_normal_frame), 5); gtk_box_pack_start(GTK_BOX(resolution_hbox), resolution_normal_frame, TRUE, TRUE, 0); resolution_normal_vbox = gtk_vbox_new(FALSE, 10); gtk_container_border_width(GTK_CONTAINER(resolution_normal_vbox), 5); gtk_container_add(GTK_CONTAINER(resolution_normal_frame), resolution_normal_vbox); resolution_normal_dither_24_to_16 = gtk_check_button_new_with_label(_("Dither 24bps to 16bps")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(resolution_normal_dither_24_to_16), flac_cfg.output.resolution.normal.dither_24_to_16); gtk_signal_connect(GTK_OBJECT(resolution_normal_dither_24_to_16), "clicked", resolution_normal_dither_24_to_16_cb, NULL); gtk_box_pack_start(GTK_BOX(resolution_normal_vbox), resolution_normal_dither_24_to_16, FALSE, FALSE, 0); resolution_replaygain_frame = gtk_frame_new(_("With ReplayGain")); gtk_container_border_width(GTK_CONTAINER(resolution_replaygain_frame), 5); gtk_box_pack_start(GTK_BOX(resolution_hbox), resolution_replaygain_frame, TRUE, TRUE, 0); resolution_replaygain_vbox = gtk_vbox_new(FALSE, 10); gtk_container_border_width(GTK_CONTAINER(resolution_replaygain_vbox), 5); gtk_container_add(GTK_CONTAINER(resolution_replaygain_frame), resolution_replaygain_vbox);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -