Skip to content

Commit

Permalink
add File > Show Project in Folder to menu
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Sep 25, 2024
1 parent e8442c7 commit f3740f8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
6 changes: 6 additions & 0 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2281,6 +2281,7 @@ void MainWindow::setCurrentFile(const QString &filename)
#else
setWindowTitle(QString("%1[*] - %2").arg(shownName).arg(qApp->applicationName()));
#endif
ui->actionShowProjectFolder->setDisabled(m_currentFile.isEmpty());
}

void MainWindow::on_actionAbout_Shotcut_triggered()
Expand Down Expand Up @@ -4183,6 +4184,11 @@ void MainWindow::on_actionOpenXML_triggered()
}
}

void MainWindow::on_actionShowProjectFolder_triggered()
{
Util::showInFolder(m_currentFile);
}

void MainWindow::onFocusChanged(QWidget *, QWidget * ) const
{
LOG_DEBUG() << "Focuswidget changed";
Expand Down
1 change: 1 addition & 0 deletions src/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ private slots:
void on_menuExternal_aboutToShow();
void on_actionUpgrade_triggered();
void on_actionOpenXML_triggered();
void on_actionShowProjectFolder_triggered();
void onAutosaveTimeout();
void onFocusChanged(QWidget *old, QWidget *now) const;
void onFocusObjectChanged(QObject *obj) const;
Expand Down
16 changes: 11 additions & 5 deletions src/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@
<addaction name="actionSave_As"/>
<addaction name="actionBackupSave"/>
<addaction name="menuOtherVersions"/>
<addaction name="separator"/>
<addaction name="actionShowProjectFolder"/>
<addaction name="menuExport"/>
<addaction name="actionClose"/>
<addaction name="separator"/>
Expand Down Expand Up @@ -316,7 +318,7 @@
<bool>false</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonFollowStyle</enum>
<enum>Qt::ToolButtonStyle::ToolButtonFollowStyle</enum>
</property>
<property name="floatable">
<bool>false</bool>
Expand Down Expand Up @@ -393,15 +395,15 @@
<string>&amp;About Shotcut</string>
</property>
<property name="menuRole">
<enum>QAction::AboutRole</enum>
<enum>QAction::MenuRole::AboutRole</enum>
</property>
</action>
<action name="actionAbout_Qt">
<property name="text">
<string>About Qt</string>
</property>
<property name="menuRole">
<enum>QAction::AboutQtRole</enum>
<enum>QAction::MenuRole::AboutQtRole</enum>
</property>
</action>
<action name="actionOpenOther">
Expand Down Expand Up @@ -905,8 +907,7 @@
</action>
<action name="actionClose">
<property name="icon">
<iconset theme="window-close">
<normaloff>.</normaloff>.</iconset>
<iconset theme="window-close"/>
</property>
<property name="text">
<string>Close</string>
Expand Down Expand Up @@ -1403,6 +1404,11 @@
<string>Weekly</string>
</property>
</action>
<action name="actionShowProjectFolder">
<property name="text">
<string>Show Project in Folder</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>
Expand Down

0 comments on commit f3740f8

Please sign in to comment.