]> git.sesse.net Git - vlc/commitdiff
modules/gui/beos/*: fixed a few things I broke recently (dvd menus,
authorEric Petit <titer@videolan.org>
Wed, 7 May 2003 14:49:19 +0000 (14:49 +0000)
committerEric Petit <titer@videolan.org>
Wed, 7 May 2003 14:49:19 +0000 (14:49 +0000)
                     screenshots...)

modules/gui/beos/BeOS.cpp
modules/gui/beos/InterfaceWindow.cpp
modules/gui/beos/VideoOutput.cpp
modules/gui/beos/VlcWrapper.cpp
modules/gui/beos/VlcWrapper.h

index 26817a5566604de8f047525a49f7bb7b79a8a0d0..dc5460b54d54ad10a7813aeb198e4e30cfe6c0df 100644 (file)
@@ -2,7 +2,7 @@
  * beos.cpp : BeOS plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: BeOS.cpp,v 1.9 2003/05/03 13:37:21 titer Exp $
+ * $Id: BeOS.cpp,v 1.10 2003/05/07 14:49:19 titer Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -47,6 +47,9 @@ void E_(CloseVideo)   ( vlc_object_t * );
  * Module descriptor
  *****************************************************************************/
 vlc_module_begin();
+    add_bool( "beos-dvdmenus", 0, NULL, "Use DVD Menus", "", VLC_TRUE );
+    add_string( "beos-screenshotpath", "/boot/home/", NULL, "Screenshot Path", "", VLC_TRUE );
+    add_string( "beos-screenshotformat", NULL, NULL, "Screenshot Format", "", VLC_TRUE );
     set_description( _("BeOS standard API interface") );
     add_submodule();
         set_capability( "interface", 100 );
index 8c278d0818d9bb616a3ff5954e936373a283f313..8abc37dc99bd14d7c290599f87170d320983ecb7 100644 (file)
@@ -2,7 +2,7 @@
  * InterfaceWindow.cpp: beos interface
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: InterfaceWindow.cpp,v 1.36 2003/05/05 13:06:02 titer Exp $
+ * $Id: InterfaceWindow.cpp,v 1.37 2003/05/07 14:49:19 titer Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -189,9 +189,6 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char* name,
          fSettings( new BMessage( 'sett' ) ),
          p_wrapper( p_intf->p_sys->p_wrapper )
 {
-       // TODO: ?!? what about user settings?
-    p_intf->p_sys->b_dvdmenus = false;
-    
     fPlaylistIsEmpty = !( p_wrapper->PlaylistSize() > 0 );
     
     BScreen screen;
@@ -849,7 +846,8 @@ InterfaceWindow::_SetMenusEnabled(bool hasFile, bool hasChapters, bool hasTitles
         if ( fSpeedMenu->IsEnabled() != hasFile )
              fSpeedMenu->SetEnabled( hasFile );
         // "goto menu" menu item
-        bool hasMenu = p_intf->p_sys->b_dvdmenus ? hasTitles : false;
+        bool hasMenu = config_GetInt( p_intf, "beos-dvdmenus" ) ?
+                           hasTitles : false;
         if ( fGotoMenuMI->IsEnabled() != hasMenu )
              fGotoMenuMI->SetEnabled( hasMenu );
         Unlock();
index b65123be524362b7fff4cabad21798997520ea47..8b76614907584cec040066a604a54fc4826264ef 100644 (file)
@@ -2,7 +2,7 @@
  * vout_beos.cpp: beos video output display method
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: VideoOutput.cpp,v 1.17 2003/04/22 16:36:16 titer Exp $
+ * $Id: VideoOutput.cpp,v 1.18 2003/05/07 14:49:19 titer Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -381,10 +381,11 @@ VideoWindow::MessageReceived( BMessage *p_message )
                                                dst += dstBpr;
                                                src += srcBpr;
                                        }
-                                       char* path = config_GetPsz( p_vout, "beos-screenshot-path" );
+                                       char* path = config_GetPsz( p_vout, "beos-screenshotpath" );
                                        if ( !path )
                                                path = strdup( DEFAULT_SCREEN_SHOT_PATH );
-                                       int32 format = config_GetInt( p_vout, "beos-screenshot-format" );
+                                       /* config_GetPsz( p_vout, "beos-screenshotformat" ); */
+                                       int32 format = DEFAULT_SCREEN_SHOT_FORMAT;
                                        _SaveScreenShot( temp, path, format );
                                }
                                else
@@ -911,19 +912,8 @@ VideoWindow::_save_screen_shot( void* cookie )
                BString path( info->path );
                // create the folder if it doesn't exist
                BString folder( info->path );
-               int32 pos = folder.FindLast("/");
-               if ( pos > 0 )
-               {
-                       pos++; // leave the last '/' in the string
-                       if ( pos == path.Length() )
-                               path << "vlc screenshot";
-                       else
-                       {
-                               int32 removeChars = folder.Length() - pos;      
-                               folder.Remove( pos, removeChars );
-                       }
-                       create_directory( folder.String(), 0777 );
-               }
+               create_directory( folder.String(), 0777 );
+               path << "/vlc screenshot";
                BEntry entry( path.String() );
                int32 appendedNumber = 0;
                if ( entry.Exists() && !entry.IsSymLink() )
index 8f1494312a6817887651abc5a043fb0ebece9c68..dc7411dd39f45486694438915fd38c6296ed5a03 100644 (file)
@@ -2,7 +2,7 @@
  * VlcWrapper.cpp: BeOS plugin for vlc (derived from MacOS X port)
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: VlcWrapper.cpp,v 1.29 2003/05/05 22:23:38 gbazin Exp $
+ * $Id: VlcWrapper.cpp,v 1.30 2003/05/07 14:49:19 titer Exp $
  *
  * Authors: Florian G. Pflug <fgp@phlo.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
@@ -397,8 +397,8 @@ void VlcWrapper::OpenFiles( BList* o_files, bool replace, int32 index )
  
 void VlcWrapper::OpenDisc(BString o_type, BString o_device, int i_title, int i_chapter)
 {
-    if( p_intf->p_sys->b_dvdmenus )
-        o_device.Prepend( "dvd:" );
+    if( config_GetInt( p_intf, "beos-dvdmenus" ) )
+        o_device.Prepend( "dvdplay:" );
     else
         o_device.Prepend( "dvdold:" );
     playlist_Add( p_playlist, o_device.String(),
index 48880af6b55c917d0561a8120aadc60162ba6f7a..d824c08153bdc2dbac28ffe2c7e18c805990a4ab 100644 (file)
@@ -2,7 +2,7 @@
  * VlcWrapper.h: BeOS plugin for vlc (derived from MacOS X port)
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: VlcWrapper.h,v 1.21 2003/04/22 16:36:16 titer Exp $
+ * $Id: VlcWrapper.h,v 1.22 2003/05/07 14:49:19 titer Exp $
  *
  * Authors: Florian G. Pflug <fgp@phlo.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
@@ -46,7 +46,6 @@ struct intf_sys_t
     int                  i_part;
     audio_volume_t       i_saved_volume;
     int                  i_channel;
-    bool                 b_dvdmenus;
     
     VlcWrapper *         p_wrapper;
 };