diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 715cf9ec0b..23197c6e3b 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -202,8 +202,8 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir) , about (X_("about"), _("About")) , location_ui (X_("locations"), _("Locations")) , route_params (X_("inspector"), _("Tracks and Busses")) - //VKPRefs:, audio_midi_setup (X_("audio-midi-setup"), _("Audio/MIDI Setup")) , tracks_control_panel (X_("tracks-control-panel"), _("PREFERENCES")) + , session_lock_dialog (X_("session-lock-dialog"), _("SESSION LOCK")) , session_option_editor (X_("session-options-editor"), _("Properties"), boost::bind (&ARDOUR_UI::create_session_option_editor, this)) , add_video_dialog (X_("add-video"), _("Add Tracks/Busses"), boost::bind (&ARDOUR_UI::create_add_video_dialog, this)) , bundle_manager (X_("bundle-manager"), _("Bundle Manager"), boost::bind (&ARDOUR_UI::create_bundle_manager, this)) @@ -370,8 +370,8 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir) WM::Manager::instance().register_window (&add_route_dialog); WM::Manager::instance().register_window (&add_video_dialog); WM::Manager::instance().register_window (&route_params); - //VKPRefs:WM::Manager::instance().register_window (&audio_midi_setup); WM::Manager::instance().register_window (&tracks_control_panel); + WM::Manager::instance().register_window (&session_lock_dialog); WM::Manager::instance().register_window (&bundle_manager); WM::Manager::instance().register_window (&location_ui); WM::Manager::instance().register_window (&big_clock_window); @@ -4399,3 +4399,10 @@ ARDOUR_UI::do_tracks_control_panel (uint32_t desired_sample_rate) return -1; } +int +ARDOUR_UI::do_session_lock_dialog () +{ + session_lock_dialog->run(); + + return 0; +} diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index eb85833186..dd76578de6 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -72,7 +72,7 @@ #include "ardour_dialog.h" #include "ardour_window.h" #include "editing.h" -//VKPRefs:#include "engine_dialog.h" +#include "session_lock_dialog.h" #include "tracks_control_panel.h" #include "meterbridge.h" #include "ui_config.h" @@ -606,8 +606,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr WM::Proxy about; WM::Proxy location_ui; WM::Proxy route_params; - //VKPRefs:WM::Proxy audio_midi_setup; WM::Proxy tracks_control_panel; + WM::Proxy session_lock_dialog; /* Windows/Dialogs that require a creator method */ @@ -754,11 +754,11 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr void resize_text_widgets (); - std::string _announce_string; - void check_announcements (); + std::string _announce_string; + void check_announcements (); - //VKPRefs:int do_audio_midi_setup (uint32_t); - int do_tracks_control_panel(uint32_t); + int do_tracks_control_panel(uint32_t); + int do_session_lock_dialog(); }; #endif /* __ardour_gui_h__ */ diff --git a/gtk2_ardour/icons/session_lock.png b/gtk2_ardour/icons/session_lock.png new file mode 100644 index 0000000000..abe4ade037 Binary files /dev/null and b/gtk2_ardour/icons/session_lock.png differ diff --git a/gtk2_ardour/session_lock_dialog.cc b/gtk2_ardour/session_lock_dialog.cc new file mode 100644 index 0000000000..e682f128f6 --- /dev/null +++ b/gtk2_ardour/session_lock_dialog.cc @@ -0,0 +1,85 @@ +/* + Copyright (C) 2014 Valeriy Kamyshniy + + 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 +#include + +#include "waves_button.h" + +#include + +//#include "pbd/failed_constructor.h" +//#include "pbd/file_utils.h" +//#include "pbd/replace_all.h" +//#include "pbd/whitespace.h" +//#include "pbd/stacktrace.h" +//#include "pbd/openuri.h" +// +//#include "ardour/audioengine.h" +//#include "ardour/filesystem_paths.h" +//#include "ardour/recent_sessions.h" +//#include "ardour/session.h" +//#include "ardour/session_state_utils.h" +//#include "ardour/template_utils.h" +//#include "ardour/filename_extensions.h" +// +//#include "ardour_ui.h" +#include "session_lock_dialog.h" +//#include "opts.h" +//VKPRefs:#include "engine_dialog.h" +#include "i18n.h" +//#include "utils.h" + +using namespace std; +using namespace Gtk; +using namespace Gdk; +using namespace Glib; +using namespace PBD; +using namespace ARDOUR; + +#define dbg_msg(a) MessageDialog (a, PROGRAM_NAME).run(); + + +SessionLockDialog::SessionLockDialog () + : WavesDialog (_("session_lock_dialog.xml"), true, false) + , ok_button (get_waves_button ("ok_button")) +{ + set_keep_above (true); + set_position (WIN_POS_CENTER); + + ok_button.signal_clicked.connect (sigc::mem_fun (*this, &SessionLockDialog::on_ok)); +} + +SessionLockDialog::~SessionLockDialog() +{ +} + +//app logic +void +SessionLockDialog::on_ok (WavesButton*) +{ + hide(); + response (Gtk::RESPONSE_OK); +} + + diff --git a/gtk2_ardour/session_lock_dialog.h b/gtk2_ardour/session_lock_dialog.h new file mode 100644 index 0000000000..334bbc99c2 --- /dev/null +++ b/gtk2_ardour/session_lock_dialog.h @@ -0,0 +1,58 @@ +/* + Copyright (C) 2014 Valeriy Kamyshniy + + 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. + +*/ + +#ifndef __gtk2_session_lock_dialog_h__ +#define __gtk2_session_lock_dialog_h__ + +#include +#include "waves_dialog.h" + +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include + +//#include "ardour/utils.h" + +class EngineControl; +#define MAX_RECENT_SESSION_COUNTS 10 +class SessionLockDialog : public WavesDialog { + public: + + SessionLockDialog (); + ~SessionLockDialog (); + + private: + WavesButton& ok_button; + void on_ok(WavesButton*); +}; + +#endif /* __gtk2_session_lock_dialog_h__ */ diff --git a/gtk2_ardour/tracks.menus.in b/gtk2_ardour/tracks.menus.in index 5021d46c9c..88b017b8e6 100644 --- a/gtk2_ardour/tracks.menus.in +++ b/gtk2_ardour/tracks.menus.in @@ -44,11 +44,13 @@ -#ifdef GTKOSX + #ifdef GTKOSX #endif #ifndef GTKOSX + + #endif diff --git a/gtk2_ardour/ui/session_lock_dilaog.xml b/gtk2_ardour/ui/session_lock_dilaog.xml new file mode 100644 index 0000000000..234e89957f --- /dev/null +++ b/gtk2_ardour/ui/session_lock_dilaog.xml @@ -0,0 +1,22 @@ + + +