Changeset 354abbea2151c4718f1ad2a645afff4799252588

Show
Ignore:
Timestamp:
25/08/08 10:06:48 (3 months ago)
Author:
Jean-Baptiste Kempf <jb@videolan.org>
git-committer:
Jean-Baptiste Kempf <jb@videolan.org> 1219651608 -0700
git-parent:

[5ca01aec25d467af7197eda4a368a341d41a3764]

git-author:
Jean-Baptiste Kempf <jb@videolan.org> 1219651608 -0700
Message:

Don't allocate and create the Capture Open Panel in open.

The Capture panel is sensibly slower than all the other ones and way less used by most people. Therefore, don't build it (especially for windows) unless you need it. Better for speed and memory.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/qt4/components/open_panels.cpp

    r5b1be49 r354abbe  
    558558                                OpenPanel( _parent, _p_intf ) 
    559559{ 
     560    isInitialized = false; 
     561} 
     562 
     563void CaptureOpenPanel::initialize() 
     564{ 
     565    if( isInitialized ) return; 
     566 
     567    msg_Dbg( p_intf, "Initialization of Capture device panel" ); 
     568    isInitialized = true; 
     569 
    560570    ui.setupUi( this ); 
    561571 
  • modules/gui/qt4/components/open_panels.hpp

    r2ee008a r354abbe  
    180180private: 
    181181    Ui::OpenCapture ui; 
     182    bool isInitialized; 
     183 
    182184    QString advMRL; 
    183185    QDialog *adv; 
     
    204206public slots: 
    205207    virtual void updateMRL(); 
     208    void initialize(); 
    206209private slots: 
    207210    void updateButtons(); 
  • modules/gui/qt4/dialogs/open.cpp

    r5ea03a6 r354abbe  
    129129 
    130130    /* Force MRL update on tab change */ 
    131     CONNECT( ui.Tab, currentChanged( int ), this, signalCurrent() ); 
     131    CONNECT( ui.Tab, currentChanged( int ), this, signalCurrent( int ) ); 
    132132 
    133133    CONNECT( fileOpenPanel, mrlUpdated( QString ), this, updateMRL( QString ) ); 
     
    209209void OpenDialog::showTab( int i_tab ) 
    210210{ 
     211    if( i_tab == OPEN_CAPTURE_TAB ) captureOpenPanel->initialize(); 
    211212    ui.Tab->setCurrentIndex( i_tab ); 
    212213    show(); 
     
    214215 
    215216/* Function called on signal currentChanged triggered */ 
    216 void OpenDialog::signalCurrent() 
    217 
     217void OpenDialog::signalCurrent( int i_tab ) 
     218
     219    if( i_tab == OPEN_CAPTURE_TAB ) captureOpenPanel->initialize(); 
     220 
    218221    if( ui.Tab->currentWidget() != NULL ) 
    219222        ( dynamic_cast<OpenPanel *>( ui.Tab->currentWidget() ) )->updateMRL(); 
  • modules/gui/qt4/dialogs/open.hpp

    ra04632a r354abbe  
    115115    void updateMRL(); 
    116116    void newCachingMethod( QString ); 
    117     void signalCurrent(); 
     117    void signalCurrent( int ); 
    118118    void browseInputSlave(); 
    119119};