?? options.c
字號:
restart_flag = 0; reskin_flag = 0; appearance_changed = 0; if (!restart_list_store) { restart_list_store = gtk_list_store_new(1, G_TYPE_STRING); } else { gtk_list_store_clear(restart_list_store); } refresh_ms_pathlist_clicked(NULL, NULL); options_window = gtk_dialog_new_with_buttons(_("Settings"), GTK_WINDOW(main_window), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL); gtk_window_set_position(GTK_WINDOW(options_window), GTK_WIN_POS_CENTER); gtk_dialog_set_default_response(GTK_DIALOG(options_window), GTK_RESPONSE_ACCEPT); gtk_container_set_border_width(GTK_CONTAINER(options_window), 5); notebook = gtk_notebook_new(); gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_LEFT); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(options_window)->vbox), notebook); label_size = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); /* "General" notebook page */ vbox_general = gtk_vbox_new(FALSE, 3); gtk_container_set_border_width(GTK_CONTAINER(vbox_general), 8); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox_general, create_notebook_tab(_("General"), "general.png")); frame_title = gtk_frame_new(_("Title format")); gtk_box_pack_start(GTK_BOX(vbox_general), frame_title, FALSE, TRUE, 0); hbox_title = gtk_hbox_new(FALSE, 3); gtk_container_set_border_width(GTK_CONTAINER(hbox_title), 5); gtk_container_add(GTK_CONTAINER(frame_title), hbox_title); entry_title = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(entry_title), MAXLEN - 1); gtk_entry_set_text(GTK_ENTRY(entry_title), options.title_format); gtk_box_pack_start(GTK_BOX(hbox_title), entry_title, TRUE, TRUE, 0); help_btn_title = gtk_button_new_from_stock (GTK_STOCK_HELP); g_signal_connect(help_btn_title, "clicked", G_CALLBACK(display_title_format_help), NULL); gtk_box_pack_start(GTK_BOX(hbox_title), help_btn_title, FALSE, FALSE, 0); frame_param = gtk_frame_new(_("Implicit command line")); gtk_box_pack_start(GTK_BOX(vbox_general), frame_param, FALSE, TRUE, 5); hbox_param = gtk_hbox_new(FALSE, 3); gtk_container_set_border_width(GTK_CONTAINER(hbox_param), 5); gtk_container_add(GTK_CONTAINER(frame_param), hbox_param); entry_param = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(entry_param), MAXLEN - 1); gtk_entry_set_text(GTK_ENTRY(entry_param), options.default_param); gtk_box_pack_start(GTK_BOX(hbox_param), entry_param, TRUE, TRUE, 0); help_btn_param = gtk_button_new_from_stock (GTK_STOCK_HELP); g_signal_connect(help_btn_param, "clicked", G_CALLBACK(display_implict_command_line_help), NULL); gtk_box_pack_start(GTK_BOX(hbox_param), help_btn_param, FALSE, FALSE, 0); frame_misc = gtk_frame_new(_("Miscellaneous")); gtk_box_pack_start(GTK_BOX(vbox_general), frame_misc, FALSE, TRUE, 0); vbox_misc = gtk_vbox_new(FALSE, 3); gtk_container_set_border_width(GTK_CONTAINER(vbox_misc), 8); gtk_container_add(GTK_CONTAINER(frame_misc), vbox_misc); check_enable_tooltips = gtk_check_button_new_with_label(_("Enable tooltips")); gtk_widget_set_name(check_enable_tooltips, "check_on_notebook"); if (options.enable_tooltips) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_enable_tooltips), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_misc), check_enable_tooltips, FALSE, FALSE, 0); check_buttons_at_the_bottom = gtk_check_button_new_with_label(_("Put control buttons at the bottom of playlist")); gtk_widget_set_name(check_buttons_at_the_bottom, "check_on_notebook"); if (options.buttons_at_the_bottom_shadow) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_buttons_at_the_bottom), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_misc), check_buttons_at_the_bottom, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (check_buttons_at_the_bottom), "toggled", G_CALLBACK (restart_active), _("Put control buttons at the bottom of playlist")); check_disable_buttons_relief = gtk_check_button_new_with_label(_("Disable control buttons relief")); gtk_widget_set_name(check_disable_buttons_relief, "check_on_notebook"); if (options.disable_buttons_relief) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_disable_buttons_relief), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_misc), check_disable_buttons_relief, FALSE, FALSE, 0); check_main_window_always_on_top = gtk_check_button_new_with_label(_("Keep main window always on top")); gtk_widget_set_name(check_main_window_always_on_top, "check_on_notebook"); if (options.main_window_always_on_top) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_main_window_always_on_top), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_misc), check_main_window_always_on_top, FALSE, FALSE, 0);#ifdef HAVE_LADSPA check_simple_view_in_fx = gtk_check_button_new_with_label(_("Simple view in LADSPA patch builder")); gtk_widget_set_name(check_simple_view_in_fx, "check_on_notebook"); if (options.simple_view_in_fx_shadow) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_simple_view_in_fx), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_misc), check_simple_view_in_fx, FALSE, FALSE, 0); g_signal_connect(G_OBJECT (check_simple_view_in_fx), "toggled", G_CALLBACK (restart_active), _("Simple view in LADSPA patch builder"));#endif /* HAVE_LADSPA */ check_united_minimization = gtk_check_button_new_with_label(_("United windows minimization")); gtk_widget_set_name(check_united_minimization, "check_on_notebook"); if (options.united_minimization) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_united_minimization), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_misc), check_united_minimization, FALSE, FALSE, 0); check_show_sn_title = gtk_check_button_new_with_label(_("Show song name in the main window's title")); gtk_widget_set_name(check_show_sn_title, "check_on_notebook"); if (options.show_sn_title) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_show_sn_title), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_misc), check_show_sn_title, FALSE, FALSE, 0); check_show_hidden = gtk_check_button_new_with_label(_("Show hidden files and directories in file choosers")); gtk_widget_set_name(check_show_hidden, "check_on_notebook"); if (options.show_hidden) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_show_hidden), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_misc), check_show_hidden, FALSE, FALSE, 0); check_tags_tab_first = gtk_check_button_new_with_label(_("Show tags tab first in the file info dialog")); gtk_widget_set_name(check_tags_tab_first, "check_on_notebook"); if (options.tags_tab_first) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_tags_tab_first), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_misc), check_tags_tab_first, FALSE, FALSE, 0); /* "Playlist" notebook page */ vbox_pl = gtk_vbox_new(FALSE, 3); gtk_container_set_border_width(GTK_CONTAINER(vbox_pl), 8); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox_pl, create_notebook_tab(_("Playlist"), "playlist.png")); check_playlist_is_embedded = gtk_check_button_new_with_label(_("Embed playlist into main window")); gtk_widget_set_name(check_playlist_is_embedded, "check_on_notebook"); if (options.playlist_is_embedded_shadow) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_playlist_is_embedded), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_pl), check_playlist_is_embedded, FALSE, TRUE, 0); g_signal_connect (G_OBJECT (check_playlist_is_embedded), "toggled", G_CALLBACK (restart_active), _("Embed playlist into main window")); check_autoplsave = gtk_check_button_new_with_label(_("Save and restore the playlist on exit/startup")); gtk_widget_set_name(check_autoplsave, "check_on_notebook"); if (options.auto_save_playlist) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_autoplsave), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_pl), check_autoplsave, FALSE, TRUE, 0); check_playlist_is_tree = gtk_check_button_new_with_label(_("Album mode is the default when adding entire records")); gtk_widget_set_name(check_playlist_is_tree, "check_on_notebook"); if (options.playlist_is_tree) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_playlist_is_tree), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_pl), check_playlist_is_tree, FALSE, TRUE, 0); check_album_shuffle_mode = gtk_check_button_new_with_label(_("When shuffling, records added in Album mode " "are played in order")); gtk_widget_set_name(check_album_shuffle_mode, "check_on_notebook"); if (options.album_shuffle_mode) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_album_shuffle_mode), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_pl), check_album_shuffle_mode, FALSE, TRUE, 0); check_enable_playlist_statusbar = gtk_check_button_new_with_label(_("Enable statusbar")); gtk_widget_set_name(check_enable_playlist_statusbar, "check_on_notebook"); if (options.enable_playlist_statusbar_shadow) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_enable_playlist_statusbar), TRUE); } g_signal_connect(G_OBJECT(check_enable_playlist_statusbar), "toggled", G_CALLBACK(restart_active), _("Enable statusbar in playlist")); gtk_box_pack_start(GTK_BOX(vbox_pl), check_enable_playlist_statusbar, FALSE, TRUE, 0); check_pl_statusbar_show_size = gtk_check_button_new_with_label(_("Show soundfile size in statusbar")); gtk_widget_set_name(check_pl_statusbar_show_size, "check_on_notebook"); if (options.pl_statusbar_show_size) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_pl_statusbar_show_size), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_pl), check_pl_statusbar_show_size, FALSE, TRUE, 0); check_show_rva_in_playlist = gtk_check_button_new_with_label(_("Show RVA values")); gtk_widget_set_name(check_show_rva_in_playlist, "check_on_notebook"); if (options.show_rva_in_playlist) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_show_rva_in_playlist), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_pl), check_show_rva_in_playlist, FALSE, TRUE, 0); check_show_length_in_playlist = gtk_check_button_new_with_label(_("Show track lengths")); gtk_widget_set_name(check_show_length_in_playlist, "check_on_notebook"); if (options.show_length_in_playlist) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_show_length_in_playlist), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_pl), check_show_length_in_playlist, FALSE, TRUE, 0); check_show_active_track_name_in_bold = gtk_check_button_new_with_label(_("Show active track name in bold")); gtk_widget_set_name(check_show_active_track_name_in_bold, "check_on_notebook"); track_name_in_bold_shadow = options.show_active_track_name_in_bold; if (options.show_active_track_name_in_bold) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_show_active_track_name_in_bold), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_pl), check_show_active_track_name_in_bold, FALSE, TRUE, 0); check_enable_pl_rules_hint = gtk_check_button_new_with_label(_("Enable rules hint")); gtk_widget_set_name(check_enable_pl_rules_hint, "check_on_notebook"); if (options.enable_pl_rules_hint) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_enable_pl_rules_hint), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_pl), check_enable_pl_rules_hint, FALSE, TRUE, 0); frame_plistcol = gtk_frame_new(_("Playlist column order")); gtk_box_pack_start(GTK_BOX(vbox_pl), frame_plistcol, FALSE, TRUE, 5); vbox_plistcol = gtk_vbox_new(FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(vbox_plistcol), 8); gtk_container_add(GTK_CONTAINER(frame_plistcol), vbox_plistcol); label_plistcol = gtk_label_new(_("Drag and drop entries in the list below \n\to set the column order in the Playlist.")); gtk_box_pack_start(GTK_BOX(vbox_plistcol), label_plistcol, FALSE, TRUE, 5); plistcol_store = gtk_list_store_new(2, G_TYPE_STRING, /* Column name */ G_TYPE_STRING); /* Column index */ plistcol_list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(plistcol_store)); gtk_tree_view_set_enable_search(GTK_TREE_VIEW(plistcol_list), FALSE); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Column"), renderer, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(plistcol_list), column); gtk_tree_view_set_reorderable(GTK_TREE_VIEW(plistcol_list), TRUE); viewport = gtk_viewport_new(NULL, NULL); gtk_box_pack_start(GTK_BOX(vbox_plistcol), viewport, TRUE, TRUE, 5); gtk_container_add(GTK_CONTAINER(viewport), plistcol_list); for (i = 0; i < 3; i++) { switch (options.plcol_idx[i]) { case 0: gtk_list_store_append(plistcol_store, &iter); gtk_list_store_set(plistcol_store, &iter, 0, _("Track titles"), 1, "0", -1); break; case 1: gtk_list_store_append(plistcol_store, &iter); gtk_list_store_set(plistcol_store, &iter, 0, _("RVA values"), 1, "1", -1); break; case 2: gtk_list_store_append(plistcol_store, &iter); gtk_list_store_set(plistcol_store, &iter, 0, _("Track lengths"), 1, "2", -1); break; } } /* "Music store" notebook page */ vbox_ms = gtk_vbox_new(FALSE, 3); gtk_container_set_border_width(GTK_CONTAINER(vbox_ms), 8); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox_ms, create_notebook_tab(_("Music Store"), "music_store.png")); check_hide_comment_pane = gtk_check_button_new_with_label(_("Hide comment pane")); gtk_widget_set_name(check_hide_comment_pane, "check_on_notebook"); if (options.hide_comment_pane_shadow) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_hide_comment_pane), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_ms), check_hide_comment_pane, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (check_hide_comment_pane), "toggled", G_CALLBACK (restart_active), _("Hide the Music Store comment pane")); check_enable_mstore_toolbar = gtk_check_button_new_with_label(_("Enable toolbar")); gtk_widget_set_name(check_enable_mstore_toolbar, "check_on_notebook"); if (options.enable_mstore_toolbar_shadow) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_enable_mstore_toolbar), TRUE); } g_signal_connect(G_OBJECT(check_enable_mstore_toolbar), "toggled", G_CALLBACK(restart_active), _("Enable toolbar in Music Store")); gtk_box_pack_start(GTK_BOX(vbox_ms), check_enable_mstore_toolbar, FALSE, TRUE, 0); check_enable_mstore_statusbar = gtk_check_button_new_with_label(_("Enable statusbar")); gtk_widget_set_name(check_enable_mstore_statusbar, "check_on_notebook"); if (options.enable_mstore_statusbar_shadow) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_enable_mstore_statusbar), TRUE); } g_signal_connect(G_OBJECT(check_enable_mstore_statusbar), "toggled", G_CALLBACK(restart_active), _("Enable statusbar in Music Store")); gtk_box_pack_start(GTK_BOX(vbox_ms), check_enable_mstore_statusbar, FALSE, TRUE, 0); check_ms_statusbar_show_size = gtk_check_button_new_with_label(_("Show soundfile size in statusbar")); gtk_widget_set_name(check_ms_statusbar_show_size, "check_on_notebook"); if (options.ms_statusbar_show_size) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_ms_statusbar_show_size), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_ms), check_ms_statusbar_show_size, FALSE, TRUE, 0); check_expand_stores = gtk_check_button_new_with_label(_("Expand Stores on startup")); gtk_widget_set_name(check_expand_stores, "check_on_notebook"); if (options.autoexpand_stores) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_expand_stores), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_ms), check_expand_stores, FALSE, FALSE, 0); check_enable_ms_rules_hint = gtk_check_button_new_with_label(_("Enable rules hint")); gtk_widget_set_name(check_enable_ms_rules_hint, "check_on_notebook"); if (options.enable_ms_rules_hint) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_enable_ms_rules_hint), TRUE); } gtk_box_pack_start(GTK_BOX(vbox_ms), check_enable_ms_rules_hint, FALSE, TRUE, 0); check_enable_ms_tree_icons = gtk_check_button_new_with_label(_("Enable tree node icons")); gtk_widget_set_name(check_enable_ms_tree_icons, "check_on_notebook"); if (options.enable_ms_tree_icons_shadow) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_enable_ms_tree_icons), TRUE); } g_signal_connect (G_OBJECT (check_enable_ms_tree_icons), "toggled", G_CALLBACK (restart_active), _("Enable Music Store tree node icons")); gtk_box_pack_start(GTK_BOX(vbox_ms), check_enable_ms_tree_icons, FALSE, TRUE, 0); frame_cart = gtk_frame_new(_("Cover art")); gtk_box_pack_start(GTK_BOX(vbox_ms), frame_cart, FALSE, TRUE, 5); vbox_cart = gtk_vbox_new(FALSE, 3); gtk_container_set_border_width(GTK_CONTAINER(vbox_cart), 10); gtk_container_add(GTK_CONTAINER(frame_cart), vbox_cart); hbox_cwidth = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox_cart), hbox_cwidth, FALSE, FALSE, 0); label_cwidth = gtk_label_new(_("Default cover width:")); gtk_box_pack_start(GTK_BOX(hbox_cwidth), label_cwidth, FALSE, FALSE, 0); hbox_s = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox_cwidth), hbox_s, TRUE, TRUE, 3); combo_cwidth = gtk_combo_box_new_text (); gtk_box_pack_start(GTK_BOX(hbox_cwidth), combo_cwidth, FALSE, FALSE, 0); gtk_combo_box_append_text (GTK_COMBO_BOX (combo_cwidth), _("50 pixels")); gtk_combo_box_append_text (GTK_COMBO_BOX (combo_cwidth), _("100 pixels")); gtk_combo_box_append_text (GTK_COMBO_BOX (combo_cwidth), _("200 pixels")); gtk_combo_box_append_text (GTK_COMBO_BOX (combo_cwidth), _("300 pixels")); gtk_combo_box_append_text (GTK_COMBO_BOX (combo_cwidth), _("use browser window width")); gtk_combo_box_set_active (GTK_COMBO_BOX (combo_cwidth), options.cover_width); check_magnify_smaller_images = gtk_check_button_new_with_label(_("Do not magnify images with smaller width")); gtk_widget_set_name(check_magnify_smaller_images, "check_on_notebook"); if (!options.magnify_smaller_images) { gtk_toggle_button_set_activ
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -