diff options
author | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-09-12 15:08:53 +0000 |
---|---|---|
committer | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-09-12 15:08:53 +0000 |
commit | fdf4a82029cf9e49e275101175c417b903e16b58 (patch) | |
tree | ece8eb0a50e87875bde12c534690e54e447dfe56 | |
parent | 6a8ef38e092fff64227df74d342a0bec0fd65eab (diff) | |
download | mpv-fdf4a82029cf9e49e275101175c417b903e16b58.tar.bz2 mpv-fdf4a82029cf9e49e275101175c417b903e16b58.tar.xz |
add to multi lang support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1885 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | Gui/gui.mak | 2 | ||||
-rw-r--r-- | Gui/language.h | 39 | ||||
-rw-r--r-- | Gui/mplayer/gtk/about.h | 2 | ||||
-rw-r--r-- | Gui/mplayer/gtk/fs.h | 16 | ||||
-rw-r--r-- | Gui/mplayer/gtk/mb.h | 16 | ||||
-rw-r--r-- | Gui/mplayer/gtk/pl.h | 22 | ||||
-rw-r--r-- | Gui/mplayer/gtk/sb.h | 19 | ||||
-rw-r--r-- | Gui/mplayer/menu.h | 4 | ||||
-rw-r--r-- | Gui/mplayer/mplayer.c | 4 | ||||
-rw-r--r-- | Gui/mplayer/play.c | 6 | ||||
-rw-r--r-- | Gui/mplayer/psignal.c | 1 | ||||
-rw-r--r-- | Gui/mplayer/widgets.c | 1 | ||||
-rw-r--r-- | Gui/skin/skin.c | 76 | ||||
-rw-r--r-- | help_mp-de.h | 40 | ||||
-rw-r--r-- | help_mp-en.h | 40 | ||||
-rw-r--r-- | help_mp-hu.h | 42 | ||||
-rw-r--r-- | help_mp-pl.h | 41 |
17 files changed, 246 insertions, 125 deletions
diff --git a/Gui/gui.mak b/Gui/gui.mak index 1ec3294ec5..221f351fd8 100644 --- a/Gui/gui.mak +++ b/Gui/gui.mak @@ -6,6 +6,6 @@ MPLAYERSRCS = $(MPLAYERDIR)mplayer.c $(MPLAYERDIR)widgets.c $(MPLAYERDIR)play.c $(MPLAYERDIR)psignal.c MPLAYEROBJS = $(MPLAYERSRCS:.c=.o) -SRCS = $(SKINSRC) $(BITMAPSRCS) wm/ws.c wm/wsconv.c app.c events.c timer.c language.c error.c +SRCS = $(SKINSRC) $(BITMAPSRCS) wm/ws.c wm/wsconv.c app.c events.c timer.c error.c OBJS = $(SRCS:.c=.o) diff --git a/Gui/language.h b/Gui/language.h index e4f0d4acf7..945d955790 100644 --- a/Gui/language.h +++ b/Gui/language.h @@ -2,43 +2,6 @@ #ifndef __MPLAYER_LANG #define __MPLAYER_LANG -// --- labels --- -extern char * langAbout; -extern char * langFileSelect; -extern char * langMessageBox; -extern char * langPlayList; -extern char * langSkinBrowser; - -// --- buttons --- -extern char * langOk; -extern char * langCancel; -extern char * langAdd; -extern char * langRemove; - -// --- error messages --- -extern char * langNEMDB; -extern char * langNEMFMR; -extern char * langNEMFMM; -extern char * langLIRCSNW; -extern char * langAudioDriverSelectNotSupported; -extern char * langNotSupportedFileFormat; -extern char * langCodecConfNotFound; -extern char * langErrorProcessingDVDKey; -extern char * langErrorInDVDAuth; -extern char * langAVIMissing; -extern char * langAVIMissingVideoStream; -extern char * langASFMissingVideoStream; -extern char * langMPEGEOFNotFound; -extern char * langCannotAllocateSharedMem; -extern char * langMPEGCannotReadSeqHeader; -extern char * langMPEGBadSeqHeader; -extern char * langMPEGCannotReadSeqHeaderExt; -extern char * langMPEGBadSeqHeaderExt; -extern char * langCantFindCodec; -extern char * langSelectedVideoOutIncompTheCodec; -extern char * langMPCompWithoutDSSupport; -extern char * langDSCodecNotFound; -extern char * langCantInitVideoDriver; -extern char * langUnknowError; +#include "../help_mp.h" #endif
\ No newline at end of file diff --git a/Gui/mplayer/gtk/about.h b/Gui/mplayer/gtk/about.h index be3955f95c..1deeb6d2f4 100644 --- a/Gui/mplayer/gtk/about.h +++ b/Gui/mplayer/gtk/about.h @@ -2,8 +2,6 @@ #ifndef __WIDGET_ABOUT #define __WIDGET_ABOUT -#include "../../language.h" - void ab_Ok_released( GtkButton * button,gpointer user_data ) { gtk_widget_hide( AboutBox ); diff --git a/Gui/mplayer/gtk/fs.h b/Gui/mplayer/gtk/fs.h index d03a48eaf7..26443c8a8f 100644 --- a/Gui/mplayer/gtk/fs.h +++ b/Gui/mplayer/gtk/fs.h @@ -9,8 +9,6 @@ #include <glob.h> #include <unistd.h> -#include "../../language.h" - #ifdef __SVR4 #define get_current_dir_name() getcwd(NULL, PATH_MAX) #endif @@ -380,7 +378,7 @@ GtkWidget * create_FileSelect( void ) GTK_WIDGET_SET_FLAGS( fsFileSelect,GTK_CAN_FOCUS ); GTK_WIDGET_SET_FLAGS( fsFileSelect,GTK_CAN_DEFAULT ); gtk_widget_set_events( fsFileSelect,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( fsFileSelect ),langFileSelect ); + gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_FileSelect ); gtk_window_set_position( GTK_WINDOW( fsFileSelect ),GTK_WIN_POS_CENTER ); gtk_window_set_policy( GTK_WINDOW( fsFileSelect ),FALSE,FALSE,TRUE ); fsColorMap=gdk_colormap_get_system(); @@ -590,10 +588,10 @@ GtkWidget * create_FileSelect( void ) // gtk_container_add( GTK_CONTAINER( hbuttonbox3 ),fsOk ); // gtk_widget_show( fsOk ); - fsOk=gtk_button_new_with_label( langOk ); - gtk_widget_set_name( fsOk,langOk ); + fsOk=gtk_button_new_with_label( MSGTR_Ok ); + gtk_widget_set_name( fsOk,MSGTR_Ok ); gtk_widget_ref( fsOk ); - gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),langOk,fsOk,( GtkDestroyNotify )gtk_widget_unref ); + gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),MSGTR_Ok,fsOk,( GtkDestroyNotify )gtk_widget_unref ); gtk_container_add( GTK_CONTAINER( hbuttonbox3 ),fsOk ); gtk_widget_show( fsOk ); @@ -607,10 +605,10 @@ GtkWidget * create_FileSelect( void ) // gtk_container_add( GTK_CONTAINER( hbuttonbox3 ),fsCancel ); // gtk_widget_show( fsCancel ); - fsCancel=gtk_button_new_with_label( langCancel ); - gtk_widget_set_name( fsCancel,langCancel ); + fsCancel=gtk_button_new_with_label( MSGTR_Cancel ); + gtk_widget_set_name( fsCancel,MSGTR_Cancel ); gtk_widget_ref( fsCancel ); - gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),langCancel,fsCancel,( GtkDestroyNotify )gtk_widget_unref ); + gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),MSGTR_Cancel,fsCancel,( GtkDestroyNotify )gtk_widget_unref ); gtk_container_add( GTK_CONTAINER( hbuttonbox3 ),fsCancel ); gtk_widget_show( fsCancel ); diff --git a/Gui/mplayer/gtk/mb.h b/Gui/mplayer/gtk/mb.h index baebdf2ed7..a92ba6f583 100644 --- a/Gui/mplayer/gtk/mb.h +++ b/Gui/mplayer/gtk/mb.h @@ -2,8 +2,6 @@ #ifndef __MY_MESSAGEBOX #define __MY_MESSAGEBOX -#include "../../language.h" - GtkWidget * gtkMessageBoxText; void on_MessageBox_destroy( GtkObject * object,gpointer user_data ) @@ -36,17 +34,17 @@ GtkWidget * create_MessageBox( void ) accel_group=gtk_accel_group_new(); MessageBox=gtk_window_new( GTK_WINDOW_DIALOG ); - gtk_widget_set_name( MessageBox,langMessageBox ); - gtk_object_set_data( GTK_OBJECT( MessageBox ),langMessageBox,MessageBox ); + gtk_widget_set_name( MessageBox,MSGTR_MessageBox ); + gtk_object_set_data( GTK_OBJECT( MessageBox ),MSGTR_MessageBox,MessageBox ); gtk_widget_set_usize( MessageBox,420,128 ); GTK_WIDGET_SET_FLAGS( MessageBox,GTK_CAN_FOCUS ); GTK_WIDGET_SET_FLAGS( MessageBox,GTK_CAN_DEFAULT ); gtk_widget_set_events( MessageBox,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 ); - gtk_window_set_title( GTK_WINDOW( MessageBox ),langMessageBox ); + gtk_window_set_title( GTK_WINDOW( MessageBox ),MSGTR_MessageBox ); gtk_window_set_position( GTK_WINDOW( MessageBox ),GTK_WIN_POS_CENTER ); gtk_window_set_modal( GTK_WINDOW( MessageBox ),TRUE ); gtk_window_set_policy( GTK_WINDOW( MessageBox ),FALSE,FALSE,FALSE ); - gtk_window_set_wmclass( GTK_WINDOW( MessageBox ),langMessageBox,langMessageBox ); + gtk_window_set_wmclass( GTK_WINDOW( MessageBox ),MSGTR_MessageBox,MSGTR_MessageBox ); frame1=gtk_frame_new( NULL ); gtk_widget_set_name( frame1,"frame1" ); @@ -132,10 +130,10 @@ GtkWidget * create_MessageBox( void ) gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox1 ),60,0 ); gtk_button_box_set_child_ipadding( GTK_BUTTON_BOX( hbuttonbox1 ),10,0 ); - Ok=gtk_button_new_with_label( langOk ); - gtk_widget_set_name( Ok,langOk ); + Ok=gtk_button_new_with_label( MSGTR_Ok ); + gtk_widget_set_name( Ok,MSGTR_Ok ); gtk_widget_ref( Ok ); - gtk_object_set_data_full( GTK_OBJECT( MessageBox ),langOk,Ok, + gtk_object_set_data_full( GTK_OBJECT( MessageBox ),MSGTR_Ok,Ok, ( GtkDestroyNotify ) gtk_widget_unref ); gtk_widget_show( Ok ); gtk_container_add( GTK_CONTAINER( hbuttonbox1 ),Ok ); diff --git a/Gui/mplayer/gtk/pl.h b/Gui/mplayer/gtk/pl.h index 1b509fe693..6d8372d1f0 100644 --- a/Gui/mplayer/gtk/pl.h +++ b/Gui/mplayer/gtk/pl.h @@ -4,8 +4,6 @@ #ifndef __MY_PLAYLIST #define __MY_PLAYLIST -#include "../../language.h" - void HidePlayList( void ) { gtk_widget_hide( PlayList ); @@ -91,12 +89,12 @@ GtkWidget* create_PlayList( void ) GtkWidget *Cancel; PlayList = gtk_window_new( GTK_WINDOW_DIALOG ); - gtk_object_set_data( GTK_OBJECT( PlayList ),langPlayList,PlayList ); + gtk_object_set_data( GTK_OBJECT( PlayList ),MSGTR_PlayList,PlayList ); gtk_widget_set_usize( PlayList,512,256 ); GTK_WIDGET_SET_FLAGS( PlayList,GTK_CAN_FOCUS ); GTK_WIDGET_SET_FLAGS( PlayList,GTK_CAN_DEFAULT ); gtk_widget_set_events( PlayList,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( PlayList ),langPlayList ); + gtk_window_set_title( GTK_WINDOW( PlayList ),MSGTR_PlayList ); gtk_window_set_position( GTK_WINDOW( PlayList ),GTK_WIN_POS_CENTER ); gtk_window_set_policy( GTK_WINDOW( PlayList ),FALSE,FALSE,TRUE ); @@ -220,36 +218,36 @@ GtkWidget* create_PlayList( void ) gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox5 ),65,27 ); gtk_button_box_set_child_ipadding( GTK_BUTTON_BOX( hbuttonbox5 ),2,0 ); - Add = gtk_button_new_with_label( langAdd ); + Add = gtk_button_new_with_label( MSGTR_Add ); gtk_widget_ref( Add ); - gtk_object_set_data_full( GTK_OBJECT( PlayList ),langAdd,Add, + gtk_object_set_data_full( GTK_OBJECT( PlayList ),MSGTR_Add,Add, ( GtkDestroyNotify ) gtk_widget_unref ); gtk_widget_show( Add ); gtk_container_add( GTK_CONTAINER( hbuttonbox5 ),Add ); gtk_widget_set_usize( Add,45,-2 ); GTK_WIDGET_SET_FLAGS( Add,GTK_CAN_DEFAULT ); - Remove = gtk_button_new_with_label( langRemove ); + Remove = gtk_button_new_with_label( MSGTR_Remove ); gtk_widget_ref( Remove ); - gtk_object_set_data_full( GTK_OBJECT( PlayList ),langRemove,Remove, + gtk_object_set_data_full( GTK_OBJECT( PlayList ),MSGTR_Remove,Remove, ( GtkDestroyNotify ) gtk_widget_unref ); gtk_widget_show( Remove ); gtk_container_add( GTK_CONTAINER( hbuttonbox5 ),Remove ); gtk_widget_set_usize( Remove,45,-2 ); GTK_WIDGET_SET_FLAGS( Remove,GTK_CAN_DEFAULT ); - Ok = gtk_button_new_with_label( langOk ); + Ok = gtk_button_new_with_label( MSGTR_Ok ); gtk_widget_ref( Ok ); - gtk_object_set_data_full( GTK_OBJECT( PlayList ),langOk,Ok, + gtk_object_set_data_full( GTK_OBJECT( PlayList ),MSGTR_Ok,Ok, ( GtkDestroyNotify ) gtk_widget_unref ); gtk_widget_show( Ok ); gtk_container_add( GTK_CONTAINER( hbuttonbox5 ),Ok ); gtk_widget_set_usize( Ok,45,-2 ); GTK_WIDGET_SET_FLAGS( Ok,GTK_CAN_DEFAULT ); - Cancel = gtk_button_new_with_label( langCancel ); + Cancel = gtk_button_new_with_label( MSGTR_Cancel ); gtk_widget_ref( Cancel ); - gtk_object_set_data_full( GTK_OBJECT( PlayList ),langCancel,Cancel, + gtk_object_set_data_full( GTK_OBJECT( PlayList ),MSGTR_Cancel,Cancel, ( GtkDestroyNotify ) gtk_widget_unref ); gtk_widget_show( Cancel ); gtk_container_add( GTK_CONTAINER( hbuttonbox5 ),Cancel ); diff --git a/Gui/mplayer/gtk/sb.h b/Gui/mplayer/gtk/sb.h index f1ea25ad9d..32321eea3d 100644 --- a/Gui/mplayer/gtk/sb.h +++ b/Gui/mplayer/gtk/sb.h @@ -9,7 +9,6 @@ #include <unistd.h> #include "../app.h" -#include "../../language.h" GtkWidget * SkinList; GtkWidget * sbOk; @@ -145,14 +144,14 @@ GtkWidget * create_SkinBrowser( void ) GtkWidget * Cancel; SkinBrowser=gtk_window_new( GTK_WINDOW_DIALOG ); - gtk_widget_set_name( SkinBrowser,langSkinBrowser ); - gtk_object_set_data( GTK_OBJECT( SkinBrowser ),langSkinBrowser,SkinBrowser ); + gtk_widget_set_name( SkinBrowser,MSGTR_SkinBrowser ); + gtk_object_set_data( GTK_OBJECT( SkinBrowser ),MSGTR_SkinBrowser,SkinBrowser ); gtk_widget_set_usize( SkinBrowser,256,320 ); gtk_container_set_border_width( GTK_CONTAINER( SkinBrowser ),1 ); GTK_WIDGET_SET_FLAGS( SkinBrowser,GTK_CAN_FOCUS ); GTK_WIDGET_SET_FLAGS( SkinBrowser,GTK_CAN_DEFAULT ); 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 ),langSkinBrowser ); + gtk_window_set_title( GTK_WINDOW( SkinBrowser ),MSGTR_SkinBrowser ); gtk_window_set_position( GTK_WINDOW( SkinBrowser ),GTK_WIN_POS_CENTER ); gtk_window_set_policy( GTK_WINDOW( SkinBrowser ),FALSE,FALSE,TRUE ); @@ -269,20 +268,20 @@ GtkWidget * create_SkinBrowser( void ) gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox4 ),0 ); gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox4 ),80,0 ); - sbOk=gtk_button_new_with_label( langOk ); - gtk_widget_set_name( sbOk,langOk ); + sbOk=gtk_button_new_with_label( MSGTR_Ok ); + gtk_widget_set_name( sbOk,MSGTR_Ok ); gtk_widget_ref( sbOk ); - gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),langOk,sbOk, + gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),MSGTR_Ok,sbOk, ( GtkDestroyNotify ) gtk_widget_unref ); gtk_widget_show( sbOk ); gtk_container_add( GTK_CONTAINER( hbuttonbox4 ),sbOk ); gtk_widget_set_usize( sbOk,-2,33 ); GTK_WIDGET_SET_FLAGS( sbOk,GTK_CAN_DEFAULT ); - Cancel=gtk_button_new_with_label( langCancel ); - gtk_widget_set_name( Cancel,langCancel ); + Cancel=gtk_button_new_with_label( MSGTR_Cancel ); + gtk_widget_set_name( Cancel,MSGTR_Cancel ); gtk_widget_ref( Cancel ); - gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),langCancel,Cancel, + 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 ); diff --git a/Gui/mplayer/menu.h b/Gui/mplayer/menu.h index 78e21acddf..4d4d1238a8 100644 --- a/Gui/mplayer/menu.h +++ b/Gui/mplayer/menu.h @@ -121,9 +121,9 @@ void mplMenuInit( void ) if ( ( mplMenuDrawBuffer = calloc( 1,appMPlayer.menuBase.Bitmap.ImageSize ) ) == NULL ) { #ifdef DEBUG - dbprintf( 1,langNEMFMR ); + dbprintf( 1,MSGTR_NEMFMR ); #endif - gtkMessageBox( langNEMFMR ); + gtkMessageBox( MSGTR_NEMFMR ); return; } diff --git a/Gui/mplayer/mplayer.c b/Gui/mplayer/mplayer.c index 751f3d315a..4c90b8ff53 100644 --- a/Gui/mplayer/mplayer.c +++ b/Gui/mplayer/mplayer.c @@ -13,10 +13,10 @@ #include "../wm/widget.h" #include "../bitmap/bitmap.h" #include "../timer.h" -#include "../language.h" #include "../error.h" #include "../../config.h" +#include "../../help_mp.h" #include "../../libvo/x11_common.h" #define mplMouseTimerConst 10 @@ -68,7 +68,7 @@ void mplInit( int argc,char* argv[], char *envp[], void* disp ) if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL ) { - fprintf( stderr,langNEMDB ); + fprintf( stderr,MSGTR_NEMDB ); exit( 0 ); } diff --git a/Gui/mplayer/play.c b/Gui/mplayer/play.c index eb4629a4f4..1500ba90aa 100644 --- a/Gui/mplayer/play.c +++ b/Gui/mplayer/play.c @@ -16,6 +16,7 @@ int moviex,moviey,moviewidth,movieheight; #include "../wm/widget.h" #include "../../config.h" +#include "../../help_mp.h" #include "../../libvo/x11_common.h" #include "widgets.h" @@ -25,7 +26,6 @@ int moviex,moviey,moviewidth,movieheight; #include "../skin/skin.h" #include "../error.h" -#include "../language.h" mplCommStruct * mplShMem; char * Filename = NULL; @@ -157,7 +157,7 @@ void ChangeSkin( void ) { if ( mplMenuDrawBuffer ) free( mplMenuDrawBuffer ); if ( ( mplMenuDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.menuBase.Bitmap.ImageSize ) ) == NULL ) - { message( False,langNEMDB ); return; } + { message( False,MSGTR_NEMDB ); return; } wsResizeWindow( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height ); wsResizeImage( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height ); } @@ -179,7 +179,7 @@ void ChangeSkin( void ) if ( mplDrawBuffer ) free( mplDrawBuffer ); if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL ) - { message( False,langNEMDB ); return; } + { message( False,MSGTR_NEMDB ); return; } wsVisibleWindow( &appMPlayer.mainWindow,wsHideWindow ); wsResizeWindow( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height ); wsMoveWindow( &appMPlayer.mainWindow,appMPlayer.main.x,appMPlayer.main.y ); diff --git a/Gui/mplayer/psignal.c b/Gui/mplayer/psignal.c index 7a810dffdb..550de227a9 100644 --- a/Gui/mplayer/psignal.c +++ b/Gui/mplayer/psignal.c @@ -13,7 +13,6 @@ #include "../skin/skin.h" #include "../wm/ws.h" #include "../error.h" -#include "../language.h" #include "../../config.h" #include "../../libvo/x11_common.h" diff --git a/Gui/mplayer/widgets.c b/Gui/mplayer/widgets.c index a99dfd0152..30ed8a31b9 100644 --- a/Gui/mplayer/widgets.c +++ b/Gui/mplayer/widgets.c @@ -19,6 +19,7 @@ #include "../events.h" #include "../../config.h" +#include "../../help_mp.h" #include "../error.h" #include "pixmaps/up.xpm" diff --git a/Gui/skin/skin.c b/Gui/skin/skin.c index d410306372..973363bd15 100644 --- a/Gui/skin/skin.c +++ b/Gui/skin/skin.c @@ -7,8 +7,8 @@ #include "error.h" #include "font.h" #include "../app.h" -#include "../language.h" #include "../../config.h" +#include "../../help_mp.h" listItems * skinAppMPlayer = &appMPlayer; @@ -28,23 +28,27 @@ void ERRORMESSAGE( const char * format, ... ) va_start( ap,format ); vsnprintf( p,512,format,ap ); va_end( ap ); - message( False,"[skin] error in skin config file on line %d: %s",linenumber,p ); +// message( False,"[skin] error in skin config file on line %d: %s",linenumber,p ); + message( False,MSGTR_SKIN_ERRORMESSAGE,linenumber,p ); } -#define CHECKDEFLIST( str ) { \ - if ( defList == NULL ) \ - { \ - message( False,"[skin] warning in skin config file on line %d: widget found but before \"section\" not found ("str")",linenumber ); \ - return 1; \ - } \ - } -#define CHECKWINLIST( str ) { \ - if ( !strlen( winList ) ) \ - { \ - message( False,"[skin] warning in skin config file on line %d: widget found but before \"subsection\" not found ("str")",linenumber ); \ - return 1; \ - } \ - } +#define CHECKDEFLIST( str ) \ +{ \ + if ( defList == NULL ) \ + { \ + message( False,MSGTR_SKIN_WARNING1,linenumber,str ); \ + return 1; \ + } \ +} + +#define CHECKWINLIST( str ) \ +{ \ + if ( !strlen( winList ) ) \ + { \ + message( False,MSGTR_SKIN_WARNING2,linenumber,str ); \ + return 1; \ + } \ +} char * strlower( char * in ) { @@ -58,14 +62,14 @@ int skinBPRead( char * fname, txSample * bf ) int i=bpRead( fname,bf ); switch ( i ) { - case -1: ERRORMESSAGE( "16 bits or less depth bitmap not supported ( %s ).\n",fname ); break; - case -2: ERRORMESSAGE( "file not found ( %s )\n",fname ); break; - case -3: ERRORMESSAGE( "bmp read error ( %s )\n",fname ); break; - case -4: ERRORMESSAGE( "tga read error ( %s )\n",fname ); break; - case -5: ERRORMESSAGE( "png read error ( %s )\n",fname ); break; - case -6: ERRORMESSAGE( "RLE packed tga not supported ( %s )\n",fname ); break; - case -7: ERRORMESSAGE( "unknown file type ( %s )\n",fname ); break; - case -8: ERRORMESSAGE( "24 bit to 32 bit convert error ( %s )\n",fname ); break; + case -1: ERRORMESSAGE( MSGTR_SKIN_BITMAP_16bit,fname ); break; + case -2: ERRORMESSAGE( MSGTR_SKIN_BITMAP_FileNotFound,fname ); break; + case -3: ERRORMESSAGE( MSGTR_SKIN_BITMAP_BMPReadError,fname ); break; + case -4: ERRORMESSAGE( MSGTR_SKIN_BITMAP_TGAReadError,fname ); break; + case -5: ERRORMESSAGE( MSGTR_SKIN_BITMAP_PNGReadError,fname ); break; + case -6: ERRORMESSAGE( MSGTR_SKIN_BITMAP_RLENotSupported,fname ); break; + case -7: ERRORMESSAGE( MSGTR_SKIN_BITMAP_UnknownFileType,fname ); break; + case -8: ERRORMESSAGE( MSGTR_SKIN_BITMAP_ConvertError,fname ); break; } return i; } @@ -133,7 +137,7 @@ int __base( char * in ) defList->main.Mask.BPP=1; defList->main.Mask.ImageSize=defList->main.Mask.Width * defList->main.Mask.Height / 8; defList->main.Mask.Image=(char *)calloc( 1,defList->main.Mask.ImageSize ); - if ( defList->main.Mask.Image == NULL ) message( True,langNEMFMM ); + if ( defList->main.Mask.Image == NULL ) message( True,MSGTR_NEMFMM ); { int i,b,c=0; unsigned long * buf = NULL; unsigned char tmp = 0; int nothaveshape = 1; buf=(unsigned long *)defList->main.Bitmap.Image; @@ -244,7 +248,7 @@ int __button( char * in ) #endif if ( ( defList->Items[ defList->NumberOfItems ].msg=appFindMessage( msg ) ) == -1 ) - { ERRORMESSAGE( "unknown message: %s\n",msg ); return 1; } + { ERRORMESSAGE( MSGTR_SKIN_BITMAP_UnknownMessage,msg ); return 1; } defList->Items[ defList->NumberOfItems ].pressed=btnReleased; if ( defList->Items[ defList->NumberOfItems ].msg == evPauseSwitchToPlay ) defList->Items[ defList->NumberOfItems ].pressed=btnDisabled; defList->Items[ defList->NumberOfItems ].tmp=1; @@ -312,7 +316,7 @@ int __menu( char * in ) #endif if ( ( defList->MenuItems[ defList->NumberOfMenuItems ].msg=msg ) == -1 ) - ERRORMESSAGE( "unknown message: %s\n",tmp ); + ERRORMESSAGE( MSGTR_SKIN_BITMAP_UnknownMessage,tmp ); #ifdef DEBUG dbprintf( 3,"[skin] message: %d\n",defList->Items[ defList->NumberOfItems ].msg ); @@ -449,8 +453,8 @@ int __font( char * in ) item->fontid=fntAddNewFont( name ); switch ( item->fontid ) { - case -1: ERRORMESSAGE( "not enought memory\n" ); return 1; - case -2: ERRORMESSAGE( "too many fonts\n" ); return 1; + case -1: ERRORMESSAGE( MSGTR_SKIN_FONT_NotEnoughtMemory ); return 1; + case -2: ERRORMESSAGE( MSGTR_SKIN_FONT_TooManyFontsDeclared ); return 1; } #ifdef DEBUG @@ -459,8 +463,8 @@ int __font( char * in ) switch ( fntRead( path,name,item->fontid ) ) { - case -1: ERRORMESSAGE( "font file not found\n" ); return 1; - case -2: ERRORMESSAGE( "font image not found\n" ); return 1; + case -1: ERRORMESSAGE( MSGTR_SKIN_FONT_FontFileNotFound ); return 1; + case -2: ERRORMESSAGE( MSGTR_SKIN_FONT_FontImageNotFound ); return 1; } return 0; @@ -483,7 +487,7 @@ int __slabel( char * in ) x=cutItemToInt( in,',',0 ); y=cutItemToInt( in,',',1 ); cutItem( in,sid,',',2 ); id=fntFindID( sid ); - if ( id < 0 ) { ERRORMESSAGE( "nonexistent font id. ( %s )\n",sid ); return 1; } + if ( id < 0 ) { ERRORMESSAGE( MSGTR_SKIN_FONT_NonExistentFontID,sid ); return 1; } cutItem( in,tmp,',',3 ); cutItem( tmp,tmp,'"',1 ); #ifdef DEBUG @@ -498,7 +502,7 @@ int __slabel( char * in ) item->fontid=id; item->x=x; item->y=y; item->width=-1; item->height=-1; - if ( ( item->label=malloc( strlen( tmp ) + 1 ) ) == NULL ) { ERRORMESSAGE( "not enought memory.\n" ); return 1; } + if ( ( item->label=malloc( strlen( tmp ) + 1 ) ) == NULL ) { ERRORMESSAGE( MSGTR_SKIN_FONT_NotEnoughtMemory ); return 1; } strcpy( item->label,tmp ); return 0; @@ -523,7 +527,7 @@ int __dlabel( char * in ) sx=cutItemToInt( in,',',2 ); a=cutItemToInt( in,',',3 ); cutItem( in,sid,',',4 ); id=fntFindID( sid ); - if ( id < 0 ) { ERRORMESSAGE( "nonexistent font id. ( %s )\n",sid ); return 1; } + if ( id < 0 ) { ERRORMESSAGE( MSGTR_SKIN_FONT_NonExistentFontID,sid ); return 1; } cutItem( in,tmp,',',5 ); cutItem( tmp,tmp,'"',1 ); #ifdef DEBUG @@ -538,7 +542,7 @@ int __dlabel( char * in ) item->fontid=id; item->align=a; item->x=x; item->y=y; item->width=sx; item->height=-1; - if ( ( item->label=malloc( strlen( tmp ) + 1 ) ) == NULL ) { ERRORMESSAGE( "not enought memory.\n" ); return 1; } + if ( ( item->label=malloc( strlen( tmp ) + 1 ) ) == NULL ) { ERRORMESSAGE( MSGTR_SKIN_FONT_NotEnoughtMemory ); return 1; } strcpy( item->label,tmp ); return 0; @@ -555,7 +559,7 @@ int __decoration( char * in ) dbprintf( 0,"\n[skin] window decoration is %s\n",in ); #endif cutItem( in,tmp,',',0 ); - if ( strcmp( tmp,"enable" )&&strcmp( tmp,"disable" ) ) { ERRORMESSAGE( "unknown parameter.\n" ); return 1; } + if ( strcmp( tmp,"enable" )&&strcmp( tmp,"disable" ) ) { ERRORMESSAGE( MSGTR_SKIN_UnknownParameter,tmp ); return 1; } if ( strcmp( tmp,"enable" ) ) defList->mainDecoration=0; else defList->mainDecoration=1; diff --git a/help_mp-de.h b/help_mp-de.h index 3d6114c358..69fd427307 100644 --- a/help_mp-de.h +++ b/help_mp-de.h @@ -118,4 +118,44 @@ static char help_text[]= //#define MSGTR_ +#ifdef HAVE_NEW_GUI +// --- labels --- +#define MSGTR_About "About" +#define MSGTR_FileSelect "Select file ..." +#define MSGTR_MessageBox "MessageBox" +#define MSGTR_PlayList "PlayList" +#define MSGTR_SkinBrowser "Skin Browser" + +// --- buttons --- +#define MSGTR_Ok "Ok" +#define MSGTR_Cancel "Cancel" +#define MSGTR_Add "Add" +#define MSGTR_Remove "Remove" + +// --- error messages --- +#define MSGTR_NEMDB "Sorry, not enough memory for draw buffer." +#define MSGTR_NEMFMR "Sorry, not enough memory for menu rendering." +#define MSGTR_NEMFMM "Sorry, not enough memory for main window shape mask." + +// --- skin loader error messages +#define MSGTR_SKIN_ERRORMESSAGE "[skin] error in skin config file on line %d: %s" +#define MSGTR_SKIN_WARNING1 "[skin] warning in skin config file on line %d: widget found but before \"section\" n +#define MSGTR_SKIN_WARNING2 "[skin] warning in skin config file on line %d: widget found but before \"subsection\ +#define MSGTR_SKIN_BITMAP_16bit "16 bits or less depth bitmap not supported ( %s ).\n" +#define MSGTR_SKIN_BITMAP_FileNotFound "file not found ( %s )\n" +#define MSGTR_SKIN_BITMAP_BMPReadError "bmp read error ( %s )\n" +#define MSGTR_SKIN_BITMAP_TGAReadError "tga read error ( %s )\n" +#define MSGTR_SKIN_BITMAP_PNGReadError "png read error ( %s )\n" +#define MSGTR_SKIN_BITMAP_RLENotSupported "RLE packed tga not supported ( %s )\n" +#define MSGTR_SKIN_BITMAP_UnknownFileType "unknown file type ( %s )\n" +#define MSGTR_SKIN_BITMAP_ConvertError "24 bit to 32 bit convert error ( %s )\n" +#define MSGTR_SKIN_BITMAP_UnknownMessage "unknown message: %s\n" +#define MSGTR_SKIN_FONT_NotEnoughtMemory "not enought memory\n" +#define MSGTR_SKIN_FONT_TooManyFontsDeclared "too many fonts declared\n" +#define MSGTR_SKIN_FONT_FontFileNotFound "font file not found\n" +#define MSGTR_SKIN_FONT_FontImageNotFound "font image file not found\n" +#define MSGTR_SKIN_FONT_NonExistentFontID "non-existent font identifier ( %s )\n" +#define MSGTR_SKIN_UnknownParameter "unknown parameter ( %s )\n" + +#endif diff --git a/help_mp-en.h b/help_mp-en.h index a70436bb1d..84ae25dcad 100644 --- a/help_mp-en.h +++ b/help_mp-en.h @@ -116,4 +116,44 @@ static char help_text[]= //#define MSGTR_ +#ifdef HAVE_NEW_GUI +// --- labels --- +#define MSGTR_About "About" +#define MSGTR_FileSelect "Select file ..." +#define MSGTR_MessageBox "MessageBox" +#define MSGTR_PlayList "PlayList" +#define MSGTR_SkinBrowser "Skin Browser" + +// --- buttons --- +#define MSGTR_Ok "Ok" +#define MSGTR_Cancel "Cancel" +#define MSGTR_Add "Add" +#define MSGTR_Remove "Remove" + +// --- error messages --- +#define MSGTR_NEMDB "Sorry, not enough memory for draw buffer." +#define MSGTR_NEMFMR "Sorry, not enough memory for menu rendering." +#define MSGTR_NEMFMM "Sorry, not enough memory for main window shape mask." + +// --- skin loader error messages +#define MSGTR_SKIN_ERRORMESSAGE "[skin] error in skin config file on line %d: %s" +#define MSGTR_SKIN_WARNING1 "[skin] warning in skin config file on line %d: widget found but before \"section\" not found ( %s )" +#define MSGTR_SKIN_WARNING2 "[skin] warning in skin config file on line %d: widget found but before \"subsection\" not found (%s)" +#define MSGTR_SKIN_BITMAP_16bit "16 bits or less depth bitmap not supported ( %s ).\n" +#define MSGTR_SKIN_BITMAP_FileNotFound "file not found ( %s )\n" +#define MSGTR_SKIN_BITMAP_BMPReadError "bmp read error ( %s )\n" +#define MSGTR_SKIN_BITMAP_TGAReadError "tga read error ( %s )\n" +#define MSGTR_SKIN_BITMAP_PNGReadError "png read error ( %s )\n" +#define MSGTR_SKIN_BITMAP_RLENotSupported "RLE packed tga not supported ( %s )\n" +#define MSGTR_SKIN_BITMAP_UnknownFileType "unknown file type ( %s )\n" +#define MSGTR_SKIN_BITMAP_ConvertError "24 bit to 32 bit convert error ( %s )\n" +#define MSGTR_SKIN_BITMAP_UnknownMessage "unknown message: %s\n" +#define MSGTR_SKIN_FONT_NotEnoughtMemory "not enought memory\n" +#define MSGTR_SKIN_FONT_TooManyFontsDeclared "too many fonts declared\n" +#define MSGTR_SKIN_FONT_FontFileNotFound "font file not found\n" +#define MSGTR_SKIN_FONT_FontImageNotFound "font image file not found\n" +#define MSGTR_SKIN_FONT_NonExistentFontID "non-existent font identifier ( %s )\n" +#define MSGTR_SKIN_UnknownParameter "unknown parameter ( %s )\n" + +#endif diff --git a/help_mp-hu.h b/help_mp-hu.h index e50693e701..4942fbe3fc 100644 --- a/help_mp-hu.h +++ b/help_mp-hu.h @@ -116,3 +116,45 @@ static char help_text[]= #define MSGTR_MissingMPEGaudio "MPEG: Nincs hangfolyam... -> hang nélkül\n" //#define MSGTR_ + +#ifdef HAVE_NEW_GUI + +// --- labels --- +#define MSGTR_About "About" +#define MSGTR_FileSelect "Select file ..." +#define MSGTR_MessageBox "MessageBox" +#define MSGTR_PlayList "PlayList" +#define MSGTR_SkinBrowser "Skin Browser" + +// --- buttons --- +#define MSGTR_Ok "Ok" +#define MSGTR_Cancel "Cancel" +#define MSGTR_Add "Add" +#define MSGTR_Remove "Remove" + +// --- error messages --- +#define MSGTR_NEMDB "Sorry, not enough memory for draw buffer." +#define MSGTR_NEMFMR "Sorry, not enough memory for menu rendering." +#define MSGTR_NEMFMM "Sorry, not enough memory for main window shape mask." + +// --- skin loader error messages +#define MSGTR_SKIN_ERRORMESSAGE "[skin] error in skin config file on line %d: %s" +#define MSGTR_SKIN_WARNING1 "[skin] warning in skin config file on line %d: widget found but before \"section\" n +#define MSGTR_SKIN_WARNING2 "[skin] warning in skin config file on line %d: widget found but before \"subsection\ +#define MSGTR_SKIN_BITMAP_16bit "16 bits or less depth bitmap not supported ( %s ).\n" +#define MSGTR_SKIN_BITMAP_FileNotFound "file not found ( %s )\n" +#define MSGTR_SKIN_BITMAP_BMPReadError "bmp read error ( %s )\n" +#define MSGTR_SKIN_BITMAP_TGAReadError "tga read error ( %s )\n" +#define MSGTR_SKIN_BITMAP_PNGReadError "png read error ( %s )\n" +#define MSGTR_SKIN_BITMAP_RLENotSupported "RLE packed tga not supported ( %s )\n" +#define MSGTR_SKIN_BITMAP_UnknownFileType "unknown file type ( %s )\n" +#define MSGTR_SKIN_BITMAP_ConvertError "24 bit to 32 bit convert error ( %s )\n" +#define MSGTR_SKIN_BITMAP_UnknownMessage "unknown message: %s\n" +#define MSGTR_SKIN_FONT_NotEnoughtMemory "not enought memory\n" +#define MSGTR_SKIN_FONT_TooManyFontsDeclared "too many fonts declared\n" +#define MSGTR_SKIN_FONT_FontFileNotFound "font file not found\n" +#define MSGTR_SKIN_FONT_FontImageNotFound "font image file not found\n" +#define MSGTR_SKIN_FONT_NonExistentFontID "non-existent font identifier ( %s )\n" +#define MSGTR_SKIN_UnknownParameter "unknown parameter ( %s )\n" + +#endif diff --git a/help_mp-pl.h b/help_mp-pl.h index c1dd0a5912..9d5e1f9c4d 100644 --- a/help_mp-pl.h +++ b/help_mp-pl.h @@ -117,4 +117,45 @@ static char help_text[]= //#define MSGTR_ +#ifdef HAVE_NEW_GUI + +// --- labels --- +#define MSGTR_About "About" +#define MSGTR_FileSelect "Select file ..." +#define MSGTR_MessageBox "MessageBox" +#define MSGTR_PlayList "PlayList" +#define MSGTR_SkinBrowser "Skin B |