Commit 4c4aae84 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: cosmetics and comments.

parent df20afd7
...@@ -165,7 +165,7 @@ FileOpenPanel::~FileOpenPanel() ...@@ -165,7 +165,7 @@ FileOpenPanel::~FileOpenPanel()
void FileOpenPanel::browseFile() void FileOpenPanel::browseFile()
{ {
QStringList files = QFileDialog::getOpenFileNames( this ); QStringList files = QFileDialog::getOpenFileNames( this );
foreach( const QString &file, files) foreach( const QString &file, files )
{ {
QListWidgetItem *item = QListWidgetItem *item =
new QListWidgetItem( toNativeSeparators( file ), ui.fileListWidg ); new QListWidgetItem( toNativeSeparators( file ), ui.fileListWidg );
...@@ -244,7 +244,8 @@ void FileOpenPanel::updateMRL() ...@@ -244,7 +244,8 @@ void FileOpenPanel::updateMRL()
/* Function called by Open Dialog when clicke on Play/Enqueue */ /* Function called by Open Dialog when clicke on Play/Enqueue */
void FileOpenPanel::accept() void FileOpenPanel::accept()
{ {
p_intf->p_sys->filepath = dialogBox->directory().absolutePath(); if( dialogBox )
p_intf->p_sys->filepath = dialogBox->directory().absolutePath();
ui.fileListWidg->clear(); ui.fileListWidg->clear();
} }
......
...@@ -449,7 +449,7 @@ static void *Thread( void *obj ) ...@@ -449,7 +449,7 @@ static void *Thread( void *obj )
{ {
char *psz_path = config_GetPsz( p_intf, "qt-filedialog-path" ); char *psz_path = config_GetPsz( p_intf, "qt-filedialog-path" );
p_intf->p_sys->filepath = p_intf->p_sys->filepath =
EMPTY_STR(psz_path) ? config_GetHomeDir() : qfu(psz_path); EMPTY_STR( psz_path ) ? config_GetHomeDir() : qfu( psz_path );
free( psz_path ); free( psz_path );
} }
...@@ -491,7 +491,7 @@ static void *Thread( void *obj ) ...@@ -491,7 +491,7 @@ static void *Thread( void *obj )
/* Save the path */ /* Save the path */
config_PutPsz( p_intf, "qt-filedialog-path", config_PutPsz( p_intf, "qt-filedialog-path",
qtu(p_intf->p_sys->filepath) ); qtu( p_intf->p_sys->filepath ) );
/* Delete the application automatically */ /* Delete the application automatically */
#ifdef Q_WS_X11 #ifdef Q_WS_X11
......
...@@ -70,10 +70,14 @@ void RecentsMRL::addRecent( const QString &mrl ) ...@@ -70,10 +70,14 @@ void RecentsMRL::addRecent( const QString &mrl )
{ {
if ( !isActive || ( filter && filter->indexIn( mrl ) >= 0 ) ) if ( !isActive || ( filter && filter->indexIn( mrl ) >= 0 ) )
return; return;
msg_Dbg( p_intf, "Adding a new MRL to recent ones: %s", qtu( mrl ) );
#ifdef WIN32 #ifdef WIN32
/* Add to the Windows 7 default list in taskbar */
SHAddToRecentDocs( 0x00000002 , qtu( mrl ) ); SHAddToRecentDocs( 0x00000002 , qtu( mrl ) );
#endif #endif
msg_Dbg( p_intf, "Adding a new MRL to recent ones: %s", qtu( mrl ) );
int i_index = stack->indexOf( mrl ); int i_index = stack->indexOf( mrl );
if( 0 <= i_index ) if( 0 <= i_index )
{ {
...@@ -88,7 +92,6 @@ void RecentsMRL::addRecent( const QString &mrl ) ...@@ -88,7 +92,6 @@ void RecentsMRL::addRecent( const QString &mrl )
} }
QVLCMenu::updateRecents( p_intf ); QVLCMenu::updateRecents( p_intf );
save(); save();
} }
void RecentsMRL::clear() void RecentsMRL::clear()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment