2014-04-16 12:30:29 -05:00
|
|
|
/*
|
2014-05-01 03:53:31 -05:00
|
|
|
Copyright (C) 2014 Waves Audio Ltd.
|
2014-04-16 12:30:29 -05:00
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifdef WAF_BUILD
|
|
|
|
|
#include "gtk2ardour-config.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include <fstream>
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
|
|
|
|
|
#include "waves_button.h"
|
|
|
|
|
|
|
|
|
|
#include <gtkmm/filechooser.h>
|
|
|
|
|
|
|
|
|
|
#include "session_lock_dialog.h"
|
|
|
|
|
#include "i18n.h"
|
2014-11-29 21:02:36 +02:00
|
|
|
#include "dbg_msg.h"
|
2015-02-13 13:16:42 +02:00
|
|
|
#include "actions.h"
|
2015-01-23 11:34:56 +02:00
|
|
|
#include "ardour_ui.h"
|
2015-04-01 17:08:29 +03:00
|
|
|
#include "public_editor.h"
|
2014-04-16 12:30:29 -05:00
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
using namespace Gtk;
|
|
|
|
|
using namespace Gdk;
|
|
|
|
|
using namespace Glib;
|
|
|
|
|
using namespace PBD;
|
|
|
|
|
using namespace ARDOUR;
|
|
|
|
|
|
|
|
|
|
SessionLockDialog::SessionLockDialog ()
|
|
|
|
|
: WavesDialog (_("session_lock_dialog.xml"), true, false)
|
2014-06-11 06:00:48 -05:00
|
|
|
, _ok_button (get_waves_button ("ok_button"))
|
2015-04-01 17:08:29 +03:00
|
|
|
, _session_lock_dialog_menu_disabler (0)
|
2014-04-16 12:30:29 -05:00
|
|
|
{
|
|
|
|
|
set_keep_above (true);
|
|
|
|
|
set_position (WIN_POS_CENTER);
|
|
|
|
|
|
2014-05-01 03:53:31 -05:00
|
|
|
_ok_button.signal_clicked.connect (sigc::mem_fun (*this, &SessionLockDialog::on_ok));
|
2014-04-16 12:30:29 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SessionLockDialog::~SessionLockDialog()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//app logic
|
|
|
|
|
void
|
|
|
|
|
SessionLockDialog::on_ok (WavesButton*)
|
|
|
|
|
{
|
|
|
|
|
hide();
|
|
|
|
|
response (Gtk::RESPONSE_OK);
|
|
|
|
|
}
|
|
|
|
|
|
2015-01-23 11:34:56 +02:00
|
|
|
void
|
|
|
|
|
SessionLockDialog::on_show ()
|
|
|
|
|
{
|
2015-04-01 17:08:29 +03:00
|
|
|
if (!_session_lock_dialog_menu_disabler) {
|
|
|
|
|
_session_lock_dialog_menu_disabler = new MainMenuDisabler ();
|
|
|
|
|
}
|
2015-01-23 11:34:56 +02:00
|
|
|
WavesDialog::on_show ();
|
|
|
|
|
ARDOUR_UI::instance()->on_lock_session ();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
SessionLockDialog::on_hide ()
|
|
|
|
|
{
|
|
|
|
|
ARDOUR_UI::instance()->on_unlock_session ();
|
|
|
|
|
WavesDialog::on_hide ();
|
2015-02-13 13:16:42 +02:00
|
|
|
|
2015-04-01 17:08:29 +03:00
|
|
|
if (_session_lock_dialog_menu_disabler) {
|
|
|
|
|
delete _session_lock_dialog_menu_disabler;
|
|
|
|
|
_session_lock_dialog_menu_disabler = 0;
|
|
|
|
|
}
|
2015-01-23 11:34:56 +02:00
|
|
|
}
|
2014-04-16 12:30:29 -05:00
|
|
|
|
2015-01-23 11:33:44 +02:00
|
|
|
bool
|
|
|
|
|
SessionLockDialog::on_key_press_event (GdkEventKey*)
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|