typedef uint64_t microseconds_t;
#include "about_dialog.h"
+#include "read_only_session_dialog.h"
#include "actions.h"
#include "add_tracks_dialog.h"
#include "ambiguous_file_dialog.h"
}
}
+
+
if (!new_session->writable()) {
- MessageDialog msg (_("This session has been opened in read-only mode.\n\nYou will not be able to record or save."),
- true,
- Gtk::MESSAGE_INFO,
- BUTTONS_OK);
-
- msg.set_keep_above (true);
- msg.set_title (_("Read-only Session"));
- msg.set_position (Gtk::WIN_POS_CENTER);
- pop_back_splash (msg);
- msg.present ();
- (void) msg.run ();
- msg.hide ();
+
+ ReadOnlySessionDialog ros_dialog;
+ ros_dialog.run ();
+ ros_dialog.set_keep_above (true);
+ ros_dialog.set_position (Gtk::WIN_POS_CENTER);
}
/* Now the session been created, add the transport controls */
--- /dev/null
+/*
+ Copyright (C) 2014 Waves Audio Ltd.
+
+ 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.
+
+*/
+
+#include "pbd/file_utils.h"
+#include "ardour/filesystem_paths.h"
+
+#include "i18n.h"
+#include "about_dialog.h"
+#include "read_only_session_dialog.h"
+
+using namespace Gtk;
+using namespace Gdk;
+using namespace std;
+using namespace ARDOUR;
+using namespace PBD;
+
+ReadOnlySessionDialog::ReadOnlySessionDialog ()
+ : WavesDialog (_("read_only_session_dialog.xml"), true, false)
+ , _ok_button ( get_waves_button ("ok_button") )
+{
+ set_modal (true);
+ set_resizable (false);
+
+ _ok_button.signal_clicked.connect (sigc::mem_fun (*this, &ReadOnlySessionDialog::ok_button_pressed));
+
+ show_all ();
+}
+
+void
+ReadOnlySessionDialog::on_esc_pressed ()
+{
+ hide ();
+}
+
+void
+ReadOnlySessionDialog::on_enter_pressed ()
+{
+ hide ();
+}
+
+void
+ReadOnlySessionDialog::ok_button_pressed (WavesButton*)
+{
+ hide ();
+}
+
+ReadOnlySessionDialog::~ReadOnlySessionDialog ()
+{
+}
--- /dev/null
+/*
+ Copyright (C) 2014 Waves Audio Ltd.
+
+ 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 __read_only_session_dialog_h__
+#define __read_only_session_dialog_h__
+
+#include "waves_dialog.h"
+#include "ardour_button.h"
+
+class ReadOnlySessionDialog : public WavesDialog
+{
+public:
+ ReadOnlySessionDialog();
+ ~ReadOnlySessionDialog();
+
+protected:
+ void on_esc_pressed ();
+ void on_enter_pressed ();
+
+private:
+ void ok_button_pressed (WavesButton*);
+
+ WavesButton& _ok_button;
+};
+
+#endif /* __read_only_session_dialog_h__ */
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<Dialog title="Read-only Session" resizeable="False">
+
+ <style name="generic_control"
+ winfont ="Arial Bold 10"
+ macfont ="Helvetica Bold 10"
+ fgnormal="#FFFFFF"
+ bgnormal="#6a6a6a"
+ fgactive="#FFFFFF"
+ bgactive="#303030"
+ fghover="#CCCCCC"
+ bghover="#898989"
+ horzalignment="start"/>
+
+ <Layout width="350"
+ height="135"
+ style="generic_control">
+ <VBox width="350"
+ x="0"
+ y="20">
+ <Label style="generic_control"
+ horzalignment="center"
+ text="This session has been opened in read-only mode.\n"/>
+
+ <Label style="generic_control"
+ horzalignment="center"
+ text="You will not be able to record or save."/>
+ </VBox>
+ <Button id="ok_button"
+ style="generic_control"
+ text="OK"
+ fgnormal="#6D6E72"
+ bgnormal="#CACAC5"
+ fgactive="#EDECE8"
+ bgactive="#6D6E72"
+ borderwidth="0 0 0 0"
+ bordercolor="#6D6E72"
+ width="69"
+ height="22"
+ x="255"
+ y="100"/>
+ </Layout>
+
+</Dialog>
\ No newline at end of file
'public_editor.cc',
'quantize_dialog.cc',
'rc_option_editor.cc',
+ 'read_only_session_dialog.cc',
'region_editor.cc',
'region_gain_line.cc',
'region_layering_order_editor.cc',