summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_mouse.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-05-02 18:13:35 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-05-02 18:13:35 -0400
commit3973ce81b37a9ba6fcd2e7ff95ca730b0aa32252 (patch)
treee5f970e5cbcd5abb168ce59b99c93a65d7cecf3d /gtk2_ardour/editor_mouse.cc
parentd14f43ccf2eef9c43ecb44f7973962e634d17590 (diff)
remove all of Gtk::Window::set_position (WIN_POS_MOUSE) for anything deriving from ArdourDialog or ArdourWindow; move the set_position() call into those classes' constructors, so that they are called before the windows are realized, and thus it actually works
Diffstat (limited to 'gtk2_ardour/editor_mouse.cc')
-rw-r--r--gtk2_ardour/editor_mouse.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index 1a4399854f..00156a90a2 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -2281,7 +2281,6 @@ Editor::edit_control_point (ArdourCanvas::Item* item)
}
ControlPointDialog d (p);
- d.set_position (Gtk::WIN_POS_MOUSE);
ensure_float (d);
if (d.run () != RESPONSE_ACCEPT) {
@@ -2306,11 +2305,18 @@ Editor::edit_notes (TimeAxisViewItem& tavi)
return;
}
- EditNoteDialog d (&(*s.begin())->region_view(), s);
- d.set_position (Gtk::WIN_POS_MOUSE);
- ensure_float (d);
+ EditNoteDialog* d = new EditNoteDialog (&(*s.begin())->region_view(), s);
+ d->show_all ();
+ ensure_float (*d);
+
+ d->signal_response().connect (sigc::bind (sigc::mem_fun (*this, &Editor::note_edit_done), d));
+}
- d.run ();
+void
+Editor::note_edit_done (int r, EditNoteDialog* d)
+{
+ d->done (r);
+ delete d;
}
void