mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-23 15:16:25 +01:00
[Summary] Fixed bug #45537 "System Lock button is not active when locked from main menu item"
[Feature reviewed] MKolsharnyy [Reviewed] YPozdnyakov
This commit is contained in:
parent
a506b16a1e
commit
71252aee8e
4 changed files with 31 additions and 2 deletions
|
|
@ -2211,12 +2211,22 @@ ARDOUR_UI::on_lock_button_pressed () {
|
|||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::lock_session () {
|
||||
ARDOUR_UI::on_lock_session ()
|
||||
{
|
||||
editor->get_waves_button ("lock_session_button").set_active (true);
|
||||
session_lock_dialog->run ();
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::on_unlock_session ()
|
||||
{
|
||||
editor->get_waves_button ("lock_session_button").set_active (false);
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::lock_session () {
|
||||
session_lock_dialog->run ();
|
||||
}
|
||||
|
||||
bool
|
||||
ARDOUR_UI::screen_lock_is_allowed() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -369,6 +369,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
|
||||
bool screen_lock_is_allowed() const;
|
||||
void on_lock_button_pressed ();
|
||||
void on_lock_session ();
|
||||
void on_unlock_session ();
|
||||
PBD::Signal0<void> lock_button_was_pressed;
|
||||
|
||||
bool session_auto_save_is_allowed() const;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include "session_lock_dialog.h"
|
||||
#include "i18n.h"
|
||||
#include "dbg_msg.h"
|
||||
#include "ardour_ui.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace Gtk;
|
||||
|
|
@ -61,6 +62,19 @@ SessionLockDialog::on_ok (WavesButton*)
|
|||
response (Gtk::RESPONSE_OK);
|
||||
}
|
||||
|
||||
void
|
||||
SessionLockDialog::on_show ()
|
||||
{
|
||||
WavesDialog::on_show ();
|
||||
ARDOUR_UI::instance()->on_lock_session ();
|
||||
}
|
||||
|
||||
void
|
||||
SessionLockDialog::on_hide ()
|
||||
{
|
||||
ARDOUR_UI::instance()->on_unlock_session ();
|
||||
WavesDialog::on_hide ();
|
||||
}
|
||||
|
||||
bool
|
||||
SessionLockDialog::on_key_press_event (GdkEventKey*)
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@ class SessionLockDialog : public WavesDialog {
|
|||
~SessionLockDialog ();
|
||||
bool on_key_press_event (GdkEventKey*);
|
||||
|
||||
void on_show ();
|
||||
void on_hide ();
|
||||
|
||||
private:
|
||||
WavesButton& _ok_button;
|
||||
void on_ok(WavesButton*);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue