Changeset 354abbea2151c4718f1ad2a645afff4799252588
- 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
| r5b1be49 |
r354abbe |
|
| 558 | 558 | OpenPanel( _parent, _p_intf ) |
|---|
| 559 | 559 | { |
|---|
| | 560 | isInitialized = false; |
|---|
| | 561 | } |
|---|
| | 562 | |
|---|
| | 563 | void CaptureOpenPanel::initialize() |
|---|
| | 564 | { |
|---|
| | 565 | if( isInitialized ) return; |
|---|
| | 566 | |
|---|
| | 567 | msg_Dbg( p_intf, "Initialization of Capture device panel" ); |
|---|
| | 568 | isInitialized = true; |
|---|
| | 569 | |
|---|
| 560 | 570 | ui.setupUi( this ); |
|---|
| 561 | 571 | |
|---|
| r2ee008a |
r354abbe |
|
| 180 | 180 | private: |
|---|
| 181 | 181 | Ui::OpenCapture ui; |
|---|
| | 182 | bool isInitialized; |
|---|
| | 183 | |
|---|
| 182 | 184 | QString advMRL; |
|---|
| 183 | 185 | QDialog *adv; |
|---|
| … | … | |
| 204 | 206 | public slots: |
|---|
| 205 | 207 | virtual void updateMRL(); |
|---|
| | 208 | void initialize(); |
|---|
| 206 | 209 | private slots: |
|---|
| 207 | 210 | void updateButtons(); |
|---|
| r5ea03a6 |
r354abbe |
|
| 129 | 129 | |
|---|
| 130 | 130 | /* Force MRL update on tab change */ |
|---|
| 131 | | CONNECT( ui.Tab, currentChanged( int ), this, signalCurrent() ); |
|---|
| | 131 | CONNECT( ui.Tab, currentChanged( int ), this, signalCurrent( int ) ); |
|---|
| 132 | 132 | |
|---|
| 133 | 133 | CONNECT( fileOpenPanel, mrlUpdated( QString ), this, updateMRL( QString ) ); |
|---|
| … | … | |
| 209 | 209 | void OpenDialog::showTab( int i_tab ) |
|---|
| 210 | 210 | { |
|---|
| | 211 | if( i_tab == OPEN_CAPTURE_TAB ) captureOpenPanel->initialize(); |
|---|
| 211 | 212 | ui.Tab->setCurrentIndex( i_tab ); |
|---|
| 212 | 213 | show(); |
|---|
| … | … | |
| 214 | 215 | |
|---|
| 215 | 216 | /* Function called on signal currentChanged triggered */ |
|---|
| 216 | | void OpenDialog::signalCurrent() |
|---|
| 217 | | { |
|---|
| | 217 | void OpenDialog::signalCurrent( int i_tab ) |
|---|
| | 218 | { |
|---|
| | 219 | if( i_tab == OPEN_CAPTURE_TAB ) captureOpenPanel->initialize(); |
|---|
| | 220 | |
|---|
| 218 | 221 | if( ui.Tab->currentWidget() != NULL ) |
|---|
| 219 | 222 | ( dynamic_cast<OpenPanel *>( ui.Tab->currentWidget() ) )->updateMRL(); |
|---|
| ra04632a |
r354abbe |
|
| 115 | 115 | void updateMRL(); |
|---|
| 116 | 116 | void newCachingMethod( QString ); |
|---|
| 117 | | void signalCurrent(); |
|---|
| | 117 | void signalCurrent( int ); |
|---|
| 118 | 118 | void browseInputSlave(); |
|---|
| 119 | 119 | }; |
|---|