Changeset a94647f04b28484b49f16ce252523b38343b6b58
- Timestamp:
- 09/12/06 19:12:05 (2 years ago)
- git-parent:
- Files:
-
- NEWS (modified) (1 diff)
- include/vlc_intf_strings.h (modified) (2 diffs)
- modules/gui/qt4/components/playlist/standardpanel.cpp (modified) (8 diffs)
- modules/gui/qt4/dialogs/messages.cpp (modified) (1 diff)
- modules/gui/qt4/dialogs_provider.cpp (modified) (7 diffs)
- modules/gui/qt4/dialogs_provider.hpp (modified) (2 diffs)
- modules/gui/qt4/menus.cpp (modified) (5 diffs)
- modules/misc/playlist/m3u.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
NEWS
r27bf7df ra94647f 12 12 * This version of VLC contains a new interface for Windows and Linux. This 13 13 interface lacks a few features that used to be present in vlc 0.8.6: 14 "Streaming wizard" and "VLM control". These features will be replaced 15 by a better alternative in the next version. If you absolutely need these 16 features, we advise you to keep vlc 0.8.6 14 - "Streaming wizard" and "VLM control". These features will be replaced 15 by a better alternative in the next version. If you absolutely need these 16 features, we advise you to keep vlc 0.8.6 17 - Similarly, "Bookmarks" will be reintroduced in an improved version at a 18 later point 17 19 18 20 Changes: include/vlc_intf_strings.h
rfbf4c80 ra94647f 31 31 /*************** Open dialogs **************/ 32 32 33 #define I_POP_SEL_FILES N_("Select one or more files to open") 33 #define I_OP_OPF N_("Quick &Open File...") 34 #define I_OP_ADVOP N_("&Advanced Open...") 35 #define I_OP_OPDIR N_("Open &Directory...") 36 37 #define I_OP_SEL_FILES N_("Select one or more files to open") 34 38 35 39 /******************* Menus *****************/ 40 41 #define I_MENU_INFO N_("Information...") 42 #define I_MENU_MSG N_("Messages...") 43 #define I_MENU_EXT N_("Extended settings...") 44 45 #define I_MENU_ABOUT N_("About VLC media player...") 36 46 37 47 /* Playlist popup */ … … 45 55 #define I_POP_SAVE N_("Save...") 46 56 57 /*************** Playlist *************/ 58 59 #define I_PL_LOOP N_("Repeat all") 60 #define I_PL_REPEAT N_("Repeat one") 61 #define I_PL_NOREPEAT N_("No repeat") 62 63 #define I_PL_RANDOM N_("Random") 64 #define I_PL_NORANDOM N_("No random") 65 66 #define I_PL_ADDPL N_("Add to playlist") 67 #define I_PL_ADDML N_("Add to media library") 68 69 #define I_PL_ADDF N_("Add file...") 70 #define I_PL_ADVADD N_("Advanced open...") 71 #define I_PL_ADDDIR N_("Add directory...") 72 73 #define I_PL_SAVE N_("Save playlist to file...") 74 #define I_PL_LOAD N_("Load playlist file...") 75 76 #define I_PL_SEARCH N_("Search") 77 #define I_PL_FILTER N_("Search filter") 78 79 #define I_PL_SD N_("Additional sources") 80 47 81 /*************** Preferences *************/ 48 82 modules/gui/qt4/components/playlist/standardpanel.cpp
rbc32a19 ra94647f 27 27 #include "components/playlist/panels.hpp" 28 28 #include "util/customwidgets.hpp" 29 30 #include <vlc_intf_strings.h> 29 31 30 32 #include <QTreeView> … … 54 56 view->setAlternatingRowColors( true ); 55 57 view->header()->resizeSection( 0, 230 ); 56 view->header()->resizeSection( 2, 60 );58 view->header()->resizeSection( 1, 170 ); 57 59 view->header()->setSortIndicatorShown( true ); 58 60 view->header()->setClickable( true ); … … 96 98 QSpacerItem *spacer = new QSpacerItem( 10, 20 );buttons->addItem( spacer ); 97 99 98 QLabel *filter = new QLabel( q fu( "&Search:") + " " );100 QLabel *filter = new QLabel( qtr(I_PL_SEARCH) + " " ); 99 101 buttons->addWidget( filter ); 100 searchLine = new ClickLineEdit( q fu( "Playlist filter"), 0 );102 searchLine = new ClickLineEdit( qtr(I_PL_FILTER), 0 ); 101 103 CONNECT( searchLine, textChanged(QString), this, search(QString)); 102 104 buttons->addWidget( searchLine ); filter->setBuddy( searchLine ); … … 118 120 { 119 121 model->setRepeat( false ); model->setLoop( true ); 120 repeatButton->setText( qtr( "Repeat All") );122 repeatButton->setText( qtr(I_PL_LOOP) ); 121 123 } 122 124 else if( model->hasLoop() ) 123 125 { 124 126 model->setRepeat( false ) ; model->setLoop( false ); 125 repeatButton->setText( qtr( "No Repeat") );127 repeatButton->setText( qtr(I_PL_NOREPEAT) ); 126 128 } 127 129 else 128 130 { 129 131 model->setRepeat( true ); 130 repeatButton->setText( qtr( "Repeat One") );132 repeatButton->setText( qtr(I_PL_REPEAT) ); 131 133 } 132 134 } … … 136 138 bool prev = model->hasRandom(); 137 139 model->setRandom( !prev ); 138 randomButton->setText( prev ? qtr( "No Random" ) : qtr( "Random") );140 randomButton->setText( prev ? qtr(I_PL_NORANDOM) : qtr(I_PL_RANDOM) ); 139 141 } 140 142 … … 160 162 { 161 163 addButton->setEnabled( true ); 162 addButton->setToolTip( qtr( "Add to playlist") );164 addButton->setToolTip( qtr(I_PL_ADDPL) ); 163 165 } 164 166 else if( currentRootId == THEPL->p_ml_category->i_id || … … 166 168 { 167 169 addButton->setEnabled( true ); 168 addButton->setToolTip( qtr( "Add to media library") );170 addButton->setToolTip( qtr(I_PL_ADDML) ); 169 171 } 170 172 else … … 178 180 currentRootId == THEPL->p_local_onelevel->i_id ) 179 181 { 180 popup->addAction( qtr("Add file"), THEDP, SLOT( simplePLAppendDialog() ) ); 181 popup->addAction( qtr("Advanced add"), THEDP, SLOT( PLAppendDialog() ) ); 182 popup->addAction( qtr(I_PL_ADDF), THEDP, SLOT(simplePLAppendDialog())); 183 popup->addAction( qtr(I_PL_ADVADD), THEDP, SLOT(PLAppendDialog()) ); 184 popup->addAction( qtr(I_PL_ADDDIR), THEDP, SLOT( PLAppendDir()) ); 182 185 } 183 186 else if( currentRootId == THEPL->p_ml_category->i_id || 184 187 currentRootId == THEPL->p_ml_onelevel->i_id ) 185 188 { 186 popup->addAction( qtr( "Add file"), THEDP, SLOT( simpleMLAppendDialog() ));187 popup->addAction( qtr( "Advanced add"), THEDP, SLOT( MLAppendDialog() ) );188 popup->addAction( qtr( "Directory"), THEDP, SLOT( openMLDirectory() ) );189 popup->addAction( qtr(I_PL_ADDF), THEDP, SLOT(simpleMLAppendDialog())); 190 popup->addAction( qtr(I_PL_ADVADD), THEDP, SLOT( MLAppendDialog() ) ); 191 popup->addAction( qtr(I_PL_ADDDIR), THEDP, SLOT( MLAppendDir() ) ); 189 192 } 190 193 popup->popup( QCursor::pos() ); modules/gui/qt4/dialogs/messages.cpp
rbb727b7 ra94647f 157 157 "Texts / Logs (*.log *.txt);; All (*.*) "); 158 158 159 if( saveLogFileName != NULL)159 if( !saveLogFileName.isNull() ) 160 160 { 161 161 QFile file(saveLogFileName); modules/gui/qt4/dialogs_provider.cpp
r4595653 ra94647f 67 67 } 68 68 69 void DialogsProvider::quit() 70 { 71 p_intf->b_die = VLC_TRUE; 72 QApplication::quit(); 73 } 74 69 75 void DialogsProvider::customEvent( QEvent *event ) 70 76 { … … 91 97 popupMenu( de->i_dialog ); break; 92 98 case INTF_DIALOG_FILEINFO: 93 MediaInfoDialog(); break;99 mediaInfoDialog(); break; 94 100 case INTF_DIALOG_INTERACTION: 95 101 doInteraction( de->p_arg ); break; … … 104 110 } 105 111 112 /**************************************************************************** 113 * Individual simple dialogs 114 ****************************************************************************/ 106 115 void DialogsProvider::playlistDialog() 107 116 { … … 109 118 } 110 119 120 void DialogsProvider::prefsDialog() 121 { 122 PrefsDialog::getInstance( p_intf )->toggleVisible(); 123 } 124 void DialogsProvider::extendedDialog() 125 { 126 ExtendedDialog::getInstance( p_intf )->toggleVisible(); 127 } 128 129 void DialogsProvider::messagesDialog() 130 { 131 MessagesDialog::getInstance( p_intf )->toggleVisible(); 132 } 133 134 void DialogsProvider::helpDialog() 135 { 136 HelpDialog::getInstance( p_intf )->toggleVisible(); 137 } 138 139 void DialogsProvider::aboutDialog() 140 { 141 AboutDialog::getInstance( p_intf )->toggleVisible(); 142 } 143 144 void DialogsProvider::mediaInfoDialog() 145 { 146 MediaInfoDialog::getInstance( p_intf )->toggleVisible(); 147 } 148 149 void DialogsProvider::bookmarksDialog() 150 { 151 } 152 153 /**************************************************************************** 154 * All the open/add stuff 155 ****************************************************************************/ 156 111 157 void DialogsProvider::openDialog() 112 158 { … … 123 169 OpenDialog::getInstance( p_intf->p_sys->p_mi , p_intf )->showTab( i_tab ); 124 170 } 171 172 /**** Simple open ****/ 173 174 QStringList DialogsProvider::showSimpleOpen() 175 { 176 QString FileTypes; 177 FileTypes = _("Media Files"); 178 FileTypes += " ( "; 179 FileTypes += EXTENSIONS_MEDIA; 180 FileTypes += ");;"; 181 FileTypes += _("Video Files"); 182 FileTypes += " ( "; 183 FileTypes += EXTENSIONS_VIDEO; 184 FileTypes += ");;"; 185 FileTypes += _("Sound Files"); 186 FileTypes += " ( "; 187 FileTypes += EXTENSIONS_AUDIO; 188 FileTypes += ");;"; 189 FileTypes += _("PlayList Files"); 190 FileTypes += " ( "; 191 FileTypes += EXTENSIONS_PLAYLIST; 192 FileTypes += ");;"; 193 FileTypes += _("All Files"); 194 FileTypes += " (*.*)"; 195 FileTypes.replace(QString(";*"), QString(" *")); 196 return QFileDialog::getOpenFileNames( NULL, qfu(I_OP_SEL_FILES ), 197 p_intf->p_libvlc->psz_homedir, FileTypes ); 198 } 199 200 void DialogsProvider::addFromSimple( bool pl, bool go) 201 { 202 QStringList files = DialogsProvider::showSimpleOpen(); 203 int i = 0; 204 foreach( QString file, files ) 205 { 206 const char * psz_utf8 = qtu( file ); 207 playlist_Add( THEPL, psz_utf8, NULL, 208 go ? ( PLAYLIST_APPEND | ( i ? 0 : PLAYLIST_GO ) | 209 ( i ? PLAYLIST_PREPARSE : 0 ) ) 210 : ( PLAYLIST_APPEND | PLAYLIST_PREPARSE ), 211 PLAYLIST_END, 212 pl ? VLC_TRUE : VLC_FALSE ); 213 i++; 214 } 215 } 216 217 void DialogsProvider::simplePLAppendDialog() 218 { 219 addFromSimple( true, false ); 220 } 221 222 void DialogsProvider::simpleMLAppendDialog() 223 { 224 addFromSimple( false, false ); 225 } 226 227 void DialogsProvider::simpleOpenDialog() 228 { 229 addFromSimple( true, true ); 230 } 231 232 void DialogsProvider::openPlaylist() 233 { 234 QStringList files = showSimpleOpen(); 235 foreach( QString file, files ) 236 { 237 playlist_Import( THEPL, qtu(file) ); 238 } 239 } 240 241 void DialogsProvider::savePlaylist() 242 { 243 QFileDialog *qfd = new QFileDialog( NULL, 244 qtr("Choose a filename to save playlist"), 245 p_intf->p_libvlc->psz_homedir, 246 qfu("XSPF playlist (*.xspf);; ") + 247 qfu("M3U playlist (*.m3u);; Any (*.*) ") ); 248 qfd->setFileMode( QFileDialog::AnyFile ); 249 qfd->setAcceptMode( QFileDialog::AcceptSave ); 250 qfd->setConfirmOverwrite( true ); 251 252 if( qfd->exec() == QDialog::Accepted ) 253 { 254 if( qfd->selectedFiles().count() > 0 ) 255 { 256 char *psz_module, *psz_m3u = "export-m3u", 257 *psz_xspf = "export-xspf"; 258 259 QString file = qfd->selectedFiles().first(); 260 QString filter = qfd->selectedFilter(); 261 262 if( file.contains(".xsp") || 263 ( filter.contains(".xspf") && !file.contains(".m3u") ) ) 264 { 265 psz_module = psz_xspf; 266 if( !file.contains( ".xsp" ) ) 267 file.append( ".xspf" ); 268 } 269 else 270 { 271 psz_module = psz_m3u; 272 if( !file.contains( ".m3u" ) ) 273 file.append( ".m3u" ); 274 } 275 276 playlist_Export( THEPL, qtu(file), THEPL->p_playlist_category, 277 psz_module); 278 } 279 } 280 delete qfd; 281 } 282 283 static void openDirectory( intf_thread_t* p_intf, bool pl, bool go ) 284 { 285 QString dir = QFileDialog::getExistingDirectory ( 0, 286 _("Open directory") ); 287 input_item_t *p_input = input_ItemNewExt( THEPL, qtu(dir), NULL, 288 0, NULL, -1 ); 289 playlist_AddInput( THEPL, p_input, 290 go ? ( PLAYLIST_APPEND | PLAYLIST_GO ) : PLAYLIST_APPEND, 291 PLAYLIST_END, pl); 292 input_Read( THEPL, p_input, VLC_FALSE ); 293 } 294 295 void DialogsProvider::PLAppendDir() 296 { 297 openDirectory( p_intf, true, false ); 298 } 299 300 void DialogsProvider::MLAppendDir() 301 { 302 openDirectory( p_intf, false , false ); 303 } 304 305 306 /**************************************************************************** 307 * Sout emulation 308 ****************************************************************************/ 309 310 void DialogsProvider::streamingDialog() 311 { 312 OpenDialog *o = new OpenDialog( p_intf->p_sys->p_mi, p_intf, true ); 313 if ( o->exec() == QDialog::Accepted ) 314 { 315 SoutDialog *s = new SoutDialog( p_intf->p_sys->p_mi, p_intf ); 316 if( s->exec() == QDialog::Accepted ) 317 { 318 msg_Err(p_intf, "mrl %s\n", qta(s->mrl)); 319 /* Just do it */ 320 int i_len = strlen( qtu(s->mrl) ) + 10; 321 char *psz_option = (char*)malloc(i_len); 322 snprintf( psz_option, i_len - 1, ":sout=%s", qtu(s->mrl)); 323 324 playlist_AddExt( THEPL, qtu( o->mrl ), "Streaming", 325 PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, 326 -1, &psz_option, 1, VLC_TRUE ); 327 } 328 delete s; 329 } 330 delete o; 331 } 332 333 /**************************************************************************** 334 * Menus / Interaction 335 ****************************************************************************/ 336 337 void DialogsProvider::menuAction( QObject *data ) 338 { 339 QVLCMenu::DoAction( p_intf, data ); 340 } 341 342 void DialogsProvider::menuUpdateAction( QObject *data ) 343 { 344 MenuFunc * f = qobject_cast<MenuFunc *>(data); 345 f->doFunc( p_intf ); 346 } 347 348 void DialogsProvider::SDMenuAction( QString data ) 349 { 350 char *psz_sd = data.toUtf8().data(); 351 if( !playlist_IsServicesDiscoveryLoaded( THEPL, psz_sd ) ) 352 playlist_ServicesDiscoveryAdd( THEPL, psz_sd ); 353 else 354 playlist_ServicesDiscoveryRemove( THEPL, psz_sd ); 355 } 356 125 357 126 358 void DialogsProvider::doInteraction( intf_dialog_args_t *p_arg ) … … 156 388 } 157 389 158 void DialogsProvider::quit()159 {160 p_intf->b_die = VLC_TRUE;161 QApplication::quit();162 }163 164 void DialogsProvider::MediaInfoDialog()165 {166 MediaInfoDialog::getInstance( p_intf )->toggleVisible();167 }168 169 void DialogsProvider::streamingDialog()170 {171 OpenDialog *o = new OpenDialog( p_intf->p_sys->p_mi, p_intf, true );172 if ( o->exec() == QDialog::Accepted )173 {174 SoutDialog *s = new SoutDialog( p_intf->p_sys->p_mi, p_intf );175 if( s->exec() == QDialog::Accepted )176 {177 msg_Err(p_intf, "mrl %s\n", qta(s->mrl));178 /* Just do it */179 int i_len = strlen( qtu(s->mrl) ) + 10;180 char *psz_option = (char*)malloc(i_len);181 snprintf( psz_option, i_len - 1, ":sout=%s", qtu(s->mrl));182 183 playlist_AddExt( THEPL, qtu( o->mrl ), "Streaming",184 PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END,185 -1, &psz_option, 1, VLC_TRUE );186 }187 delete s;188 }189 delete o;190 }191 192 void DialogsProvider::prefsDialog()193 {194 PrefsDialog::getInstance( p_intf )->toggleVisible();195 }196 void DialogsProvider::extendedDialog()197 {198 ExtendedDialog::getInstance( p_intf )->toggleVisible();199 }200 201 void DialogsProvider::messagesDialog()202 {203 MessagesDialog::getInstance( p_intf )->toggleVisible();204 }205 206 void DialogsProvider::helpDialog()207 {208 HelpDialog::getInstance( p_intf )->toggleVisible();209 }210 211 void DialogsProvider::aboutDialog()212 {213 AboutDialog::getInstance( p_intf )->toggleVisible();214 }215 216 void DialogsProvider::menuAction( QObject *data )217 {218 QVLCMenu::DoAction( p_intf, data );219 }220 221 void DialogsProvider::menuUpdateAction( QObject *data )222 {223 MenuFunc * f = qobject_cast<MenuFunc *>(data);224 f->doFunc( p_intf );225 }226 227 void DialogsProvider::SDMenuAction( QString data )228 {229 char *psz_sd = data.toUtf8().data();230 if( !playlist_IsServicesDiscoveryLoaded( THEPL, psz_sd ) )231 playlist_ServicesDiscoveryAdd( THEPL, psz_sd );232 else233 playlist_ServicesDiscoveryRemove( THEPL, psz_sd );234 }235 236 237 void DialogsProvider::simplePLAppendDialog()238 {239 QStringList files = showSimpleOpen();240 QString file;241 foreach( file, files )242 {243 const char * psz_utf8 = qtu( file );244 playlist_Add( THEPL, psz_utf8, NULL,245 PLAYLIST_APPEND | PLAYLIST_PREPARSE, PLAYLIST_END, VLC_TRUE );246 }247 }248 249 void DialogsProvider::simpleMLAppendDialog()250 {251 QStringList files = showSimpleOpen();252 QString file;253 foreach( file, files )254 {255 const char * psz_utf8 = qtu( file );256 playlist_Add( THEPL, psz_utf8, psz_utf8,257 PLAYLIST_APPEND | PLAYLIST_PREPARSE, PLAYLIST_END,258 VLC_TRUE);259 }260 }261 262 void DialogsProvider::simpleOpenDialog()263 {264 QStringList files = showSimpleOpen();265 QString file;266 for( size_t i = 0 ; i< files.size(); i++ )267 {268 const char * psz_utf8 = qtu( files[i] );269 /* Play the first one, parse and enqueue the other ones */270 playlist_Add( THEPL, psz_utf8, NULL,271 PLAYLIST_APPEND | (i ? 0 : PLAYLIST_GO) |272 ( i ? PLAYLIST_PREPARSE : 0 ),273 PLAYLIST_END, VLC_TRUE );274 }275 }276 277 void DialogsProvider::openPlaylist()278 {279 QStringList files = showSimpleOpen();280 QString file;281 for( size_t i = 0 ; i< files.size(); i++ )282 {283 const char * psz_utf8 = qtu( files[i] );284 playlist_Import( THEPL, psz_utf8 );285 }286 }287 288 void DialogsProvider::openDirectory()289 {290 QString dir = QFileDialog::getExistingDirectory ( 0,291 _("Open directory") );292 const char *psz_utf8 = qtu( dir );293 input_item_t *p_input = input_ItemNewExt( THEPL, psz_utf8, NULL,294 0, NULL, -1 );295 playlist_AddInput( THEPL, p_input, PLAYLIST_APPEND, PLAYLIST_END, VLC_TRUE);296 input_Read( THEPL, p_input, VLC_FALSE );297 }298 void DialogsProvider::openMLDirectory()299 {300 QString dir = QFileDialog::getExistingDirectory ( 0,301 _("Open directory") );302 const char *psz_utf8 = qtu( dir );303 input_item_t *p_input = input_ItemNewExt( THEPL, psz_utf8, NULL,304 0, NULL, -1 );305 playlist_AddInput( THEPL, p_input, PLAYLIST_APPEND, PLAYLIST_END,306 VLC_FALSE );307 input_Read( THEPL, p_input, VLC_FALSE );308 }309 310 QStringList DialogsProvider::showSimpleOpen()311 {312 QString FileTypes;313 FileTypes = _("Media Files");314 FileTypes += " ( ";315 FileTypes += EXTENSIONS_MEDIA;316 FileTypes += ");;";317 FileTypes += _("Video Files");318 FileTypes += " ( ";319 FileTypes += EXTENSIONS_VIDEO;320 FileTypes += ");;";321 FileTypes += _("Sound Files");322 FileTypes += " ( ";323 FileTypes += EXTENSIONS_AUDIO;324 FileTypes += ");;";325 FileTypes += _("PlayList Files");326 FileTypes += " ( ";327 FileTypes += EXTENSIONS_PLAYLIST;328 FileTypes += ");;";329 FileTypes += _("All Files");330 FileTypes += " (*.*)";331 FileTypes.replace(QString(";*"), QString(" *"));332 return QFileDialog::getOpenFileNames( NULL, qfu(I_POP_SEL_FILES ),333 p_intf->p_libvlc->psz_homedir, FileTypes );334 }335 336 390 void DialogsProvider::switchToSkins() 337 391 { … … 339 393 } 340 394 341 void DialogsProvider::bookmarksDialog()342 {343 }344 345 395 void DialogsProvider::popupMenu( int i_dialog ) 346 396 { 347 348 } 397 } modules/gui/qt4/dialogs_provider.hpp
re9735ab ra94647f 71 71 static DialogsProvider *instance; 72 72 QStringList showSimpleOpen(); 73 void addFromSimple( bool, bool ); 73 74 74 75 public slots: 75 76 void playlistDialog(); 76 77 void bookmarksDialog(); 77 void MediaInfoDialog();78 void mediaInfoDialog(); 78 79 void prefsDialog(); 79 80 void extendedDialog(); … … 93 94 void streamingDialog(); 94 95 void openPlaylist(); 95 void openDirectory(); 96 void openMLDirectory(); 96 void savePlaylist(); 97 void PLAppendDir(); 98 void MLAppendDir(); 97 99 void quit(); 98 100 void switchToSkins(); modules/gui/qt4/menus.cpp
re9735ab ra94647f 28 28 #include <QSignalMapper> 29 29 30 #include <vlc_intf_strings.h> 31 30 32 #include "main_interface.hpp" 31 32 33 #include "menus.hpp" 33 34 #include "dialogs_provider.hpp" … … 156 157 menu->addSeparator(); 157 158 158 DP_SADD( qtr( "Open playlist file"), "", "", openPlaylist() );159 // DP_SADD( qtr( "Save playlist to file"), "", "", savePlaylist() );159 DP_SADD( qtr(I_PL_LOAD), "", "", openPlaylist() ); 160 DP_SADD( qtr(I_PL_SAVE), "", "", savePlaylist() ); 160 161 menu->addSeparator(); 161 162 menu->addAction( qtr("Undock from interface"), mi, … … 176 177 menu->addSeparator(); 177 178 } 178 DP_SADD( qtr("Messages" ), "", "", messagesDialog() ); 179 DP_SADD( qtr("Information") , "", "", MediaInfoDialog() ); 180 DP_SADD( qtr("Bookmarks"), "", "", bookmarksDialog() ); 181 DP_SADD( qtr("Extended settings"), "","",extendedDialog() ); 179 DP_SADD( qtr(I_MENU_MSG), "", "", messagesDialog() ); 180 DP_SADD( qtr(I_MENU_INFO) , "", "", mediaInfoDialog() ); 181 DP_SADD( qtr(I_MENU_EXT), "","",extendedDialog() ); 182 182 if( mi ) 183 183 { … … 291 291 { 292 292 QMenu *menu = new QMenu(); 293 menu->setTitle( qtr( "Additional sources") );293 menu->setTitle( qtr(I_PL_SD) ); 294 294 vlc_list_t *p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, 295 295 FIND_ANYWHERE ); … … 332 332 DP_SADD( qtr("Help") , "", "", helpDialog() ); 333 333 menu->addSeparator(); 334 DP_SADD( qtr( "About VLC media player..."), "", "", aboutDialog() );334 DP_SADD( qtr(I_MENU_ABOUT), "", "", aboutDialog() ); 335 335 return menu; 336 336 } modules/misc/playlist/m3u.c
rd3fe7f2 ra94647f 43 43 * Export_M3U: main export function 44 44 *****************************************************************************/ 45 int Export_M3U( vlc_object_t *p_this ) 45 static void DoChildren( playlist_t *p_playlist, playlist_export_t *p_export, 46 playlist_item_t *p_root ) 46 47 { 47 playlist_t *p_playlist = (playlist_t*)p_this;48 playlist_export_t *p_export = (playlist_export_t *)p_playlist->p_private;49 48 int i, j; 50 49 51 msg_Dbg(p_playlist, "saving using M3U format");52 53 /* Write header */54 fprintf( p_export->p_file, "#EXTM3U\n" );55 56 50 /* Go through the playlist and add items */ 57 for( i = 0; i< p_ export->p_root->i_children ; i++)51 for( i = 0; i< p_root->i_children ; i++) 58 52 { 59 playlist_item_t *p_current = p_ export->p_root->pp_children[i];53 playlist_item_t *p_current = p_root->pp_children[i]; 60 54 if( p_current->i_flags & PLAYLIST_SAVE_FLAG ) 61 55 continue; 56 57 if( p_current->i_children >= 0 ) 58 { 59 DoChildren( p_playlist, p_export, p_current ); 60 continue; 61 } 62 63 assert( p_current->p_input->psz_uri ); 62 64 63 65 /* General info */ … … 100 102 p_current->p_input->psz_uri ); 101 103 } 104 } 105 106 int Export_M3U( vlc_object_t *p_this ) 107 { 108 playlist_t *p_playlist = (playlist_t*)p_this; 109 playlist_export_t *p_export = (playlist_export_t *)p_playlist->p_private; 110 111 msg_Dbg(p_playlist, "saving using M3U format"); 112 113 /* Write header */ 114 fprintf( p_export->p_file, "#EXTM3U\n" ); 115 116 DoChildren( p_playlist, p_export, p_export->p_root ); 102 117 return VLC_SUCCESS; 103 118 } 119
