make follow-playhead available again; remove special pane handling
git-svn-id: svn://localhost/ardour2/trunk@1197 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
a0fadfa4f3
commit
3039691723
|
@ -12,6 +12,7 @@
|
|||
(gtk_accel_path "<Actions>/Editor/crop" "c")
|
||||
(gtk_accel_path "<Actions>/Editor/duplicate-region" "d")
|
||||
(gtk_accel_path "<Actions>/Editor/set-edit-cursor" "e")
|
||||
(gtk_accel_path "<Actions>/Editor/toggle-follow-playhead" "f")
|
||||
(gtk_accel_path "<Actions>/MouseMode/set-mouse-mode-gain" "g")
|
||||
(gtk_accel_path "<Actions>/Editor/split-region" "s")
|
||||
(gtk_accel_path "<Actions>/Editor/set-region-sync-position" "v")
|
||||
|
|
|
@ -199,9 +199,6 @@ Mixer_UI::Mixer_UI (AudioEngine& eng)
|
|||
rhs_pane1.set_data ("collapse-direction", (gpointer) 0);
|
||||
list_hpane.set_data ("collapse-direction", (gpointer) 1);
|
||||
|
||||
rhs_pane1.signal_button_release_event().connect (bind (sigc::ptr_fun (pane_handler), static_cast<Paned*>(&rhs_pane1)));
|
||||
list_hpane.signal_button_release_event().connect (bind (sigc::ptr_fun (pane_handler), static_cast<Paned*>(&list_hpane)));
|
||||
|
||||
global_vpacker.pack_start (list_hpane, true, true);
|
||||
|
||||
add (global_vpacker);
|
||||
|
|
|
@ -224,64 +224,6 @@ get_font_for_style (string widgetname)
|
|||
return style->get_font();
|
||||
}
|
||||
|
||||
gint
|
||||
pane_handler (GdkEventButton* ev, Gtk::Paned* pane)
|
||||
{
|
||||
if (ev->window != Gtkmm2ext::get_paned_handle (*pane)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (Keyboard::is_delete_event (ev)) {
|
||||
|
||||
gint pos;
|
||||
gint cmp;
|
||||
|
||||
pos = pane->get_position ();
|
||||
|
||||
if (dynamic_cast<VPaned*>(pane)) {
|
||||
cmp = pane->get_height();
|
||||
} else {
|
||||
cmp = pane->get_width();
|
||||
}
|
||||
|
||||
/* we have to use approximations here because we can't predict the
|
||||
exact position or sizes of the pane (themes, etc)
|
||||
*/
|
||||
|
||||
if (pos < 10 || abs (pos - cmp) < 10) {
|
||||
|
||||
/* already collapsed: restore it (note that this is cast from a pointer value to int, which is tricky on 64bit */
|
||||
|
||||
pane->set_position ((intptr_t) pane->get_data ("rpos"));
|
||||
|
||||
} else {
|
||||
|
||||
int collapse_direction;
|
||||
|
||||
/* store the current position */
|
||||
|
||||
pane->set_data ("rpos", (gpointer) pos);
|
||||
|
||||
/* collapse to show the relevant child in full */
|
||||
|
||||
collapse_direction = (intptr_t) pane->get_data ("collapse-direction");
|
||||
|
||||
if (collapse_direction) {
|
||||
pane->set_position (1);
|
||||
} else {
|
||||
if (dynamic_cast<VPaned*>(pane)) {
|
||||
pane->set_position (pane->get_height());
|
||||
} else {
|
||||
pane->set_position (pane->get_width());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
uint32_t
|
||||
rgba_from_style (string style, uint32_t r, uint32_t g, uint32_t b, uint32_t a, string attr, int state, bool rgba)
|
||||
{
|
||||
|
|
|
@ -65,7 +65,6 @@ ArdourCanvas::Points* get_canvas_points (std::string who, uint32_t npoints);
|
|||
|
||||
Pango::FontDescription get_font_for_style (std::string widgetname);
|
||||
|
||||
gint pane_handler (GdkEventButton*, Gtk::Paned*);
|
||||
uint32_t rgba_from_style (std::string, uint32_t, uint32_t, uint32_t, uint32_t, std::string = "fg", int = Gtk::STATE_NORMAL, bool = true);
|
||||
|
||||
void decorate (Gtk::Window& w, Gdk::WMDecoration d);
|
||||
|
|
Loading…
Reference in New Issue
Block a user