diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-11-16 18:42:48 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-11-16 18:42:48 +0000 |
commit | 2bf3ed423f7aecdaabf5fbb078d9e2f20d26880c (patch) | |
tree | 722c7b81b46f966c6cba9caacc12bbf21663ca7f /gtk2_ardour/time_axis_view.cc | |
parent | 7bbf76132164d3bd293c3bfdf2038dd47f1cc63b (diff) |
track naming patch from brian; slightly modified F11-bug workaround from brian; undo/redo items in edit menu now show operation to be undone/redone; canvas allocations now handled by an idle handler; region views respond to changes in fade/in/out curves ; undo/redo possible for some fade in/out operations; automation tracks extend to max_frames
git-svn-id: svn://localhost/ardour2/trunk@1134 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/time_axis_view.cc')
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 783a41e0a1..da7d3863d7 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -234,7 +234,7 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent) if (canvas_item_visible ((*i)->canvas_display)) { ++nth; - effective_height += (*i)->show_at (y + effective_height, nth, parent); + effective_height += (*i)->show_at (y + 1 + effective_height, nth, parent); } } @@ -373,8 +373,43 @@ TimeAxisView::set_height_pixels (uint32_t h) bool TimeAxisView::name_entry_key_release (GdkEventKey* ev) { + PublicEditor::TrackViewList *allviews = 0; + PublicEditor::TrackViewList::iterator i; + switch (ev->keyval) { + case GDK_Escape: + name_entry.select_region (0,0); + controls_ebox.grab_focus (); + name_entry_changed (); + return true; + + /* Shift+Tab Keys Pressed. Note that for Shift+Tab, GDK actually + * generates a different ev->keyval, rather than setting + * ev->state. + */ + case GDK_ISO_Left_Tab: case GDK_Tab: + name_entry_changed (); + allviews = editor.get_valid_views (0); + if (allviews != 0) { + i = find (allviews->begin(), allviews->end(), this); + if (i != allviews->end()) { + do { + if(ev->keyval == GDK_Tab) { + if(++i == allviews->end()) { return true; } + } else { + if(i-- == allviews->begin()) { return true; } + } + } while((*i)->hidden()); + + if((*i)->height_style == Small) { + (*i)->set_height(Smaller); + } + + (*i)->name_entry.grab_focus(); + } + } + return true; case GDK_Up: case GDK_Down: name_entry_changed (); @@ -424,6 +459,7 @@ TimeAxisView::name_entry_focus_out (GdkEventFocus* ev) last_name_entry_key_press_event = 0; name_entry_key_timeout.disconnect (); name_entry.set_name ("EditorTrackNameDisplay"); + name_entry.select_region (0,0); /* do the real stuff */ |