Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/FileBrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ private slots:
void activateListItem( QTreeWidgetItem * item, int column );
void openInNewInstrumentTrackBBE( void );
void openInNewInstrumentTrackSE( void );
void openContainingFolder();
void sendToActiveInstrumentTrack( void );
void updateDirectory( QTreeWidgetItem * item );

Expand Down
16 changes: 16 additions & 0 deletions src/gui/FileBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*/


#include <QDesktopServices>
#include <QHBoxLayout>
#include <QKeyEvent>
#include <QLineEdit>
Expand Down Expand Up @@ -380,6 +381,11 @@ void FileBrowserTreeWidget::contextMenuEvent(QContextMenuEvent * e )
"B+B Editor" ),
this,
SLOT( openInNewInstrumentTrackBBE() ) );
contextMenu.addSeparator();
contextMenu.addAction( QIcon(embed::getIconPixmap( "folder" )),
tr( "Open containing folder" ),
this,
SLOT( openContainingFolder() ) );
contextMenu.exec( e->globalPos() );
m_contextMenuItem = NULL;
}
Expand Down Expand Up @@ -671,6 +677,16 @@ void FileBrowserTreeWidget::openInNewInstrumentTrackSE( void )



void FileBrowserTreeWidget::openContainingFolder()
{
if (m_contextMenuItem)
{
QFileInfo fileInfo(m_contextMenuItem->fullName());
QDesktopServices::openUrl(QUrl::fromLocalFile(fileInfo.dir().path()));
}
}



void FileBrowserTreeWidget::sendToActiveInstrumentTrack( void )
{
Expand Down