[MPlayer-cvslog] r38301 - in trunk: Changelog gui/app/cfg.c gui/app/gui.h gui/dialog/about.c gui/dialog/dialog.c gui/dialog/equalizer.c gui/dialog/fileselect.c gui/dialog/menu.c gui/dialog/msgbox.c gui/dialog/playl...
ib
subversion at mplayerhq.hu
Thu Mar 4 16:48:29 EET 2021
Author: ib
Date: Thu Mar 4 16:48:28 2021
New Revision: 38301
Log:
Implement Native Language Support for the X11/GTK GUI.
Use dgettext() to translate the GUI text strings and set the locale
for messages as specified in LC_MESSAGES or LANG by the user.
Modified:
trunk/Changelog
trunk/gui/app/cfg.c
trunk/gui/app/gui.h
trunk/gui/dialog/about.c
trunk/gui/dialog/dialog.c
trunk/gui/dialog/equalizer.c
trunk/gui/dialog/fileselect.c
trunk/gui/dialog/menu.c
trunk/gui/dialog/msgbox.c
trunk/gui/dialog/playlist.c
trunk/gui/dialog/preferences.c
trunk/gui/dialog/skinbrowser.c
trunk/gui/dialog/tools.c
trunk/gui/dialog/url.c
trunk/gui/interface.c
trunk/gui/skin/skin.c
trunk/gui/ui/actions.c
trunk/gui/ui/main.c
trunk/gui/ui/menu.c
trunk/gui/ui/playbar.c
trunk/gui/ui/render.c
trunk/gui/wm/ws.c
trunk/gui/wm/wsxdnd.c
Modified: trunk/Changelog
==============================================================================
--- trunk/Changelog Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/Changelog Thu Mar 4 16:48:28 2021 (r38301)
@@ -13,6 +13,8 @@ MPlayer
* Use correct visual in OpenGL video output driver for X11
* Provide a built-in skin so that the GUI can be used even
without an installed skin
+ * Native Language Support, i.e. the GUI language can be changed
+ as specified in LC_MESSAGES or LANG
* Minor bug fixes
Other:
Modified: trunk/gui/app/cfg.c
==============================================================================
--- trunk/gui/app/cfg.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/app/cfg.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -278,14 +278,14 @@ void cfg_read(void)
gui_conf = m_config_new();
if (!gui_conf) {
- gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_GUI_MemAllocFailed);
+ gmp_msg(MSGT_GPLAYER, MSGL_FATAL, _(MSGTR_GUI_MemAllocFailed));
mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
}
m_config_register_options(gui_conf, gui_opts);
if (!disable_gui_conf && (m_config_parse_config_file(gui_conf, fname, 1) < 0)) {
- gmp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_GUI_ConfigFileError);
+ gmp_msg(MSGT_GPLAYER, MSGL_ERR, _(MSGTR_GUI_ConfigFileError));
mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
}
@@ -306,7 +306,7 @@ void cfg_read(void)
item = calloc(1, sizeof(*item));
if (!item) {
- gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_GUI_MemAllocFailed);
+ gmp_msg(MSGT_GPLAYER, MSGL_FATAL, _(MSGTR_GUI_MemAllocFailed));
mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
}
@@ -341,7 +341,7 @@ void cfg_read(void)
item = calloc(1, sizeof(*item));
if (!item) {
- gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_GUI_MemAllocFailed);
+ gmp_msg(MSGT_GPLAYER, MSGL_FATAL, _(MSGTR_GUI_MemAllocFailed));
mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
}
@@ -422,7 +422,7 @@ void cfg_write(void)
char *val = m_option_print(opts, opts->p);
if (val == (char *)-1) {
- gmp_msg(MSGT_GPLAYER, MSGL_WARN, MSGTR_GUI_MSG_UnableToSaveOption, opts->name);
+ gmp_msg(MSGT_GPLAYER, MSGL_WARN, _(MSGTR_GUI_MSG_UnableToSaveOption), opts->name);
val = NULL;
}
Modified: trunk/gui/app/gui.h
==============================================================================
--- trunk/gui/app/gui.h Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/app/gui.h Thu Mar 4 16:48:28 2021 (r38301)
@@ -24,6 +24,17 @@
#ifndef MPLAYER_GUI_GUI_H
#define MPLAYER_GUI_GUI_H
+#include "config.h"
+
+#ifdef ENABLE_NLS
+#include <libintl.h>
+#include <locale.h>
+#define GETTEXT_PACKAGE "mplayer"
+#define _(string) dgettext(GETTEXT_PACKAGE, string)
+#else
+#define _(string) string
+#endif
+
/// Name of the program the GUI utilizes
#define MPlayer "MPlayer"
Modified: trunk/gui/dialog/about.c
==============================================================================
--- trunk/gui/dialog/about.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/dialog/about.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -63,7 +63,7 @@ static GtkWidget * CreateAbout( void )
About=gtk_window_new( GTK_WINDOW_TOPLEVEL );
gtk_widget_set_usize( About,370,425 );
- gtk_window_set_title( GTK_WINDOW( About ),MSGTR_GUI_AboutMPlayer );
+ gtk_window_set_title( GTK_WINDOW( About ),_(MSGTR_GUI_AboutMPlayer) );
gtk_window_set_position( GTK_WINDOW( About ),GTK_WIN_POS_CENTER );
gtk_window_set_policy( GTK_WINDOW( About ),FALSE,FALSE,TRUE );
gtk_window_set_wmclass( GTK_WINDOW( About ),"About",MPlayer );
@@ -323,16 +323,16 @@ static GtkWidget * CreateAbout( void )
" • Andrew Weber\n"
" • Gary Jr. Whitmore\n"
" • Franciszek Wilamowski\n"
- " • Michael Zeising", MSGTR_GUI_Sponsored,
- MSGTR_GUI_Contributors,
- MSGTR_GUI_CodecsAndLibraries,
- MSGTR_GUI_Translations,
- MSGTR_GUI_Skins);
+ " • Michael Zeising", _(MSGTR_GUI_Sponsored),
+ _(MSGTR_GUI_Contributors),
+ _(MSGTR_GUI_CodecsAndLibraries),
+ _(MSGTR_GUI_Translations),
+ _(MSGTR_GUI_Skins));
gtk_text_buffer_insert(AboutTextBuffer, &iter, about, -1);
g_free(about);
gtkAddHSeparator( vbox );
- Ok=gtkAddButton( MSGTR_GUI_Ok,gtkAddHButtonBox( vbox ) );
+ Ok=gtkAddButton( _(MSGTR_GUI_Ok),gtkAddHButtonBox( vbox ) );
gtk_signal_connect( GTK_OBJECT( About ),"destroy",GTK_SIGNAL_FUNC( gtk_widget_destroyed ),&About );
gtk_signal_connect_object( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( abWidgetDestroy ),NULL );
Modified: trunk/gui/dialog/dialog.c
==============================================================================
--- trunk/gui/dialog/dialog.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/dialog/dialog.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -97,7 +97,7 @@ static int gtkLoadIcon(GtkIconTheme *the
g_object_unref(pixbuf);
} else
- mp_msg(MSGT_GPLAYER, MSGL_WARN, MSGTR_GUI_MSG_IconError, guiIconName, size);
+ mp_msg(MSGT_GPLAYER, MSGL_WARN, _(MSGTR_GUI_MSG_IconError), guiIconName, size);
/* start up GTK which realizes the pixmaps */
gtk_main_iteration_do(FALSE);
@@ -133,7 +133,7 @@ void gtkInit(char *display_name)
env = getenv("G_FILENAME_ENCODING");
if ((!env && getenv("G_BROKEN_FILENAMES")) || (gstrncmp(env, "@locale", 7) == 0))
- mp_msg(MSGT_GPLAYER, MSGL_WARN, MSGTR_GUI_MSG_LocaleEncoding);
+ mp_msg(MSGT_GPLAYER, MSGL_WARN, _(MSGTR_GUI_MSG_LocaleEncoding));
gtk_init(&argc, &argv);
wsSetErrorHandler(); // GDK has just set its own handler
@@ -193,7 +193,7 @@ void gtkMessageBox(int type, const gchar
switch (type & ~MSGBOX_WAIT) {
case MSGBOX_FATAL:
- gtk_window_set_title(GTK_WINDOW(MessageBox), MSGTR_GUI_ErrorFatal);
+ gtk_window_set_title(GTK_WINDOW(MessageBox), _(MSGTR_GUI_ErrorFatal));
gtk_widget_hide(InformationImage);
gtk_widget_hide(WarningImage);
gtk_widget_show(ErrorImage);
@@ -201,21 +201,21 @@ void gtkMessageBox(int type, const gchar
break;
case MSGBOX_ERROR:
- gtk_window_set_title(GTK_WINDOW(MessageBox), MSGTR_GUI_Error);
+ gtk_window_set_title(GTK_WINDOW(MessageBox), _(MSGTR_GUI_Error));
gtk_widget_hide(InformationImage);
gtk_widget_hide(WarningImage);
gtk_widget_show(ErrorImage);
break;
case MSGBOX_WARNING:
- gtk_window_set_title(GTK_WINDOW(MessageBox), MSGTR_GUI_Warning);
+ gtk_window_set_title(GTK_WINDOW(MessageBox), _(MSGTR_GUI_Warning));
gtk_widget_hide(InformationImage);
gtk_widget_show(WarningImage);
gtk_widget_hide(ErrorImage);
break;
case MSGBOX_INFORMATION:
- gtk_window_set_title(GTK_WINDOW(MessageBox), MSGTR_GUI_Information);
+ gtk_window_set_title(GTK_WINDOW(MessageBox), _(MSGTR_GUI_Information));
gtk_widget_show(InformationImage);
gtk_widget_hide(WarningImage);
gtk_widget_hide(ErrorImage);
@@ -281,7 +281,7 @@ void gtkShow(int type, char *param)
gtkSetLayer(SkinBrowser);
} else {
gtk_widget_destroy(SkinBrowser);
- gtkMessageBox(MSGBOX_ERROR, MSGTR_GUI_MSG_SkinDirNotFound);
+ gtkMessageBox(MSGBOX_ERROR, _(MSGTR_GUI_MSG_SkinDirNotFound));
}
break;
Modified: trunk/gui/dialog/equalizer.c
==============================================================================
--- trunk/gui/dialog/equalizer.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/dialog/equalizer.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -106,7 +106,7 @@ static void eqSetChannelNames( void )
gchar * str[2];
gtk_clist_clear( GTK_CLIST( ChannelsList ) );
str[1]="";
- str[0]=MSGTR_GUI_ChannelAll;
+ str[0]=_(MSGTR_GUI_ChannelAll);
gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
if ( guiInfo.AudioChannels > 1 )
{
@@ -260,7 +260,7 @@ static GtkWidget * CreateEqualizer( void
Equalizer=gtk_window_new( GTK_WINDOW_TOPLEVEL );
gtk_widget_set_usize( Equalizer,-1,256 );
- gtk_window_set_title( GTK_WINDOW( Equalizer ),MSGTR_GUI_Equalizer );
+ gtk_window_set_title( GTK_WINDOW( Equalizer ),_(MSGTR_GUI_Equalizer) );
gtk_window_set_position( GTK_WINDOW( Equalizer ),GTK_WIN_POS_CENTER );
gtk_window_set_policy( GTK_WINDOW( Equalizer ),FALSE,FALSE,TRUE );
gtk_window_set_wmclass( GTK_WINDOW( Equalizer ),"Equalizer",MPlayer );
@@ -336,66 +336,66 @@ static GtkWidget * CreateEqualizer( void
gtk_table_attach( GTK_TABLE( table1 ),A16000,9,10,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabel( MSGTR_GUI_Frequency0,NULL ),
+ gtkAddLabel( _(MSGTR_GUI_Frequency0),NULL ),
0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabel( MSGTR_GUI_Frequency1,NULL ),
+ gtkAddLabel( _(MSGTR_GUI_Frequency1),NULL ),
1,2,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabel( MSGTR_GUI_Frequency2,NULL ),
+ gtkAddLabel( _(MSGTR_GUI_Frequency2),NULL ),
2,3,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabel( MSGTR_GUI_Frequency3,NULL ),
+ gtkAddLabel( _(MSGTR_GUI_Frequency3),NULL ),
3,4,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabel( MSGTR_GUI_Frequency4,NULL ),
+ gtkAddLabel( _(MSGTR_GUI_Frequency4),NULL ),
4,5,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabel( MSGTR_GUI_Frequency5,NULL ),
+ gtkAddLabel( _(MSGTR_GUI_Frequency5),NULL ),
5,6,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabel( MSGTR_GUI_Frequency6,NULL ),
+ gtkAddLabel( _(MSGTR_GUI_Frequency6),NULL ),
6,7,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabel( MSGTR_GUI_Frequency7,NULL ),
+ gtkAddLabel( _(MSGTR_GUI_Frequency7),NULL ),
7,8,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabel( MSGTR_GUI_Frequency8,NULL ),
+ gtkAddLabel( _(MSGTR_GUI_Frequency8),NULL ),
8,9,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabel( MSGTR_GUI_Frequency9,NULL ),
+ gtkAddLabel( _(MSGTR_GUI_Frequency9),NULL ),
9,10,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
gtk_notebook_set_tab_label( GTK_NOTEBOOK( Notebook ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( Notebook ),0 ),
- gtkAddLabel( MSGTR_GUI_Audio,NULL ) );
+ gtkAddLabel( _(MSGTR_GUI_Audio),NULL ) );
table1=gtk_table_new( 4,2,FALSE );
gtk_widget_show( table1 );
gtk_container_add( GTK_CONTAINER( Notebook ),table1 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabelColon( MSGTR_GUI_Contrast,NULL ),
+ gtkAddLabelColon( _(MSGTR_GUI_Contrast),NULL ),
0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabelColon( MSGTR_GUI_Brightness,NULL ),
+ gtkAddLabelColon( _(MSGTR_GUI_Brightness),NULL ),
0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabelColon( MSGTR_GUI_Hue,NULL ),
+ gtkAddLabelColon( _(MSGTR_GUI_Hue),NULL ),
0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabelColon( MSGTR_GUI_Saturation,NULL ),
+ gtkAddLabelColon( _(MSGTR_GUI_Saturation),NULL ),
0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
VContrastadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-100,100,1,0,0 ) );
@@ -419,7 +419,7 @@ static GtkWidget * CreateEqualizer( void
gtk_widget_set_usize( VSaturation,-1,45 );
gtk_notebook_set_tab_label( GTK_NOTEBOOK( Notebook ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( Notebook ),1 ),
- gtkAddLabel( MSGTR_GUI_Video,NULL ) );
+ gtkAddLabel( _(MSGTR_GUI_Video),NULL ) );
gtkAddHSeparator( vbox1 );
@@ -427,9 +427,9 @@ static GtkWidget * CreateEqualizer( void
gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox1 ),GTK_BUTTONBOX_END );
gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 );
- Config=gtkAddButton( MSGTR_GUI_Configure,hbuttonbox1 );
- Clear=gtkAddButton( MSGTR_GUI_Clear,hbuttonbox1 );
- Ok=gtkAddButton( MSGTR_GUI_Ok,hbuttonbox1 );
+ Config=gtkAddButton( _(MSGTR_GUI_Configure),hbuttonbox1 );
+ Clear=gtkAddButton( _(MSGTR_GUI_Clear),hbuttonbox1 );
+ Ok=gtkAddButton( _(MSGTR_GUI_Ok),hbuttonbox1 );
gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
@@ -471,12 +471,12 @@ void ShowEqualizer( void )
if ( Equalizer ) gtkRaise( Equalizer );
else Equalizer=CreateEqualizer();
- if ( !gtkEquChannel1 ) gtkEquChannel1=strdup( MSGTR_GUI_FrontRight );
- if ( !gtkEquChannel2 ) gtkEquChannel2=strdup( MSGTR_GUI_FrontLeft );
- if ( !gtkEquChannel3 ) gtkEquChannel3=strdup( MSGTR_GUI_RearRight );
- if ( !gtkEquChannel4 ) gtkEquChannel4=strdup( MSGTR_GUI_RearLeft );
- if ( !gtkEquChannel5 ) gtkEquChannel5=strdup( MSGTR_GUI_Center );
- if ( !gtkEquChannel6 ) gtkEquChannel6=strdup( MSGTR_GUI_Bass );
+ if ( !gtkEquChannel1 ) gtkEquChannel1=strdup( _(MSGTR_GUI_FrontRight) );
+ if ( !gtkEquChannel2 ) gtkEquChannel2=strdup( _(MSGTR_GUI_FrontLeft) );
+ if ( !gtkEquChannel3 ) gtkEquChannel3=strdup( _(MSGTR_GUI_RearRight) );
+ if ( !gtkEquChannel4 ) gtkEquChannel4=strdup( _(MSGTR_GUI_RearLeft) );
+ if ( !gtkEquChannel5 ) gtkEquChannel5=strdup( _(MSGTR_GUI_Center) );
+ if ( !gtkEquChannel6 ) gtkEquChannel6=strdup( _(MSGTR_GUI_Bass) );
eqSetChannelNames();
@@ -534,12 +534,12 @@ void ShowEquConfig( void )
if ( EquConfig ) gtkRaise( EquConfig );
else EquConfig=CreateEquConfig();
- Items=g_list_append( Items,(gpointer)MSGTR_GUI_FrontRight );
- Items=g_list_append( Items,(gpointer)MSGTR_GUI_FrontLeft );
- Items=g_list_append( Items,(gpointer)MSGTR_GUI_RearRight );
- Items=g_list_append( Items,(gpointer)MSGTR_GUI_RearLeft );
- Items=g_list_append( Items,(gpointer)MSGTR_GUI_Center );
- Items=g_list_append( Items,(gpointer)MSGTR_GUI_Bass );
+ Items=g_list_append( Items,(gpointer)_(MSGTR_GUI_FrontRight) );
+ Items=g_list_append( Items,(gpointer)_(MSGTR_GUI_FrontLeft) );
+ Items=g_list_append( Items,(gpointer)_(MSGTR_GUI_RearRight) );
+ Items=g_list_append( Items,(gpointer)_(MSGTR_GUI_RearLeft) );
+ Items=g_list_append( Items,(gpointer)_(MSGTR_GUI_Center) );
+ Items=g_list_append( Items,(gpointer)_(MSGTR_GUI_Bass) );
gtk_combo_set_popdown_strings( GTK_COMBO( CBChannel1 ),Items );
gtk_combo_set_popdown_strings( GTK_COMBO( CBChannel2 ),Items );
@@ -589,7 +589,7 @@ GtkWidget * CreateEquConfig( void )
EquConfig=gtk_window_new( GTK_WINDOW_TOPLEVEL );
gtk_widget_set_usize( EquConfig,350,260 );
- gtk_window_set_title( GTK_WINDOW( EquConfig ),MSGTR_GUI_EqualizerConfiguration );
+ gtk_window_set_title( GTK_WINDOW( EquConfig ),_(MSGTR_GUI_EqualizerConfiguration) );
gtk_window_set_position( GTK_WINDOW( EquConfig ),GTK_WIN_POS_CENTER );
// gtk_window_set_modal( GTK_WINDOW( EquConfig ),TRUE );
gtk_window_set_policy( GTK_WINDOW( EquConfig ),FALSE,FALSE,TRUE );
@@ -607,27 +607,27 @@ GtkWidget * CreateEquConfig( void )
gtk_table_set_col_spacings( GTK_TABLE( table1 ),4 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabelColon( MSGTR_GUI_Channel1,NULL ),
+ gtkAddLabelColon( _(MSGTR_GUI_Channel1),NULL ),
0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabelColon( MSGTR_GUI_Channel2,NULL ),
+ gtkAddLabelColon( _(MSGTR_GUI_Channel2),NULL ),
0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabelColon( MSGTR_GUI_Channel3,NULL ),
+ gtkAddLabelColon( _(MSGTR_GUI_Channel3),NULL ),
0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabelColon( MSGTR_GUI_Channel4,NULL ),
+ gtkAddLabelColon( _(MSGTR_GUI_Channel4),NULL ),
0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabelColon( MSGTR_GUI_Channel5,NULL ),
+ gtkAddLabelColon( _(MSGTR_GUI_Channel5),NULL ),
0,1,4,5,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
gtk_table_attach( GTK_TABLE( table1 ),
- gtkAddLabelColon( MSGTR_GUI_Channel6,NULL ),
+ gtkAddLabelColon( _(MSGTR_GUI_Channel6),NULL ),
0,1,5,6,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
CBChannel1=gtkAddCombo( NULL );
@@ -672,8 +672,8 @@ GtkWidget * CreateEquConfig( void )
gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox1 ),GTK_BUTTONBOX_END );
gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 );
- ecOk=gtkAddButton( MSGTR_GUI_Ok,hbuttonbox1 );
- ecCancel=gtkAddButton( MSGTR_GUI_Cancel,hbuttonbox1 );
+ ecOk=gtkAddButton( _(MSGTR_GUI_Ok),hbuttonbox1 );
+ ecCancel=gtkAddButton( _(MSGTR_GUI_Cancel),hbuttonbox1 );
gtk_widget_add_accelerator( ecOk,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
gtk_widget_add_accelerator( ecCancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
Modified: trunk/gui/dialog/fileselect.c
==============================================================================
--- trunk/gui/dialog/fileselect.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/dialog/fileselect.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -448,7 +448,7 @@ static void fs_fsFilterCombo_changed(Gtk
case FILESELECT_VIDEO_AUDIO:
for (i = 0; fsVideoAudioFilterNames[i][0]; i++)
- if (strcmp(str, fsVideoAudioFilterNames[i][0]) == 0) {
+ if (strcmp(str, _(fsVideoAudioFilterNames[i][0])) == 0) {
fsFilter = fsVideoAudioFilterNames[i][1];
fsLastVideoAudioFilterSelected = i;
break;
@@ -459,7 +459,7 @@ static void fs_fsFilterCombo_changed(Gtk
case FILESELECT_SUBTITLE:
for (i = 0; fsSubtitleFilterNames[i][0]; i++)
- if (strcmp(str, fsSubtitleFilterNames[i][0]) == 0) {
+ if (strcmp(str, _(fsSubtitleFilterNames[i][0])) == 0) {
fsFilter = fsSubtitleFilterNames[i][1];
fsLastSubtitleFilterSelected = i;
break;
@@ -470,7 +470,7 @@ static void fs_fsFilterCombo_changed(Gtk
case FILESELECT_AUDIO_TRACK:
for (i = 0; fsAudioFileNames[i][0]; i++)
- if (strcmp(str, fsAudioFileNames[i][0]) == 0) {
+ if (strcmp(str, _(fsAudioFileNames[i][0])) == 0) {
fsFilter = fsAudioFileNames[i][1];
fsLastAudioFilterSelected = i;
break;
@@ -481,7 +481,7 @@ static void fs_fsFilterCombo_changed(Gtk
case FILESELECT_FONT:
for (i = 0; fsFontFileNames[i][0]; i++)
- if (strcmp(str, fsFontFileNames[i][0]) == 0) {
+ if (strcmp(str, _(fsFontFileNames[i][0])) == 0) {
fsFilter = fsFontFileNames[i][1];
fsLastFontFilterSelected = i;
break;
@@ -492,7 +492,7 @@ static void fs_fsFilterCombo_changed(Gtk
case FILESELECT_IMAGE:
for (i = 0; fsImageFilterNames[i][0]; i++)
- if (strcmp(str, fsImageFilterNames[i][0]) == 0) {
+ if (strcmp(str, _(fsImageFilterNames[i][0])) == 0) {
fsFilter = fsImageFilterNames[i][1];
fsLastImageFilterSelected = i;
break;
@@ -875,12 +875,12 @@ void ShowFileSelector(int type)
for (i = 0; fsVideoAudioFilterNames[i][0]; i++)
if ((strcmp(fsVideoAudioFilterNames[i][0], MSGTR_GUI_FilterFilePlaylist) != 0) || allow_playlist_parsing)
- fsList_items = g_list_append(fsList_items, fsVideoAudioFilterNames[i][0]);
+ fsList_items = g_list_append(fsList_items, _(fsVideoAudioFilterNames[i][0]));
k = fsLastVideoAudioFilterSelected;
gtk_combo_set_popdown_strings(GTK_COMBO(List), fsList_items);
g_list_free(fsList_items);
- gtk_entry_set_text(GTK_ENTRY(fsFilterCombo), fsVideoAudioFilterNames[k >= 0 ? k : i - 4][0]);
+ gtk_entry_set_text(GTK_ENTRY(fsFilterCombo), _(fsVideoAudioFilterNames[k >= 0 ? k : i - 4][0]));
//tmp=guiInfo.Filename;
break;
@@ -889,12 +889,12 @@ void ShowFileSelector(int type)
fsList_items = NULL;
for (i = 0; fsSubtitleFilterNames[i][0]; i++)
- fsList_items = g_list_append(fsList_items, fsSubtitleFilterNames[i][0]);
+ fsList_items = g_list_append(fsList_items, _(fsSubtitleFilterNames[i][0]));
k = fsLastSubtitleFilterSelected;
gtk_combo_set_popdown_strings(GTK_COMBO(List), fsList_items);
g_list_free(fsList_items);
- gtk_entry_set_text(GTK_ENTRY(fsFilterCombo), fsSubtitleFilterNames[k >= 0 ? k : i - 2][0]);
+ gtk_entry_set_text(GTK_ENTRY(fsFilterCombo), _(fsSubtitleFilterNames[k >= 0 ? k : i - 2][0]));
tmp = guiInfo.SubtitleFilename;
break;
@@ -903,12 +903,12 @@ void ShowFileSelector(int type)
fsList_items = NULL;
for (i = 0; fsAudioFileNames[i][0]; i++)
- fsList_items = g_list_append(fsList_items, fsAudioFileNames[i][0]);
+ fsList_items = g_list_append(fsList_items, _(fsAudioFileNames[i][0]));
k = fsLastAudioFilterSelected;
gtk_combo_set_popdown_strings(GTK_COMBO(List), fsList_items);
g_list_free(fsList_items);
- gtk_entry_set_text(GTK_ENTRY(fsFilterCombo), fsAudioFileNames[k >= 0 ? k : i - 2][0]);
+ gtk_entry_set_text(GTK_ENTRY(fsFilterCombo), _(fsAudioFileNames[k >= 0 ? k : i - 2][0]));
tmp = guiInfo.AudioFilename;
break;
@@ -917,12 +917,12 @@ void ShowFileSelector(int type)
fsList_items = NULL;
for (i = 0; fsFontFileNames[i][0]; i++)
- fsList_items = g_list_append(fsList_items, fsFontFileNames[i][0]);
+ fsList_items = g_list_append(fsList_items, _(fsFontFileNames[i][0]));
k = fsLastFontFilterSelected;
gtk_combo_set_popdown_strings(GTK_COMBO(List), fsList_items);
g_list_free(fsList_items);
- gtk_entry_set_text(GTK_ENTRY(fsFilterCombo), fsFontFileNames[k >= 0 ? k : i - 2][0]);
+ gtk_entry_set_text(GTK_ENTRY(fsFilterCombo), _(fsFontFileNames[k >= 0 ? k : i - 2][0]));
tmp = font_name;
break;
@@ -931,12 +931,12 @@ void ShowFileSelector(int type)
fsList_items = NULL;
for (i = 0; fsImageFilterNames[i][0]; i++)
- fsList_items = g_list_append(fsList_items, fsImageFilterNames[i][0]);
+ fsList_items = g_list_append(fsList_items, _(fsImageFilterNames[i][0]));
k = fsLastImageFilterSelected;
gtk_combo_set_popdown_strings(GTK_COMBO(List), fsList_items);
g_list_free(fsList_items);
- gtk_entry_set_text(GTK_ENTRY(fsFilterCombo), fsImageFilterNames[k >= 0 ? k : 0][0]);
+ gtk_entry_set_text(GTK_ENTRY(fsFilterCombo), _(fsImageFilterNames[k >= 0 ? k : 0][0]));
tmp = guiInfo.ImageFilename;
break;
}
Modified: trunk/gui/dialog/menu.c
==============================================================================
--- trunk/gui/dialog/menu.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/dialog/menu.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -408,7 +408,7 @@ static const char * GetLanguage( void *l
}
for ( i=0;i<sizeof( Languages ) / sizeof( Languages_t );i++ )
if ( type == GET_LANG_INT ? Languages[i].id == l : av_strncasecmp(Languages[i].id2, p, sizeof(Languages[i].id2)) == 0 ) return Languages[i].name;
- return MSGTR_GUI_Unknown;
+ return _(MSGTR_GUI_Unknown);
}
#undef lng
@@ -443,66 +443,66 @@ GtkWidget * CreatePopUpMenu( int wType )
Menu=gtk_menu_new();
gtk_widget_realize (Menu);
- trkfmt = g_strconcat( MSGTR_GUI_TrackN, " - %s", NULL);
+ trkfmt = g_strconcat( _(MSGTR_GUI_TrackN), " - %s", NULL);
- AddMenuItem( Menu, about_png, MSGTR_GUI_AboutMPlayer, evAbout );
+ AddMenuItem( Menu, about_png, _(MSGTR_GUI_AboutMPlayer), evAbout );
AddSeparator( Menu );
- SubMenu=AddSubMenu( Menu, open_png, MSGTR_GUI_Open );
- AddMenuItemEllipsis( SubMenu, file_png, MSGTR_GUI_File, evLoadPlay );
+ SubMenu=AddSubMenu( Menu, open_png, _(MSGTR_GUI_Open) );
+ AddMenuItemEllipsis( SubMenu, file_png, _(MSGTR_GUI_File), evLoadPlay );
#ifdef CONFIG_CDDA
- AddMenuItem( SubMenu, cd_play_png, MSGTR_GUI_CD, evPlayCD );
- CDSubMenu=AddSubMenu( Menu, cd_png, MSGTR_GUI_CD );
- AddMenuItem( CDSubMenu, cd_play_png, MSGTR_GUI_Play, evPlayCD );
+ AddMenuItem( SubMenu, cd_play_png, _(MSGTR_GUI_CD), evPlayCD );
+ CDSubMenu=AddSubMenu( Menu, cd_png, _(MSGTR_GUI_CD) );
+ AddMenuItem( CDSubMenu, cd_play_png, _(MSGTR_GUI_Play), evPlayCD );
AddSeparator( CDSubMenu );
- CDTitleMenu=AddSubMenu( CDSubMenu, title_png, MSGTR_GUI_Titles );
+ CDTitleMenu=AddSubMenu( CDSubMenu, title_png, _(MSGTR_GUI_Titles) );
if ( guiInfo.Tracks && ( guiInfo.StreamType == STREAMTYPE_CDDA ) )
{
char tmp[32]; int i;
for ( i=1;i <= guiInfo.Tracks;i++ )
{
- snprintf( tmp,32,MSGTR_GUI_TitleNN,i );
+ snprintf( tmp,32,_(MSGTR_GUI_TitleNN),i );
AddMenuCheckItem( CDTitleMenu, NULL, tmp, guiInfo.Track == i, ( i << 16 ) + ivSetCDTrack );
}
}
else
{
- MenuItem=AddMenuItem( CDTitleMenu, NULL, MSGTR_GUI__none_, evNone );
+ MenuItem=AddMenuItem( CDTitleMenu, NULL, _(MSGTR_GUI__none_), evNone );
gtk_widget_set_sensitive( MenuItem,FALSE );
}
#endif
#ifdef CONFIG_VCD
- AddMenuItem( SubMenu, vcd_play_png, MSGTR_GUI_VCD, evPlayVCD );
- VCDSubMenu=AddSubMenu( Menu, vcd_png, MSGTR_GUI_VCD );
- AddMenuItem( VCDSubMenu, vcd_play_png, MSGTR_GUI_Play, evPlayVCD );
+ AddMenuItem( SubMenu, vcd_play_png, _(MSGTR_GUI_VCD), evPlayVCD );
+ VCDSubMenu=AddSubMenu( Menu, vcd_png, _(MSGTR_GUI_VCD) );
+ AddMenuItem( VCDSubMenu, vcd_play_png, _(MSGTR_GUI_Play), evPlayVCD );
AddSeparator( VCDSubMenu );
- VCDTitleMenu=AddSubMenu( VCDSubMenu, title_png, MSGTR_GUI_Titles );
+ VCDTitleMenu=AddSubMenu( VCDSubMenu, title_png, _(MSGTR_GUI_Titles) );
if ( guiInfo.Tracks && ( guiInfo.StreamType == STREAMTYPE_VCD ) )
{
char tmp[32]; int i;
for ( i=1;i < guiInfo.Tracks;i++ )
{
- snprintf( tmp,32,MSGTR_GUI_TitleNN,i );
+ snprintf( tmp,32,_(MSGTR_GUI_TitleNN),i );
AddMenuCheckItem( VCDTitleMenu, NULL, tmp, guiInfo.Track == i + 1, ( ( i + 1 ) << 16 ) + ivSetVCDTrack );
}
}
else
{
- MenuItem=AddMenuItem( VCDTitleMenu, NULL, MSGTR_GUI__none_, evNone );
+ MenuItem=AddMenuItem( VCDTitleMenu, NULL, _(MSGTR_GUI__none_), evNone );
gtk_widget_set_sensitive( MenuItem,FALSE );
}
#endif
#ifdef CONFIG_DVDREAD
- AddMenuItem( SubMenu, dvd_play_png, MSGTR_GUI_DVD, evPlayDVD );
- DVDSubMenu=AddSubMenu( Menu, dvd_png, MSGTR_GUI_DVD );
- AddMenuItem( DVDSubMenu, dvd_play_png, MSGTR_GUI_Play, evPlayDVD );
+ AddMenuItem( SubMenu, dvd_play_png, _(MSGTR_GUI_DVD), evPlayDVD );
+ DVDSubMenu=AddSubMenu( Menu, dvd_png, _(MSGTR_GUI_DVD) );
+ AddMenuItem( DVDSubMenu, dvd_play_png, _(MSGTR_GUI_Play), evPlayDVD );
AddSeparator( DVDSubMenu );
- DVDTitleMenu=AddSubMenu( DVDSubMenu, title_png, MSGTR_GUI_Titles );
+ DVDTitleMenu=AddSubMenu( DVDSubMenu, title_png, _(MSGTR_GUI_Titles) );
if ( guiInfo.Tracks && ( guiInfo.StreamType == STREAMTYPE_DVD ) )
{
char tmp[32]; int i;
for ( i=1 ; i<= guiInfo.Tracks;i++ )
{
- snprintf( tmp,32,MSGTR_GUI_TitleNN,i);
+ snprintf( tmp,32,_(MSGTR_GUI_TitleNN),i);
AddMenuCheckItem( DVDTitleMenu, NULL, tmp,
guiInfo.Track == i,
(i << 16) + ivSetDVDTitle );
@@ -510,51 +510,51 @@ GtkWidget * CreatePopUpMenu( int wType )
}
else
{
- MenuItem=AddMenuItem( DVDTitleMenu, NULL, MSGTR_GUI__none_, evNone );
+ MenuItem=AddMenuItem( DVDTitleMenu, NULL, _(MSGTR_GUI__none_), evNone );
gtk_widget_set_sensitive( MenuItem,FALSE );
}
- DVDChapterMenu=AddSubMenu( DVDSubMenu, chapter_png, MSGTR_GUI_Chapters );
+ DVDChapterMenu=AddSubMenu( DVDSubMenu, chapter_png, _(MSGTR_GUI_Chapters) );
if ( guiInfo.Chapters && ( guiInfo.StreamType == STREAMTYPE_DVD ) )
{
char tmp[32]; int i;
for ( i=1;i <= guiInfo.Chapters;i++ )
{
- snprintf( tmp,32,MSGTR_GUI_ChapterNN,i );
+ snprintf( tmp,32,_(MSGTR_GUI_ChapterNN),i );
AddMenuCheckItem( DVDChapterMenu, NULL, tmp, guiInfo.Chapter == i,
( i << 16 ) + ivSetDVDChapter );
}
}
else
{
- MenuItem=AddMenuItem( DVDChapterMenu, NULL, MSGTR_GUI__none_, evNone );
+ MenuItem=AddMenuItem( DVDChapterMenu, NULL, _(MSGTR_GUI__none_), evNone );
gtk_widget_set_sensitive( MenuItem,FALSE );
}
#endif
#if defined(CONFIG_LIBCDIO) || defined(CONFIG_DVDREAD)
- AddMenuItemEllipsis( SubMenu, image_png, MSGTR_GUI_Image, evPlayImage );
+ AddMenuItemEllipsis( SubMenu, image_png, _(MSGTR_GUI_Image), evPlayImage );
#endif
- AddMenuItemEllipsis( SubMenu, url_png, MSGTR_GUI_URL, evLoadURL );
+ AddMenuItemEllipsis( SubMenu, url_png, _(MSGTR_GUI_URL), evLoadURL );
#ifdef CONFIG_TV
- AddMenuItem( SubMenu, tv_png, MSGTR_GUI_TV, evPlayTV );
+ AddMenuItem( SubMenu, tv_png, _(MSGTR_GUI_TV), evPlayTV );
#endif
AddSeparator( SubMenu );
- D = AddMenuItemEllipsis( SubMenu, audio_track_load_png, MSGTR_GUI_AudioTrack, evLoadAudioFile );
+ D = AddMenuItemEllipsis( SubMenu, audio_track_load_png, _(MSGTR_GUI_AudioTrack), evLoadAudioFile );
gtk_widget_set_sensitive( D, !guiInfo.Playing );
- D = AddMenuItemEllipsis( SubMenu, subtitle_load_png, MSGTR_GUI_Subtitle, evLoadSubtitle );
+ D = AddMenuItemEllipsis( SubMenu, subtitle_load_png, _(MSGTR_GUI_Subtitle), evLoadSubtitle );
gtk_widget_set_sensitive( D, !guiInfo.Playing );
- SubMenu=AddSubMenu( Menu, play_png, MSGTR_GUI_Playback );
- D = AddMenuItem( SubMenu, play_png, MSGTR_GUI_Play, evPlay );
- F = AddMenuItem( SubMenu, play_pause_png, MSGTR_GUI_Pause, evPause );
- H = AddMenuItem( SubMenu, play_stop_png, MSGTR_GUI_Stop, evStop );
- N = AddMenuItem( SubMenu, play_next_png, MSGTR_GUI_Next, evNext );
- I = AddMenuItem( SubMenu, play_previous_png, MSGTR_GUI_Previous, evPrev );
+ SubMenu=AddSubMenu( Menu, play_png, _(MSGTR_GUI_Playback) );
+ D = AddMenuItem( SubMenu, play_png, _(MSGTR_GUI_Play), evPlay );
+ F = AddMenuItem( SubMenu, play_pause_png, _(MSGTR_GUI_Pause), evPause );
+ H = AddMenuItem( SubMenu, play_stop_png, _(MSGTR_GUI_Stop), evStop );
+ N = AddMenuItem( SubMenu, play_next_png, _(MSGTR_GUI_Next), evNext );
+ I = AddMenuItem( SubMenu, play_previous_png, _(MSGTR_GUI_Previous), evPrev );
AddSeparator( SubMenu );
- I2 = AddMenuItem( SubMenu, seek_forward_10sec_png, MSGTR_GUI_SeekForward10sec, evForward10sec );
- I3 = AddMenuItem( SubMenu, seek_forward_1min_png, MSGTR_GUI_SeekForward1min, evForward1min );
- I4 = AddMenuItem( SubMenu, seek_forward_10min_png, MSGTR_GUI_SeekForward10min, evForward10min );
- I5 = AddMenuItem( SubMenu, seek_backward_10sec_png, MSGTR_GUI_SeekBackward10sec, evBackward10sec );
- I6 = AddMenuItem( SubMenu, seek_backward_1min_png, MSGTR_GUI_SeekBackward1min, evBackward1min );
- I7 = AddMenuItem( SubMenu, seek_backward_10min_png, MSGTR_GUI_SeekBackward10min, evBackward10min );
+ I2 = AddMenuItem( SubMenu, seek_forward_10sec_png, _(MSGTR_GUI_SeekForward10sec), evForward10sec );
+ I3 = AddMenuItem( SubMenu, seek_forward_1min_png, _(MSGTR_GUI_SeekForward1min), evForward1min );
+ I4 = AddMenuItem( SubMenu, seek_forward_10min_png, _(MSGTR_GUI_SeekForward10min), evForward10min );
+ I5 = AddMenuItem( SubMenu, seek_backward_10sec_png, _(MSGTR_GUI_SeekBackward10sec), evBackward10sec );
+ I6 = AddMenuItem( SubMenu, seek_backward_1min_png, _(MSGTR_GUI_SeekBackward1min), evBackward1min );
+ I7 = AddMenuItem( SubMenu, seek_backward_10min_png, _(MSGTR_GUI_SeekBackward10min), evBackward10min );
if ( !guiInfo.Playing )
{
@@ -571,7 +571,7 @@ GtkWidget * CreatePopUpMenu( int wType )
gtk_widget_set_sensitive( I7, FALSE );
}
- AddMenuItem( Menu, playlist_png, MSGTR_GUI_Playlist, evPlaylist );
+ AddMenuItem( Menu, playlist_png, _(MSGTR_GUI_Playlist), evPlaylist );
if ( guiInfo.VideoWindow )
{
@@ -611,20 +611,20 @@ GtkWidget * CreatePopUpMenu( int wType )
if (a <= 0.075f)
{
- aspect = MSGTR_GUI_235To1;
+ aspect = _(MSGTR_GUI_235To1);
if (a <= 0.01f) ca = FALSE;
}
}
- snprintf(tmp, sizeof(tmp), "%s%s%s%s%s", MSGTR_GUI_Original, aspect ? " (" : "", aspect && ca ? "≈" : "", aspect ? aspect : "", aspect ? ")" : "");
+ snprintf(tmp, sizeof(tmp), "%s%s%s%s%s", _(MSGTR_GUI_Original), aspect ? " (" : "", aspect && ca ? "≈" : "", aspect ? aspect : "", aspect ? ")" : "");
AddSeparator( Menu );
- AspectMenu=AddSubMenu( Menu, aspect_png, MSGTR_GUI_AspectRatio );
+ AspectMenu=AddSubMenu( Menu, aspect_png, _(MSGTR_GUI_AspectRatio) );
H=AddMenuCheckItem( AspectMenu, aspect_original_png, tmp, a11, evSetAspect + ( 1 << 16 ) );
D=AddMenuCheckItem( AspectMenu, aspect_4_3_png, "4:3", a43, evSetAspect + ( 3 << 16 ) );
N=AddMenuCheckItem( AspectMenu, aspect_16_9_png, "16:9", a169, evSetAspect + ( 2 << 16 ) );
- F=AddMenuCheckItem( AspectMenu, aspect_2_35_1_png, MSGTR_GUI_235To1, a235, evSetAspect + ( 4 << 16 ) );
+ F=AddMenuCheckItem( AspectMenu, aspect_2_35_1_png, _(MSGTR_GUI_235To1), a235, evSetAspect + ( 4 << 16 ) );
if ( !guiInfo.Playing )
{
@@ -637,11 +637,11 @@ GtkWidget * CreatePopUpMenu( int wType )
if ( guiInfo.VideoWindow )
{
- RotationMenu=AddSubMenu( Menu, rotate_png, MSGTR_GUI_Rotation );
- N=AddMenuCheckItem( RotationMenu, rotate_0_png, MSGTR_GUI__none_, guiInfo.Rotation == -1, evSetRotation );
- D=AddMenuCheckItem( RotationMenu, rotate_90cw_png, MSGTR_GUI_Rotation90CW, guiInfo.Rotation == 1, evSetRotation + ( 90 << 16 ) );
- F=AddMenuCheckItem( RotationMenu, rotate_90ccw_png, MSGTR_GUI_Rotation90CCW, guiInfo.Rotation == 2, evSetRotation + ( -90 << 16 ) );
- H=AddMenuCheckItem( RotationMenu, rotate_180_png, MSGTR_GUI_Rotation180, guiInfo.Rotation == 8, evSetRotation + ( 180 << 16 ) );
+ RotationMenu=AddSubMenu( Menu, rotate_png, _(MSGTR_GUI_Rotation) );
+ N=AddMenuCheckItem( RotationMenu, rotate_0_png, _(MSGTR_GUI__none_), guiInfo.Rotation == -1, evSetRotation );
+ D=AddMenuCheckItem( RotationMenu, rotate_90cw_png, _(MSGTR_GUI_Rotation90CW), guiInfo.Rotation == 1, evSetRotation + ( 90 << 16 ) );
+ F=AddMenuCheckItem( RotationMenu, rotate_90ccw_png, _(MSGTR_GUI_Rotation90CCW), guiInfo.Rotation == 2, evSetRotation + ( -90 << 16 ) );
+ H=AddMenuCheckItem( RotationMenu, rotate_180_png, _(MSGTR_GUI_Rotation180), guiInfo.Rotation == 8, evSetRotation + ( 180 << 16 ) );
if ( !guiInfo.Playing )
{
@@ -664,10 +664,10 @@ GtkWidget * CreatePopUpMenu( int wType )
( guiApp.videoWindow.Height == guiInfo.VideoHeight / 2 ) ) b_half=True;
else b1=( guiApp.videoWindow.Width == guiInfo.VideoWidth && guiApp.videoWindow.Height == guiInfo.VideoHeight );
} else b1=!guiApp.videoWindow.isFullScreen;
- F=AddMenuCheckItem( Menu, size_full_png, MSGTR_GUI_SizeFullscreen, guiApp.videoWindow.isFullScreen, evFullScreen + ( True << 16 ) );
- D=AddMenuCheckItem( Menu, size_double_png, MSGTR_GUI_SizeDouble, b2, evDoubleSize );
- N=AddMenuCheckItem( Menu, size_normal_png, MSGTR_GUI_SizeNormal, b1, evNormalSize );
- H=AddMenuCheckItem( Menu, size_half_png, MSGTR_GUI_SizeHalf, b_half, evHalfSize );
+ F=AddMenuCheckItem( Menu, size_full_png, _(MSGTR_GUI_SizeFullscreen), guiApp.videoWindow.isFullScreen, evFullScreen + ( True << 16 ) );
+ D=AddMenuCheckItem( Menu, size_double_png, _(MSGTR_GUI_SizeDouble), b2, evDoubleSize );
+ N=AddMenuCheckItem( Menu, size_normal_png, _(MSGTR_GUI_SizeNormal), b1, evNormalSize );
+ H=AddMenuCheckItem( Menu, size_half_png, _(MSGTR_GUI_SizeHalf), b_half, evHalfSize );
if ( !guiInfo.Playing )
{
gtk_widget_set_sensitive( H,FALSE );
@@ -686,23 +686,23 @@ GtkWidget * CreatePopUpMenu( int wType )
if ( c > 1 )
{
- SubMenu=AddSubMenu( Menu, video_track_png, MSGTR_GUI_VideoTracks );
+ SubMenu=AddSubMenu( Menu, video_track_png, _(MSGTR_GUI_VideoTracks) );
for ( i=0;i < MAX_V_STREAMS;i++ )
if ( demuxer->v_streams[i] )
{
int vid = ((sh_video_t *)demuxer->v_streams[i])->vid;
char tmp[32];
int selected_id = (video_id == vid || (video_id == -1 && vid == demuxer_default_video_track(demuxer)));
- snprintf( tmp,32,MSGTR_GUI_TrackN,vid );
+ snprintf( tmp,32,_(MSGTR_GUI_TrackN),vid );
AddMenuCheckItem( SubMenu, NULL, tmp, selected_id, ( vid << 16 ) + ivSetVideo );
}
}
}
AddSeparator( Menu );
- VolumeMenu = AddSubMenu( Menu, volume_png, MSGTR_GUI_Volume );
- H = AddMenuItem( VolumeMenu, volume_increase_png, MSGTR_GUI_Increase, evIncVolume );
- D = AddMenuItem( VolumeMenu, volume_decrease_png, MSGTR_GUI_Decrease, evDecVolume );
+ VolumeMenu = AddSubMenu( Menu, volume_png, _(MSGTR_GUI_Volume) );
+ H = AddMenuItem( VolumeMenu, volume_increase_png, _(MSGTR_GUI_Increase), evIncVolume );
+ D = AddMenuItem( VolumeMenu, volume_decrease_png, _(MSGTR_GUI_Decrease), evDecVolume );
if ( !guiInfo.AudioChannels )
{
@@ -710,7 +710,7 @@ GtkWidget * CreatePopUpMenu( int wType )
gtk_widget_set_sensitive( D, FALSE );
}
- MenuItem=AddMenuCheckItem( Menu, volume_mute_png, MSGTR_GUI_Mute, mixer->muted, evMute );
+ MenuItem=AddMenuCheckItem( Menu, volume_mute_png, _(MSGTR_GUI_Mute), mixer->muted, evMute );
if ( !guiInfo.AudioChannels ) gtk_widget_set_sensitive( MenuItem,FALSE );
if ( guiInfo.Playing && demuxer && guiInfo.StreamType != STREAMTYPE_DVD )
@@ -722,7 +722,7 @@ GtkWidget * CreatePopUpMenu( int wType )
if ( c > 1 )
{
- SubMenu=AddSubMenu( Menu, audio_track_png, MSGTR_GUI_AudioTracks );
+ SubMenu=AddSubMenu( Menu, audio_track_png, _(MSGTR_GUI_AudioTracks) );
for ( i=0;i < MAX_A_STREAMS;i++ )
if ( demuxer->a_streams[i] )
{
@@ -730,7 +730,7 @@ GtkWidget * CreatePopUpMenu( int wType )
int selected_id = (audio_id == aid || (audio_id == -1 && aid == demuxer_default_audio_track(demuxer)));
char lng[32], tmp[64];
if ( demuxer_audio_lang( demuxer, i, lng, sizeof(lng) ) == 0 ) snprintf( tmp,sizeof(tmp),trkfmt,aid,GetLanguage( lng, GET_LANG_CHR ) );
- else snprintf( tmp,sizeof(tmp),MSGTR_GUI_TrackN,aid );
+ else snprintf( tmp,sizeof(tmp),_(MSGTR_GUI_TrackN),aid );
AddMenuCheckItem( SubMenu, NULL, tmp, selected_id, ( aid << 16 ) + ivSetAudio );
}
}
@@ -743,7 +743,7 @@ GtkWidget * CreatePopUpMenu( int wType )
if (guiInfo.AudioStreams > 1)
{
- DVDAudioLanguageMenu=AddSubMenu( Menu, audio_track_png, MSGTR_GUI_AudioTracks );
+ DVDAudioLanguageMenu=AddSubMenu( Menu, audio_track_png, _(MSGTR_GUI_AudioTracks) );
for ( i=0;i < guiInfo.AudioStreams;i++ )
{
@@ -761,8 +761,8 @@ GtkWidget * CreatePopUpMenu( int wType )
{
char tmp[64]; int i;
- DVDSubtitleLanguageMenu=AddSubMenu( Menu, subtitle_track_png, MSGTR_GUI_Subtitles );
- AddMenuCheckItem( DVDSubtitleLanguageMenu, NULL, MSGTR_GUI__none_, guiInfo.mpcontext->d_sub->id == -2, ( -2 << 16 ) + ivSetDVDSubtitle );
+ DVDSubtitleLanguageMenu=AddSubMenu( Menu, subtitle_track_png, _(MSGTR_GUI_Subtitles) );
+ AddMenuCheckItem( DVDSubtitleLanguageMenu, NULL, _(MSGTR_GUI__none_), guiInfo.mpcontext->d_sub->id == -2, ( -2 << 16 ) + ivSetDVDSubtitle );
for ( i=0;i < guiInfo.Subtitles;i++ )
{
@@ -788,8 +788,8 @@ GtkWidget * CreatePopUpMenu( int wType )
if ( subs && guiInfo.StreamType != STREAMTYPE_DVD )
{
int i, j, subs0 = guiInfo.mpcontext->sub_counts[SUB_SOURCE_SUBS], subs1 = guiInfo.mpcontext->sub_counts[SUB_SOURCE_VOBSUB];
- SubMenu=AddSubMenu( Menu, subtitle_track_png, MSGTR_GUI_Subtitles );
- AddMenuCheckItem( SubMenu, NULL, MSGTR_GUI__none_, sub_pos == -1, (-1 << 16) + ivSetSubtitle );
+ SubMenu=AddSubMenu( Menu, subtitle_track_png, _(MSGTR_GUI_Subtitles) );
+ AddMenuCheckItem( SubMenu, NULL, _(MSGTR_GUI__none_), sub_pos == -1, (-1 << 16) + ivSetSubtitle );
for ( i=0;i < subs;i++ )
{
int ret = -1;
@@ -832,21 +832,21 @@ GtkWidget * CreatePopUpMenu( int wType )
}
}
if ( ret == 0 ) snprintf( tmp, sizeof(tmp), trkfmt, i, GetLanguage( lng, GET_LANG_CHR ) );
- else snprintf( tmp, sizeof(tmp), MSGTR_GUI_TrackN, i );
+ else snprintf( tmp, sizeof(tmp), _(MSGTR_GUI_TrackN), i );
AddMenuCheckItem( SubMenu, NULL, tmp, sub_pos == i, ( i << 16 ) + ivSetSubtitle );
}
}
- if ( subdata ) AddMenuItem( Menu, subtitle_drop_png, MSGTR_GUI_DropSubtitle, evDropSubtitle );
+ if ( subdata ) AddMenuItem( Menu, subtitle_drop_png, _(MSGTR_GUI_DropSubtitle), evDropSubtitle );
AddSeparator( Menu );
- AddMenuItem( Menu, equalizer_png, MSGTR_GUI_Equalizer, evEqualizer );
- AddMenuItem( Menu, skin_png, MSGTR_GUI_SkinBrowser, evSkinBrowser );
- AddMenuItem( Menu, preferences_png, MSGTR_GUI_Preferences, evPreferences );
+ AddMenuItem( Menu, equalizer_png, _(MSGTR_GUI_Equalizer), evEqualizer );
+ AddMenuItem( Menu, skin_png, _(MSGTR_GUI_SkinBrowser), evSkinBrowser );
+ AddMenuItem( Menu, preferences_png, _(MSGTR_GUI_Preferences), evPreferences );
AddSeparator( Menu );
- if ( wType == wMain || wType == wVideo ) AddMenuItem( Menu, minimize_png, MSGTR_GUI_Minimize, (wType << 16) + evIconify );
- AddMenuItem( Menu, exit_png, MSGTR_GUI_Quit, evExit );
+ if ( wType == wMain || wType == wVideo ) AddMenuItem( Menu, minimize_png, _(MSGTR_GUI_Minimize), (wType << 16) + evIconify );
+ AddMenuItem( Menu, exit_png, _(MSGTR_GUI_Quit), evExit );
g_free( trkfmt );
Modified: trunk/gui/dialog/msgbox.c
==============================================================================
--- trunk/gui/dialog/msgbox.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/dialog/msgbox.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -96,7 +96,7 @@ static GtkWidget * CreateMessageBox( voi
gtkAddHSeparator( vbox1 );
hbuttonbox1=gtkAddHButtonBox( vbox1 );
- Ok=gtkAddButton( MSGTR_GUI_Ok,hbuttonbox1 );
+ Ok=gtkAddButton( _(MSGTR_GUI_Ok),hbuttonbox1 );
gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
Modified: trunk/gui/dialog/playlist.c
==============================================================================
--- trunk/gui/dialog/playlist.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/dialog/playlist.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -459,7 +459,7 @@ static GtkWidget * CreatePlaylist( void
Playlist=gtk_window_new( GTK_WINDOW_TOPLEVEL );
gtk_widget_set_usize(Playlist, 640, 480);
- gtk_window_set_title( GTK_WINDOW( Playlist ),MSGTR_GUI_Playlist );
+ gtk_window_set_title( GTK_WINDOW( Playlist ),_(MSGTR_GUI_Playlist) );
gtk_window_set_position( GTK_WINDOW( Playlist ),GTK_WIN_POS_CENTER );
gtk_window_set_wmclass( GTK_WINDOW( Playlist ),"Playlist",MPlayer );
@@ -504,7 +504,7 @@ static GtkWidget * CreatePlaylist( void
else if ( fsHistory[0] ) old_path = strdup( cfg_old_filename_from_utf8( fsHistory[0] ) );
gtk_clist_set_column_widget( GTK_CLIST( CTDirTree ),0,
- gtkAddLabel( MSGTR_GUI_DirectoryTree,NULL ) );
+ gtkAddLabel( _(MSGTR_GUI_DirectoryTree),NULL ) );
gtk_clist_column_title_passive( GTK_CLIST( CTDirTree ),0 );
@@ -526,7 +526,7 @@ static GtkWidget * CreatePlaylist( void
gtk_clist_set_shadow_type( GTK_CLIST( CLFiles ),GTK_SHADOW_NONE );
gtk_clist_set_column_widget( GTK_CLIST( CLFiles ),0,
- gtkAddLabel( MSGTR_GUI_Files,NULL ) );
+ gtkAddLabel( _(MSGTR_GUI_Files),NULL ) );
gtk_clist_column_title_passive( GTK_CLIST( CLFiles ),0 );
@@ -547,10 +547,10 @@ static GtkWidget * CreatePlaylist( void
gtk_clist_set_shadow_type( GTK_CLIST( CLSelected ),GTK_SHADOW_NONE );
gtk_clist_set_column_widget( GTK_CLIST( CLSelected ),0,
- gtkAddLabel( MSGTR_GUI_SelectedFiles,NULL ) );
+ gtkAddLabel( _(MSGTR_GUI_SelectedFiles),NULL ) );
gtk_clist_set_column_widget( GTK_CLIST( CLSelected ),1,
- gtkAddLabel( MSGTR_GUI_Directory,NULL ) );
+ gtkAddLabel( _(MSGTR_GUI_Directory),NULL ) );
gtk_clist_column_title_passive( GTK_CLIST( CLSelected ),0 );
@@ -560,10 +560,10 @@ static GtkWidget * CreatePlaylist( void
gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox1 ),GTK_BUTTONBOX_END );
gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 );
- Add=gtkAddButton( MSGTR_GUI_Add,hbuttonbox1 );
- Remove=gtkAddButton( MSGTR_GUI_Remove,hbuttonbox1 );
- Ok=gtkAddButton( MSGTR_GUI_Ok,hbuttonbox1 );
- Cancel=gtkAddButton( MSGTR_GUI_Cancel,hbuttonbox1 );
+ Add=gtkAddButton( _(MSGTR_GUI_Add),hbuttonbox1 );
+ Remove=gtkAddButton( _(MSGTR_GUI_Remove),hbuttonbox1 );
+ Ok=gtkAddButton( _(MSGTR_GUI_Ok),hbuttonbox1 );
+ Cancel=gtkAddButton( _(MSGTR_GUI_Cancel),hbuttonbox1 );
gtk_widget_add_accelerator( Cancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
Modified: trunk/gui/dialog/preferences.c
==============================================================================
--- trunk/gui/dialog/preferences.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/dialog/preferences.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -238,7 +238,7 @@ static void prEntry( GtkEditable * edita
case 0: // font encoding
comment=gtk_entry_get_text( GTK_ENTRY( EFontEncoding ) );
for ( i=0;lEncoding[i].name;i++ )
- if ( !gstrcmp( lEncoding[i].comment,comment ) ) break;
+ if ( !gstrcmp( _(lEncoding[i].comment),comment ) ) break;
if ( lEncoding[i].comment ) mplayer( MPLAYER_SET_FONT_ENCODING,0,lEncoding[i].name );
else mplayer( MPLAYER_SET_FONT_ENCODING,0,(char *)comment );
break;
@@ -247,11 +247,11 @@ static void prEntry( GtkEditable * edita
case 1: // sub encoding
comment=gtk_entry_get_text( GTK_ENTRY( ESubEncoding ) );
for ( i=0;lEncoding[i].name;i++ )
- if ( !gstrcmp( lEncoding[i].comment,comment ) ) break;
+ if ( !gstrcmp( _(lEncoding[i].comment),comment ) ) break;
if ( lEncoding[i].comment ) mplayer( MPLAYER_SET_SUB_ENCODING,0,lEncoding[i].name );
else
{
- if ( strcmp( comment,MSGTR_GUI__Default_ ) == 0 ) comment=NULL;
+ if ( strcmp( comment,_(MSGTR_GUI__Default_) ) == 0 ) comment=NULL;
mplayer( MPLAYER_SET_SUB_ENCODING,0,(char *)comment );
}
if ( !comment) gtk_widget_set_sensitive( CBSubEncoding,(!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(CBSubUtf8)) && !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(CBSubUnicode))) );
@@ -397,7 +397,7 @@ static void prButton( GtkButton * button
if ( guiInfo.Playing && inform )
{
- gtkMessageBox( MSGBOX_INFORMATION,MSGTR_GUI_MSG_PlaybackNeedsRestart );
+ gtkMessageBox( MSGBOX_INFORMATION,_(MSGTR_GUI_MSG_PlaybackNeedsRestart) );
inform = False;
}
@@ -629,7 +629,7 @@ static GtkWidget * CreatePreferences( vo
accel_group=gtk_accel_group_new();
Preferences=gtk_window_new( GTK_WINDOW_TOPLEVEL );
- gtk_window_set_title( GTK_WINDOW( Preferences ),MSGTR_GUI_Preferences );
+ gtk_window_set_title( GTK_WINDOW( Preferences ),_(MSGTR_GUI_Preferences) );
gtk_window_set_position( GTK_WINDOW( Preferences ),GTK_WIN_POS_CENTER );
gtk_window_set_wmclass( GTK_WINDOW( Preferences ),"Preferences",MPlayer );
@@ -663,9 +663,9 @@ static GtkWidget * CreatePreferences( vo
gtk_clist_set_shadow_type( GTK_CLIST( CLADrivers ),GTK_SHADOW_NONE );
gtk_widget_set_usize( CLADrivers,250,-2 );
gtk_clist_set_column_widget( GTK_CLIST( CLADrivers ),0,
- gtkAddLabel( MSGTR_GUI_AvailableDrivers,NULL ) );
+ gtkAddLabel( _(MSGTR_GUI_AvailableDrivers),NULL ) );
- AConfig=gtkAddButton( MSGTR_GUI_ConfigureDriver,
+ AConfig=gtkAddButton( _(MSGTR_GUI_ConfigureDriver),
gtkAddHButtonBox( vbox2 ) );
vbox3=gtkAddVBox(
@@ -674,39 +674,39 @@ static GtkWidget * CreatePreferences( vo
gtk_widget_set_usize( vbox3,250,-2 );
hbox10 = gtkAddHBox(vbox3, 1);
- CBReplayGain = gtkAddCheckButton(MSGTR_GUI_ReplayGain, hbox10);
+ CBReplayGain = gtkAddCheckButton(_(MSGTR_GUI_ReplayGain), hbox10);
RGbox = gtkAddHBox(hbox10, 1);
- gtkAddLabel(MSGTR_GUI_ReplayGainAdjustment, RGbox);
+ gtkAddLabel(_(MSGTR_GUI_ReplayGainAdjustment), RGbox);
RGadj = gtk_adjustment_new(gtkReplayGainAdjustment, -30, 10, 1, 5, 0);
RGspin = gtk_spin_button_new(GTK_ADJUSTMENT(RGadj), 1, 0);
gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(RGspin), TRUE);
gtk_box_pack_start(GTK_BOX(RGbox), GTK_WIDGET(RGspin), FALSE, FALSE, 0);
- gtkAddLabel(MSGTR_GUI_dB, RGbox);
+ gtkAddLabel(_(MSGTR_GUI_dB), RGbox);
gtk_widget_set_sensitive(RGbox, gtkReplayGainOn);
gtk_widget_show(RGspin);
- CBNormalize=gtkAddCheckButton( MSGTR_GUI_NormalizeSound,vbox3 );
- CBAudioEqualizer=gtkAddCheckButton( MSGTR_GUI_EnableEqualizer,vbox3 );
- CBSoftwareMixer=gtkAddCheckButton( MSGTR_GUI_EnableSoftwareMixer,vbox3 );
+ CBNormalize=gtkAddCheckButton( _(MSGTR_GUI_NormalizeSound),vbox3 );
+ CBAudioEqualizer=gtkAddCheckButton( _(MSGTR_GUI_EnableEqualizer),vbox3 );
+ CBSoftwareMixer=gtkAddCheckButton( _(MSGTR_GUI_EnableSoftwareMixer),vbox3 );
#if 0
CBSurround=gtkAddCheckButton( "Enable surround",vbox3 );
#endif
gtkAddHSeparator( vbox3 );
- CBExtraStereo=gtkAddCheckButton( MSGTR_GUI_EnableExtraStereo,vbox3 );
+ CBExtraStereo=gtkAddCheckButton( _(MSGTR_GUI_EnableExtraStereo),vbox3 );
hbox8=gtkAddHBox( vbox3,1 );
- /*label=*/gtkAddLabelColon( MSGTR_GUI_Coefficient,hbox8 );
+ /*label=*/gtkAddLabelColon( _(MSGTR_GUI_Coefficient),hbox8 );
// gtk_misc_set_padding( GTK_MISC( label ),20,0 );
HSExtraStereoMuladj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-10,10,0.1,0,0 ) );
HSExtraStereoMul=gtkAddHScale( HSExtraStereoMuladj,hbox8,1 );
gtkAddHSeparator( vbox3 );
hbox8=gtkAddHBox( vbox3,1 );
- gtkAddLabelColon( MSGTR_GUI_AudioDelay,hbox8 );
+ gtkAddLabelColon( _(MSGTR_GUI_AudioDelay),hbox8 );
HSAudioDelayadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-100,100,0.1,0,0 ) );
HSAudioDelay=gtkAddHScale( HSAudioDelayadj,hbox8,1 );
- label=gtkAddLabel( MSGTR_GUI_Audio,NULL );
+ label=gtkAddLabel( _(MSGTR_GUI_Audio),NULL );
gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),0 ),label );
/* 2nd page */
@@ -730,31 +730,31 @@ static GtkWidget * CreatePreferences( vo
gtk_clist_set_shadow_type( GTK_CLIST( CLVDrivers ),GTK_SHADOW_NONE );
gtk_widget_set_usize( CLVDrivers,250,-2 );
- label=gtkAddLabel( MSGTR_GUI_AvailableDrivers,NULL );
+ label=gtkAddLabel( _(MSGTR_GUI_AvailableDrivers),NULL );
gtk_clist_set_column_widget( GTK_CLIST( CLVDrivers ),0,label );
hbuttonbox3=gtkAddHButtonBox( vbox4 );
- VConfig=gtkAddButton( MSGTR_GUI_ConfigureDriver,hbuttonbox3 );
+ VConfig=gtkAddButton( _(MSGTR_GUI_ConfigureDriver),hbuttonbox3 );
vbox5=gtkAddVBox(
gtkAddFrame( NULL,GTK_SHADOW_NONE,
gtkAddFrame( NULL,GTK_SHADOW_ETCHED_OUT,hbox2,0 ),1 ),0 );
gtk_widget_set_usize( vbox5,250,-2 );
- CBDoubleBuffer=gtkAddCheckButton( MSGTR_GUI_EnableDoubleBuffering,vbox5 );
- CBDR=gtkAddCheckButton( MSGTR_GUI_EnableDirectRendering,vbox5 );
- CBFramedrop=gtkAddCheckButton( MSGTR_GUI_EnableFrameDropping,vbox5 );
- CBHFramedrop=gtkAddCheckButton( MSGTR_GUI_EnableFrameDroppingIntense,vbox5 );
- CBFlip=gtkAddCheckButton( MSGTR_GUI_Flip,vbox5 );
+ CBDoubleBuffer=gtkAddCheckButton( _(MSGTR_GUI_EnableDoubleBuffering),vbox5 );
+ CBDR=gtkAddCheckButton( _(MSGTR_GUI_EnableDirectRendering),vbox5 );
+ CBFramedrop=gtkAddCheckButton( _(MSGTR_GUI_EnableFrameDropping),vbox5 );
+ CBHFramedrop=gtkAddCheckButton( _(MSGTR_GUI_EnableFrameDroppingIntense),vbox5 );
+ CBFlip=gtkAddCheckButton( _(MSGTR_GUI_Flip),vbox5 );
table1=gtk_table_new( 2,2,FALSE );
gtk_widget_show( table1 );
gtk_box_pack_start( GTK_BOX( vbox5 ),table1,FALSE,FALSE,0 );
- label=gtkAddLabelColon( MSGTR_GUI_PanAndScan,NULL );
+ label=gtkAddLabelColon( _(MSGTR_GUI_PanAndScan),NULL );
gtk_table_attach( GTK_TABLE( table1 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
- label=gtkAddLabelColon( MSGTR_GUI_FrameRate,NULL );
+ label=gtkAddLabelColon( _(MSGTR_GUI_FrameRate),NULL );
gtk_table_attach( GTK_TABLE( table1 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
HSPanscanadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,1,0.1,0,0 ) );
@@ -767,7 +767,7 @@ static GtkWidget * CreatePreferences( vo
gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( HSFPS ),TRUE );
gtk_table_attach( GTK_TABLE( table1 ),HSFPS,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
- label=gtkAddLabel( MSGTR_GUI_Video,NULL );
+ label=gtkAddLabel( _(MSGTR_GUI_Video),NULL );
gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),1 ),label );
/* 3rd page */
@@ -776,21 +776,21 @@ static GtkWidget * CreatePreferences( vo
vbox600=gtkAddVBox(
gtkAddFrame( NULL,GTK_SHADOW_NONE,
- gtkAddFrame( MSGTR_GUI_OsdLevel,GTK_SHADOW_ETCHED_OUT,vbox6,0 ),1 ),0 );
+ gtkAddFrame( _(MSGTR_GUI_OsdLevel),GTK_SHADOW_ETCHED_OUT,vbox6,0 ),1 ),0 );
- RBOSDNone=gtkAddRadioButton( MSGTR_GUI_OsdLevel0,&OSD_group,vbox600 );
- RBOSDIndicator=gtkAddRadioButton( MSGTR_GUI_OsdLevel1,&OSD_group,vbox600 );
- RBOSDTandP=gtkAddRadioButton( MSGTR_GUI_OsdLevel2,&OSD_group,vbox600 );
- RBOSDTPTT=gtkAddRadioButton( MSGTR_GUI_OsdLevel3,&OSD_group,vbox600 );
+ RBOSDNone=gtkAddRadioButton( _(MSGTR_GUI_OsdLevel0),&OSD_group,vbox600 );
+ RBOSDIndicator=gtkAddRadioButton( _(MSGTR_GUI_OsdLevel1),&OSD_group,vbox600 );
+ RBOSDTandP=gtkAddRadioButton( _(MSGTR_GUI_OsdLevel2),&OSD_group,vbox600 );
+ RBOSDTPTT=gtkAddRadioButton( _(MSGTR_GUI_OsdLevel3),&OSD_group,vbox600 );
vbox7=gtkAddVBox(
gtkAddFrame( NULL,GTK_SHADOW_NONE,
- gtkAddFrame( MSGTR_GUI_Subtitle,GTK_SHADOW_ETCHED_OUT,vbox6,0 ),1 ),0 );
+ gtkAddFrame( _(MSGTR_GUI_Subtitle),GTK_SHADOW_ETCHED_OUT,vbox6,0 ),1 ),0 );
#if 0
hbox4=gtkAddHBox( vbox7,1 );
- gtkAddLabelColon( MSGTR_GUI_Subtitle,hbox4 );
+ gtkAddLabelColon( _(MSGTR_GUI_Subtitle),hbox4 );
ESubtitleName=gtk_entry_new();
gtk_widget_show( ESubtitleName );
@@ -798,7 +798,7 @@ static GtkWidget * CreatePreferences( vo
hbuttonbox4=gtkAddHButtonBox( hbuttonbox4 );
gtk_container_set_border_width( GTK_CONTAINER( hbuttonbox4 ),3 );
- BLoadSubtitle=gtkAddButton( MSGTR_GUI_Browse,hbuttonbox4 );
+ BLoadSubtitle=gtkAddButton( _(MSGTR_GUI_Browse),hbuttonbox4 );
#endif
vbox8=gtkAddVBox( vbox7,0 );
@@ -807,16 +807,16 @@ static GtkWidget * CreatePreferences( vo
gtk_widget_show( table1 );
gtk_box_pack_start( GTK_BOX( vbox8 ),table1,FALSE,FALSE,0 );
- label=gtkAddLabelColon( MSGTR_GUI_Delay,NULL );
+ label=gtkAddLabelColon( _(MSGTR_GUI_Delay),NULL );
gtk_table_attach( GTK_TABLE( table1 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
- label=gtkAddLabelColon( MSGTR_GUI_Position,NULL );
+ label=gtkAddLabelColon( _(MSGTR_GUI_Position),NULL );
gtk_table_attach( GTK_TABLE( table1 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
- label=gtkAddLabelColon( MSGTR_GUI_FrameRate,NULL );
+ label=gtkAddLabelColon( _(MSGTR_GUI_FrameRate),NULL );
gtk_table_attach( GTK_TABLE( table1 ),label,0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
- label=gtkAddLabelColon( MSGTR_GUI_Encoding,NULL );
+ label=gtkAddLabelColon( _(MSGTR_GUI_Encoding),NULL );
gtk_table_attach( GTK_TABLE( table1 ),label,0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_FILL ),0,0 );
HSSubDelayadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-10.0,10,0.1,0,0 ) );
@@ -842,7 +842,7 @@ static GtkWidget * CreatePreferences( vo
CBSubEncoding=gtk_combo_new();
gtk_widget_show( CBSubEncoding );
gtk_box_pack_start( GTK_BOX( vbox10 ),CBSubEncoding,TRUE,FALSE,0 );
- CBSubEncoding_items=g_list_append( CBSubEncoding_items,MSGTR_GUI__Default_ );
+ CBSubEncoding_items=g_list_append( CBSubEncoding_items,_(MSGTR_GUI__Default_) );
{
int i, listed=(sub_cp == NULL);
@@ -853,7 +853,7 @@ static GtkWidget * CreatePreferences( vo
if (cd != (iconv_t) -1)
{
iconv_close(cd);
- CBSubEncoding_items=g_list_append( CBSubEncoding_items,lEncoding[i].comment );
+ CBSubEncoding_items=g_list_append( CBSubEncoding_items,_(lEncoding[i].comment) );
if ( !listed )
if ( av_strcasecmp ( lEncoding[i].name, sub_cp ) == 0 ) listed=True;
@@ -875,31 +875,31 @@ static GtkWidget * CreatePreferences( vo
vbox9=gtkAddVBox( vbox8,0 );
- CBSubOverlap=gtkAddCheckButton( MSGTR_GUI_SubtitleAllowOverlap,vbox9 );
- CBNoAutoSub=gtkAddCheckButton( MSGTR_GUI_SubtitleAutomaticLoad,vbox9 );
- CBSubUtf8=gtkAddCheckButton( MSGTR_GUI_CpUTF8,hbox3 );
- CBSubUnicode=gtkAddCheckButton( MSGTR_GUI_CpUnicode,hbox3 );
- CBDumpMPSub=gtkAddCheckButton( MSGTR_GUI_SubtitleConvertMpsub,vbox9 );
- CBDumpSrt=gtkAddCheckButton( MSGTR_GUI_SubtitleConvertSrt,vbox9 );
+ CBSubOverlap=gtkAddCheckButton( _(MSGTR_GUI_SubtitleAllowOverlap),vbox9 );
+ CBNoAutoSub=gtkAddCheckButton( _(MSGTR_GUI_SubtitleAutomaticLoad),vbox9 );
+ CBSubUtf8=gtkAddCheckButton( _(MSGTR_GUI_CpUTF8),hbox3 );
+ CBSubUnicode=gtkAddCheckButton( _(MSGTR_GUI_CpUnicode),hbox3 );
+ CBDumpMPSub=gtkAddCheckButton( _(MSGTR_GUI_SubtitleConvertMpsub),vbox9 );
+ CBDumpSrt=gtkAddCheckButton( _(MSGTR_GUI_SubtitleConvertSrt),vbox9 );
gtkAddHSeparator( vbox9 );
- CBUseASS=gtkAddCheckButton( MSGTR_GUI_EnableAssSubtitle,vbox9 );
+ CBUseASS=gtkAddCheckButton( _(MSGTR_GUI_EnableAssSubtitle),vbox9 );
hbox9=gtkAddHBox( vbox9,0 );
- CBASSUseMargins=gtkAddCheckButton( MSGTR_GUI_SubtitleAddMargins,hbox9 );
+ CBASSUseMargins=gtkAddCheckButton( _(MSGTR_GUI_SubtitleAddMargins),hbox9 );
hbox91=gtk_hbox_new( FALSE,0 );
gtk_box_pack_start( GTK_BOX( hbox9 ),hbox91,TRUE,FALSE,0 );
gtk_widget_show( hbox91 );
- SBASSTopMargin=gtkAddSpinButtonColon( MSGTR_GUI_Top,
+ SBASSTopMargin=gtkAddSpinButtonColon( _(MSGTR_GUI_Top),
(GtkAdjustment *)gtk_adjustment_new(0,0,2000,1,8,0),hbox91 );
hbox92=gtk_hbox_new( FALSE,0 );
gtk_box_pack_start( GTK_BOX( hbox9 ),hbox92,TRUE,FALSE,0 );
gtk_widget_show( hbox92 );
- SBASSBottomMargin=gtkAddSpinButtonColon( MSGTR_GUI_Bottom,
+ SBASSBottomMargin=gtkAddSpinButtonColon( _(MSGTR_GUI_Bottom),
(GtkAdjustment *)gtk_adjustment_new(0,0,2000,1,8,0),hbox92 );
- label=gtkAddLabel( MSGTR_GUI_OSD_Subtitles,NULL );
+ label=gtkAddLabel( _(MSGTR_GUI_OSD_Subtitles),NULL );
gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),2 ),label );
vbox601=gtkAddVBox( notebook1,0 );
@@ -910,32 +910,32 @@ static GtkWidget * CreatePreferences( vo
gtkAddFrame( NULL,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 );
hbox6=gtkAddHBox( vbox603,1 );
- gtkAddLabelColon( MSGTR_GUI_Font,hbox6 );
+ gtkAddLabelColon( _(MSGTR_GUI_Font),hbox6 );
prEFontName=gtk_entry_new();
gtk_widget_show( prEFontName );
gtk_box_pack_start( GTK_BOX( hbox6 ),prEFontName,TRUE,TRUE,0 );
hbuttonbox5=gtkAddHButtonBox( hbox6 );
gtk_container_set_border_width( GTK_CONTAINER( hbuttonbox5 ),3 );
- BLoadFont=gtkAddButton( MSGTR_GUI_Browse,hbuttonbox5 );
+ BLoadFont=gtkAddButton( _(MSGTR_GUI_Browse),hbuttonbox5 );
#ifdef CONFIG_FREETYPE
table1=gtk_table_new( 6,2,FALSE );
gtk_widget_show( table1 );
gtk_box_pack_start( GTK_BOX( vbox603 ),table1,FALSE,FALSE,0 );
- label=gtkAddLabelColon( MSGTR_GUI_ScaleMode,NULL );
+ label=gtkAddLabelColon( _(MSGTR_GUI_ScaleMode),NULL );
gtk_misc_set_alignment( GTK_MISC( label ),0,0 );
gtk_table_attach( GTK_TABLE( table1 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_FILL ),0,0 );
vbox11=gtkAddVBox( NULL,0 );
gtk_table_attach( GTK_TABLE( table1 ),vbox11,1,2,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
- RBFontNoAutoScale=gtkAddRadioButton( MSGTR_GUI_ScaleNo,&Font_group,vbox11 );
- RBFontAutoScaleHeight=gtkAddRadioButton( MSGTR_GUI_ScaleMovieHeight,&Font_group,vbox11 );
- RBFontAutoScaleWidth=gtkAddRadioButton( MSGTR_GUI_ScaleMovieWidth,&Font_group,vbox11 );
- RBFontAutoScaleDiagonal=gtkAddRadioButton( MSGTR_GUI_ScaleMovieDiagonal,&Font_group,vbox11 );
+ RBFontNoAutoScale=gtkAddRadioButton( _(MSGTR_GUI_ScaleNo),&Font_group,vbox11 );
+ RBFontAutoScaleHeight=gtkAddRadioButton( _(MSGTR_GUI_ScaleMovieHeight),&Font_group,vbox11 );
+ RBFontAutoScaleWidth=gtkAddRadioButton( _(MSGTR_GUI_ScaleMovieWidth),&Font_group,vbox11 );
+ RBFontAutoScaleDiagonal=gtkAddRadioButton( _(MSGTR_GUI_ScaleMovieDiagonal),&Font_group,vbox11 );
- label=gtkAddLabelColon( MSGTR_GUI_Encoding,NULL );
+ label=gtkAddLabelColon( _(MSGTR_GUI_Encoding),NULL );
gtk_table_attach( GTK_TABLE( table1 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
CBFontEncoding=gtk_combo_new();
@@ -957,7 +957,7 @@ static GtkWidget * CreatePreferences( vo
#endif
if ( append )
{
- CBFontEncoding_items=g_list_append( CBFontEncoding_items,lEncoding[i].comment );
+ CBFontEncoding_items=g_list_append( CBFontEncoding_items,_(lEncoding[i].comment) );
if ( !listed )
if ( av_strcasecmp ( lEncoding[i].name, subtitle_font_encoding ) == 0 ) listed=True;
@@ -972,28 +972,28 @@ static GtkWidget * CreatePreferences( vo
gtk_entry_set_editable( GTK_ENTRY( EFontEncoding ),FALSE );
gtk_widget_show( EFontEncoding );
- label=gtkAddLabelColon( MSGTR_GUI_Blur,NULL );
+ label=gtkAddLabelColon( _(MSGTR_GUI_Blur),NULL );
gtk_table_attach( GTK_TABLE( table1 ),label,0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
HSFontBluradj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.1,0,0 ) );
HSFontBlur=gtkAddHScale( HSFontBluradj,NULL,1 );
gtk_table_attach( GTK_TABLE( table1 ),HSFontBlur,1,2,2,3,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
- label=gtkAddLabelColon( MSGTR_GUI_Outline,NULL );
+ label=gtkAddLabelColon( _(MSGTR_GUI_Outline),NULL );
gtk_table_attach( GTK_TABLE( table1 ),label,0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
HSFontOutLineadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.1,0,0 ) );
HSFontOutLine=gtkAddHScale( HSFontOutLineadj,NULL,1 );
gtk_table_attach( GTK_TABLE( table1 ),HSFontOutLine,1,2,3,4,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
- label=gtkAddLabelColon( MSGTR_GUI_SizeSubtitles,NULL );
+ label=gtkAddLabelColon( _(MSGTR_GUI_SizeSubtitles),NULL );
gtk_table_attach( GTK_TABLE( table1 ),label,0,1,4,5,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
HSFontTextScaleadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.1,0,0 ) );
HSFontTextScale=gtkAddHScale( HSFontTextScaleadj,NULL,1 );
gtk_table_attach( GTK_TABLE( table1 ),HSFontTextScale,1,2,4,5,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
- label=gtkAddLabelColon( MSGTR_GUI_SizeOSD,NULL );
+ label=gtkAddLabelColon( _(MSGTR_GUI_SizeOSD),NULL );
gtk_table_attach( GTK_TABLE( table1 ),label,0,1,5,6,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
HSFontOSDScaleadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.1,0,0 ) );
@@ -1001,12 +1001,12 @@ static GtkWidget * CreatePreferences( vo
gtk_table_attach( GTK_TABLE( table1 ),HSFontOSDScale,1,2,5,6,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
#else
hbox7=gtkAddHBox( vbox603,1 );
- gtkAddLabelColon( MSGTR_GUI_Outline,hbox7 );
+ gtkAddLabelColon( _(MSGTR_GUI_Outline),hbox7 );
HSFontFactoradj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,10,0.05,0,0 ) );
HSFontFactor=gtkAddHScale( HSFontFactoradj,hbox7,2 );
#endif
- label=gtkAddLabel( MSGTR_GUI_Font,NULL );
+ label=gtkAddLabel( _(MSGTR_GUI_Font),NULL );
gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),3 ),label );
/* 5th page */
@@ -1015,18 +1015,18 @@ static GtkWidget * CreatePreferences( vo
vbox602=gtkAddVBox(
gtkAddFrame( NULL,GTK_SHADOW_NONE,
- gtkAddFrame( MSGTR_GUI_Demuxer,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 );
+ gtkAddFrame( _(MSGTR_GUI_Demuxer),GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 );
- CBNonInterlaved=gtkAddCheckButton( MSGTR_GUI_NonInterleavedParser,vbox602 );
- CBIndex=gtkAddCheckButton( MSGTR_GUI_SeekingInBrokenMedia,vbox602 );
+ CBNonInterlaved=gtkAddCheckButton( _(MSGTR_GUI_NonInterleavedParser),vbox602 );
+ CBIndex=gtkAddCheckButton( _(MSGTR_GUI_SeekingInBrokenMedia),vbox602 );
vbox604=gtkAddVBox(
gtkAddFrame( NULL,GTK_SHADOW_NONE,
- gtkAddFrame( MSGTR_GUI_Codecs,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 );
+ gtkAddFrame( _(MSGTR_GUI_Codecs),GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 );
hbox5=gtkAddHBox( vbox604,1 );
- gtkAddLabelColon( MSGTR_GUI_CodecFamilyVideo,hbox5 );
+ gtkAddLabelColon( _(MSGTR_GUI_CodecFamilyVideo),hbox5 );
CBVFM=gtk_combo_new();
gtk_widget_show( CBVFM );
@@ -1038,7 +1038,7 @@ static GtkWidget * CreatePreferences( vo
hbox5=gtkAddHBox( vbox604,1 );
- gtkAddLabelColon( MSGTR_GUI_CodecFamilyAudio,hbox5 );
+ gtkAddLabelColon( _(MSGTR_GUI_CodecFamilyAudio),hbox5 );
CBAFM=gtk_combo_new();
gtk_widget_show( CBAFM );
@@ -1048,7 +1048,7 @@ static GtkWidget * CreatePreferences( vo
gtk_entry_set_editable( GTK_ENTRY( EAFM ),FALSE );
gtk_widget_show( EAFM );
- label=gtkAddLabel( MSGTR_GUI_Demuxers_Codecs,NULL );
+ label=gtkAddLabel( _(MSGTR_GUI_Demuxers_Codecs),NULL );
gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),4 ),label );
vbox601=gtkAddVBox( notebook1,0 );
@@ -1057,13 +1057,13 @@ static GtkWidget * CreatePreferences( vo
vbox602=gtkAddVBox(
gtkAddFrame( NULL,GTK_SHADOW_NONE,
- gtkAddFrame( MSGTR_GUI_PostProcessing,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 );
+ gtkAddFrame( _(MSGTR_GUI_PostProcessing),GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 );
- CBPostprocess=gtkAddCheckButton( MSGTR_GUI_EnablePostProcessing,vbox602 );
+ CBPostprocess=gtkAddCheckButton( _(MSGTR_GUI_EnablePostProcessing),vbox602 );
hbox5=gtkAddHBox( vbox602,1 );
- gtkAddLabelColon( MSGTR_GUI_MaximumUsageSpareCPU,hbox5 );
+ gtkAddLabelColon( _(MSGTR_GUI_MaximumUsageSpareCPU),hbox5 );
if ( guiInfo.sh_video && guiInfo.Playing ) HSPPQualityadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,get_video_quality_max( guiInfo.sh_video ),1,0,0 ) );
else HSPPQualityadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,1,0,0 ) );
@@ -1071,13 +1071,13 @@ static GtkWidget * CreatePreferences( vo
vbox602=gtkAddVBox(
gtkAddFrame( NULL,GTK_SHADOW_NONE,
- gtkAddFrame( MSGTR_GUI_Cache,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 );
+ gtkAddFrame( _(MSGTR_GUI_Cache),GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 );
- CBCache=gtkAddCheckButton( MSGTR_GUI_EnableCache,vbox602 );
+ CBCache=gtkAddCheckButton( _(MSGTR_GUI_EnableCache),vbox602 );
hbox5=gtkAddHBox( vbox602,1 );
- gtkAddLabelColon( MSGTR_GUI_CacheSize,hbox5 );
+ gtkAddLabelColon( _(MSGTR_GUI_CacheSize),hbox5 );
SBCacheadj=GTK_ADJUSTMENT( gtk_adjustment_new( gtkCacheSize,32,0x7fffffff,1,32,0 ) );
SBCache=gtk_spin_button_new( GTK_ADJUSTMENT( SBCacheadj ),1,0 );
@@ -1086,22 +1086,22 @@ static GtkWidget * CreatePreferences( vo
vbox602=gtkAddVBox(
gtkAddFrame( NULL,GTK_SHADOW_NONE,
- gtkAddFrame( MSGTR_GUI_Miscellaneous,GTK_SHADOW_ETCHED_OUT,vbox601,1 ),1 ),0 );
+ gtkAddFrame( _(MSGTR_GUI_Miscellaneous),GTK_SHADOW_ETCHED_OUT,vbox601,1 ),1 ),0 );
- CBShowVideoWindow=gtkAddCheckButton( MSGTR_GUI_HideVideoWindow,vbox602 );
- CBLoadFullscreen=gtkAddCheckButton( MSGTR_GUI_StartFullscreen,vbox602 );
- CBSaveWinPos=gtkAddCheckButton( MSGTR_GUI_SaveWindowPositions,vbox602 );
- CBStopXScreenSaver=gtkAddCheckButton( MSGTR_GUI_TurnOffXScreenSaver,vbox602 );
- CBPlayBar=gtkAddCheckButton( MSGTR_GUI_EnablePlaybar,vbox602 );
- CBTVDigital=gtkAddCheckButton( MSGTR_GUI_EnableDigitalTV,vbox602 );
- CBPlaylists = gtkAddCheckButton(MSGTR_GUI_PlaylistSupport, vbox602);
- CBNoIdle=gtkAddCheckButton( MSGTR_GUI_QuitAfterPlaying,vbox602 );
+ CBShowVideoWindow=gtkAddCheckButton( _(MSGTR_GUI_HideVideoWindow),vbox602 );
+ CBLoadFullscreen=gtkAddCheckButton( _(MSGTR_GUI_StartFullscreen),vbox602 );
+ CBSaveWinPos=gtkAddCheckButton( _(MSGTR_GUI_SaveWindowPositions),vbox602 );
+ CBStopXScreenSaver=gtkAddCheckButton( _(MSGTR_GUI_TurnOffXScreenSaver),vbox602 );
+ CBPlayBar=gtkAddCheckButton( _(MSGTR_GUI_EnablePlaybar),vbox602 );
+ CBTVDigital=gtkAddCheckButton( _(MSGTR_GUI_EnableDigitalTV),vbox602 );
+ CBPlaylists = gtkAddCheckButton(_(MSGTR_GUI_PlaylistSupport), vbox602);
+ CBNoIdle=gtkAddCheckButton( _(MSGTR_GUI_QuitAfterPlaying),vbox602 );
gtkAddHSeparator( vbox602 );
- CBAutoSync=gtkAddCheckButton( MSGTR_GUI_EnableAutomaticAVSync,vbox602 );
+ CBAutoSync=gtkAddCheckButton( _(MSGTR_GUI_EnableAutomaticAVSync),vbox602 );
hbox5=gtkAddHBox( vbox602,1 );
- gtkAddLabelColon( MSGTR_GUI_SyncValue,hbox5 );
+ gtkAddLabelColon( _(MSGTR_GUI_SyncValue),hbox5 );
SBAutoSyncadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,10000,1,10,0 ) );
SBAutoSync=gtk_spin_button_new( GTK_ADJUSTMENT( SBAutoSyncadj ),1,0 );
gtk_widget_show( SBAutoSync );
@@ -1113,13 +1113,13 @@ static GtkWidget * CreatePreferences( vo
gtk_widget_show( table1 );
gtk_box_pack_start( GTK_BOX( vbox602 ),table1,FALSE,FALSE,0 );
- label=gtkAddLabelColon( MSGTR_GUI_DeviceDVD,NULL );
+ label=gtkAddLabelColon( _(MSGTR_GUI_DeviceDVD),NULL );
gtk_table_attach( GTK_TABLE( table1 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
prEDVDDevice=gtk_entry_new();
gtk_widget_show( prEDVDDevice );
gtk_table_attach( GTK_TABLE( table1 ),prEDVDDevice,1,2,0,1,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
- label=gtkAddLabelColon( MSGTR_GUI_DeviceCDROM,NULL );
+ label=gtkAddLabelColon( _(MSGTR_GUI_DeviceCDROM),NULL );
gtk_table_attach( GTK_TABLE( table1 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
prECDRomDevice=gtk_entry_new();
gtk_widget_show( prECDRomDevice );
@@ -1127,7 +1127,7 @@ static GtkWidget * CreatePreferences( vo
// gtkAddHSeparator( vbox602 );
- label=gtkAddLabel( MSGTR_GUI_Miscellaneous,NULL );
+ label=gtkAddLabel( _(MSGTR_GUI_Miscellaneous),NULL );
gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),5 ),label );
/* --- */
@@ -1137,8 +1137,8 @@ static GtkWidget * CreatePreferences( vo
hbuttonbox1=gtkAddHButtonBox( vbox1 );
gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox1 ),GTK_BUTTONBOX_END );
gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 );
- BOk=gtkAddButton( MSGTR_GUI_Ok,hbuttonbox1 );
- BCancel=gtkAddButton( MSGTR_GUI_Cancel,hbuttonbox1 );
+ BOk=gtkAddButton( _(MSGTR_GUI_Ok),hbuttonbox1 );
+ BCancel=gtkAddButton( _(MSGTR_GUI_Cancel),hbuttonbox1 );
gtk_widget_add_accelerator( BOk,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
gtk_widget_add_accelerator( BCancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
@@ -1327,7 +1327,7 @@ void ShowPreferences( void )
int i;
for ( i=0;lEncoding[i].name;i++ )
if ( !av_strcasecmp( sub_cp,lEncoding[i].name ) ) break;
- if ( lEncoding[i].name ) gtk_entry_set_text( GTK_ENTRY( ESubEncoding ),lEncoding[i].comment );
+ if ( lEncoding[i].name ) gtk_entry_set_text( GTK_ENTRY( ESubEncoding ),_(lEncoding[i].comment) );
else gtk_entry_set_text( GTK_ENTRY( ESubEncoding ),sub_cp );
gtk_widget_set_sensitive( CBSubUtf8,FALSE );
gtk_widget_set_sensitive( CBSubUnicode,FALSE );
@@ -1348,7 +1348,7 @@ void ShowPreferences( void )
const char *s = (subtitle_font_encoding ? subtitle_font_encoding : ENC_UNICODE);
for ( i=0;lEncoding[i].name;i++ )
if ( !av_strcasecmp( s,lEncoding[i].name ) ) break;
- if ( lEncoding[i].name ) gtk_entry_set_text( GTK_ENTRY( EFontEncoding ),lEncoding[i].comment );
+ if ( lEncoding[i].name ) gtk_entry_set_text( GTK_ENTRY( EFontEncoding ),_(lEncoding[i].comment) );
else gtk_entry_set_text( GTK_ENTRY( EFontEncoding ),s );
}
switch ( subtitle_autoscale )
@@ -1370,7 +1370,7 @@ void ShowPreferences( void )
GList * Items = NULL;
const char * name = NULL;
- Items=g_list_append( Items,MSGTR_GUI__Default_ );
+ Items=g_list_append( Items,_(MSGTR_GUI__Default_) );
for( i=0;mpcodecs_vd_drivers[i];i++ )
{
Items=g_list_append( Items,(char *)mpcodecs_vd_drivers[i]->info->name );
@@ -1386,7 +1386,7 @@ void ShowPreferences( void )
GList * Items = NULL;
const char * name = NULL;
- Items=g_list_append( Items,MSGTR_GUI__Default_ );
+ Items=g_list_append( Items,_(MSGTR_GUI__Default_) );
for( i=0;mpcodecs_ad_drivers[i];i++ )
{
Items=g_list_append( Items,(char *)mpcodecs_ad_drivers[i]->info->name );
@@ -1593,22 +1593,22 @@ static GList *appendESDDevices(GList *l)
#if defined(CONFIG_OSS_AUDIO) || defined(CONFIG_ALSA) || defined(CONFIG_SDL) || defined (CONFIG_ESD)
// Gets text string from a gtk entry, interpreting
-// MSGTR_GUI_DefaultSetting as null string.
+// _(MSGTR_GUI_DefaultSetting) as null string.
static const char *getGtkEntryText(GtkWidget *from)
{
const char *tmp = gtk_entry_get_text(GTK_ENTRY(from));
- if (strcmp(tmp, MSGTR_GUI_DefaultSetting) == 0) {
+ if (strcmp(tmp, _(MSGTR_GUI_DefaultSetting)) == 0) {
tmp = NULL;
}
return tmp;
}
// Sets text string of a gtk entry, interpreting
-// null string as MSGTR_GUI_DefaultSetting.
+// null string as _(MSGTR_GUI_DefaultSetting).
static void setGtkEntryText(GtkWidget *dest, char *to)
{
if (!to) {
- to = MSGTR_GUI_DefaultSetting;
+ to = _(MSGTR_GUI_DefaultSetting);
}
gtk_entry_set_text(GTK_ENTRY(dest),to);
}
@@ -1676,7 +1676,7 @@ static GtkWidget *CreateAudioConfig( voi
GtkAccelGroup *accel_group;
AudioConfig = gtk_window_new(GTK_WINDOW_TOPLEVEL);
- gtk_window_set_title(GTK_WINDOW(AudioConfig), MSGTR_GUI_AudioDriverConfiguration);
+ gtk_window_set_title(GTK_WINDOW(AudioConfig), _(MSGTR_GUI_AudioDriverConfiguration));
gtk_window_set_position(GTK_WINDOW(AudioConfig), GTK_WIN_POS_CENTER);
gtk_window_set_policy(GTK_WINDOW(AudioConfig), FALSE, FALSE, TRUE);
gtk_window_set_wmclass(GTK_WINDOW(AudioConfig), "AudioConfig", MPlayer);
@@ -1690,12 +1690,12 @@ static GtkWidget *CreateAudioConfig( voi
gtk_widget_show(table);
gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0);
- label = gtkAddLabelColon(MSGTR_GUI_Device, NULL);
+ label = gtkAddLabelColon(_(MSGTR_GUI_Device), NULL);
gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0);
CBAudioDevice = gtkAddCombo(NULL);
gtk_table_attach(GTK_TABLE(table), CBAudioDevice, 1, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0);
- items = g_list_append(items,(gpointer)MSGTR_GUI_DefaultSetting);
+ items = g_list_append(items,(gpointer)_(MSGTR_GUI_DefaultSetting));
#ifdef CONFIG_OSS_AUDIO
if (strncmp(ao_driver[0], "oss", 3) == 0)
items = appendOSSDevices(items);
@@ -1719,12 +1719,12 @@ static GtkWidget *CreateAudioConfig( voi
CEAudioDevice = GTK_COMBO(CBAudioDevice)->entry;
gtk_widget_show(CEAudioDevice);
- label = gtkAddLabelColon(MSGTR_GUI_Mixer, NULL);
+ label = gtkAddLabelColon(_(MSGTR_GUI_Mixer), NULL);
gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0);
CBAudioMixer = gtkAddCombo(NULL);
gtk_table_attach(GTK_TABLE(table), CBAudioMixer, 1, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0);
- items = g_list_append(items, (gpointer)MSGTR_GUI_DefaultSetting);
+ items = g_list_append(items, (gpointer)_(MSGTR_GUI_DefaultSetting));
#ifdef CONFIG_OSS_AUDIO
if (strncmp(ao_driver[0], "oss", 3) == 0)
items = appendOSSMixers(items);
@@ -1740,12 +1740,12 @@ static GtkWidget *CreateAudioConfig( voi
CEAudioMixer = GTK_COMBO(CBAudioMixer)->entry;
gtk_widget_show(CEAudioMixer);
- label = gtkAddLabelColon(MSGTR_GUI_MixerChannel, NULL);
+ label = gtkAddLabelColon(_(MSGTR_GUI_MixerChannel), NULL);
gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0);
CBAudioMixerChannel = gtkAddCombo(NULL);
gtk_table_attach(GTK_TABLE(table), CBAudioMixerChannel, 1, 2, 2, 3, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0);
- items = g_list_append(items, (gpointer)MSGTR_GUI_DefaultSetting);
+ items = g_list_append(items, (gpointer)_(MSGTR_GUI_DefaultSetting));
#ifdef CONFIG_OSS_AUDIO
if (strncmp(ao_driver[0], "oss", 3) == 0)
items = appendOSSMixerChannels(items);
@@ -1766,8 +1766,8 @@ static GtkWidget *CreateAudioConfig( voi
hbuttonbox = gtkAddHButtonBox(vbox);
gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox), GTK_BUTTONBOX_END);
gtk_button_box_set_spacing(GTK_BUTTON_BOX(hbuttonbox), 10);
- BAudioOk = gtkAddButton(MSGTR_GUI_Ok, hbuttonbox);
- BAudioCancel = gtkAddButton(MSGTR_GUI_Cancel, hbuttonbox);
+ BAudioOk = gtkAddButton(_(MSGTR_GUI_Ok), hbuttonbox);
+ BAudioCancel = gtkAddButton(_(MSGTR_GUI_Cancel), hbuttonbox);
gtk_signal_connect(GTK_OBJECT(AudioConfig), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &AudioConfig);
gtk_signal_connect(GTK_OBJECT(BAudioOk), "clicked", GTK_SIGNAL_FUNC(audioButton), GINT_TO_POINTER(1));
@@ -1880,7 +1880,7 @@ GtkWidget * CreateDXR3Config( void )
vbox1=gtkAddVBox( gtkAddDialogFrame( DXR3Config ),0 );
vbox2=gtkAddVBox( vbox1,0 );
hbox1=gtkAddHBox( vbox2,1 );
- gtkAddLabelColon( MSGTR_GUI_Device,hbox1 );
+ gtkAddLabelColon( _(MSGTR_GUI_Device),hbox1 );
CBDevice=gtkAddCombo( hbox1 );
@@ -1898,17 +1898,17 @@ GtkWidget * CreateDXR3Config( void )
gtkAddHSeparator( vbox2 );
vbox3=gtkAddVBox( vbox2,0 );
- gtkAddLabelColon( MSGTR_GUI_VideoEncoder,vbox3 );
- RBVNone=gtkAddRadioButton( MSGTR_GUI_None,&VEncoder_group,vbox3 );
- RBVLavc=gtkAddRadioButton( MSGTR_GUI_Lavc,&VEncoder_group,vbox3 );
+ gtkAddLabelColon( _(MSGTR_GUI_VideoEncoder),vbox3 );
+ RBVNone=gtkAddRadioButton( _(MSGTR_GUI_None),&VEncoder_group,vbox3 );
+ RBVLavc=gtkAddRadioButton( _(MSGTR_GUI_Lavc),&VEncoder_group,vbox3 );
gtkAddHSeparator( vbox1 );
hbuttonbox1=gtkAddHButtonBox( vbox1 );
gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox1 ),GTK_BUTTONBOX_END );
gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 );
- dxr3BOk=gtkAddButton( MSGTR_GUI_Ok,hbuttonbox1 );
- dxr3BCancel=gtkAddButton( MSGTR_GUI_Cancel,hbuttonbox1 );
+ dxr3BOk=gtkAddButton( _(MSGTR_GUI_Ok),hbuttonbox1 );
+ dxr3BCancel=gtkAddButton( _(MSGTR_GUI_Cancel),hbuttonbox1 );
gtk_widget_add_accelerator( dxr3BOk,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
gtk_widget_add_accelerator( dxr3BCancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
Modified: trunk/gui/dialog/skinbrowser.c
==============================================================================
--- trunk/gui/dialog/skinbrowser.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/dialog/skinbrowser.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -100,7 +100,7 @@ void ShowSkinBrowser( void )
gtk_widget_set_usize( SkinBrowser,256,320 );
gtk_container_set_border_width( GTK_CONTAINER( SkinBrowser ),1 );
gtk_widget_set_events( SkinBrowser,GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK );
- gtk_window_set_title( GTK_WINDOW( SkinBrowser ),MSGTR_GUI_SkinBrowser );
+ gtk_window_set_title( GTK_WINDOW( SkinBrowser ),_(MSGTR_GUI_SkinBrowser) );
gtk_window_set_position( GTK_WINDOW( SkinBrowser ),GTK_WIN_POS_CENTER );
gtk_window_set_policy( GTK_WINDOW( SkinBrowser ),FALSE,FALSE,TRUE );
gtk_window_set_wmclass( GTK_WINDOW( SkinBrowser ),"SkinBrowser",MPlayer );
@@ -127,7 +127,7 @@ void ShowSkinBrowser( void )
gtk_clist_set_selection_mode( GTK_CLIST( SkinList ),GTK_SELECTION_SINGLE );
gtk_clist_column_titles_show( GTK_CLIST( SkinList ) );
gtk_clist_set_shadow_type( GTK_CLIST( SkinList ),GTK_SHADOW_ETCHED_OUT );
- gtk_clist_set_column_widget( GTK_CLIST( SkinList ),0, gtkAddLabel( MSGTR_GUI_AvailableSkins,NULL ) );
+ gtk_clist_set_column_widget( GTK_CLIST( SkinList ),0, gtkAddLabel( _(MSGTR_GUI_AvailableSkins),NULL ) );
gtkAddHSeparator( vbox5 );
@@ -135,8 +135,8 @@ void ShowSkinBrowser( void )
gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox4 ),GTK_BUTTONBOX_SPREAD );
gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox4 ),10 );
- Ok=gtkAddButton( MSGTR_GUI_Ok,hbuttonbox4 );
- Cancel=gtkAddButton( MSGTR_GUI_Cancel,hbuttonbox4 );
+ Ok=gtkAddButton( _(MSGTR_GUI_Ok),hbuttonbox4 );
+ Cancel=gtkAddButton( _(MSGTR_GUI_Cancel),hbuttonbox4 );
gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
gtk_widget_add_accelerator( Cancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
Modified: trunk/gui/dialog/tools.c
==============================================================================
--- trunk/gui/dialog/tools.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/dialog/tools.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -21,6 +21,7 @@
#include <string.h>
#include "tools.h"
+#include "gui/app/gui.h"
#include "help_mp.h"
@@ -37,7 +38,7 @@
*/
static gchar *scale_format_value (GtkScale *scale, gdouble value, gpointer user_data)
{
- gchar *val, *p, *dm = MSGTR_GUI_DecimalMark;
+ gchar *val, *p, *dm = _(MSGTR_GUI_DecimalMark);
(void) user_data;
Modified: trunk/gui/dialog/url.c
==============================================================================
--- trunk/gui/dialog/url.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/dialog/url.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -104,7 +104,7 @@ static GtkWidget *CreateURLDialog(void)
URLDialog = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_set_usize(URLDialog, 384, -1);
- gtk_window_set_title(GTK_WINDOW(URLDialog), MSGTR_GUI_NetworkStreaming);
+ gtk_window_set_title(GTK_WINDOW(URLDialog), _(MSGTR_GUI_NetworkStreaming));
gtk_window_set_position(GTK_WINDOW(URLDialog), GTK_WIN_POS_CENTER);
gtk_window_set_wmclass(GTK_WINDOW(URLDialog), "Network", MPlayer);
@@ -130,8 +130,8 @@ static GtkWidget *CreateURLDialog(void)
gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox1), GTK_BUTTONBOX_END);
gtk_button_box_set_spacing(GTK_BUTTON_BOX(hbuttonbox1), 10);
- Ok = gtkAddButton(MSGTR_GUI_Ok, hbuttonbox1);
- Cancel = gtkAddButton(MSGTR_GUI_Cancel, hbuttonbox1);
+ Ok = gtkAddButton(_(MSGTR_GUI_Ok), hbuttonbox1);
+ Cancel = gtkAddButton(_(MSGTR_GUI_Cancel), hbuttonbox1);
geometry.max_width = gdk_screen_get_width(gtk_widget_get_screen(URLDialog));
geometry.max_height = -1;
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/interface.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -138,7 +138,7 @@ static void add_vf(const char *vf, const
vf_settings[0].attribs = listDup(argvf);
}
- mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_GUI_MSG_AddingVideoFilter, vf);
+ mp_msg(MSGT_GPLAYER, MSGL_INFO, _(MSGTR_GUI_MSG_AddingVideoFilter), vf);
}
/**
@@ -182,7 +182,7 @@ static void remove_vf(char *vf)
if (strcmp(vf_settings[i].name, vf) == 0) {
int j;
- mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_GUI_MSG_RemovingVideoFilter, vf);
+ mp_msg(MSGT_GPLAYER, MSGL_INFO, _(MSGTR_GUI_MSG_RemovingVideoFilter), vf);
free(vf_settings[i].name);
listFree(&vf_settings[i].attribs);
@@ -226,6 +226,13 @@ void guiInit(void)
mp_msg(MSGT_GPLAYER, MSGL_V, "GUI init.\n");
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
+ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+ textdomain(GETTEXT_PACKAGE);
+#endif
+
/* check options */
if (!cdrom_device)
@@ -277,7 +284,7 @@ void guiInit(void)
ret = skinRead(skinName);
if (ret == -1 && strcmp(skinName, "default") != 0) {
- mp_msg(MSGT_GPLAYER, MSGL_WARN, MSGTR_GUI_MSG_SkinCfgSelectedNotFound, skinName);
+ mp_msg(MSGT_GPLAYER, MSGL_WARN, _(MSGTR_GUI_MSG_SkinCfgSelectedNotFound), skinName);
setdup(&skinName, "default");
ret = skinRead(skinName);
@@ -286,19 +293,19 @@ void guiInit(void)
switch (ret) {
case -1:
if (skin) {
- gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_GUI_MSG_SkinCfgNotFound, skinName);
+ gmp_msg(MSGT_GPLAYER, MSGL_FATAL, _(MSGTR_GUI_MSG_SkinCfgNotFound), skinName);
mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
} else {
if (skinRead("Noskin") != 0)
mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
- gtkMessageBox(MSGBOX_WARNING | MSGBOX_WAIT, MSGTR_GUI_MSG_NoSkinInstalled);
+ gtkMessageBox(MSGBOX_WARNING | MSGBOX_WAIT, _(MSGTR_GUI_MSG_NoSkinInstalled));
setdup(&skinName, "");
break;
}
case -2:
- gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_GUI_MSG_SkinCfgError, skinName);
+ gmp_msg(MSGT_GPLAYER, MSGL_FATAL, _(MSGTR_GUI_MSG_SkinCfgError), skinName);
mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
}
@@ -647,7 +654,7 @@ int gui(int what, void *data)
}
if (!video_driver_list && !video_driver_list[0]) {
- gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_GUI_MSG_VideoOutError);
+ gmp_msg(MSGT_GPLAYER, MSGL_FATAL, _(MSGTR_GUI_MSG_VideoOutError));
mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
}
@@ -908,7 +915,7 @@ int gui(int what, void *data)
btnSet(evSetMoviePosition, state);
if (video_driver_list && !gstrcmp(video_driver_list[0], "dxr3") && (((demuxer_t *)mpctx_get_demuxer(guiInfo.mpcontext))->file_format != DEMUXER_TYPE_MPEG_PS) && !gtkVfLAVC) {
- gtkMessageBox(MSGBOX_FATAL, MSGTR_GUI_MSG_DXR3NeedsLavc);
+ gtkMessageBox(MSGBOX_FATAL, _(MSGTR_GUI_MSG_DXR3NeedsLavc));
return False;
}
@@ -1297,7 +1304,7 @@ void mplayer(int what, float value, void
vo_font = read_font_desc(font_name, font_factor, 0);
if (!vo_font)
- gmp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_GUI_CantLoadFont, font_name);
+ gmp_msg(MSGT_GPLAYER, MSGL_ERR, _(MSGTR_GUI_CantLoadFont), font_name);
} else {
char *fname = get_path("font/font.desc");
@@ -1403,19 +1410,19 @@ void mplayer(int what, float value, void
void mplayerLoadSubtitle(const char *name)
{
if (subdata) {
- mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_GUI_MSG_RemovingSubtitle);
+ mp_msg(MSGT_GPLAYER, MSGL_INFO, _(MSGTR_GUI_MSG_RemovingSubtitle));
sub_free(subdata);
subdata = NULL;
}
if (name) {
- mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_GUI_MSG_LoadingSubtitle, name);
+ mp_msg(MSGT_GPLAYER, MSGL_INFO, _(MSGTR_GUI_MSG_LoadingSubtitle), name);
subdata = sub_read_file(name, guiInfo.sh_video ? guiInfo.sh_video->fps : 25);
if (!subdata) {
- gmp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_GUI_CantLoadSub, name);
+ gmp_msg(MSGT_GPLAYER, MSGL_ERR, _(MSGTR_GUI_CantLoadSub), name);
return;
}
}
Modified: trunk/gui/skin/skin.c
==============================================================================
--- trunk/gui/skin/skin.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/skin/skin.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -74,16 +74,16 @@ static void skin_legacy(const char *old,
p = strchr(data, ',');
if (p)
- mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_GUI_MSG_SkinLegacy, linenumber, p, "font = fontfile");
+ mp_msg(MSGT_GPLAYER, MSGL_INFO, _(MSGTR_GUI_MSG_SkinLegacy), linenumber, p, "font = fontfile");
} else if (strcmp(old, "$l") == 0) {
p = strstr(old, data);
if (p && (p == data || p[-1] != '$'))
- mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_GUI_MSG_SkinLegacy, linenumber, old, "$p");
+ mp_msg(MSGT_GPLAYER, MSGL_INFO, _(MSGTR_GUI_MSG_SkinLegacy), linenumber, old, "$p");
} else if (strcmp(old, "evSetURL") == 0 && strcmp(data, old) == 0)
- mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_GUI_MSG_SkinLegacy, linenumber, old, "evLoadURL");
+ mp_msg(MSGT_GPLAYER, MSGL_INFO, _(MSGTR_GUI_MSG_SkinLegacy), linenumber, old, "evLoadURL");
else if (strcmp(old, "sub") == 0 || strcmp(old, "potmeter") == 0)
- mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_GUI_MSG_SkinLegacy, linenumber, old, data);
+ mp_msg(MSGT_GPLAYER, MSGL_INFO, _(MSGTR_GUI_MSG_SkinLegacy), linenumber, old, data);
}
/**
@@ -101,7 +101,7 @@ static void skin_error(const char *forma
vsnprintf(p, sizeof(p), format, ap);
va_end(ap);
- gmp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_GUI_MSG_SkinErrorMessage, linenumber, p);
+ gmp_msg(MSGT_GPLAYER, MSGL_ERR, _(MSGTR_GUI_MSG_SkinErrorMessage), linenumber, p);
}
/**
@@ -114,7 +114,7 @@ static void skin_error(const char *forma
static int section_item(char *item)
{
if (!skin) {
- skin_error(MSGTR_GUI_MSG_SkinErrorSection, item);
+ skin_error(_(MSGTR_GUI_MSG_SkinErrorSection), item);
return False;
}
@@ -131,7 +131,7 @@ static int section_item(char *item)
static int window_item(char *item)
{
if (!currWinName[0]) {
- skin_error(MSGTR_GUI_MSG_SkinErrorWindow, item);
+ skin_error(_(MSGTR_GUI_MSG_SkinErrorWindow), item);
return False;
}
@@ -148,7 +148,7 @@ static int window_item(char *item)
static int in_window(char *name)
{
if (strcmp(currWinName, name) == 0) {
- skin_error(MSGTR_GUI_MSG_SkinErrorItem, name);
+ skin_error(_(MSGTR_GUI_MSG_SkinErrorItem), name);
return 1;
}
@@ -168,7 +168,7 @@ static guiItem *next_item(void)
(*currWinItemIdx)++;
item = &currWinItems[*currWinItemIdx];
} else
- skin_error(MSGTR_GUI_MSG_SkinTooManyItems);
+ skin_error(_(MSGTR_GUI_MSG_SkinTooManyItems));
return item;
}
@@ -185,14 +185,14 @@ static guiItem *next_item(void)
static int item_section(char *in)
{
if (skin) {
- skin_error(MSGTR_GUI_MSG_SkinErrorItem, currItem);
+ skin_error(_(MSGTR_GUI_MSG_SkinErrorItem), currItem);
return 1;
}
if (strcmp(strlower(in), "movieplayer") == 0)
skin = &guiApp;
else {
- skin_error(MSGTR_GUI_MSG_SkinUnknownName, in);
+ skin_error(_(MSGTR_GUI_MSG_SkinUnknownName), in);
return 1;
}
@@ -255,7 +255,7 @@ static int item_window(char *in)
return 1;
if (currWinName[0]) {
- skin_error(MSGTR_GUI_MSG_SkinErrorItem, currItem);
+ skin_error(_(MSGTR_GUI_MSG_SkinErrorItem), currItem);
return 1;
}
@@ -284,7 +284,7 @@ static int item_window(char *in)
currWinItemIdx = &skin->IndexOfMenuItems;
currWinItems = skin->menuItems;
} else {
- skin_error(MSGTR_GUI_MSG_SkinUnknownName, in);
+ skin_error(_(MSGTR_GUI_MSG_SkinUnknownName), in);
return 1;
}
@@ -365,7 +365,7 @@ static int item_base(char *in)
if (!is_video) {
if (!bpRenderMask(&currWin->Bitmap, &currWin->Mask)) {
- skin_error(MSGTR_GUI_MSG_SkinMemoryError);
+ skin_error(_(MSGTR_GUI_MSG_SkinMemoryError));
return 1;
}
mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] mask: %ux%u\n", currWin->Mask.Width, currWin->Mask.Height);
@@ -444,7 +444,7 @@ static int item_button(char *in)
message = appFindMessage(msg);
if (message == -1) {
- skin_error(MSGTR_GUI_MSG_SkinUnknownMessage, msg);
+ skin_error(_(MSGTR_GUI_MSG_SkinUnknownMessage), msg);
return 1;
}
// legacy
@@ -563,7 +563,7 @@ static int item_menu(char *in)
message = appFindMessage(msg);
if (message == -1) {
- skin_error(MSGTR_GUI_MSG_SkinUnknownMessage, msg);
+ skin_error(_(MSGTR_GUI_MSG_SkinUnknownMessage), msg);
return 1;
}
// legacy
@@ -642,7 +642,7 @@ static int parse_potmeter(guiItem *item,
message = appFindMessage(buf);
if (message == -1) {
- skin_error(MSGTR_GUI_MSG_SkinUnknownMessage, buf);
+ skin_error(_(MSGTR_GUI_MSG_SkinUnknownMessage), buf);
return 1;
}
// legacy
@@ -650,7 +650,7 @@ static int parse_potmeter(guiItem *item,
skin_legacy("evSetURL", buf);
if (d < 0 || d > 100) {
- skin_error(MSGTR_GUI_MSG_SkinErrorDefault, d);
+ skin_error(_(MSGTR_GUI_MSG_SkinErrorDefault), d);
return 1;
}
@@ -693,7 +693,7 @@ static int parse_potmeter(guiItem *item,
if (strcmp(phfname, "NULL") != 0) {
if (num == 0) {
- skin_error(MSGTR_GUI_MSG_SkinErrorNumphases);
+ skin_error(_(MSGTR_GUI_MSG_SkinErrorNumphases));
return 1;
}
@@ -849,7 +849,7 @@ static int item_pimage(char *in)
message = appFindMessage(buf);
if (message == -1) {
- skin_error(MSGTR_GUI_MSG_SkinUnknownMessage, buf);
+ skin_error(_(MSGTR_GUI_MSG_SkinUnknownMessage), buf);
return 1;
}
// legacy
@@ -857,7 +857,7 @@ static int item_pimage(char *in)
skin_legacy("evSetURL", buf);
if (d < 0 || d > 100) {
- skin_error(MSGTR_GUI_MSG_SkinErrorDefault, d);
+ skin_error(_(MSGTR_GUI_MSG_SkinErrorDefault), d);
return 1;
}
@@ -883,7 +883,7 @@ static int item_pimage(char *in)
if (strcmp(phfname, "NULL") != 0) {
if (num == 0) {
- skin_error(MSGTR_GUI_MSG_SkinErrorNumphases);
+ skin_error(_(MSGTR_GUI_MSG_SkinErrorNumphases));
return 1;
}
@@ -927,19 +927,19 @@ static int item_font(char *in)
switch (fntRead(path, fnt)) {
case -1:
- skin_error(MSGTR_GUI_MSG_SkinMemoryError);
+ skin_error(_(MSGTR_GUI_MSG_SkinMemoryError));
return 1;
case -2:
- skin_error(MSGTR_GUI_MSG_SkinTooManyFonts);
+ skin_error(_(MSGTR_GUI_MSG_SkinTooManyFonts));
return 1;
case -3:
- skin_error(MSGTR_GUI_MSG_SkinFontFileNotFound);
+ skin_error(_(MSGTR_GUI_MSG_SkinFontFileNotFound));
return 1;
case -4:
- skin_error(MSGTR_GUI_MSG_SkinFontImageNotFound);
+ skin_error(_(MSGTR_GUI_MSG_SkinFontImageNotFound));
return 1;
}
@@ -984,7 +984,7 @@ static int item_slabel(char *in)
id = fntFindID(fnt);
if (id < 0) {
- skin_error(MSGTR_GUI_MSG_SkinFontNotFound, fnt);
+ skin_error(_(MSGTR_GUI_MSG_SkinFontNotFound), fnt);
return 1;
}
@@ -1004,7 +1004,7 @@ static int item_slabel(char *in)
item->label = strdup(txt);
if (!item->label) {
- skin_error(MSGTR_GUI_MSG_SkinMemoryError);
+ skin_error(_(MSGTR_GUI_MSG_SkinMemoryError));
return 1;
}
@@ -1053,7 +1053,7 @@ static int item_dlabel(char *in)
id = fntFindID(fnt);
if (id < 0) {
- skin_error(MSGTR_GUI_MSG_SkinFontNotFound, fnt);
+ skin_error(_(MSGTR_GUI_MSG_SkinFontNotFound), fnt);
return 1;
}
@@ -1074,7 +1074,7 @@ static int item_dlabel(char *in)
item->label = strdup(txt);
if (!item->label) {
- skin_error(MSGTR_GUI_MSG_SkinMemoryError);
+ skin_error(_(MSGTR_GUI_MSG_SkinMemoryError));
return 1;
}
@@ -1105,7 +1105,7 @@ static int item_decoration(char *in)
strlower(in);
if (strcmp(in, "enable") != 0 && strcmp(in, "disable") != 0) {
- skin_error(MSGTR_GUI_MSG_SkinUnknownParameter, in);
+ skin_error(_(MSGTR_GUI_MSG_SkinUnknownParameter), in);
return 1;
}
@@ -1153,19 +1153,19 @@ int skinImageRead(char *fname, guiImage
switch (i) {
case -1:
- skin_error(MSGTR_GUI_MSG_SkinErrorBitmap16Bit, fname);
+ skin_error(_(MSGTR_GUI_MSG_SkinErrorBitmap16Bit), fname);
break;
case -2:
- skin_error(MSGTR_GUI_MSG_SkinBitmapNotFound, fname);
+ skin_error(_(MSGTR_GUI_MSG_SkinBitmapNotFound), fname);
break;
case -5:
- skin_error(MSGTR_GUI_MSG_SkinBitmapPngReadError, fname);
+ skin_error(_(MSGTR_GUI_MSG_SkinBitmapPngReadError), fname);
break;
case -8:
- skin_error(MSGTR_GUI_MSG_SkinBitmapConversionError, fname);
+ skin_error(_(MSGTR_GUI_MSG_SkinBitmapConversionError), fname);
break;
}
@@ -1230,14 +1230,14 @@ static int skinNoskin(void)
currWin->Bitmap.Image = calloc(1, 4);
if (!currWin->Bitmap.Image) {
- skin_error(MSGTR_GUI_MSG_SkinMemoryError);
+ skin_error(_(MSGTR_GUI_MSG_SkinMemoryError));
return -1;
}
*(uint32_t *)currWin->Bitmap.Image = GUI_TRANSPARENT;
if (!bpRenderMask(&currWin->Bitmap, &currWin->Mask)) {
- skin_error(MSGTR_GUI_MSG_SkinMemoryError);
+ skin_error(_(MSGTR_GUI_MSG_SkinMemoryError));
return -1;
}
@@ -1294,7 +1294,7 @@ int skinRead(char *sname)
skinfname = setname(skinDirInData, sname);
if ((skinfile = fopen(skinfname, "rt")) == NULL) {
- mp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_GUI_MSG_SkinFileNotFound, skinfname);
+ mp_msg(MSGT_GPLAYER, MSGL_ERR, _(MSGTR_GUI_MSG_SkinFileNotFound), skinfname);
return -1;
}
}
@@ -1332,7 +1332,7 @@ int skinRead(char *sname)
}
if (i == FF_ARRAY_ELEMS(skinItem)) {
- skin_error(MSGTR_GUI_MSG_SkinUnknownItem, currItem);
+ skin_error(_(MSGTR_GUI_MSG_SkinUnknownItem), currItem);
fclose(skinfile);
return -2;
}
@@ -1341,7 +1341,7 @@ int skinRead(char *sname)
fclose(skinfile);
if (linenumber == 0) {
- mp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_GUI_MSG_SkinFileNotReadable, skinfname);
+ mp_msg(MSGT_GPLAYER, MSGL_ERR, _(MSGTR_GUI_MSG_SkinFileNotReadable), skinfname);
return -1;
}
Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/ui/actions.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -661,7 +661,7 @@ void uiChangeSkin(char *name)
if (skinRead(name) != 0) {
if (skinRead(skinName) != 0) {
- gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_GUI_MSG_SkinCfgError, skinName);
+ gmp_msg(MSGT_GPLAYER, MSGL_FATAL, _(MSGTR_GUI_MSG_SkinCfgError), skinName);
mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
}
}
Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/ui/main.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -371,7 +371,7 @@ static void uiMainDND(int num,char** fil
}
listMgr(PLAYLIST_ITEM_APPEND,item);
} else {
- mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_GUI_MSG_NotAFile1,str );
+ mp_msg( MSGT_GPLAYER,MSGL_WARN,_(MSGTR_GUI_MSG_NotAFile1),str );
}
free( str );
}
@@ -396,7 +396,7 @@ void uiMainInit (void)
{
char msg[80] = "[main] ";
- av_strlcat(msg, MSGTR_GUI_MSG_MemoryErrorWindow, sizeof(msg));
+ av_strlcat(msg, _(MSGTR_GUI_MSG_MemoryErrorWindow), sizeof(msg));
gmp_msg(MSGT_GPLAYER, MSGL_FATAL, msg);
mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
}
Modified: trunk/gui/ui/menu.c
==============================================================================
--- trunk/gui/ui/menu.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/ui/menu.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -113,7 +113,7 @@ void uiMenuInit( void )
{
char msg[80] = "[menu] ";
- av_strlcat( msg, MSGTR_GUI_MSG_MemoryErrorWindow, sizeof(msg) );
+ av_strlcat( msg, _(MSGTR_GUI_MSG_MemoryErrorWindow), sizeof(msg) );
gmp_msg( MSGT_GPLAYER, MSGL_FATAL, msg );
mplayer( MPLAYER_EXIT_GUI, EXIT_ERROR, 0 );
}
Modified: trunk/gui/ui/playbar.c
==============================================================================
--- trunk/gui/ui/playbar.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/ui/playbar.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -289,7 +289,7 @@ void uiPlaybarInit( void )
{
char msg[80] = "[playbar] ";
- av_strlcat( msg, MSGTR_GUI_MSG_MemoryErrorWindow, sizeof(msg) );
+ av_strlcat( msg, _(MSGTR_GUI_MSG_MemoryErrorWindow), sizeof(msg) );
gmp_msg( MSGT_GPLAYER, MSGL_FATAL, msg );
mplayer( MPLAYER_EXIT_GUI, EXIT_ERROR, 0 );
}
Modified: trunk/gui/ui/render.c
==============================================================================
--- trunk/gui/ui/render.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/ui/render.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -86,7 +86,7 @@ static char *TranslateFilename(int how,
else if (len > 5 && fname[len - 5] == '.')
fname[len - 5] = 0;
} else
- av_strlcpy(fname, MSGTR_GUI_MSG_NoFileLoaded, maxlen);
+ av_strlcpy(fname, _(MSGTR_GUI_MSG_NoFileLoaded), maxlen);
break;
@@ -97,27 +97,27 @@ static char *TranslateFilename(int how,
case STREAMTYPE_CDDA:
- snprintf(fname, maxlen, MSGTR_GUI_TitleN, guiInfo.Track);
+ snprintf(fname, maxlen, _(MSGTR_GUI_TitleN), guiInfo.Track);
break;
case STREAMTYPE_VCD:
- snprintf(fname, maxlen, MSGTR_GUI_TitleN, guiInfo.Track - 1);
+ snprintf(fname, maxlen, _(MSGTR_GUI_TitleN), guiInfo.Track - 1);
break;
case STREAMTYPE_DVD:
if (guiInfo.Chapter)
- snprintf(fname, maxlen, MSGTR_GUI_ChapterN, guiInfo.Chapter);
+ snprintf(fname, maxlen, _(MSGTR_GUI_ChapterN), guiInfo.Chapter);
else
- av_strlcpy(fname, MSGTR_GUI_NoChapter, maxlen);
+ av_strlcpy(fname, _(MSGTR_GUI_NoChapter), maxlen);
break;
case STREAMTYPE_TV:
case STREAMTYPE_DVB:
- p = MSGTR_GUI_NoChannelName;
+ p = _(MSGTR_GUI_NoChannelName);
stream = mpctx_get_stream(guiInfo.mpcontext);
if (stream)
@@ -129,7 +129,7 @@ static char *TranslateFilename(int how,
case STREAMTYPE_BINCUE:
if (guiInfo.Track)
- snprintf(fname, maxlen, MSGTR_GUI_TitleN, guiInfo.Track - guiInfo.Angles);
+ snprintf(fname, maxlen, _(MSGTR_GUI_TitleN), guiInfo.Track - guiInfo.Angles);
else
*fname = 0;
@@ -137,7 +137,7 @@ static char *TranslateFilename(int how,
default:
- av_strlcpy(fname, MSGTR_GUI_MSG_NoMediaOpened, maxlen);
+ av_strlcpy(fname, _(MSGTR_GUI_MSG_NoMediaOpened), maxlen);
break;
}
Modified: trunk/gui/wm/ws.c
==============================================================================
--- trunk/gui/wm/ws.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/wm/ws.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -205,7 +205,7 @@ void wsInit(Display *display)
mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws] display name: %s => %s display.\n", dispname, localdisp ? "local" : "REMOTE");
if (!localdisp)
- mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_GUI_MSG_RemoteDisplay);
+ mp_msg(MSGT_GPLAYER, MSGL_INFO, _(MSGTR_GUI_MSG_RemoteDisplay));
}
#ifdef HAVE_SHM
@@ -214,7 +214,7 @@ void wsInit(Display *display)
wsUseXShm = False;
if (!wsUseXShm)
- mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_GUI_MSG_XSharedMemoryUnavailable);
+ mp_msg(MSGT_GPLAYER, MSGL_INFO, _(MSGTR_GUI_MSG_XSharedMemoryUnavailable));
#ifdef CONFIG_XSHAPE
if (!XShapeQueryExtension(wsDisplay, &eventbase, &errorbase))
@@ -222,7 +222,7 @@ void wsInit(Display *display)
wsUseXShape = False;
if (!wsUseXShape)
- mp_msg(MSGT_GPLAYER, MSGL_WARN, MSGTR_GUI_MSG_XShapeError);
+ mp_msg(MSGT_GPLAYER, MSGL_WARN, _(MSGTR_GUI_MSG_XShapeError));
wsScreen = DefaultScreen(wsDisplay);
wsRootWin = RootWindow(wsDisplay, wsScreen);
@@ -319,7 +319,7 @@ static int wsErrorHandler(Display *displ
XGetErrorText(display, event->error_code, type, sizeof(type));
- av_strlcat(msg, MSGTR_GUI_MSG_X11Error, sizeof(msg));
+ av_strlcat(msg, _(MSGTR_GUI_MSG_X11Error), sizeof(msg));
mp_msg(MSGT_GPLAYER, MSGL_ERR, "%s", msg);
mp_msg(MSGT_GPLAYER, MSGL_ERR, "[ws] Error code: %d - %s\n", event->error_code, type);
@@ -826,7 +826,7 @@ void wsWindowCreate(wsWindow *win, int x
break;
if (i == wsWLCount) {
- mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_GUI_MSG_TooManyWindows);
+ mp_msg(MSGT_GPLAYER, MSGL_FATAL, _(MSGTR_GUI_MSG_TooManyWindows));
mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
}
@@ -857,7 +857,7 @@ void wsWindowCreate(wsWindow *win, int x
depth = vo_find_depth_from_visuals(wsDisplay, wsScreen, NULL);
if (depth < 15) {
- mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_GUI_MSG_ColorDepthTooLow);
+ mp_msg(MSGT_GPLAYER, MSGL_FATAL, _(MSGTR_GUI_MSG_ColorDepthTooLow));
mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
}
@@ -1353,7 +1353,7 @@ void wsImageCreate(wsWindow *win, int w,
win->VisualInfo.depth, ZPixmap, NULL, &win->Shminfo, w, h);
if (win->xImage == NULL) {
- mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_GUI_MSG_XSharedMemoryError);
+ mp_msg(MSGT_GPLAYER, MSGL_FATAL, _(MSGTR_GUI_MSG_XSharedMemoryError));
mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
}
@@ -1361,7 +1361,7 @@ void wsImageCreate(wsWindow *win, int w,
if (win->Shminfo.shmid < 0) {
XDestroyImage(win->xImage);
- mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_GUI_MSG_XSharedMemoryError);
+ mp_msg(MSGT_GPLAYER, MSGL_FATAL, _(MSGTR_GUI_MSG_XSharedMemoryError));
mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
}
@@ -1373,7 +1373,7 @@ void wsImageCreate(wsWindow *win, int w,
if (win->Shminfo.shmaddr != ((char *)-1))
shmdt(win->Shminfo.shmaddr);
- mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_GUI_MSG_XSharedMemoryError);
+ mp_msg(MSGT_GPLAYER, MSGL_FATAL, _(MSGTR_GUI_MSG_XSharedMemoryError));
mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
}
@@ -1391,7 +1391,7 @@ void wsImageCreate(wsWindow *win, int w,
0);
if ((win->xImage->data = malloc(win->xImage->bytes_per_line * win->xImage->height)) == NULL) {
- mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_GUI_MSG_MemoryErrorImage);
+ mp_msg(MSGT_GPLAYER, MSGL_FATAL, _(MSGTR_GUI_MSG_MemoryErrorImage));
mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
}
}
Modified: trunk/gui/wm/wsxdnd.c
==============================================================================
--- trunk/gui/wm/wsxdnd.c Thu Mar 4 16:43:07 2021 (r38300)
+++ trunk/gui/wm/wsxdnd.c Thu Mar 4 16:48:28 2021 (r38301)
@@ -21,6 +21,7 @@
#include <X11/Xlib.h>
#include "wsxdnd.h"
+#include "gui/app/gui.h"
#include <stdio.h>
#include <stdlib.h>
@@ -100,7 +101,7 @@ wsXDNDProcessSelection(wsWindow* win, XE
XSendEvent(wsDisplay, selowner, 0, 0, &xevent);
if (!delme){
- mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_GUI_MSG_DragAndDropNothing );
+ mp_msg( MSGT_GPLAYER,MSGL_WARN,_(MSGTR_GUI_MSG_DragAndDropNothing) );
return False;
}
@@ -170,7 +171,7 @@ wsXDNDProcessClientMessage(XClientMessag
}
}
if (atom_support == None) {
- mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_GUI_MSG_NotAFile0 );
+ mp_msg( MSGT_GPLAYER,MSGL_WARN,_(MSGTR_GUI_MSG_NotAFile0) );
}
} else {
/* need to check the whole list here */
@@ -217,7 +218,7 @@ wsXDNDProcessClientMessage(XClientMessag
if (event->message_type == XA_XdndDrop) {
if ((Window) event->data.l[0] != XGetSelectionOwner(wsDisplay, XA_XdndSelection)){
- mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_GUI_MSG_DragAndDropOwner );
+ mp_msg( MSGT_GPLAYER,MSGL_WARN,_(MSGTR_GUI_MSG_DragAndDropOwner) );
}
if (atom_support != None) {
XConvertSelection(wsDisplay, XA_XdndSelection, atom_support,
More information about the MPlayer-cvslog
mailing list