13
0

use new ruler dialog class for context clicks on ruler labels area

This commit is contained in:
Paul Davis 2014-06-25 15:23:25 -04:00
parent c381f5b653
commit 298085eec2
4 changed files with 9 additions and 3 deletions

View File

@ -303,6 +303,7 @@ Editor::Editor ()
pre_press_cursor = 0;
_drags = new DragManager (this);
lock_dialog = 0;
ruler_dialog = 0;
current_mixer_strip = 0;
tempo_lines = 0;

View File

@ -117,6 +117,7 @@ class PlaylistSelector;
class PluginSelector;
class ProgressReporter;
class RhythmFerret;
class RulerDialog;
class Selection;
class SoundFileOmega;
class StreamView;
@ -805,6 +806,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
Gtk::Widget * ruler_grabbed_widget;
RulerDialog* ruler_dialog;
void initialize_rulers ();
void update_just_timecode ();
void compute_fixed_ruler_scale (); //calculates the RulerScale of the fixed rulers

View File

@ -47,6 +47,7 @@
#include "editing.h"
#include "actions.h"
#include "gui_thread.h"
#include "ruler_dialog.h"
#include "time_axis_view.h"
#include "editor_drag.h"
#include "editor_cursors.h"
@ -181,10 +182,10 @@ bool
Editor::ruler_label_button_release (GdkEventButton* ev)
{
if (Gtkmm2ext::Keyboard::is_context_menu_event (ev)) {
Gtk::Menu* m = dynamic_cast<Gtk::Menu*> (ActionManager::get_widget (X_("/RulerMenuPopup")));
if (m) {
m->popup (1, ev->time);
if (!ruler_dialog) {
ruler_dialog = new RulerDialog ();
}
ruler_dialog->present ();
}
return true;

View File

@ -193,6 +193,7 @@ gtk2_ardour_sources = [
'route_processor_selection.cc',
'route_time_axis.cc',
'route_ui.cc',
'ruler_dialog.cc',
'search_path_option.cc',
'selection.cc',
'send_ui.cc',