[Summary] Reworking general message dialogs

This commit is contained in:
VKamyshniy 2014-11-24 02:09:21 +02:00
parent 53391399c4
commit 11167a6ae9
12 changed files with 131 additions and 553 deletions

View file

@ -98,7 +98,6 @@ typedef uint64_t microseconds_t;
#include "about_dialog.h" #include "about_dialog.h"
#include "read_only_session_dialog.h" #include "read_only_session_dialog.h"
#include "sample_rate_mismatch_dialog.h"
#include "actions.h" #include "actions.h"
#include "add_tracks_dialog.h" #include "add_tracks_dialog.h"
#include "ambiguous_file_dialog.h" #include "ambiguous_file_dialog.h"
@ -144,7 +143,7 @@ typedef uint64_t microseconds_t;
#include "i18n.h" #include "i18n.h"
#include "open_file_dialog_proxy.h" #include "open_file_dialog_proxy.h"
#include "ok_dialog.h" #include "waves_message_dialog.h"
#include "crash_recovery_dialog.h" #include "crash_recovery_dialog.h"
using namespace ARDOUR; using namespace ARDOUR;
@ -2946,10 +2945,10 @@ ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name,
catch (...) { catch (...) {
OkDialog ok_dialog ("Loading Error", string_compose(_("Session \"%1 (snapshot %2)\"\ndid not load successfully"), path, snap_name)); WavesMessageDialog message_dialog ("Loading Error", string_compose(_("Session \"%1 (snapshot %2)\"\ndid not load successfully"), path, snap_name));
ok_dialog.set_position (Gtk::WIN_POS_CENTER); message_dialog.set_position (Gtk::WIN_POS_CENTER);
pop_back_splash (ok_dialog); pop_back_splash (message_dialog);
ok_dialog.run (); message_dialog.run ();
goto out; goto out;
} }
@ -3991,9 +3990,21 @@ ARDOUR_UI::session_dialog (std::string msg)
int int
ARDOUR_UI::pending_state_dialog () ARDOUR_UI::pending_state_dialog ()
{ {
CrashRecoveryDialog crash_recovery_dialog; WavesMessageDialog message_dialog ("crash_recovery_dialog.xml",
_("Crash Recovery"),
string_compose (_(
"This session appears to have been in the\n\
middle of recording when %1 or\n\
the computer was shutdown.\n\
\n\
%1 can recover any captured audio for\n\
you, or it can ignore it. Please decide\n\
what you would like to do.\n"), PROGRAM_NAME),
WavesMessageDialog::BUTTON_ACCEPT |
WavesMessageDialog::BUTTON_NO);
switch (crash_recovery_dialog.run ()) { switch (message_dialog.run ()) {
case WavesDialog::RESPONSE_DEFAULT:
case RESPONSE_ACCEPT: case RESPONSE_ACCEPT:
return 1; return 1;
default: default:
@ -4005,16 +4016,22 @@ int
ARDOUR_UI::sr_mismatch_dialog (framecnt_t desired, framecnt_t actual) ARDOUR_UI::sr_mismatch_dialog (framecnt_t desired, framecnt_t actual)
{ {
SampleRateMismatchDialog srm_dialog(desired, PROGRAM_NAME, actual); WavesMessageDialog message_dialog (_("Sample Rate Mismatch"),
string_compose (_("\
This session was created with a sample rate of %1 Hz, but\n\
%2 is currently running at %3 Hz. If you load this session,\n\
device will be switched to the session sample rate value. \n\
If an attemp to switch the device is unsuccessful\n\
audio may be played at the wrong sample rate.\n"),
desired,
PROGRAM_NAME,
actual),
WavesMessageDialog::BUTTON_ACCEPT|WavesMessageDialog::BUTTON_CANCEL);
message_dialog.set_position (WIN_POS_CENTER);
switch ( srm_dialog.run () ) { int result = message_dialog.run ();
case RESPONSE_ACCEPT:
return 0; return (result == Gtk::RESPONSE_ACCEPT || result == WavesDialog::RESPONSE_DEFAULT) ? 0 : 1;
default:
break;
}
return 1;
} }
int int

View file

@ -1,142 +0,0 @@
/*
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 "i18n.h"
#include "ok_dialog.h"
#include <vector>
using namespace Gtk;
using namespace Gdk;
using namespace std;
using namespace ARDOUR;
using namespace PBD;
using namespace Pango;
namespace {
const size_t button_left_padding = 10;
const size_t button_bottom_padding = 15;
const size_t font_size = 12;
const size_t label_top_padding = 10;
size_t count_lines(const std::string& str)
{
std::string::const_iterator beg = str.begin();
std::string::const_iterator end = str.end();
std::string::size_type count = 0;
std::string delimeter = "\n";
while ((beg + (delimeter.size() - 1)) != end)
{
std::string tmp(beg, beg + delimeter.size());
if (tmp == delimeter)
{
++count;
}
++beg;
}
return count+1;
}
int calculate_window_height (size_t current_window_height, size_t button_height, size_t font_size, size_t current_lines_number)
{
int label_max_height = (current_window_height - label_top_padding - button_height - button_bottom_padding);
int max_lines_number = label_max_height / font_size;
if ( current_lines_number > max_lines_number )
{
return current_window_height + (current_lines_number - max_lines_number + 1) * font_size;
} else
return current_window_height;
}
}
/*
*/
OkDialog::OkDialog (std::string window_title, std::string info_lines)
: WavesDialog ( _("ok_dialog.xml"), true, false )
, _ok_button ( get_waves_button ("ok_button") )
, _info_label ( get_label("info_label") )
, _layout ( get_layout("layout") )
{
set_modal (true);
set_resizable (false);
this->set_keep_above (true);
_info_label.set_text( info_lines );
this->set_title(window_title);
// Recalculate window height if needed
std::size_t new_window_height = 0;
size_t current_window_height;
this->realize();
current_window_height = this->get_allocation().get_height();
size_t button_height = _ok_button.get_allocation().get_height();
new_window_height = calculate_window_height( current_window_height, button_height, font_size, count_lines(info_lines) );
// end recalculating
// Resize window height
if ( new_window_height > current_window_height ) {
this->realize(); // must be for correct work of get_width,height functions
guint layout_width, layout_height;
layout_width = _layout.get_allocation().get_width();
_layout.set_size_request (layout_width, new_window_height);
guint button_width, button_height;
button_width = _ok_button.get_allocation().get_width();
button_height = _ok_button.get_allocation().get_height();
_info_label.set_size_request( layout_width, new_window_height - button_height - button_bottom_padding);
_layout.put( _ok_button, layout_width - button_width - button_left_padding, new_window_height - button_height - button_bottom_padding);
}
_ok_button.signal_clicked.connect (sigc::mem_fun (*this, &OkDialog::ok_button_pressed));
show_all ();
}
void
OkDialog::on_esc_pressed ()
{
hide ();
response (Gtk::RESPONSE_OK);
}
void
OkDialog::on_enter_pressed ()
{
hide ();
response (Gtk::RESPONSE_OK);
}
void
OkDialog::ok_button_pressed (WavesButton*)
{
hide ();
response (Gtk::RESPONSE_OK);
}
OkDialog::~OkDialog ()
{
}

View file

@ -1,44 +0,0 @@
/*
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 __ok_dialog_h__
#define __ok_dialog_h__
#include "waves_dialog.h"
#include "ardour_button.h"
class OkDialog : public WavesDialog
{
public:
OkDialog(std::string window_title, std::string info_lines);
~OkDialog();
protected:
void on_esc_pressed ();
void on_enter_pressed ();
private:
void ok_button_pressed (WavesButton*);
WavesButton& _ok_button;
Gtk::Label& _info_label;
Gtk::Layout& _layout;
};
#endif /* __ok_dialog_h__ */

View file

@ -1,78 +0,0 @@
/*
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 "sample_rate_mismatch_dialog.h"
#include "utils.h"
#include <string.h>
#include "i18n.h"
using namespace Gtk;
using namespace Gdk;
using namespace std;
using namespace ARDOUR;
using namespace PBD;
SampleRateMismatchDialog::SampleRateMismatchDialog (ARDOUR::framecnt_t desired, std::string program_name, ARDOUR::framecnt_t actual)
: WavesDialog (_("sample_rate_mismatch_dialog.xml"), true, false)
, _cancel_button ( get_waves_button ("cancel_button") )
, _accept_button ( get_waves_button ("accept_button") )
, _info_label ( get_label("info_label") )
{
set_modal (true);
set_resizable (false);
_cancel_button.signal_clicked.connect (sigc::mem_fun (*this, &SampleRateMismatchDialog::cancel_button_pressed));
_accept_button.signal_clicked.connect (sigc::mem_fun (*this, &SampleRateMismatchDialog::accept_button_pressed));
_info_label.set_text (string_compose ( _("This session was created with a sample rate of %1 Hz, but\n%2 is currently running at %3 Hz. If you load this session,\ndevice will be switched to the session sample rate value.\nIf an attemp to switch the device is unsuccessful\naudio may be played at the wrong sample rate."), desired, program_name, actual) );
show_all ();
}
void
SampleRateMismatchDialog::on_esc_pressed ()
{
hide ();
response (Gtk::RESPONSE_CANCEL);
}
void
SampleRateMismatchDialog::on_enter_pressed ()
{
hide ();
response (Gtk::RESPONSE_ACCEPT);
}
void
SampleRateMismatchDialog::cancel_button_pressed (WavesButton*)
{
hide ();
response (Gtk::RESPONSE_CANCEL);
}
void
SampleRateMismatchDialog::accept_button_pressed (WavesButton*)
{
hide ();
response (Gtk::RESPONSE_ACCEPT);
}
SampleRateMismatchDialog::~SampleRateMismatchDialog ()
{
}

View file

@ -1,47 +0,0 @@
/*
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 __sample_rate_mismatch_dialog_h__
#define __sample_rate_mismatch_dialog_h__
#include "waves_dialog.h"
#include "ardour_button.h"
#include <string.h>
#include "utils.h"
class SampleRateMismatchDialog : public WavesDialog
{
public:
SampleRateMismatchDialog(ARDOUR::framecnt_t desired, std::string program_name, ARDOUR::framecnt_t actual);
~SampleRateMismatchDialog();
protected:
void on_esc_pressed ();
void on_enter_pressed ();
private:
void cancel_button_pressed (WavesButton*);
void accept_button_pressed (WavesButton*);
WavesButton& _cancel_button;
WavesButton& _accept_button;
Gtk::Label& _info_label;
};
#endif /* __sample_rate_mismatch_dialog_h__ */

View file

@ -44,7 +44,7 @@
#include "open_file_dialog_proxy.h" #include "open_file_dialog_proxy.h"
#include "yes_no_dialog.h" #include "yes_no_dialog.h"
#include "ok_dialog.h" #include "waves_message_dialog.h"
using namespace ARDOUR; using namespace ARDOUR;
using namespace Gtk; using namespace Gtk;
@ -588,8 +588,8 @@ TracksControlPanel::populate_engine_dropdown()
EngineStateController::instance()->available_backends(backends); EngineStateController::instance()->available_backends(backends);
if (backends.empty()) { if (backends.empty()) {
OkDialog ok_dialog ("", string_compose (_("No audio/MIDI backends detected. %1 cannot run\n(This is a build/packaging/system error.\nIt should never happen.)"), PROGRAM_NAME)); WavesMessageDialog message_dialog ("", string_compose (_("No audio/MIDI backends detected. %1 cannot run\n(This is a build/packaging/system error.\nIt should never happen.)"), PROGRAM_NAME));
ok_dialog.run (); message_dialog.run ();
throw failed_constructor (); throw failed_constructor ();
} }
for (std::vector<const AudioBackendInfo*>::const_iterator b = backends.begin(); b != backends.end(); ++b) { for (std::vector<const AudioBackendInfo*>::const_iterator b = backends.begin(); b != backends.end(); ++b) {
@ -1148,8 +1148,11 @@ TracksControlPanel::on_device_dropdown_item_clicked (WavesDropdown*, int)
std::string message = _("Would you like to switch to ") + device_name + "?"; std::string message = _("Would you like to switch to ") + device_name + "?";
this->set_keep_above (false); set_keep_above (false);
YesNoDialog yes_no_dialog ("", message); WavesMessageDialog yes_no_dialog ("",
message,
WavesMessageDialog::BUTTON_YES |
WavesMessageDialog::BUTTON_NO);
yes_no_dialog.set_position (Gtk::WIN_POS_MOUSE); yes_no_dialog.set_position (Gtk::WIN_POS_MOUSE);
@ -1159,11 +1162,14 @@ TracksControlPanel::on_device_dropdown_item_clicked (WavesDropdown*, int)
PBD::Unwinder<uint32_t> protect_ignore_changes (_ignore_changes, _ignore_changes + 1); PBD::Unwinder<uint32_t> protect_ignore_changes (_ignore_changes, _ignore_changes + 1);
_device_dropdown.set_text (EngineStateController::instance()->get_current_device_name()); _device_dropdown.set_text (EngineStateController::instance()->get_current_device_name());
this->set_keep_above (true); set_keep_above (true);
return; return;
break;
default:
break;
} }
this->set_keep_above (true); set_keep_above (true);
device_changed (); device_changed ();
} }
@ -1405,13 +1411,11 @@ TracksControlPanel::on_a_settings_tab_button_clicked (WavesButton* clicked_butto
void void
TracksControlPanel::on_device_error () TracksControlPanel::on_device_error ()
{ {
std::string message = _("Device cannot operate properly. Switched to None device."); WavesMessageDialog message_dialog ("", _("Device cannot operate properly. Switched to None device."));
OkDialog ok_dialog ("", message); message_dialog.set_position (Gtk::WIN_POS_MOUSE);
message_dialog.set_keep_above (true);
ok_dialog.set_position (Gtk::WIN_POS_MOUSE); message_dialog.run ();
ok_dialog.set_keep_above (true);
ok_dialog.run ();
} }
void void
@ -1628,12 +1632,12 @@ TracksControlPanel::on_device_list_update (bool current_device_disconnected)
if (current_device_disconnected) { if (current_device_disconnected) {
std::string message = _("Audio device has been removed"); std::string message = _("Audio device has been removed");
this->set_keep_above (false); set_keep_above (false);
OkDialog ok_dialog ("", message); WavesMessageDialog message_dialog ("", message);
ok_dialog.set_position (Gtk::WIN_POS_MOUSE); message_dialog.set_position (Gtk::WIN_POS_MOUSE);
ok_dialog.run(); message_dialog.run();
this->set_keep_above (true); set_keep_above (true);
return; return;
} }

View file

@ -1,58 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Dialog title="" <Dialog title="Tracks Live" resizeable="False">
resizeable="False" <style name="generic_control"
winfont ="Arial Bold 12" winfont ="Arial Bold 12"
macfont ="Helvetica Bold 12" macfont ="Helvetica Bold 12"
fgnormal="#6D6E72"> fgnormal="#BFBFBF"
bgnormal="#6C6C6C"
<style name="generic_control" fgactive="#BFBFBF"
winfont ="Arial Bold 12" bgactive="#454545"
macfont ="Helvetica Bold 12" fghover="#CCCCCC"
fgnormal="#6D6E72" bghover="#898989"/>
horzalignment="center"
justify="center"/> <style name="generic_button"
winfont ="Arial Bold 12"
<Layout id="layout" macfont ="Helvetica Bold 12"
width="350" fgnormal="#6D6E72"
height="140" bgnormal="#CACAC5"
bgnormal="#EDECE8"> fgactive="#EDECE8"
<VBox x="0" bgactive="#6D6E72"
y="10" visible="false"
width="350"> noshowall="true"
<Label id="info_label" width="80"
height="90" height="21"/>
style="generic_control"
text=""/> <EventBox bgnormal="#EDECE8">
</VBox> <VBox borderwidth="10"
spacing="10">
<Button id="ignore_button" <Label id="message_label"
style="generic_control" style="generic_control"
text="Ignore crash data" fgnormal="#6D6E72"
fgnormal="#6D6E72" horzalignment="center"
bgnormal="#CACAC5" justify="center"/>
fgactive="#EDECE8" <HBox spacing="10">
bgactive="#6D6E72" <Button id="ok_button"
borderwidth="0 0 0 0" style="generic_button"
bordercolor="#6D6E72" box.pack="end"
width="120" text="ok"/>
height="22" <Button id="close_button"
x="90" style="generic_button"
y="108"/> box.pack="end"
text="Close"/>
<Button id="recover_button" <Button id="accept_button"
style="generic_control" style="generic_button"
text="Recover from crash" box.pack="end"
fgnormal="#6D6E72" width="160"
bgnormal="#CACAC5" height="21"
fgactive="#EDECE8" text="Recover from crash"/>
bgactive="#6D6E72" <Button id="yes_button"
borderwidth="0 0 0 0" style="generic_button"
bordercolor="#6D6E72" box.pack="end"
width="120" text="Yes"/>
height="22" <Button id="no_button"
x="220" style="generic_button"
y="108"/> box.pack="end"
width="160"
</Layout> height="21"
text="Ignore crash data"/>
</Dialog> <Button id="cancel_button"
style="generic_button"
box.pack="end"
text="Cancel"/>
</HBox>
</VBox>
</EventBox>
</Dialog>

View file

@ -1,45 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Dialog title=""
resizeable="False"
winfont ="Arial Bold 12"
macfont ="Helvetica Bold 12"
fgnormal="#6D6E72">
<style name="generic_control"
winfont ="Arial Bold 12"
macfont ="Helvetica Bold 12"
fgnormal="#6D6E72"
horzalignment="center"
justify="center"/>
<Layout id="layout"
width="350"
height="120"
bgnormal="#EDECE8">
<VBox x="0"
y="0"
width="350">
<Label id="info_label"
style="generic_control"
vertalignment="center"
text=""
height="90"/>
</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="80"
height="22"
x="260"
y="88"/>
</Layout>
</Dialog>

View file

@ -1,56 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Dialog title="Sample rate mismatch" resizeable="False">
<style name="generic_control"
winfont ="Arial Bold 12"
macfont ="Helvetica Bold 12"
fgnormal="#BFBFBF"
bgnormal="#6C6C6C"
fgactive="#BFBFBF"
bgactive="#454545"
fghover="#CCCCCC"
bghover="#898989"/>
<EventBox bgnormal="#EDECE8">
<VBox width="450"
borderwidth="10"
spacing="10">
<Label id="info_label"
style="generic_control"
fgnormal="#6D6E72"
horzalignment="center"
justify="center"/>
<HBox spacing="10">
<Button id="accept_button"
style="generic_control"
box.pack="end"
text="Accept"
fgnormal="#6D6E72"
bgnormal="#CACAC5"
fgactive="#EDECE8"
bgactive="#6D6E72"
borderwidth="0 0 0 0"
bordercolor="#6D6E72"
width="80"
height="22"
x="330"
y="110"/>
<Button id="cancel_button"
style="generic_control"
box.pack="end"
text="Cancel"
fgnormal="#6D6E72"
bgnormal="#CACAC5"
fgactive="#EDECE8"
bgactive="#6D6E72"
borderwidth="0 0 0 0"
bordercolor="#6D6E72"
width="80"
height="22"
x="240"
y="110"/>
</HBox>
</VBox>
</EventBox>
</Dialog>

View file

@ -42,7 +42,7 @@ using namespace PBD;
using namespace ARDOUR; using namespace ARDOUR;
using namespace ARDOUR_UI_UTILS; using namespace ARDOUR_UI_UTILS;
WavesDialog::WavesDialog (std::string layout_script_file, bool modal, bool use_seperator) WavesDialog::WavesDialog (const std::string& layout_script_file, bool modal, bool use_seperator)
: Gtk::Dialog ("", modal, use_seperator) : Gtk::Dialog ("", modal, use_seperator)
, WavesUI (layout_script_file, *get_vbox()) , WavesUI (layout_script_file, *get_vbox())
, _proxy (0) , _proxy (0)
@ -107,53 +107,17 @@ WavesDialog::~WavesDialog ()
WM::Manager::instance().remove (_proxy); WM::Manager::instance().remove (_proxy);
} }
void
WavesDialog::on_esc_pressed ()
{
}
void
WavesDialog::on_enter_pressed ()
{
}
bool bool
WavesDialog::on_key_press_event (GdkEventKey* ev) WavesDialog::on_key_press_event (GdkEventKey* ev)
{ {
switch (ev->keyval) switch (ev->keyval)
{ {
case GDK_Return: case GDK_Return:
on_enter_pressed (); response (WavesDialog::RESPONSE_DEFAULT);
break; return true;
case GDK_Escape:
on_esc_pressed ();
break;
} }
return relay_key_press (ev, this); return Gtk::Dialog::on_key_press_event (ev);
}
bool
WavesDialog::on_enter_notify_event (GdkEventCrossing *ev)
{
Keyboard::the_keyboard().enter_window (ev, this);
return Dialog::on_enter_notify_event (ev);
}
bool
WavesDialog::on_leave_notify_event (GdkEventCrossing *ev)
{
Keyboard::the_keyboard().leave_window (ev, this);
return Dialog::on_leave_notify_event (ev);
}
void
WavesDialog::on_unmap ()
{
Keyboard::the_keyboard().leave_window (0, this);
Dialog::on_unmap ();
} }
void void

View file

@ -45,19 +45,18 @@ class WavesDialog : public Gtk::Dialog, public ARDOUR::SessionHandlePtr, public
{ {
public: public:
WavesDialog (std::string layout_script, bool modal = false, bool use_separator = false); WavesDialog (const std::string& layout_script_file, bool modal = false, bool use_separator = false);
~WavesDialog(); virtual ~WavesDialog();
bool on_enter_notify_event (GdkEventCrossing*);
bool on_leave_notify_event (GdkEventCrossing*);
bool on_delete_event (GdkEventAny*); bool on_delete_event (GdkEventAny*);
bool on_key_press_event (GdkEventKey*); bool on_key_press_event (GdkEventKey*);
void on_unmap ();
void on_show (); void on_show ();
enum {
// We need one smaller then smallest Gtk::RESPONSE_*
RESPONSE_DEFAULT = -1000
};
protected: protected:
virtual void on_esc_pressed ();
virtual void on_enter_pressed ();
private: private:

View file

@ -28,6 +28,7 @@ path_prefix = 'gtk2_ardour/'
gtk2_ardour_sources = [ gtk2_ardour_sources = [
'mixer_bridge_view.cc', 'mixer_bridge_view.cc',
'waves_message_dialog.cc',
'waves_dropdown.cc', 'waves_dropdown.cc',
'waves_zoom_control.cc', 'waves_zoom_control.cc',
'waves_ui.cc', 'waves_ui.cc',
@ -118,7 +119,6 @@ gtk2_ardour_sources = [
'fft_graph.cc', 'fft_graph.cc',
'fft_result.cc', 'fft_result.cc',
'floating_text_entry.cc', 'floating_text_entry.cc',
'sample_rate_mismatch_dialog.cc',
'sfdb_freesound_mootcher.cc', 'sfdb_freesound_mootcher.cc',
'gain_meter.cc', 'gain_meter.cc',
'generic_pluginui.cc', 'generic_pluginui.cc',
@ -177,7 +177,6 @@ gtk2_ardour_sources = [
'note_player.cc', 'note_player.cc',
'nsm.cc', 'nsm.cc',
'nsmclient.cc', 'nsmclient.cc',
'ok_dialog.cc',
'option_editor.cc', 'option_editor.cc',
'opts.cc', 'opts.cc',
'panner2d.cc', 'panner2d.cc',