Mercurial > audlegacy-plugins
comparison src/musepack/libmpc.cxx @ 1304:f34112ab9101
As usual, "i18n" modifications.
author | Stany HENRY <StrassBoy@gmail.com> |
---|---|
date | Fri, 20 Jul 2007 05:39:56 +0200 |
parents | 6d749f573b3b |
children | cf46ed0ee590 |
comparison
equal
deleted
inserted
replaced
1303:2a7c9e0b9c0f | 1304:f34112ab9101 |
---|---|
140 GtkWidget* aboutBox = widgets.aboutBox; | 140 GtkWidget* aboutBox = widgets.aboutBox; |
141 if (aboutBox) | 141 if (aboutBox) |
142 gdk_window_raise(aboutBox->window); | 142 gdk_window_raise(aboutBox->window); |
143 else | 143 else |
144 { | 144 { |
145 char* titleText = g_strdup_printf("Musepack Decoder Plugin 1.2"); | 145 char* titleText = g_strdup_printf(_("Musepack Decoder Plugin 1.2")); |
146 const char* contentText = "Plugin code by\nBenoit Amiaux\nMartin Spuler\nKuniklo\n\nGet latest version at http://musepack.net\n"; | 146 const char* contentText = _("Plugin code by\nBenoit Amiaux\nMartin Spuler\nKuniklo\n\nGet latest version at http://musepack.net\n"); |
147 const char* buttonText = "Nevermind"; | 147 const char* buttonText = _("Nevermind"); |
148 aboutBox = xmms_show_message(titleText, contentText, buttonText, FALSE, NULL, NULL); | 148 aboutBox = xmms_show_message(titleText, contentText, buttonText, FALSE, NULL, NULL); |
149 widgets.aboutBox = aboutBox; | 149 widgets.aboutBox = aboutBox; |
150 g_signal_connect(G_OBJECT(aboutBox), "destroy", G_CALLBACK(gtk_widget_destroyed), &widgets.aboutBox); | 150 g_signal_connect(G_OBJECT(aboutBox), "destroy", G_CALLBACK(gtk_widget_destroyed), &widgets.aboutBox); |
151 } | 151 } |
152 } | 152 } |
160 { | 160 { |
161 configBox = gtk_window_new(GTK_WINDOW_TOPLEVEL); | 161 configBox = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
162 gtk_window_set_type_hint(GTK_WINDOW(configBox), GDK_WINDOW_TYPE_HINT_DIALOG); | 162 gtk_window_set_type_hint(GTK_WINDOW(configBox), GDK_WINDOW_TYPE_HINT_DIALOG); |
163 widgets.configBox = configBox; | 163 widgets.configBox = configBox; |
164 g_signal_connect(G_OBJECT(configBox), "destroy", G_CALLBACK(gtk_widget_destroyed), &widgets.configBox); | 164 g_signal_connect(G_OBJECT(configBox), "destroy", G_CALLBACK(gtk_widget_destroyed), &widgets.configBox); |
165 gtk_window_set_title(GTK_WINDOW(configBox), "Musepack Decoder Configuration"); | 165 gtk_window_set_title(GTK_WINDOW(configBox), _("Musepack Decoder Configuration")); |
166 gtk_window_set_policy(GTK_WINDOW(configBox), FALSE, FALSE, FALSE); | 166 gtk_window_set_policy(GTK_WINDOW(configBox), FALSE, FALSE, FALSE); |
167 gtk_container_border_width(GTK_CONTAINER(configBox), 10); | 167 gtk_container_border_width(GTK_CONTAINER(configBox), 10); |
168 | 168 |
169 GtkWidget* notebook = gtk_notebook_new(); | 169 GtkWidget* notebook = gtk_notebook_new(); |
170 GtkWidget* vbox = gtk_vbox_new(FALSE, 10); | 170 GtkWidget* vbox = gtk_vbox_new(FALSE, 10); |
171 gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0); | 171 gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0); |
172 gtk_container_add(GTK_CONTAINER(configBox), vbox); | 172 gtk_container_add(GTK_CONTAINER(configBox), vbox); |
173 | 173 |
174 //General Settings Tab | 174 //General Settings Tab |
175 GtkWidget* generalSet = gtk_frame_new("General Settings"); | 175 GtkWidget* generalSet = gtk_frame_new(_("General Settings")); |
176 gtk_container_border_width(GTK_CONTAINER(generalSet), 5); | 176 gtk_container_border_width(GTK_CONTAINER(generalSet), 5); |
177 | 177 |
178 GtkWidget* gSvbox = gtk_vbox_new(FALSE, 10); | 178 GtkWidget* gSvbox = gtk_vbox_new(FALSE, 10); |
179 gtk_container_border_width(GTK_CONTAINER(gSvbox), 5); | 179 gtk_container_border_width(GTK_CONTAINER(gSvbox), 5); |
180 gtk_container_add(GTK_CONTAINER(generalSet), gSvbox); | 180 gtk_container_add(GTK_CONTAINER(generalSet), gSvbox); |
181 | 181 |
182 GtkWidget* bitrateCheck = gtk_check_button_new_with_label("Enable Dynamic Bitrate Display"); | 182 GtkWidget* bitrateCheck = gtk_check_button_new_with_label(_("Enable Dynamic Bitrate Display")); |
183 widgets.bitrateCheck = bitrateCheck; | 183 widgets.bitrateCheck = bitrateCheck; |
184 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(bitrateCheck), pluginConfig.dynamicBitrate); | 184 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(bitrateCheck), pluginConfig.dynamicBitrate); |
185 gtk_box_pack_start(GTK_BOX(gSvbox), bitrateCheck, FALSE, FALSE, 0); | 185 gtk_box_pack_start(GTK_BOX(gSvbox), bitrateCheck, FALSE, FALSE, 0); |
186 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), generalSet, gtk_label_new("Plugin")); | 186 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), generalSet, gtk_label_new(_("Plugin"))); |
187 | 187 |
188 //ReplayGain Settings Tab | 188 //ReplayGain Settings Tab |
189 GtkWidget* replaygainSet = gtk_frame_new("ReplayGain Settings"); | 189 GtkWidget* replaygainSet = gtk_frame_new(_("ReplayGain Settings")); |
190 gtk_container_border_width(GTK_CONTAINER(replaygainSet), 5); | 190 gtk_container_border_width(GTK_CONTAINER(replaygainSet), 5); |
191 | 191 |
192 GtkWidget* rSVbox = gtk_vbox_new(FALSE, 10); | 192 GtkWidget* rSVbox = gtk_vbox_new(FALSE, 10); |
193 gtk_container_border_width(GTK_CONTAINER(rSVbox), 5); | 193 gtk_container_border_width(GTK_CONTAINER(rSVbox), 5); |
194 gtk_container_add(GTK_CONTAINER(replaygainSet), rSVbox); | 194 gtk_container_add(GTK_CONTAINER(replaygainSet), rSVbox); |
195 | 195 |
196 GtkWidget* clippingCheck = gtk_check_button_new_with_label("Enable Clipping Prevention"); | 196 GtkWidget* clippingCheck = gtk_check_button_new_with_label(_("Enable Clipping Prevention")); |
197 widgets.clippingCheck = clippingCheck; | 197 widgets.clippingCheck = clippingCheck; |
198 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(clippingCheck), pluginConfig.clipPrevention); | 198 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(clippingCheck), pluginConfig.clipPrevention); |
199 gtk_box_pack_start(GTK_BOX(rSVbox), clippingCheck, FALSE, FALSE, 0); | 199 gtk_box_pack_start(GTK_BOX(rSVbox), clippingCheck, FALSE, FALSE, 0); |
200 | 200 |
201 GtkWidget* replaygainCheck = gtk_check_button_new_with_label("Enable ReplayGain"); | 201 GtkWidget* replaygainCheck = gtk_check_button_new_with_label(_("Enable ReplayGain")); |
202 widgets.replaygainCheck = replaygainCheck; | 202 widgets.replaygainCheck = replaygainCheck; |
203 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(replaygainCheck), pluginConfig.replaygain); | 203 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(replaygainCheck), pluginConfig.replaygain); |
204 gtk_box_pack_start(GTK_BOX(rSVbox), replaygainCheck, FALSE, FALSE, 0); | 204 gtk_box_pack_start(GTK_BOX(rSVbox), replaygainCheck, FALSE, FALSE, 0); |
205 | 205 |
206 GtkWidget* replaygainType = gtk_frame_new("ReplayGain Type"); | 206 GtkWidget* replaygainType = gtk_frame_new(_("ReplayGain Type")); |
207 gtk_box_pack_start(GTK_BOX(rSVbox), replaygainType, FALSE, FALSE, 0); | 207 gtk_box_pack_start(GTK_BOX(rSVbox), replaygainType, FALSE, FALSE, 0); |
208 g_signal_connect(G_OBJECT(replaygainCheck), "toggled", G_CALLBACK(toggleSwitch), replaygainType); | 208 g_signal_connect(G_OBJECT(replaygainCheck), "toggled", G_CALLBACK(toggleSwitch), replaygainType); |
209 | 209 |
210 GtkWidget* rgVbox = gtk_vbox_new(FALSE, 5); | 210 GtkWidget* rgVbox = gtk_vbox_new(FALSE, 5); |
211 gtk_container_set_border_width(GTK_CONTAINER(rgVbox), 5); | 211 gtk_container_set_border_width(GTK_CONTAINER(rgVbox), 5); |
212 gtk_container_add(GTK_CONTAINER(replaygainType), rgVbox); | 212 gtk_container_add(GTK_CONTAINER(replaygainType), rgVbox); |
213 | 213 |
214 GtkWidget* trackCheck = gtk_radio_button_new_with_label(NULL, "Use Track Gain"); | 214 GtkWidget* trackCheck = gtk_radio_button_new_with_label(NULL, _("Use Track Gain")); |
215 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(trackCheck), !pluginConfig.albumGain); | 215 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(trackCheck), !pluginConfig.albumGain); |
216 gtk_box_pack_start(GTK_BOX(rgVbox), trackCheck, FALSE, FALSE, 0); | 216 gtk_box_pack_start(GTK_BOX(rgVbox), trackCheck, FALSE, FALSE, 0); |
217 | 217 |
218 GtkWidget* albumCheck = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(trackCheck)), "Use Album Gain"); | 218 GtkWidget* albumCheck = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(trackCheck)), _("Use Album Gain")); |
219 widgets.albumCheck = albumCheck; | 219 widgets.albumCheck = albumCheck; |
220 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(albumCheck), pluginConfig.albumGain); | 220 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(albumCheck), pluginConfig.albumGain); |
221 gtk_box_pack_start(GTK_BOX(rgVbox), albumCheck, FALSE, FALSE, 0); | 221 gtk_box_pack_start(GTK_BOX(rgVbox), albumCheck, FALSE, FALSE, 0); |
222 gtk_widget_set_sensitive(replaygainType, pluginConfig.replaygain); | 222 gtk_widget_set_sensitive(replaygainType, pluginConfig.replaygain); |
223 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), replaygainSet, gtk_label_new("ReplayGain")); | 223 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), replaygainSet, gtk_label_new(_("ReplayGain"))); |
224 | 224 |
225 //Buttons | 225 //Buttons |
226 GtkWidget* buttonBox = gtk_hbutton_box_new(); | 226 GtkWidget* buttonBox = gtk_hbutton_box_new(); |
227 gtk_button_box_set_layout(GTK_BUTTON_BOX(buttonBox), GTK_BUTTONBOX_END); | 227 gtk_button_box_set_layout(GTK_BUTTON_BOX(buttonBox), GTK_BUTTONBOX_END); |
228 gtk_button_box_set_spacing(GTK_BUTTON_BOX(buttonBox), 5); | 228 gtk_button_box_set_spacing(GTK_BUTTON_BOX(buttonBox), 5); |
229 gtk_box_pack_start(GTK_BOX(vbox), buttonBox, FALSE, FALSE, 0); | 229 gtk_box_pack_start(GTK_BOX(vbox), buttonBox, FALSE, FALSE, 0); |
230 | 230 |
231 GtkWidget* okButton = gtk_button_new_with_label("Ok"); | 231 GtkWidget* okButton = gtk_button_new_with_label(_("Ok")); |
232 g_signal_connect(G_OBJECT(okButton), "clicked", G_CALLBACK(saveConfigBox), NULL); | 232 g_signal_connect(G_OBJECT(okButton), "clicked", G_CALLBACK(saveConfigBox), NULL); |
233 GTK_WIDGET_SET_FLAGS(okButton, GTK_CAN_DEFAULT); | 233 GTK_WIDGET_SET_FLAGS(okButton, GTK_CAN_DEFAULT); |
234 gtk_box_pack_start(GTK_BOX(buttonBox), okButton, TRUE, TRUE, 0); | 234 gtk_box_pack_start(GTK_BOX(buttonBox), okButton, TRUE, TRUE, 0); |
235 | 235 |
236 GtkWidget* cancelButton = gtk_button_new_with_label("Cancel"); | 236 GtkWidget* cancelButton = gtk_button_new_with_label(_("Cancel")); |
237 g_signal_connect_swapped(G_OBJECT(cancelButton), "clicked", G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(widgets.configBox)); | 237 g_signal_connect_swapped(G_OBJECT(cancelButton), "clicked", G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(widgets.configBox)); |
238 GTK_WIDGET_SET_FLAGS(cancelButton, GTK_CAN_DEFAULT); | 238 GTK_WIDGET_SET_FLAGS(cancelButton, GTK_CAN_DEFAULT); |
239 gtk_widget_grab_default(cancelButton); | 239 gtk_widget_grab_default(cancelButton); |
240 gtk_box_pack_start(GTK_BOX(buttonBox), cancelButton, TRUE, TRUE, 0); | 240 gtk_box_pack_start(GTK_BOX(buttonBox), cancelButton, TRUE, TRUE, 0); |
241 | 241 |
477 gtk_container_add(GTK_CONTAINER(infoBox), iVbox); | 477 gtk_container_add(GTK_CONTAINER(infoBox), iVbox); |
478 | 478 |
479 GtkWidget* filenameHbox = gtk_hbox_new(FALSE, 5); | 479 GtkWidget* filenameHbox = gtk_hbox_new(FALSE, 5); |
480 gtk_box_pack_start(GTK_BOX(iVbox), filenameHbox, FALSE, TRUE, 0); | 480 gtk_box_pack_start(GTK_BOX(iVbox), filenameHbox, FALSE, TRUE, 0); |
481 | 481 |
482 GtkWidget* fileLabel = gtk_label_new("Filename:"); | 482 GtkWidget* fileLabel = gtk_label_new(_("Filename:")); |
483 gtk_box_pack_start(GTK_BOX(filenameHbox), fileLabel, FALSE, TRUE, 0); | 483 gtk_box_pack_start(GTK_BOX(filenameHbox), fileLabel, FALSE, TRUE, 0); |
484 | 484 |
485 GtkWidget* fileEntry = gtk_entry_new(); | 485 GtkWidget* fileEntry = gtk_entry_new(); |
486 widgets.fileEntry = fileEntry; | 486 widgets.fileEntry = fileEntry; |
487 gtk_editable_set_editable(GTK_EDITABLE(fileEntry), FALSE); | 487 gtk_editable_set_editable(GTK_EDITABLE(fileEntry), FALSE); |
492 | 492 |
493 GtkWidget* leftBox = gtk_vbox_new(FALSE, 10); | 493 GtkWidget* leftBox = gtk_vbox_new(FALSE, 10); |
494 gtk_box_pack_start(GTK_BOX(iHbox), leftBox, FALSE, FALSE, 0); | 494 gtk_box_pack_start(GTK_BOX(iHbox), leftBox, FALSE, FALSE, 0); |
495 | 495 |
496 //Tag labels | 496 //Tag labels |
497 GtkWidget* tagFrame = gtk_frame_new("Musepack Tag"); | 497 GtkWidget* tagFrame = gtk_frame_new(_("Musepack Tag")); |
498 gtk_box_pack_start(GTK_BOX(leftBox), tagFrame, FALSE, FALSE, 0); | 498 gtk_box_pack_start(GTK_BOX(leftBox), tagFrame, FALSE, FALSE, 0); |
499 gtk_widget_set_sensitive(tagFrame, TRUE); | 499 gtk_widget_set_sensitive(tagFrame, TRUE); |
500 | 500 |
501 GtkWidget* iTable = gtk_table_new(5, 5, FALSE); | 501 GtkWidget* iTable = gtk_table_new(5, 5, FALSE); |
502 gtk_container_set_border_width(GTK_CONTAINER(iTable), 5); | 502 gtk_container_set_border_width(GTK_CONTAINER(iTable), 5); |
503 gtk_container_add(GTK_CONTAINER(tagFrame), iTable); | 503 gtk_container_add(GTK_CONTAINER(tagFrame), iTable); |
504 | 504 |
505 mpcGtkTagLabel("Title:", 0, 1, 0, 1, iTable); | 505 mpcGtkTagLabel(_("Title:"), 0, 1, 0, 1, iTable); |
506 GtkWidget* titleEntry = mpcGtkTagEntry(1, 4, 0, 1, 0, iTable); | 506 GtkWidget* titleEntry = mpcGtkTagEntry(1, 4, 0, 1, 0, iTable); |
507 widgets.titleEntry = titleEntry; | 507 widgets.titleEntry = titleEntry; |
508 | 508 |
509 mpcGtkTagLabel("Artist:", 0, 1, 1, 2, iTable); | 509 mpcGtkTagLabel(_("Artist:"), 0, 1, 1, 2, iTable); |
510 GtkWidget* artistEntry = mpcGtkTagEntry(1, 4, 1, 2, 0, iTable); | 510 GtkWidget* artistEntry = mpcGtkTagEntry(1, 4, 1, 2, 0, iTable); |
511 widgets.artistEntry = artistEntry; | 511 widgets.artistEntry = artistEntry; |
512 | 512 |
513 mpcGtkTagLabel("Album:", 0, 1, 2, 3, iTable); | 513 mpcGtkTagLabel(_("Album:"), 0, 1, 2, 3, iTable); |
514 GtkWidget* albumEntry = mpcGtkTagEntry(1, 4, 2, 3, 0, iTable); | 514 GtkWidget* albumEntry = mpcGtkTagEntry(1, 4, 2, 3, 0, iTable); |
515 widgets.albumEntry = albumEntry; | 515 widgets.albumEntry = albumEntry; |
516 | 516 |
517 mpcGtkTagLabel("Comment:", 0, 1, 3, 4, iTable); | 517 mpcGtkTagLabel(_("Comment:"), 0, 1, 3, 4, iTable); |
518 GtkWidget* commentEntry = mpcGtkTagEntry(1, 4, 3, 4, 0, iTable); | 518 GtkWidget* commentEntry = mpcGtkTagEntry(1, 4, 3, 4, 0, iTable); |
519 widgets.commentEntry = commentEntry; | 519 widgets.commentEntry = commentEntry; |
520 | 520 |
521 mpcGtkTagLabel("Year:", 0, 1, 4, 5, iTable); | 521 mpcGtkTagLabel(_("Year:"), 0, 1, 4, 5, iTable); |
522 GtkWidget* yearEntry = mpcGtkTagEntry(1, 2, 4, 5, 4, iTable); | 522 GtkWidget* yearEntry = mpcGtkTagEntry(1, 2, 4, 5, 4, iTable); |
523 widgets.yearEntry = yearEntry; | 523 widgets.yearEntry = yearEntry; |
524 gtk_widget_set_usize(yearEntry, 4, -1); | 524 gtk_widget_set_usize(yearEntry, 4, -1); |
525 | 525 |
526 mpcGtkTagLabel("Track:", 2, 3, 4, 5, iTable); | 526 mpcGtkTagLabel(_("Track:"), 2, 3, 4, 5, iTable); |
527 GtkWidget* trackEntry = mpcGtkTagEntry(3, 4, 4, 5, 4, iTable); | 527 GtkWidget* trackEntry = mpcGtkTagEntry(3, 4, 4, 5, 4, iTable); |
528 widgets.trackEntry = trackEntry; | 528 widgets.trackEntry = trackEntry; |
529 gtk_widget_set_usize(trackEntry, 3, -1); | 529 gtk_widget_set_usize(trackEntry, 3, -1); |
530 | 530 |
531 mpcGtkTagLabel("Genre:", 0, 1, 5, 6, iTable); | 531 mpcGtkTagLabel(_("Genre:"), 0, 1, 5, 6, iTable); |
532 GtkWidget* genreEntry = mpcGtkTagEntry(1, 4, 5, 6, 0, iTable); | 532 GtkWidget* genreEntry = mpcGtkTagEntry(1, 4, 5, 6, 0, iTable); |
533 widgets.genreEntry = genreEntry; | 533 widgets.genreEntry = genreEntry; |
534 gtk_widget_set_usize(genreEntry, 20, -1); | 534 gtk_widget_set_usize(genreEntry, 20, -1); |
535 | 535 |
536 //Buttons | 536 //Buttons |
537 GtkWidget* buttonBox = gtk_hbutton_box_new(); | 537 GtkWidget* buttonBox = gtk_hbutton_box_new(); |
538 gtk_button_box_set_layout(GTK_BUTTON_BOX(buttonBox), GTK_BUTTONBOX_END); | 538 gtk_button_box_set_layout(GTK_BUTTON_BOX(buttonBox), GTK_BUTTONBOX_END); |
539 gtk_button_box_set_spacing(GTK_BUTTON_BOX(buttonBox), 5); | 539 gtk_button_box_set_spacing(GTK_BUTTON_BOX(buttonBox), 5); |
540 gtk_box_pack_start(GTK_BOX(leftBox), buttonBox, FALSE, FALSE, 0); | 540 gtk_box_pack_start(GTK_BOX(leftBox), buttonBox, FALSE, FALSE, 0); |
541 | 541 |
542 GtkWidget* saveButton = mpcGtkButton("Save", buttonBox); | 542 GtkWidget* saveButton = mpcGtkButton(_("Save"), buttonBox); |
543 g_signal_connect(G_OBJECT(saveButton), "clicked", G_CALLBACK(saveTags), NULL); | 543 g_signal_connect(G_OBJECT(saveButton), "clicked", G_CALLBACK(saveTags), NULL); |
544 | 544 |
545 GtkWidget* removeButton = mpcGtkButton("Remove Tag", buttonBox); | 545 GtkWidget* removeButton = mpcGtkButton(_("Remove Tag"), buttonBox); |
546 g_signal_connect_swapped(G_OBJECT(removeButton), "clicked", G_CALLBACK(removeTags), NULL); | 546 g_signal_connect_swapped(G_OBJECT(removeButton), "clicked", G_CALLBACK(removeTags), NULL); |
547 | 547 |
548 GtkWidget* cancelButton = mpcGtkButton("Cancel", buttonBox); | 548 GtkWidget* cancelButton = mpcGtkButton(_("Cancel"), buttonBox); |
549 g_signal_connect_swapped(G_OBJECT(cancelButton), "clicked", G_CALLBACK(closeInfoBox), NULL); | 549 g_signal_connect_swapped(G_OBJECT(cancelButton), "clicked", G_CALLBACK(closeInfoBox), NULL); |
550 gtk_widget_grab_default(cancelButton); | 550 gtk_widget_grab_default(cancelButton); |
551 | 551 |
552 //File information | 552 //File information |
553 GtkWidget* infoFrame = gtk_frame_new("Musepack Info"); | 553 GtkWidget* infoFrame = gtk_frame_new(_("Musepack Info")); |
554 gtk_box_pack_start(GTK_BOX(iHbox), infoFrame, FALSE, FALSE, 0); | 554 gtk_box_pack_start(GTK_BOX(iHbox), infoFrame, FALSE, FALSE, 0); |
555 | 555 |
556 GtkWidget* infoVbox = gtk_vbox_new(FALSE, 5); | 556 GtkWidget* infoVbox = gtk_vbox_new(FALSE, 5); |
557 gtk_container_add(GTK_CONTAINER(infoFrame), infoVbox); | 557 gtk_container_add(GTK_CONTAINER(infoFrame), infoVbox); |
558 gtk_container_set_border_width(GTK_CONTAINER(infoVbox), 10); | 558 gtk_container_set_border_width(GTK_CONTAINER(infoVbox), 10); |
581 | 581 |
582 int time = static_cast<int> (mpc_streaminfo_get_length(&info)); | 582 int time = static_cast<int> (mpc_streaminfo_get_length(&info)); |
583 int minutes = time / 60; | 583 int minutes = time / 60; |
584 int seconds = time % 60; | 584 int seconds = time % 60; |
585 | 585 |
586 mpcGtkPrintLabel(streamLabel, "Streamversion %d", info.stream_version); | 586 mpcGtkPrintLabel(streamLabel, _("Streamversion %d"), info.stream_version); |
587 mpcGtkPrintLabel(encoderLabel, "Encoder: \%s", info.encoder); | 587 mpcGtkPrintLabel(encoderLabel, _("Encoder: %s"), info.encoder); |
588 mpcGtkPrintLabel(profileLabel, "Profile: \%s", info.profile_name); | 588 mpcGtkPrintLabel(profileLabel, _("Profile: %s"), info.profile_name); |
589 mpcGtkPrintLabel(bitrateLabel, "Average bitrate: \%6.1f kbps", info.average_bitrate * 1.e-3); | 589 mpcGtkPrintLabel(bitrateLabel, _("Average bitrate: %6.1f kbps"), info.average_bitrate * 1.e-3); |
590 mpcGtkPrintLabel(rateLabel, "Samplerate: \%d Hz", info.sample_freq); | 590 mpcGtkPrintLabel(rateLabel, _("Samplerate: %d Hz"), info.sample_freq); |
591 mpcGtkPrintLabel(channelsLabel, "Channels: \%d", info.channels); | 591 mpcGtkPrintLabel(channelsLabel, _("Channels: %d"), info.channels); |
592 mpcGtkPrintLabel(lengthLabel, "Length: \%d:\%.2d", minutes, seconds); | 592 mpcGtkPrintLabel(lengthLabel, _("Length: %d:\%.2d"), minutes, seconds); |
593 mpcGtkPrintLabel(fileSizeLabel, "File size: \%d Bytes", info.total_file_length); | 593 mpcGtkPrintLabel(fileSizeLabel, _("File size: %d Bytes"), info.total_file_length); |
594 mpcGtkPrintLabel(trackPeakLabel, "Track Peak: \%5u", info.peak_title); | 594 mpcGtkPrintLabel(trackPeakLabel, _("Track Peak: %5u"), info.peak_title); |
595 mpcGtkPrintLabel(trackGainLabel, "Track Gain: \%-+2.2f dB", 0.01 * info.gain_title); | 595 mpcGtkPrintLabel(trackGainLabel, _("Track Gain: %-+2.2f dB"), 0.01 * info.gain_title); |
596 mpcGtkPrintLabel(albumPeakLabel, "Album Peak: \%5u", info.peak_album); | 596 mpcGtkPrintLabel(albumPeakLabel, _("Album Peak: %5u"), info.peak_album); |
597 mpcGtkPrintLabel(albumGainLabel, "Album Gain: \%-+5.2f dB", 0.01 * info.gain_album); | 597 mpcGtkPrintLabel(albumGainLabel, _("Album Gain: %-+5.2f dB"), 0.01 * info.gain_album); |
598 | 598 |
599 MpcInfo tags = getTags(p_Filename); | 599 MpcInfo tags = getTags(p_Filename); |
600 gtk_entry_set_text(GTK_ENTRY(titleEntry), tags.title); | 600 gtk_entry_set_text(GTK_ENTRY(titleEntry), tags.title); |
601 gtk_entry_set_text(GTK_ENTRY(artistEntry), tags.artist); | 601 gtk_entry_set_text(GTK_ENTRY(artistEntry), tags.artist); |
602 gtk_entry_set_text(GTK_ENTRY(albumEntry), tags.album); | 602 gtk_entry_set_text(GTK_ENTRY(albumEntry), tags.album); |
620 perror(temp); | 620 perror(temp); |
621 free(temp); | 621 free(temp); |
622 } | 622 } |
623 | 623 |
624 char* name = g_filename_display_basename(p_Filename); | 624 char* name = g_filename_display_basename(p_Filename); |
625 char* text = g_strdup_printf("File Info - %s", name); | 625 char* text = g_strdup_printf(_("File Info - %s"), name); |
626 free(name); | 626 free(name); |
627 gtk_window_set_title(GTK_WINDOW(infoBox), text); | 627 gtk_window_set_title(GTK_WINDOW(infoBox), text); |
628 free(text); | 628 free(text); |
629 | 629 |
630 gtk_widget_show_all(infoBox); | 630 gtk_widget_show_all(infoBox); |