diff options
Diffstat (limited to 'plugins/gtkui/interface.c')
-rw-r--r-- | plugins/gtkui/interface.c | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/plugins/gtkui/interface.c b/plugins/gtkui/interface.c index d75ff742..5cd3ce7e 100644 --- a/plugins/gtkui/interface.c +++ b/plugins/gtkui/interface.c @@ -1539,6 +1539,7 @@ create_prefwin (void) GtkWidget *vbox9; GtkWidget *pref_close_send_to_tray; GtkWidget *hide_tray_icon; + GtkWidget *enable_shift_jis_recoding; GtkWidget *enable_cp1251_recoding; GtkWidget *enable_cp936_recoding; GtkWidget *hbox102; @@ -1943,6 +1944,10 @@ create_prefwin (void) gtk_widget_show (hide_tray_icon); gtk_box_pack_start (GTK_BOX (vbox9), hide_tray_icon, FALSE, FALSE, 0); + enable_shift_jis_recoding = gtk_check_button_new_with_mnemonic (_("Enable Japanese SHIFT-JIS detection and recoding")); + gtk_widget_show (enable_shift_jis_recoding); + gtk_box_pack_start (GTK_BOX (vbox9), enable_shift_jis_recoding, FALSE, FALSE, 0); + enable_cp1251_recoding = gtk_check_button_new_with_mnemonic (_("Enable Russian CP1251 detection and recoding")); gtk_widget_show (enable_cp1251_recoding); gtk_box_pack_start (GTK_BOX (vbox9), enable_cp1251_recoding, FALSE, FALSE, 0); @@ -2700,6 +2705,9 @@ create_prefwin (void) g_signal_connect ((gpointer) hide_tray_icon, "toggled", G_CALLBACK (on_hide_tray_icon_toggled), NULL); + g_signal_connect ((gpointer) enable_shift_jis_recoding, "toggled", + G_CALLBACK (on_enable_shift_jis_recoding_toggled), + NULL); g_signal_connect ((gpointer) enable_cp1251_recoding, "toggled", G_CALLBACK (on_enable_cp1251_recoding_toggled), NULL); @@ -2904,6 +2912,7 @@ create_prefwin (void) GLADE_HOOKUP_OBJECT (prefwin, vbox9, "vbox9"); GLADE_HOOKUP_OBJECT (prefwin, pref_close_send_to_tray, "pref_close_send_to_tray"); GLADE_HOOKUP_OBJECT (prefwin, hide_tray_icon, "hide_tray_icon"); + GLADE_HOOKUP_OBJECT (prefwin, enable_shift_jis_recoding, "enable_shift_jis_recoding"); GLADE_HOOKUP_OBJECT (prefwin, enable_cp1251_recoding, "enable_cp1251_recoding"); GLADE_HOOKUP_OBJECT (prefwin, enable_cp936_recoding, "enable_cp936_recoding"); GLADE_HOOKUP_OBJECT (prefwin, hbox102, "hbox102"); @@ -4388,3 +4397,84 @@ create_select_action (void) return select_action; } +GtkWidget* +create_setcustomtitledlg (void) +{ + GtkWidget *setcustomtitledlg; + GtkWidget *dialog_vbox16; + GtkWidget *vbox46; + GtkWidget *textview2; + GtkWidget *hbox123; + GtkWidget *set_custom_title; + GtkWidget *custom_title; + GtkWidget *dialog_action_area15; + GtkWidget *cancelbutton11; + GtkWidget *okbutton11; + + setcustomtitledlg = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (setcustomtitledlg), _("Set Custom Title")); + gtk_window_set_modal (GTK_WINDOW (setcustomtitledlg), TRUE); + gtk_window_set_type_hint (GTK_WINDOW (setcustomtitledlg), GDK_WINDOW_TYPE_HINT_DIALOG); + + dialog_vbox16 = gtk_dialog_get_content_area (GTK_DIALOG (setcustomtitledlg)); + gtk_widget_show (dialog_vbox16); + + vbox46 = gtk_vbox_new (FALSE, 8); + gtk_widget_show (vbox46); + gtk_box_pack_start (GTK_BOX (dialog_vbox16), vbox46, TRUE, TRUE, 0); + gtk_container_set_border_width (GTK_CONTAINER (vbox46), 12); + + textview2 = gtk_text_view_new (); + gtk_widget_show (textview2); + gtk_box_pack_start (GTK_BOX (vbox46), textview2, FALSE, TRUE, 0); + gtk_text_view_set_editable (GTK_TEXT_VIEW (textview2), FALSE); + gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (textview2), GTK_WRAP_WORD); + gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (textview2), FALSE); + gtk_text_view_set_pixels_above_lines (GTK_TEXT_VIEW (textview2), 8); + gtk_text_view_set_pixels_below_lines (GTK_TEXT_VIEW (textview2), 8); + gtk_text_view_set_left_margin (GTK_TEXT_VIEW (textview2), 8); + gtk_text_view_set_right_margin (GTK_TEXT_VIEW (textview2), 8); + gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview2)), _("This dialog allows to set custom title for any track. This is most useful for radio stations. An option to set the custom title is also present in the \"Add Location\" dialog. The title itself is visible in columns displaying the \"Artist\" metadata field. It should look like \"[custom] artist\" if the Artist field is present, or just \"custom\" otherwise."), -1); + + hbox123 = gtk_hbox_new (FALSE, 8); + gtk_widget_show (hbox123); + gtk_box_pack_start (GTK_BOX (vbox46), hbox123, FALSE, TRUE, 0); + + set_custom_title = gtk_check_button_new_with_mnemonic (_("Set custom title")); + gtk_widget_show (set_custom_title); + gtk_box_pack_start (GTK_BOX (hbox123), set_custom_title, FALSE, FALSE, 0); + + custom_title = gtk_entry_new (); + gtk_widget_show (custom_title); + gtk_box_pack_start (GTK_BOX (hbox123), custom_title, TRUE, TRUE, 0); + gtk_entry_set_invisible_char (GTK_ENTRY (custom_title), 8226); + + dialog_action_area15 = gtk_dialog_get_action_area (GTK_DIALOG (setcustomtitledlg)); + gtk_widget_show (dialog_action_area15); + gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area15), GTK_BUTTONBOX_END); + + cancelbutton11 = gtk_button_new_from_stock ("gtk-cancel"); + gtk_widget_show (cancelbutton11); + gtk_dialog_add_action_widget (GTK_DIALOG (setcustomtitledlg), cancelbutton11, GTK_RESPONSE_CANCEL); + gtk_widget_set_can_default(cancelbutton11, TRUE); + + okbutton11 = gtk_button_new_from_stock ("gtk-ok"); + gtk_widget_show (okbutton11); + gtk_dialog_add_action_widget (GTK_DIALOG (setcustomtitledlg), okbutton11, GTK_RESPONSE_OK); + gtk_widget_set_can_default(okbutton11, TRUE); + + /* Store pointers to all widgets, for use by lookup_widget(). */ + GLADE_HOOKUP_OBJECT_NO_REF (setcustomtitledlg, setcustomtitledlg, "setcustomtitledlg"); + GLADE_HOOKUP_OBJECT_NO_REF (setcustomtitledlg, dialog_vbox16, "dialog_vbox16"); + GLADE_HOOKUP_OBJECT (setcustomtitledlg, vbox46, "vbox46"); + GLADE_HOOKUP_OBJECT (setcustomtitledlg, textview2, "textview2"); + GLADE_HOOKUP_OBJECT (setcustomtitledlg, hbox123, "hbox123"); + GLADE_HOOKUP_OBJECT (setcustomtitledlg, set_custom_title, "set_custom_title"); + GLADE_HOOKUP_OBJECT (setcustomtitledlg, custom_title, "custom_title"); + GLADE_HOOKUP_OBJECT_NO_REF (setcustomtitledlg, dialog_action_area15, "dialog_action_area15"); + GLADE_HOOKUP_OBJECT (setcustomtitledlg, cancelbutton11, "cancelbutton11"); + GLADE_HOOKUP_OBJECT (setcustomtitledlg, okbutton11, "okbutton11"); + + return setcustomtitledlg; +} + |