mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
use new ruler dialog class for context clicks on ruler labels area
This commit is contained in:
parent
c381f5b653
commit
298085eec2
4 changed files with 9 additions and 3 deletions
|
|
@ -303,6 +303,7 @@ Editor::Editor ()
|
||||||
pre_press_cursor = 0;
|
pre_press_cursor = 0;
|
||||||
_drags = new DragManager (this);
|
_drags = new DragManager (this);
|
||||||
lock_dialog = 0;
|
lock_dialog = 0;
|
||||||
|
ruler_dialog = 0;
|
||||||
current_mixer_strip = 0;
|
current_mixer_strip = 0;
|
||||||
tempo_lines = 0;
|
tempo_lines = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,7 @@ class PlaylistSelector;
|
||||||
class PluginSelector;
|
class PluginSelector;
|
||||||
class ProgressReporter;
|
class ProgressReporter;
|
||||||
class RhythmFerret;
|
class RhythmFerret;
|
||||||
|
class RulerDialog;
|
||||||
class Selection;
|
class Selection;
|
||||||
class SoundFileOmega;
|
class SoundFileOmega;
|
||||||
class StreamView;
|
class StreamView;
|
||||||
|
|
@ -805,6 +806,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
|
|
||||||
Gtk::Widget * ruler_grabbed_widget;
|
Gtk::Widget * ruler_grabbed_widget;
|
||||||
|
|
||||||
|
RulerDialog* ruler_dialog;
|
||||||
|
|
||||||
void initialize_rulers ();
|
void initialize_rulers ();
|
||||||
void update_just_timecode ();
|
void update_just_timecode ();
|
||||||
void compute_fixed_ruler_scale (); //calculates the RulerScale of the fixed rulers
|
void compute_fixed_ruler_scale (); //calculates the RulerScale of the fixed rulers
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@
|
||||||
#include "editing.h"
|
#include "editing.h"
|
||||||
#include "actions.h"
|
#include "actions.h"
|
||||||
#include "gui_thread.h"
|
#include "gui_thread.h"
|
||||||
|
#include "ruler_dialog.h"
|
||||||
#include "time_axis_view.h"
|
#include "time_axis_view.h"
|
||||||
#include "editor_drag.h"
|
#include "editor_drag.h"
|
||||||
#include "editor_cursors.h"
|
#include "editor_cursors.h"
|
||||||
|
|
@ -181,10 +182,10 @@ bool
|
||||||
Editor::ruler_label_button_release (GdkEventButton* ev)
|
Editor::ruler_label_button_release (GdkEventButton* ev)
|
||||||
{
|
{
|
||||||
if (Gtkmm2ext::Keyboard::is_context_menu_event (ev)) {
|
if (Gtkmm2ext::Keyboard::is_context_menu_event (ev)) {
|
||||||
Gtk::Menu* m = dynamic_cast<Gtk::Menu*> (ActionManager::get_widget (X_("/RulerMenuPopup")));
|
if (!ruler_dialog) {
|
||||||
if (m) {
|
ruler_dialog = new RulerDialog ();
|
||||||
m->popup (1, ev->time);
|
|
||||||
}
|
}
|
||||||
|
ruler_dialog->present ();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -193,6 +193,7 @@ gtk2_ardour_sources = [
|
||||||
'route_processor_selection.cc',
|
'route_processor_selection.cc',
|
||||||
'route_time_axis.cc',
|
'route_time_axis.cc',
|
||||||
'route_ui.cc',
|
'route_ui.cc',
|
||||||
|
'ruler_dialog.cc',
|
||||||
'search_path_option.cc',
|
'search_path_option.cc',
|
||||||
'selection.cc',
|
'selection.cc',
|
||||||
'send_ui.cc',
|
'send_ui.cc',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue