Commit b901bcae authored by Olivier Teulière's avatar Olivier Teulière

A few modifications to get closer to i18n in the win32 interface

parent be91f7e9
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include <vcl.h> #include <vcl.h>
#pragma hdrstop #pragma hdrstop
#include <vlc/vlc.h>
#include "misc.h" #include "misc.h"
/**************************************************************************** /****************************************************************************
...@@ -32,8 +34,8 @@ ...@@ -32,8 +34,8 @@
void __fastcall Translate( TForm *Form ) void __fastcall Translate( TForm *Form )
{ {
#if 0 #if 0
Form->Hint = _( Form->Hint ); Form->Hint = _( Form->Hint.c_str() );
Form->Caption = _( Form->Caption ); Form->Caption = _( Form->Caption.c_str() );
int i; int i;
for( i = 0; i < Form->ComponentCount; i++ ) for( i = 0; i < Form->ComponentCount; i++ )
...@@ -49,12 +51,12 @@ void __fastcall Translate( TForm *Form ) ...@@ -49,12 +51,12 @@ void __fastcall Translate( TForm *Form )
if( Component->InheritsFrom( __classid( TControl ) ) ) if( Component->InheritsFrom( __classid( TControl ) ) )
{ {
TControl *Object = (TControl *) Component; TControl *Object = (TControl *) Component;
Object->Hint = _( Object->Hint ); Object->Hint = _( Object->Hint.c_str() );
} }
else if( Component->InheritsFrom( __classid( TMenuItem ) ) ) else if( Component->InheritsFrom( __classid( TMenuItem ) ) )
{ {
TMenuItem *Object = (TMenuItem *) Component; TMenuItem *Object = (TMenuItem *) Component;
Object->Hint = _( Object->Hint ); Object->Hint = _( Object->Hint.c_str() );
} }
} }
...@@ -64,47 +66,47 @@ void __fastcall Translate( TForm *Form ) ...@@ -64,47 +66,47 @@ void __fastcall Translate( TForm *Form )
if( Component->InheritsFrom( __classid( TMenuItem ) ) ) if( Component->InheritsFrom( __classid( TMenuItem ) ) )
{ {
TMenuItem *Object = (TMenuItem *) Component; TMenuItem *Object = (TMenuItem *) Component;
Object->Caption = _( Object->Caption ); Object->Caption = _( Object->Caption.c_str() );
} }
else if( Component->InheritsFrom( __classid( TLabel ) ) ) else if( Component->InheritsFrom( __classid( TLabel ) ) )
{ {
TLabel *Object = (TLabel *) Component; TLabel *Object = (TLabel *) Component;
Object->Caption = _( Object->Caption ); Object->Caption = _( Object->Caption.c_str() );
} }
else if( Component->InheritsFrom( __classid( TButton ) ) ) else if( Component->InheritsFrom( __classid( TButton ) ) )
{ {
TButton *Object = (TButton *) Component; TButton *Object = (TButton *) Component;
Object->Caption = _( Object->Caption ); Object->Caption = _( Object->Caption.c_str() );
} }
else if( Component->InheritsFrom( __classid( TToolButton ) ) ) else if( Component->InheritsFrom( __classid( TToolButton ) ) )
{ {
TToolButton *Object = (TToolButton *) Component; TToolButton *Object = (TToolButton *) Component;
Object->Caption = _( Object->Caption ); Object->Caption = _( Object->Caption.c_str() );
} }
else if( Component->InheritsFrom( __classid( TRadioButton ) ) ) else if( Component->InheritsFrom( __classid( TRadioButton ) ) )
{ {
TRadioButton *Object = (TRadioButton *) Component; TRadioButton *Object = (TRadioButton *) Component;
Object->Caption = _( Object->Caption ); Object->Caption = _( Object->Caption.c_str() );
} }
else if( Component->InheritsFrom( __classid( TCheckBox ) ) ) else if( Component->InheritsFrom( __classid( TCheckBox ) ) )
{ {
TCheckBox *Object = (TCheckBox *) Component; TCheckBox *Object = (TCheckBox *) Component;
Object->Caption = _( Object->Caption ); Object->Caption = _( Object->Caption.c_str() );
} }
else if( Component->InheritsFrom( __classid( TRadioGroup ) ) ) else if( Component->InheritsFrom( __classid( TRadioGroup ) ) )
{ {
TRadioGroup *Object = (TRadioGroup *) Component; TRadioGroup *Object = (TRadioGroup *) Component;
Object->Caption = _( Object->Caption ); Object->Caption = _( Object->Caption.c_str() );
} }
else if( Component->InheritsFrom( __classid( TGroupBox ) ) ) else if( Component->InheritsFrom( __classid( TGroupBox ) ) )
{ {
TGroupBox *Object = (TGroupBox *) Component; TGroupBox *Object = (TGroupBox *) Component;
Object->Caption = _( Object->Caption ); Object->Caption = _( Object->Caption.c_str() );
} }
else if( Component->InheritsFrom( __classid( TTabSheet ) ) ) else if( Component->InheritsFrom( __classid( TTabSheet ) ) )
{ {
TTabSheet *Object = (TTabSheet *) Component; TTabSheet *Object = (TTabSheet *) Component;
Object->Caption = _( Object->Caption ); Object->Caption = _( Object->Caption.c_str() );
} }
else if( Component->InheritsFrom( __classid( TListView ) ) ) else if( Component->InheritsFrom( __classid( TListView ) ) )
{ {
...@@ -112,7 +114,7 @@ void __fastcall Translate( TForm *Form ) ...@@ -112,7 +114,7 @@ void __fastcall Translate( TForm *Form )
int iCol; int iCol;
for( iCol = 0; iCol < Object->Columns->Count; iCol++ ) for( iCol = 0; iCol < Object->Columns->Count; iCol++ )
Object->Columns->Items[iCol]->Caption = Object->Columns->Items[iCol]->Caption =
_( Object->Columns->Items[iCol]->Caption ); _( Object->Columns->Items[iCol]->Caption.c_str() );
} }
} }
...@@ -122,12 +124,12 @@ void __fastcall Translate( TForm *Form ) ...@@ -122,12 +124,12 @@ void __fastcall Translate( TForm *Form )
if( Component->InheritsFrom( __classid( TEdit ) ) ) if( Component->InheritsFrom( __classid( TEdit ) ) )
{ {
TEdit *Object = (TEdit *) Component; TEdit *Object = (TEdit *) Component;
Object->Text = _( Object->Text ); Object->Text = _( Object->Text.c_str() );
} }
else if( Component->InheritsFrom( __classid( TComboBox ) ) ) else if( Component->InheritsFrom( __classid( TComboBox ) ) )
{ {
TComboBox *Object = (TComboBox *) Component; TComboBox *Object = (TComboBox *) Component;
Object->Text = _( Object->Text ); Object->Text = _( Object->Text.c_str() );
} }
} }
} }
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<USERDEFINES value="_DEBUG;WIN32;__VLC__;__PLUGIN__;MODULE_NAME_IS_win32"/> <USERDEFINES value="_DEBUG;WIN32;__VLC__;__PLUGIN__;MODULE_NAME_IS_win32"/>
<SYSDEFINES value="NO_STRICT"/> <SYSDEFINES value="NO_STRICT"/>
<MAINSOURCE value="win32.bpf"/> <MAINSOURCE value="win32.bpf"/>
<INCLUDEPATH value="F:\ProgInst\Borland\CBuilder5\Bin;..\..\win32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\include;..\..\.."/> <INCLUDEPATH value="F:\ProgInst\Borland\CBuilder5\Bin;..\..\win32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\include;..\..\..;..\..\..\intl"/>
<LIBPATH value="F:\ProgInst\Borland\CBuilder5\Bin;..\..\win32;$(BCB)\lib\obj;$(BCB)\lib"/> <LIBPATH value="F:\ProgInst\Borland\CBuilder5\Bin;..\..\win32;$(BCB)\lib\obj;$(BCB)\lib"/>
<WARNINGS value="-w-par"/> <WARNINGS value="-w-par"/>
</MACROS> </MACROS>
...@@ -112,4 +112,4 @@ ActiveLang= ...@@ -112,4 +112,4 @@ ActiveLang=
ProjectLang= ProjectLang=
RootDir= RootDir=
</IDEOPTIONS> </IDEOPTIONS>
</PROJECT> </PROJECT>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment