]> git.sesse.net Git - vlc/commitdiff
A few modifications to get closer to i18n in the win32 interface
authorOlivier Teulière <ipkiss@videolan.org>
Thu, 27 Feb 2003 22:09:24 +0000 (22:09 +0000)
committerOlivier Teulière <ipkiss@videolan.org>
Thu, 27 Feb 2003 22:09:24 +0000 (22:09 +0000)
modules/gui/win32/misc.cpp
modules/gui/win32/win32.bpr

index a052e6f34b00f21eb711d2628c07821db3e7fc9a..13367a058842ad73a8c2082ed4c89dd8f27ab2af 100644 (file)
@@ -23,6 +23,8 @@
 #include <vcl.h>\r
 #pragma hdrstop\r
 \r
+#include <vlc/vlc.h>\r
+\r
 #include "misc.h"\r
 \r
 /****************************************************************************\r
@@ -32,8 +34,8 @@
 void __fastcall Translate( TForm *Form )\r
 {\r
 #if 0\r
-    Form->Hint = _( Form->Hint );\r
-    Form->Caption = _( Form->Caption );\r
+    Form->Hint = _( Form->Hint.c_str() );\r
+    Form->Caption = _( Form->Caption.c_str() );\r
 \r
     int i;\r
     for( i = 0; i < Form->ComponentCount; i++ )\r
@@ -49,12 +51,12 @@ void __fastcall Translate( TForm *Form )
                 if( Component->InheritsFrom( __classid( TControl ) ) )\r
                 {\r
                     TControl *Object = (TControl *) Component;\r
-                    Object->Hint = _( Object->Hint );\r
+                    Object->Hint = _( Object->Hint.c_str() );\r
                 }\r
                 else if( Component->InheritsFrom( __classid( TMenuItem ) ) )\r
                 {\r
                     TMenuItem *Object = (TMenuItem *) Component;\r
-                    Object->Hint = _( Object->Hint );\r
+                    Object->Hint = _( Object->Hint.c_str() );\r
                 }\r
             }\r
 \r
@@ -64,47 +66,47 @@ void __fastcall Translate( TForm *Form )
                 if( Component->InheritsFrom( __classid( TMenuItem ) ) )\r
                 {\r
                     TMenuItem *Object = (TMenuItem *) Component;\r
-                    Object->Caption = _( Object->Caption );\r
+                    Object->Caption = _( Object->Caption.c_str() );\r
                 }\r
                 else if( Component->InheritsFrom( __classid( TLabel ) ) )\r
                 {\r
                     TLabel *Object = (TLabel *) Component;\r
-                    Object->Caption = _( Object->Caption );\r
+                    Object->Caption = _( Object->Caption.c_str() );\r
                 }\r
                 else if( Component->InheritsFrom( __classid( TButton ) ) )\r
                 {\r
                     TButton *Object = (TButton *) Component;\r
-                    Object->Caption = _( Object->Caption );\r
+                    Object->Caption = _( Object->Caption.c_str() );\r
                 }\r
                 else if( Component->InheritsFrom( __classid( TToolButton ) ) )\r
                 {\r
                     TToolButton *Object = (TToolButton *) Component;\r
-                    Object->Caption = _( Object->Caption );\r
+                    Object->Caption = _( Object->Caption.c_str() );\r
                 }\r
                 else if( Component->InheritsFrom( __classid( TRadioButton ) ) )\r
                 {\r
                     TRadioButton *Object = (TRadioButton *) Component;\r
-                    Object->Caption = _( Object->Caption );\r
+                    Object->Caption = _( Object->Caption.c_str() );\r
                 }\r
                 else if( Component->InheritsFrom( __classid( TCheckBox ) ) )\r
                 {\r
                     TCheckBox *Object = (TCheckBox *) Component;\r
-                    Object->Caption = _( Object->Caption );\r
+                    Object->Caption = _( Object->Caption.c_str() );\r
                 }\r
                 else if( Component->InheritsFrom( __classid( TRadioGroup ) ) )\r
                 {\r
                     TRadioGroup *Object = (TRadioGroup *) Component;\r
-                    Object->Caption = _( Object->Caption );\r
+                    Object->Caption = _( Object->Caption.c_str() );\r
                 }\r
                 else if( Component->InheritsFrom( __classid( TGroupBox ) ) )\r
                 {\r
                     TGroupBox *Object = (TGroupBox *) Component;\r
-                    Object->Caption = _( Object->Caption );\r
+                    Object->Caption = _( Object->Caption.c_str() );\r
                 }\r
                 else if( Component->InheritsFrom( __classid( TTabSheet ) ) )\r
                 {\r
                     TTabSheet *Object = (TTabSheet *) Component;\r
-                    Object->Caption = _( Object->Caption );\r
+                    Object->Caption = _( Object->Caption.c_str() );\r
                 }\r
                 else if( Component->InheritsFrom( __classid( TListView ) ) )\r
                 {\r
@@ -112,7 +114,7 @@ void __fastcall Translate( TForm *Form )
                     int iCol;\r
                     for( iCol = 0; iCol < Object->Columns->Count; iCol++ )\r
                         Object->Columns->Items[iCol]->Caption =\r
-                                 _( Object->Columns->Items[iCol]->Caption );\r
+                                 _( Object->Columns->Items[iCol]->Caption.c_str() );\r
                 }\r
             }\r
 \r
@@ -122,12 +124,12 @@ void __fastcall Translate( TForm *Form )
                 if( Component->InheritsFrom( __classid( TEdit ) ) )\r
                 {\r
                     TEdit *Object = (TEdit *) Component;\r
-                    Object->Text = _( Object->Text );\r
+                    Object->Text = _( Object->Text.c_str() );\r
                 }\r
                 else if( Component->InheritsFrom( __classid( TComboBox ) ) )\r
                 {\r
                     TComboBox *Object = (TComboBox *) Component;\r
-                    Object->Text = _( Object->Text );\r
+                    Object->Text = _( Object->Text.c_str() );\r
                 }\r
             }\r
         }\r
index fabcc323d2a0a2b9c9afe37bfdaa692b831e7c5d..0411925f7b1803b6f2cbbf502d17681fef024d4a 100644 (file)
@@ -26,7 +26,7 @@
     <USERDEFINES value="_DEBUG;WIN32;__VLC__;__PLUGIN__;MODULE_NAME_IS_win32"/>\r
     <SYSDEFINES value="NO_STRICT"/>\r
     <MAINSOURCE value="win32.bpf"/>\r
-    <INCLUDEPATH value="F:\ProgInst\Borland\CBuilder5\Bin;..\..\win32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\include;..\..\.."/>\r
+    <INCLUDEPATH value="F:\ProgInst\Borland\CBuilder5\Bin;..\..\win32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\include;..\..\..;..\..\..\intl"/>\r
     <LIBPATH value="F:\ProgInst\Borland\CBuilder5\Bin;..\..\win32;$(BCB)\lib\obj;$(BCB)\lib"/>\r
     <WARNINGS value="-w-par"/>\r
   </MACROS>\r
@@ -112,4 +112,4 @@ ActiveLang=
 ProjectLang=\r
 RootDir=\r
   </IDEOPTIONS>\r
-</PROJECT>
\ No newline at end of file
+</PROJECT>\r