]> git.sesse.net Git - vlc/commitdiff
* Move the embedded option to libvlc
authorClément Stenac <zorglub@videolan.org>
Thu, 31 Aug 2006 20:50:50 +0000 (20:50 +0000)
committerClément Stenac <zorglub@videolan.org>
Thu, 31 Aug 2006 20:50:50 +0000 (20:50 +0000)
* Make the interface a bit smaller

modules/gui/qt4/main_interface.cpp
src/libvlc.h

index 0c2e8175ad89fe38f7e5a7900301c94da5d15a02..51a2bda4f9e64d6bd31c32fccb6037161714509c 100644 (file)
 #include "menus.hpp"
 
 #ifdef WIN32
-    #define PREF_W 430
+    #define PREF_W 410
     #define PREF_H 121
 #else
-    #define PREF_W 480
+    #define PREF_W 450
     #define PREF_H 125
 #endif
 
@@ -80,10 +80,10 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     statusBar()->addPermanentWidget( timeLabel, 1 );
 
     resize ( PREF_W, PREF_H );
-//    if( config_GetInt( p_intf, "embedded" ) )
-
+    if( config_GetInt( p_intf, "embedded" ) )
     {
-        videoWidget = new VideoWidget( p_intf, config_GetInt( p_intf, "qt-always-video" ) ? true:false );
+        videoWidget = new VideoWidget( p_intf, config_GetInt( p_intf,
+                                         "qt-always-video" ) ? true:false );
         if( config_GetInt( p_intf, "qt-always-video" ) )
         {
             QSettings settings( "VideoLAN", "VLC" );
@@ -99,15 +99,10 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     readSettings( "MainWindow" );
 
     addSize = QSize( ui.vboxLayout->margin() * 2, PREF_H );
-//    if( config_GetInt( p_intf, "qt-always-video" ) )
-        mainSize.setWidth( videoSize.width() + addSize.width() );
-        mainSize.setHeight( videoSize.height() + addSize.height() );
-//    else
-//        mainSize = QSize( PREF_W, PREF_H );
-    fprintf( stderr, "Resulting size %ix%i", mainSize.width(), mainSize.height() );
+    mainSize.setWidth( videoSize.width() + addSize.width() );
+    mainSize.setHeight( videoSize.height() + addSize.height() );
     resize( mainSize );
     mainSize = size();
-    fprintf( stderr, "After size %ix%i", mainSize.width(), mainSize.height() );
 
     setMinimumSize( PREF_W, addSize.height() );
 
index 3eefed38e7faa08215634766d7cbe3ad698b7f6c..c6684ed5cef79facacd947cb71a893e565aa826f 100644 (file)
@@ -275,6 +275,10 @@ static char *ppsz_align_descriptions[] =
     "Output video in grayscale. As the color information aren't decoded, " \
     "this can save some processing power." )
 
+#define EMBEDDED_TEXT N_("Embedded video")
+#define EMBEDDED_LONGTEXT N_( \
+    "Embed the video output in the main interface." )
+
 #define FULLSCREEN_TEXT N_("Fullscreen video output")
 #define FULLSCREEN_LONGTEXT N_( \
     "Start video in fullscreen mode" )
@@ -1249,6 +1253,8 @@ vlc_module_begin();
     add_bool( "fullscreen", 0, NULL, FULLSCREEN_TEXT,
               FULLSCREEN_LONGTEXT, VLC_FALSE );
         change_short('f');
+    add_bool( "embedded-video", 1, NULL, EMBEDDED_TEXT, EMBEDDED_LONGTEXT,
+              VLC_TRUE );
     add_bool( "drop-late-frames", 1, NULL, DROP_LATE_FRAMES_TEXT,
               DROP_LATE_FRAMES_LONGTEXT, VLC_TRUE );
     /* Used in vout_synchro */