]> git.sesse.net Git - vlc/commitdiff
*** empty log message ***
authorRichard Shepherd <richards@videolan.org>
Mon, 5 Mar 2001 22:29:02 +0000 (22:29 +0000)
committerRichard Shepherd <richards@videolan.org>
Mon, 5 Mar 2001 22:29:02 +0000 (22:29 +0000)
plugins/beos/InterfaceWindow.h
plugins/beos/intf_beos.cpp
plugins/beos/vout_beos.cpp

index 1ef864cf9f3519853182a8d9d8400f7712491104..887489c52e7906dcc7a893b79877c366d55126a0 100644 (file)
@@ -22,8 +22,6 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MENU_HEIGHT 15
-
 class InterfaceWindow : public BWindow
 {
 public:
index f1f5b35d51eea958f227ab8aa2cc2c34b42742d8..31df1154f5c330f723c542e1c0dc906284f2c370 100644 (file)
@@ -2,7 +2,7 @@
  * intf_beos.cpp: beos interface
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: intf_beos.cpp,v 1.15 2001/03/05 20:36:04 richards Exp $
+ * $Id: intf_beos.cpp,v 1.16 2001/03/05 22:29:02 richards Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
 #include <Locker.h>
 #include <DirectWindow.h>
 #include <Box.h>
+#include <Alert.h>
 #include <MenuBar.h>
 #include <MenuItem.h>
 #include <FilePanel.h>
-#include <Alert.h>
 #include <malloc.h>
 #include <string.h>
 
@@ -107,14 +107,13 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name , intf_thread_t
 
     SetName( "interface" );
     SetTitle(VOUT_TITLE " (BeOS interface)");
-    BRect rect(0, 0, 0, MENU_HEIGHT);
+    BRect rect(0, 0, 0, 0);
     
     BMenuBar *menu_bar; 
     menu_bar = new BMenuBar(rect, "main menu");
     AddChild( menu_bar );
 
        BMenu *m;
-       BMenuItem *i;
 
        menu_bar->AddItem( m = new BMenu("File") );
        menu_bar->ResizeToPreferred();
@@ -226,7 +225,6 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
 {
        int vol_val = p_vol->Value();   // remember the current volume
        static int playback_status;             // remember playback state
-       
        BAlert *alert;
        
        Activate();
@@ -244,8 +242,9 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
        break;
 
     case OPEN_DVD:
-       alert = new BAlert(VOUT_TITLE, "Opening DVDs not yet implemented", "Bummer");
-       alert->Go();
+           alert = new BAlert(VOUT_TITLE, "Opening DVD not yet supported", "Bummer");
+           alert->Go();
+           //intf_PlstAdd( p_main->p_playlist, PLAYLIST_END, "dvd:/dev/disk/ide/atapi/1/master/0/raw" );
        break;
 
     case STOP_PLAYBACK:
@@ -349,10 +348,12 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
            {
                        if (p_main->p_aout->vol == 0)
                        {
+                               p_vol->SetEnabled(true);
                                p_main->p_aout->vol = vol_val;
                        }       
                        else
                        {
+                               p_vol->SetEnabled(false);
                                p_main->p_aout->vol = 0;
                        }
                }
index 254c753679faa6d2397af60175257724b735c829..3713e8a2b36a163bd544a9115dd69851302ac12d 100644 (file)
@@ -142,15 +142,15 @@ int32 DrawingThread(void *data)
  *****************************************************************************/
 
 VideoWindow::VideoWindow(BRect frame, const char *name, vout_thread_t *p_video_output )
-        : BWindow(frame, name, B_DOCUMENT_WINDOW, NULL)
+        : BWindow(frame, name, B_TITLED_WINDOW, NULL)
 {
        float minWidth, minHeight, maxWidth, maxHeight; 
 
     teardownwindow = false;
     is_zoomed = false;
     p_vout = p_video_output;
-    fDrawThreadID = NULL;
-
+       fDrawThreadID = NULL;
+       
     rect = Frame();
     view = new VLCView(Bounds());
     AddChild(view);
@@ -192,10 +192,6 @@ VideoWindow::VideoWindow(BRect frame, const char *name, vout_thread_t *p_video_o
                SetTitle(VOUT_TITLE " (BBitmap output)");
         }
 
-       i_bytes_per_pixel = bitmap[0]->BytesPerRow()/bitmap[0]->Bounds().IntegerWidth();
-    fRowBytes = bitmap[0]->BytesPerRow();
-    fDirty = false;
-
        if(fUsingOverlay)
                {
                memset(bitmap[0]->Bits(), 0, bitmap[0]->BitsLength());
@@ -208,11 +204,15 @@ VideoWindow::VideoWindow(BRect frame, const char *name, vout_thread_t *p_video_o
                SetSizeLimits((float) Bounds().IntegerWidth(), maxWidth, (float) Bounds().IntegerHeight(), maxHeight);
                }
        else
-       {
-           fDrawThreadID = spawn_thread(DrawingThread, "drawing_thread",
+               {
+       fDrawThreadID = spawn_thread(DrawingThread, "drawing_thread",
                     B_DISPLAY_PRIORITY, (void*) this);
-               resume_thread(fDrawThreadID);
-               }
+       resume_thread(fDrawThreadID);
+       }
+
+       i_bytes_per_pixel = bitmap[0]->BytesPerRow()/bitmap[0]->Bounds().IntegerWidth();
+    fRowBytes = bitmap[0]->BytesPerRow();
+    fDirty = false;
     Show();
 }
 
@@ -248,7 +248,6 @@ if(is_zoomed)
        {
        MoveTo(rect.left, rect.top);
        ResizeTo(rect.IntegerWidth(), rect.IntegerHeight());
-       SetLook(B_DOCUMENT_WINDOW_LOOK);
        be_app->ShowCursor();
        }
 else
@@ -260,7 +259,6 @@ else
        delete screen;
        MoveTo(0,0);
        ResizeTo(rect.IntegerWidth(), rect.IntegerHeight());
-       SetLook(B_NO_BORDER_WINDOW_LOOK);
        be_app->HideCursor();
        }
 is_zoomed = !is_zoomed;