[vlc-devel] commit: win32: Add recent files to jump lists (Geoffroy Couprie )

git version control git at videolan.org
Wed May 20 00:32:18 CEST 2009


vlc | branch: master | Geoffroy Couprie <geal at videolan.org> | Tue May 19 20:32:15 2009 +0200| [8796e33a5ae150d629c2cfc5451658de134d923f] | committer: Geoffroy Couprie 

win32: Add recent files to jump lists

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8796e33a5ae150d629c2cfc5451658de134d923f
---

 modules/gui/qt4/recents.cpp |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/recents.cpp b/modules/gui/qt4/recents.cpp
index 82a20e1..bb6768e 100644
--- a/modules/gui/qt4/recents.cpp
+++ b/modules/gui/qt4/recents.cpp
@@ -33,6 +33,10 @@
 #include <QRegExp>
 #include <QSignalMapper>
 
+#ifdef WIN32
+#include <shlobj.h>
+#endif
+
 RecentsMRL* RecentsMRL::instance = NULL;
 
 RecentsMRL::RecentsMRL( intf_thread_t *_p_intf ) : p_intf( _p_intf )
@@ -66,7 +70,9 @@ void RecentsMRL::addRecent( const QString &mrl )
 {
     if ( !isActive || ( filter && filter->indexIn( mrl ) >= 0 ) )
         return;
-
+#ifdef WIN32
+    SHAddToRecentDocs( 0x00000002 , qtu( mrl ) );
+#endif
     msg_Dbg( p_intf, "Adding a new MRL to recent ones: %s", qtu( mrl ) );
     int i_index = stack->indexOf( mrl );
     if( 0 <= i_index )
@@ -82,6 +88,7 @@ void RecentsMRL::addRecent( const QString &mrl )
     }
     QVLCMenu::updateRecents( p_intf );
     save();
+
 }
 
 void RecentsMRL::clear()




More information about the vlc-devel mailing list