]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/recents.cpp
win32: Add recent files to jump lists
[vlc] / modules / gui / qt4 / recents.cpp
index 82a20e137cb78b74a9a339af9438130f44765403..bb6768e69bca90992b31ad943e7ea8fc70490311 100644 (file)
 #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()