mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
Default_Play_Speed: prevent varispeed dialog from stealing kbd focus
This commit is contained in:
parent
f4feb19397
commit
c38be89bab
2 changed files with 20 additions and 2 deletions
|
|
@ -16,14 +16,20 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "transpose_dialog.h"
|
||||||
|
|
||||||
#include <gtkmm/table.h>
|
#include <gtkmm/table.h>
|
||||||
#include <gtkmm/label.h>
|
#include <gtkmm/label.h>
|
||||||
#include <gtkmm/stock.h>
|
#include <gtkmm/stock.h>
|
||||||
#include "transpose_dialog.h"
|
|
||||||
#include "pbd/i18n.h"
|
#include "pbd/i18n.h"
|
||||||
|
|
||||||
#include <ardour/session.h>
|
#include <ardour/session.h>
|
||||||
|
|
||||||
|
#include "ardour_ui.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
|
|
||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
|
|
||||||
TransposeDialog::TransposeDialog ()
|
TransposeDialog::TransposeDialog ()
|
||||||
|
|
@ -104,6 +110,10 @@ VarispeedDialog::VarispeedDialog ()
|
||||||
// add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
// add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
||||||
// add_button (_("Transpose"), RESPONSE_ACCEPT);
|
// add_button (_("Transpose"), RESPONSE_ACCEPT);
|
||||||
|
|
||||||
|
_octaves_spinner.set_can_focus(false);
|
||||||
|
_semitones_spinner.set_can_focus(false);
|
||||||
|
_cents_spinner.set_can_focus(false);
|
||||||
|
|
||||||
_octaves_spinner.signal_changed().connect (sigc::mem_fun (*this, &VarispeedDialog::apply_speed));
|
_octaves_spinner.signal_changed().connect (sigc::mem_fun (*this, &VarispeedDialog::apply_speed));
|
||||||
_semitones_spinner.signal_changed().connect (sigc::mem_fun (*this, &VarispeedDialog::apply_speed));
|
_semitones_spinner.signal_changed().connect (sigc::mem_fun (*this, &VarispeedDialog::apply_speed));
|
||||||
_cents_spinner.signal_changed().connect (sigc::mem_fun (*this, &VarispeedDialog::apply_speed));
|
_cents_spinner.signal_changed().connect (sigc::mem_fun (*this, &VarispeedDialog::apply_speed));
|
||||||
|
|
@ -111,6 +121,13 @@ VarispeedDialog::VarispeedDialog ()
|
||||||
show_all_children ();
|
show_all_children ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
VarispeedDialog::on_key_press_event (GdkEventKey *ev)
|
||||||
|
{
|
||||||
|
Gtk::Window& main_window (ARDOUR_UI::instance()->main_window());
|
||||||
|
return ARDOUR_UI_UTILS::relay_key_press (ev, &main_window);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
VarispeedDialog::reset ()
|
VarispeedDialog::reset ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@
|
||||||
#include "ardour_dialog.h"
|
#include "ardour_dialog.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** A dialog box to select a transposition to apply to a MIDI region.
|
/** A dialog box to select a transposition to apply to a MIDI region.
|
||||||
* It asks for octaves and semitones, with the transposition being
|
* It asks for octaves and semitones, with the transposition being
|
||||||
* the sum of the two.
|
* the sum of the two.
|
||||||
|
|
@ -57,6 +56,8 @@ public:
|
||||||
void apply_speed ();
|
void apply_speed ();
|
||||||
void on_hide ();
|
void on_hide ();
|
||||||
|
|
||||||
|
bool on_key_press_event(GdkEventKey*);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Gtk::Adjustment _octaves_adjustment;
|
Gtk::Adjustment _octaves_adjustment;
|
||||||
Gtk::Adjustment _semitones_adjustment;
|
Gtk::Adjustment _semitones_adjustment;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue