[vlc-commits] Qt: recents: hide the file:// scheme from the MRL
Ludovic Fauvet
git at videolan.org
Fri Jul 12 14:20:45 CEST 2013
vlc/vlc-2.1 | branch: master | Ludovic Fauvet <etix at videolan.org> | Thu Jul 11 16:55:57 2013 +0200| [3249bffd5d0dfeb6e5017f67ed19e4f00956904f] | committer: Jean-Baptiste Kempf
Qt: recents: hide the file:// scheme from the MRL
(cherry picked from commit 13b88912ee250b6bfffe41a09e4ca14123c40e1c)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=3249bffd5d0dfeb6e5017f67ed19e4f00956904f
---
modules/gui/qt4/menus.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index 3a18923..95d83cd 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -1602,6 +1602,14 @@ void VLCMenuBar::updateRecents( intf_thread_t *p_intf )
QString text = qfu( psz );
text.replace("&", "&&");
+#ifdef _WIN32
+# define FILE_SCHEME "file:///"
+#else
+# define FILE_SCHEME "file://"
+#endif
+ if ( text.startsWith( FILE_SCHEME ) )
+ text.remove( 0, strlen( FILE_SCHEME ) );
+#undef FILE_SCHEME
free( psz );
action = recentsMenu->addAction(
More information about the vlc-commits
mailing list