]> git.sesse.net Git - vlc/commitdiff
* modules/gui/win32/win32.cpp: fixed a stupid bug (closes #155)
authorOlivier Teulière <ipkiss@videolan.org>
Sat, 1 Feb 2003 22:21:44 +0000 (22:21 +0000)
committerOlivier Teulière <ipkiss@videolan.org>
Sat, 1 Feb 2003 22:21:44 +0000 (22:21 +0000)
 * modules/gui/win32/menu.cpp: removed some ^M chars

modules/gui/win32/menu.cpp
modules/gui/win32/win32.cpp

index 1b0cb1a9c1a3888e57f00a62dc22a700d785030b..5af25e05a1561ce8ba7baa9d312c6de576af9448 100644 (file)
@@ -2,7 +2,7 @@
  * menu.cpp: functions to handle menu items
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: menu.cpp,v 1.11 2003/01/27 17:41:01 ipkiss Exp $
+ * $Id: menu.cpp,v 1.12 2003/02/01 22:21:44 ipkiss Exp $
  *
  * Authors: Olivier Teuliere <ipkiss@via.ecp.fr>
  *
@@ -86,39 +86,39 @@ void __fastcall TMenusGen::VoutVarClick( TObject *Sender )
 }
 
 /*
- * Modules\r
- */\r
-\r
-/* Interface modules: we spawn a new interface */\r
-void __fastcall TMenusGen::InterfaceModuleClick( TObject *Sender )\r
-{\r
-    TMenuItem * Item = (TMenuItem *)Sender;\r
-\r
-    AnsiString IntfName = CleanCaption( Item->Caption );\r
-\r
-    intf_thread_t *p_newintf;\r
-    char *psz_oldmodule = config_GetPsz( p_intf->p_vlc, "intf" );\r
-\r
-    config_PutPsz( p_intf->p_vlc, "intf", IntfName.c_str() );\r
-    p_newintf = intf_Create( p_intf->p_vlc );\r
-    config_PutPsz( p_intf->p_vlc, "intf", psz_oldmodule );\r
-\r
-    if( psz_oldmodule )\r
-    {\r
-        free( psz_oldmodule );\r
-    }\r
-\r
-    if( p_newintf )\r
-    {\r
-        p_newintf->b_block = VLC_FALSE;\r
-        if( intf_RunThread( p_newintf ) )\r
-        {\r
-            vlc_object_detach( p_newintf );\r
-            intf_Destroy( p_newintf );\r
-        }\r
-    }\r
-}\r
-\r
+ * Modules
+ */
+
+/* Interface modules: we spawn a new interface */
+void __fastcall TMenusGen::InterfaceModuleClick( TObject *Sender )
+{
+    TMenuItem * Item = (TMenuItem *)Sender;
+
+    AnsiString IntfName = CleanCaption( Item->Caption );
+
+    intf_thread_t *p_newintf;
+    char *psz_oldmodule = config_GetPsz( p_intf->p_vlc, "intf" );
+
+    config_PutPsz( p_intf->p_vlc, "intf", IntfName.c_str() );
+    p_newintf = intf_Create( p_intf->p_vlc );
+    config_PutPsz( p_intf->p_vlc, "intf", psz_oldmodule );
+
+    if( psz_oldmodule )
+    {
+        free( psz_oldmodule );
+    }
+
+    if( p_newintf )
+    {
+        p_newintf->b_block = VLC_FALSE;
+        if( intf_RunThread( p_newintf ) )
+        {
+            vlc_object_detach( p_newintf );
+            intf_Destroy( p_newintf );
+        }
+    }
+}
+
 /*
  * Audio
  */
@@ -502,18 +502,18 @@ int __fastcall TMenusGen::Pos2Data( int title, int chapter )
 }
 
 /* This function deletes all the '&' characters in the caption string,
- * because Borland automatically adds one when (and only when!) you click on\r
- * the menuitem. Grrrrr... */\r
-AnsiString __fastcall TMenusGen::CleanCaption( AnsiString Caption )\r
-{\r
-    while( Caption.LastDelimiter( "&" ) != 0 )\r
-    {\r
-        Caption.Delete( Caption.LastDelimiter( "&" ), 1 );\r
-    }\r
-\r
-    return Caption;\r
-}\r
-\r
+ * because Borland automatically adds one when (and only when!) you click on
+ * the menuitem. Grrrrr... */
+AnsiString __fastcall TMenusGen::CleanCaption( AnsiString Caption )
+{
+    while( Caption.LastDelimiter( "&" ) != 0 )
+    {
+        Caption.Delete( Caption.LastDelimiter( "&" ), 1 );
+    }
+
+    return Caption;
+}
+
 /****************************************************************************
  * VarChange: change a variable in a vlc_object_t
  ****************************************************************************
index 6ec407872612178ad81f04fe53226b19e4008430..ccf337f79ff230b2713735c84d25276aa507b1e8 100644 (file)
@@ -2,7 +2,7 @@
  * win32.cpp : Win32 interface plugin for vlc
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: win32.cpp,v 1.13 2003/01/26 02:22:59 ipkiss Exp $
+ * $Id: win32.cpp,v 1.14 2003/02/01 22:21:44 ipkiss Exp $
  *
  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
  *
@@ -268,7 +268,7 @@ int Win32Manage( intf_thread_t *p_intf )
 
         if( b_need_menus )
         {
-            //p_intf->p_sys->p_menus->SetupMenus();
+            p_intf->p_sys->p_menus->SetupMenus();
         }
 
         vlc_mutex_unlock( &p_input->stream.stream_lock );