}
else if( role == Qt::FontRole )
{
+ QFont f;
+ f.setPointSize( f.pointSize() - 1 );
if( isCurrent( index ) )
- {
- QFont f; f.setBold( true ); return QVariant( f );
- }
+ f.setBold( true );
+ return QVariant( f );
}
else if( role == Qt::BackgroundRole && isCurrent( index ) )
{
return false;
}
+ input_item_t *p_input = p_item->p_input;
+ vlc_gc_incref( p_input );
+
i_popup_item = index.isValid() ? p_item->i_id : -1;
i_popup_parent = index.isValid() ?
( p_item->p_parent ? p_item->p_parent->i_id : -1 ) :
qtr(I_POP_STREAM), this, SLOT( popupStream() ) );
menu.addAction( qtr(I_POP_SAVE), this, SLOT( popupSave() ) );
menu.addAction( QIcon( ":/menu/info" ), qtr(I_POP_INFO), this, SLOT( popupInfo() ) );
- menu.addAction( QIcon( ":/type/folder-grey" ),
- qtr( I_POP_EXPLORE ), this, SLOT( popupExplore() ) );
+ if( !strncasecmp( p_input->psz_uri, "file://", 7 ) )
+ menu.addAction( QIcon( ":/type/folder-grey" ),
+ qtr( I_POP_EXPLORE ), this, SLOT( popupExplore() ) );
menu.addSeparator();
}
if( canEdit() )
}
menu.addMenu( sortingMenu );
}
+ vlc_gc_decref( p_input );
+
if( !menu.isEmpty() )
{
menu.exec( point ); return true;
!strncasecmp( psz_access, "file", 4 ) ||
!strncasecmp( psz_access, "dire", 4 ) ))
{
+#ifdef WIN32
+ /* Qt openURL doesn't know to open files that starts with a / or \ */
+ if( psz_path[0] == '/' || psz_path[0] == '\\' )
+ psz_path++;
+#endif
+
QFileInfo info( qfu( decode_URI( psz_path ) ) );
QDesktopServices::openUrl(
QUrl::fromLocalFile( info.absolutePath() ) );