Changeset dc1c205280bafaefa53d5e81c4f13270226ee2e5
- Timestamp:
- 03/07/08 00:16:04
(6 months ago)
- Author:
- Jean-Baptiste Kempf <jb@videolan.org>
- git-committer:
- Jean-Baptiste Kempf <jb@videolan.org> 1204845364 -0800
- git-parent:
[b474086030dda418c7be58fc5a4812332e6bd2a5]
- git-author:
- Jean-François Massol <jf@debian.(none)> 1204835168 +0100
- Message:
Added import of configuration file support
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rdbddc5a |
rdc1c205 |
|
| 131 | 131 | vlmItemLayout->addItem( spacer ); |
|---|
| 132 | 132 | |
|---|
| | 133 | QPushButton *importButton = new QPushButton( qtr( "Import" ) ); |
|---|
| | 134 | ui.buttonBox->addButton( importButton, QDialogButtonBox::ActionRole ); |
|---|
| | 135 | |
|---|
| 133 | 136 | QPushButton *exportButton = new QPushButton( qtr( "Export" ) ); |
|---|
| 134 | 137 | ui.buttonBox->addButton( exportButton, QDialogButtonBox::ActionRole ); |
|---|
| … | … | |
| 150 | 153 | BUTTONACT( closeButton, close() ); |
|---|
| 151 | 154 | BUTTONACT( exportButton, exportVLMConf() ); |
|---|
| | 155 | BUTTONACT( importButton, importVLMConf() ); |
|---|
| 152 | 156 | BUTTONACT( ui.addButton, addVLMItem() ); |
|---|
| 153 | 157 | BUTTONACT( ui.clearButton, clearWidgets() ); |
|---|
| … | … | |
| 271 | 275 | } |
|---|
| 272 | 276 | |
|---|
| 273 | | // TODO : import configuration file |
|---|
| | 277 | |
|---|
| 274 | 278 | bool VLMDialog::importVLMConf() |
|---|
| 275 | 279 | { |
|---|
| | 280 | QString openVLMConfFileName = QFileDialog::getOpenFileName( |
|---|
| | 281 | this, qtr( "Choose a VLM configuration file to open..." ), |
|---|
| | 282 | qfu( p_intf->p_libvlc->psz_homedir ), |
|---|
| | 283 | qtr( "VLM conf (*.vlm) ;; All (*.*)" ) ); |
|---|
| | 284 | |
|---|
| | 285 | if( !openVLMConfFileName.isEmpty() ) |
|---|
| | 286 | { |
|---|
| | 287 | vlm_message_t *message; |
|---|
| | 288 | QString command = "load \"" + openVLMConfFileName + "\""; |
|---|
| | 289 | vlm_ExecuteCommand( p_vlm, qtu( command ) , &message ); |
|---|
| | 290 | vlm_MessageDelete( message ); |
|---|
| | 291 | return true; |
|---|
| | 292 | } |
|---|
| | 293 | return false; |
|---|
| 276 | 294 | } |
|---|
| 277 | 295 | |
|---|