]> git.sesse.net Git - vlc/blobdiff - plugins/beos/intf_beos.cpp
* Mandatory step for video output IV and the audio output quality
[vlc] / plugins / beos / intf_beos.cpp
index 22996e03ba1fea6f1be2e0b15b1f5d75229b75e7..554fb903a9cdbf7a2c50e88028bfe4db6a9f20f0 100644 (file)
@@ -2,7 +2,7 @@
  * intf_beos.cpp: beos interface
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: intf_beos.cpp,v 1.24 2001/04/12 11:10:16 tcastley Exp $
+ * $Id: intf_beos.cpp,v 1.27 2001/05/01 04:18:17 sam Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -119,23 +119,26 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name , intf_thread_t
     menu_bar = new BMenuBar(rect, "main menu");
     AddChild( menu_bar );
 
-       BMenu *m; 
-       BMenu *am;
+       BMenu *mFile
+       BMenu *mAudio;
        CDMenu *cd_menu;
+       
+       BMenuItem *mItem;
 
-       menu_bar->AddItem( m = new BMenu("File") );
+       menu_bar->AddItem( mFile = new BMenu("File") );
        menu_bar->ResizeToPreferred();
-       m->AddItem( new BMenuItem("Open File...", new BMessage(OPEN_FILE), 'O'));
+       mFile->AddItem(mItem = new BMenuItem("Open File" B_UTF8_ELLIPSIS, new BMessage(OPEN_FILE), 'O'));
        cd_menu = new CDMenu("Open Disc");
-       m->AddItem(cd_menu);
-       m->AddSeparatorItem();
-       m->AddItem( new BMenuItem("About...", new BMessage(B_ABOUT_REQUESTED), 'A'));
-       m->AddItem( new BMenuItem("Quit", new BMessage(B_QUIT_REQUESTED), 'Q'));
+       mFile->AddItem(cd_menu);
+       mFile->AddSeparatorItem();
+       mFile->AddItem(mItem = new BMenuItem("About" B_UTF8_ELLIPSIS, new BMessage(B_ABOUT_REQUESTED), 'A'));
+       mItem->SetTarget( be_app );
+       mFile->AddItem(mItem = new BMenuItem("Quit", new BMessage(B_QUIT_REQUESTED), 'Q'));
 
-       menu_bar->AddItem (am = new BMenu("Audio") );
+       menu_bar->AddItem ( mAudio = new BMenu("Audio") );
        menu_bar->ResizeToPreferred();
-       am->AddItem( new LanguageMenu("Language", AUDIO_ES, p_intf) );
-       am->AddItem( new LanguageMenu("Subtitles", SPU_ES, p_intf) );
+       mAudio->AddItem( new LanguageMenu("Language", AUDIO_ES, p_intf) );
+       mAudio->AddItem( new LanguageMenu("Subtitles", SPU_ES, p_intf) );
        
 
     rect = Bounds();
@@ -245,10 +248,10 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
        Activate();
     switch( p_message->what )
     {
-    case B_ABOUT_REQUESTED:
-               alert = new BAlert(VOUT_TITLE, "BeOS " VOUT_TITLE "\n\n<www.videolan.org>", "Ok");
-           alert->Go();
-           break;      
+//    case B_ABOUT_REQUESTED:
+//             alert = new BAlert(VOUT_TITLE, "BeOS " VOUT_TITLE "\n\n<www.videolan.org>", "Ok");
+//         alert->Go();
+//         break;      
     
     case OPEN_FILE:
        if(file_panel)
@@ -278,7 +281,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
                        // silence the sound, otherwise very horrible
                        if (p_main->p_aout != NULL)
                        {
-                               p_main->p_aout->vol = 0;
+                               p_main->p_aout->i_vol = 0;
                        }
                        snooze(400000);
                        input_SetStatus(p_intf->p_input, INPUT_STATUS_END);
@@ -290,7 +293,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
 //             {                       
 //                     if (p_main->p_aout != NULL)
 //                     {
-//                             p_main->p_aout->vol = vol_val;
+//                             p_main->p_aout->i_vol = vol_val;
 //                     }
 //                     snooze(400000);
 //                     input_SetStatus(p_intf->p_input, INPUT_STATUS_PLAY);
@@ -306,7 +309,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
                        {
                                if (p_main->p_aout != NULL)
                                {
-                                       p_main->p_aout->vol = 0;
+                                       p_main->p_aout->i_vol = 0;
                                }
                                playback_status = PAUSED;
                        }
@@ -315,7 +318,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
                        {
                                if (p_main->p_aout != NULL)
                                {
-                                       p_main->p_aout->vol = vol_val;
+                                       p_main->p_aout->i_vol = vol_val;
                                }
                                playback_status = PLAYING;
                        }
@@ -329,7 +332,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
                {
                        if (p_main->p_aout != NULL)
                        {
-                               p_main->p_aout->vol = 0;
+                               p_main->p_aout->i_vol = 0;
                        }
                        snooze(400000);
                        input_SetStatus(p_intf->p_input, INPUT_STATUS_FASTER);
@@ -341,7 +344,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
                {
                        if (p_main->p_aout != NULL)
                        {
-                               p_main->p_aout->vol = 0;
+                               p_main->p_aout->i_vol = 0;
                        }
                        snooze(400000);
                        input_SetStatus(p_intf->p_input, INPUT_STATUS_SLOWER);
@@ -354,22 +357,22 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
                // adjust the volume
         if (p_main->p_aout != NULL) 
         {
-                       p_main->p_aout->vol = vol_val;
+                       p_main->p_aout->i_vol = vol_val;
                }
                break;
        case VOLUME_MUTE:
                // mute
         if (p_main->p_aout != NULL) 
            {
-                       if (p_main->p_aout->vol == 0)
+                       if (p_main->p_aout->i_vol == 0)
                        {
                                p_vol->SetEnabled(true);
-                               p_main->p_aout->vol = vol_val;
+                               p_main->p_aout->i_vol = vol_val;
                        }       
                        else
                        {
                                p_vol->SetEnabled(false);
-                               p_main->p_aout->vol = 0;
+                               p_main->p_aout->i_vol = 0;
                        }
                }
                break;