Mercurial > mplayer.hg
changeset 3587:6e21fbb41a2b
full language support for gui
author | pontscho |
---|---|
date | Tue, 18 Dec 2001 21:33:02 +0000 |
parents | a0009a534428 |
children | 8e56fe18e7fb |
files | Gui/mplayer/gtk/fs.c Gui/mplayer/gtk/menu.c Gui/mplayer/gtk/sb.c help_mp-en.h |
diffstat | 4 files changed, 76 insertions(+), 42 deletions(-) [+] |
line wrap: on
line diff
--- a/Gui/mplayer/gtk/fs.c Tue Dec 18 20:01:10 2001 +0000 +++ b/Gui/mplayer/gtk/fs.c Tue Dec 18 21:33:02 2001 +0000 @@ -62,7 +62,7 @@ #define fsNumberOfOtherFilterNames 0 char * fsOtherFilterNames[fsNumberOfOtherFilterNames+1][2] = - { { "All types", "*" } }; + { { "All files ( * )", "*" } }; GtkWidget * fsFileNamesList; GtkWidget * fsFNameList;
--- a/Gui/mplayer/gtk/menu.c Tue Dec 18 20:01:10 2001 +0000 +++ b/Gui/mplayer/gtk/menu.c Tue Dec 18 21:33:02 2001 +0000 @@ -4,6 +4,7 @@ #include <string.h> #include "../../../config.h" +#include "../../../help_mp.h" #include "../../events.h" @@ -260,59 +261,59 @@ Menu=gtk_menu_new(); - AddMenuItem( Menu,"About MPlayer"" ", evAbout ); + AddMenuItem( Menu,MSGTR_MENU_AboutMPlayer" ", evAbout ); AddSeparator( Menu ); - SubMenu=AddSubMenu( Menu,"Open ..." ); - AddMenuItem( SubMenu,"Play file ..."" ", evLoadPlay ); - AddMenuItem( SubMenu,"Play VCD ...", evNone ); + SubMenu=AddSubMenu( Menu,MSGTR_MENU_Open ); + AddMenuItem( SubMenu,MSGTR_MENU_PlayFile" ", evLoadPlay ); + AddMenuItem( SubMenu,MSGTR_MENU_PlayVCD, evNone ); #ifdef USE_DVDREAD - AddMenuItem( SubMenu,"Play DVD ...", evPlayDVD ); + AddMenuItem( SubMenu,MSGTR_MENU_PlayDVD, evPlayDVD ); #endif - AddMenuItem( SubMenu,"Play URL ...", evNone ); - AddMenuItem( SubMenu,"Load subtitle ... ", evLoadSubtitle ); - SubMenu=AddSubMenu( Menu,"Playing" ); - AddMenuItem( SubMenu,"Play"" ", evPlay ); - AddMenuItem( SubMenu,"Pause", evPause ); - AddMenuItem( SubMenu,"Stop", evStop ); - AddMenuItem( SubMenu,"Prev stream", evPrev ); - AddMenuItem( SubMenu,"Next stream", evNext ); + AddMenuItem( SubMenu,MSGTR_MENU_PlayURL, evNone ); + AddMenuItem( SubMenu,MSGTR_MENU_LoadSubtitle" ", evLoadSubtitle ); + SubMenu=AddSubMenu( Menu,MSGTR_MENU_Playing ); + AddMenuItem( SubMenu,MSGTR_MENU_Play" ", evPlay ); + AddMenuItem( SubMenu,MSGTR_MENU_Pause, evPause ); + AddMenuItem( SubMenu,MSGTR_MENU_Stop, evStop ); + AddMenuItem( SubMenu,MSGTR_MENU_NextStream, evPrev ); + AddMenuItem( SubMenu,MSGTR_MENU_PrevStream, evNext ); // AddSeparator( SubMenu ); // AddMenuItem( SubMenu,"Back 10 sec", evBackward10sec ); // AddMenuItem( SubMenu,"Fwd 10 sec", evForward10sec ); // AddMenuItem( SubMenu,"Back 1 min", evBackward1min ); // AddMenuItem( SubMenu,"Fwd 1 min", evForward1min ); - SubMenu=AddSubMenu( Menu,"Size" ); - AddMenuItem( SubMenu,"Normal size"" ", evNormalSize ); - AddMenuItem( SubMenu,"Double size", evDoubleSize ); - AddMenuItem( SubMenu,"Fullscreen", evFullScreen ); + SubMenu=AddSubMenu( Menu,MSGTR_MENU_Size ); + AddMenuItem( SubMenu,MSGTR_MENU_NormalSize" ", evNormalSize ); + AddMenuItem( SubMenu,MSGTR_MENU_DoubleSize, evDoubleSize ); + AddMenuItem( SubMenu,MSGTR_MENU_FullScreen, evFullScreen ); #ifdef USE_DVDREAD - DVDSubMenu=AddSubMenu( Menu,"DVD" ); - AddMenuItem( DVDSubMenu,"Play disc ..."" ", evPlayDVD ); - AddMenuItem( DVDSubMenu,"Show DVD Menu", evNone ); + DVDSubMenu=AddSubMenu( Menu,MSGTR_MENU_DVD ); + AddMenuItem( DVDSubMenu,MSGTR_MENU_PlayDisc" ", evPlayDVD ); + AddMenuItem( DVDSubMenu,MSGTR_MENU_ShowDVDMenu, evNone ); AddSeparator( DVDSubMenu ); - DVDTitleMenu=AddSubMenu( DVDSubMenu,"Titles" ); + DVDTitleMenu=AddSubMenu( DVDSubMenu,MSGTR_MENU_Titles ); if ( gtkShMem->DVD.titles ) { char tmp[32]; int i; for ( i=0;i<gtkShMem->DVD.titles;i++ ) { - sprintf( tmp,"Title %2d",i+1 ); + sprintf( tmp,MSGTR_MENU_Title,i+1 ); AddMenuItem( DVDTitleMenu,tmp,( (i+1) << 16 ) + evSetDVDTitle ); } } - else AddMenuItem( DVDTitleMenu,"(none)",evNone ); - DVDChapterMenu=AddSubMenu( DVDSubMenu,"Chapter" ); + else AddMenuItem( DVDTitleMenu,MSGTR_MENU_None,evNone ); + DVDChapterMenu=AddSubMenu( DVDSubMenu,MSGTR_MENU_Chapters ); if ( gtkShMem->DVD.chapters ) { char tmp[32]; int i; for ( i=0;i<gtkShMem->DVD.chapters;i++ ) { - sprintf( tmp,"Chapter %2d",i+1 ); + sprintf( tmp,MSGTR_MENU_Chapter,i+1 ); AddMenuItem( DVDChapterMenu,tmp,( (i+1) << 16 ) + evSetDVDChapter ); } } - else DVDChapterMenu=AddMenuItem( DVDChapterMenu,"(none)",evNone ); - DVDAudioLanguageMenu=AddSubMenu( DVDSubMenu,"Audio language" ); + else DVDChapterMenu=AddMenuItem( DVDChapterMenu,MSGTR_MENU_None,evNone ); + DVDAudioLanguageMenu=AddSubMenu( DVDSubMenu,MSGTR_MENU_AudioLanguages ); if ( gtkShMem->DVD.nr_of_audio_channels ) { char tmp[64]; int i; @@ -322,8 +323,8 @@ AddMenuItem( DVDAudioLanguageMenu,tmp,( gtkShMem->DVD.audio_streams[i].id << 16 ) + evSetDVDAudio ); } } - else DVDChapterMenu=AddMenuItem( DVDAudioLanguageMenu,"(none)",evNone ); - DVDSubtitleLanguageMenu=AddSubMenu( DVDSubMenu,"Subtitle language" ); + else DVDChapterMenu=AddMenuItem( DVDAudioLanguageMenu,MSGTR_MENU_None,evNone ); + DVDSubtitleLanguageMenu=AddSubMenu( DVDSubMenu,MSGTR_MENU_SubtitleLanguages ); if ( gtkShMem->DVD.nr_of_subtitles ) { char tmp[64]; int i; @@ -333,14 +334,14 @@ AddMenuItem( DVDSubtitleLanguageMenu,tmp,( gtkShMem->DVD.subtitles[i].id << 16 ) + evSetDVDSubtitle ); } } - else DVDChapterMenu=AddMenuItem( DVDSubtitleLanguageMenu,"(none)",evNone ); + else DVDChapterMenu=AddMenuItem( DVDSubtitleLanguageMenu,MSGTR_MENU_None,evNone ); #endif AddSeparator( Menu ); - AddMenuItem( Menu,"Playlist", evPlayList ); - AddMenuItem( Menu,"Skin browser", evSkinBrowser ); - AddMenuItem( Menu,"Preferences", evPreferences ); + AddMenuItem( Menu,MSGTR_MENU_PlayList, evPlayList ); + AddMenuItem( Menu,MSGTR_MENU_SkinBrowser, evSkinBrowser ); + AddMenuItem( Menu,MSGTR_MENU_Preferences, evPreferences ); AddSeparator( Menu ); - AddMenuItem( Menu,"Exit ...", evExit ); + AddMenuItem( Menu,MSGTR_MENU_Exit, evExit ); return Menu; }
--- a/Gui/mplayer/gtk/sb.c Tue Dec 18 20:01:10 2001 +0000 +++ b/Gui/mplayer/gtk/sb.c Tue Dec 18 21:33:02 2001 +0000 @@ -161,7 +161,7 @@ gtk_widget_show( vbox5 ); gtk_container_add( GTK_CONTAINER( frame8 ),vbox5 ); - label=gtk_label_new( "Skins:" ); + label=gtk_label_new( MSGTR_SKIN_LABEL ); gtk_widget_set_name( label,"label" ); gtk_widget_ref( label ); gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"label",label, @@ -221,11 +221,12 @@ gtk_widget_set_name( hbuttonbox4,"hbuttonbox4" ); gtk_widget_ref( hbuttonbox4 ); gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"hbuttonbox4",hbuttonbox4,(GtkDestroyNotify)gtk_widget_unref ); + gtk_widget_set_usize( hbuttonbox4,-2,25 ); gtk_widget_show( hbuttonbox4 ); gtk_box_pack_start( GTK_BOX( vbox5 ),hbuttonbox4,FALSE,TRUE,0 ); gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox4 ),GTK_BUTTONBOX_END ); - gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox4 ),0 ); - gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox4 ),80,0 ); + gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox4 ),5 ); + gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox4 ),75,0 ); Ok=gtk_button_new_with_label( MSGTR_Ok ); gtk_widget_set_name( Ok,MSGTR_Ok ); @@ -233,8 +234,7 @@ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),MSGTR_Ok,Ok,(GtkDestroyNotify)gtk_widget_unref ); gtk_widget_show( Ok ); gtk_container_add( GTK_CONTAINER( hbuttonbox4 ),Ok ); - gtk_widget_set_usize( Ok,-2,33 ); - GTK_WIDGET_SET_FLAGS( Ok,GTK_CAN_DEFAULT ); + gtk_widget_set_usize( Ok,-2,22 ); gtk_widget_add_accelerator( Ok,"released",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); Cancel=gtk_button_new_with_label( MSGTR_Cancel ); @@ -243,8 +243,7 @@ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),MSGTR_Cancel,Cancel,(GtkDestroyNotify)gtk_widget_unref ); gtk_widget_show( Cancel ); gtk_container_add( GTK_CONTAINER( hbuttonbox4 ),Cancel ); - gtk_widget_set_usize( Cancel,-2,33 ); - GTK_WIDGET_SET_FLAGS( Cancel,GTK_CAN_DEFAULT ); + gtk_widget_set_usize( Cancel,-2,22 ); gtk_widget_add_accelerator( Cancel,"released",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"destroy",GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),NULL );
--- a/help_mp-en.h Tue Dec 18 20:01:10 2001 +0000 +++ b/help_mp-en.h Tue Dec 18 21:33:02 2001 +0000 @@ -268,5 +268,39 @@ #define MSGTR_SKINBROWSER_NotEnoughMemory "[skinbrowser] not enough memory.\n" #define MSGTR_SKIN_SKINCFG_SkinNotFound "Skin not found ( %s ).\n" #define MSGTR_SKIN_SKINCFG_SkinCfgReadError "Skin configfile read error ( %s ).\n" +#define MSGTR_SKIN_LABEL "Skins:" + +// --- gtk menus +#define MSGTR_MENU_AboutMPlayer "About MPlayer" +#define MSGTR_MENU_Open "Open ..." +#define MSGTR_MENU_PlayFile "Play file ..." +#define MSGTR_MENU_PlayVCD "Play VCD ..." +#define MSGTR_MENU_PlayDVD "Play DVD ..." +#define MSGTR_MENU_PlayURL "Play URL ..." +#define MSGTR_MENU_LoadSubtitle "Load subtitle ..." +#define MSGTR_MENU_Playing "Playing" +#define MSGTR_MENU_Play "Play" +#define MSGTR_MENU_Pause "Pause" +#define MSGTR_MENU_Stop "Stop" +#define MSGTR_MENU_NextStream "Next stream" +#define MSGTR_MENU_PrevStream "Prev stream" +#define MSGTR_MENU_Size "Size" +#define MSGTR_MENU_NormalSize "Normal size" +#define MSGTR_MENU_DoubleSize "Double size" +#define MSGTR_MENU_FullScreen "Fullscreen" +#define MSGTR_MENU_DVD "DVD" +#define MSGTR_MENU_PlayDisc "Play disc ..." +#define MSGTR_MENU_ShowDVDMenu "Show DVD menu" +#define MSGTR_MENU_Titles "Titles" +#define MSGTR_MENU_Title "Title %2d" +#define MSGTR_MENU_None "(none)" +#define MSGTR_MENU_Chapters "Chapters" +#define MSGTR_MENU_Chapter "Chapter %2d" +#define MSGTR_MENU_AudioLanguages "Audio languages" +#define MSGTR_MENU_SubtitleLanguages "Subtitle languages" +#define MSGTR_MENU_PlayList "Playlist" +#define MSGTR_MENU_SkinBrowser "Skin browser" +#define MSGTR_MENU_Preferences "Preferences" +#define MSGTR_MENU_Exit "Exit ..." #endif