make rec-regions insensitive to events; fix up diskrate dialog text
git-svn-id: svn://localhost/ardour2/trunk@1626 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
84bbdb9a1d
commit
36d88c8e49
@ -2379,7 +2379,7 @@ ARDOUR_UI::disk_overrun_handler ()
|
||||
|
||||
if (!have_disk_speed_dialog_displayed) {
|
||||
have_disk_speed_dialog_displayed = true;
|
||||
MessageDialog* msg = new MessageDialog (*editor, X_("diskrate dialog"), _("\
|
||||
MessageDialog* msg = new MessageDialog (*editor, _("\
|
||||
The disk system on your computer\n\
|
||||
was not able to keep up with Ardour.\n\
|
||||
\n\
|
||||
|
@ -179,6 +179,15 @@ AudioStreamView::add_region_view_internal (boost::shared_ptr<Region> r, bool wai
|
||||
region_view->set_amplitude_above_axis(_amplitude_above_axis);
|
||||
region_views.push_front (region_view);
|
||||
|
||||
|
||||
/* if its the special single-sample length that we use for rec-regions, make it
|
||||
insensitive to events
|
||||
*/
|
||||
|
||||
if (region->length() == 1) {
|
||||
region_view->set_sensitive (false);
|
||||
}
|
||||
|
||||
/* if this was the first one, then lets query the waveform scale and shape.
|
||||
otherwise, we set it to the current value */
|
||||
|
||||
|
@ -214,7 +214,11 @@ Editor::typed_event (ArdourCanvas::Item* item, GdkEvent *event, ItemType type)
|
||||
bool
|
||||
Editor::canvas_region_view_event (GdkEvent *event, ArdourCanvas::Item* item, RegionView *rv)
|
||||
{
|
||||
gint ret = FALSE;
|
||||
bool ret = false;
|
||||
|
||||
if (!rv->sensitive ()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (event->type) {
|
||||
case GDK_BUTTON_PRESS:
|
||||
@ -330,6 +334,10 @@ Editor::canvas_fade_in_event (GdkEvent *event, ArdourCanvas::Item* item, AudioRe
|
||||
{
|
||||
/* we handle only button 3 press/release events */
|
||||
|
||||
if (!rv->sensitive()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (event->type) {
|
||||
case GDK_BUTTON_PRESS:
|
||||
clicked_regionview = rv;
|
||||
@ -362,6 +370,10 @@ Editor::canvas_fade_in_handle_event (GdkEvent *event, ArdourCanvas::Item* item,
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
if (!rv->sensitive()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (event->type) {
|
||||
case GDK_BUTTON_PRESS:
|
||||
case GDK_2BUTTON_PRESS:
|
||||
@ -401,6 +413,10 @@ Editor::canvas_fade_out_event (GdkEvent *event, ArdourCanvas::Item* item, AudioR
|
||||
{
|
||||
/* we handle only button 3 press/release events */
|
||||
|
||||
if (!rv->sensitive()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (event->type) {
|
||||
case GDK_BUTTON_PRESS:
|
||||
clicked_regionview = rv;
|
||||
@ -433,6 +449,10 @@ Editor::canvas_fade_out_handle_event (GdkEvent *event, ArdourCanvas::Item* item,
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
if (!rv->sensitive()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (event->type) {
|
||||
case GDK_BUTTON_PRESS:
|
||||
case GDK_2BUTTON_PRESS:
|
||||
@ -703,6 +723,10 @@ Editor::canvas_region_view_name_highlight_event (GdkEvent* event, ArdourCanvas::
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
if (!rv->sensitive()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (event->type) {
|
||||
case GDK_BUTTON_PRESS:
|
||||
case GDK_2BUTTON_PRESS:
|
||||
@ -739,6 +763,10 @@ Editor::canvas_region_view_name_event (GdkEvent *event, ArdourCanvas::Item* item
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
if (!rv->sensitive()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (event->type) {
|
||||
case GDK_BUTTON_PRESS:
|
||||
case GDK_2BUTTON_PRESS:
|
||||
|
@ -56,6 +56,8 @@ class RegionView : public TimeAxisViewItem
|
||||
boost::shared_ptr<ARDOUR::Region> region() const { return _region; }
|
||||
|
||||
bool is_valid() const { return valid; }
|
||||
|
||||
|
||||
void set_valid (bool yn) { valid = yn; }
|
||||
|
||||
virtual void set_height (double) = 0;
|
||||
|
@ -136,6 +136,7 @@ TimeAxisViewItem::init (const string& it_name, double spu, Gdk::Color& base_colo
|
||||
min_item_duration = 0 ;
|
||||
show_vestigial = true;
|
||||
visibility = vis;
|
||||
_sensitive = true;
|
||||
|
||||
if (duration == 0) {
|
||||
warning << "Time Axis Item Duration == 0" << endl ;
|
||||
|
@ -177,6 +177,9 @@ class TimeAxisViewItem : public Selectable
|
||||
*/
|
||||
virtual void set_should_show_selection (bool yn) ;
|
||||
|
||||
void set_sensitive (bool yn) { _sensitive = yn; }
|
||||
bool sensitive () const { return _sensitive; }
|
||||
|
||||
//---------------------------------------------------------------------------------------//
|
||||
// Parent Component Methods
|
||||
|
||||
@ -413,6 +416,9 @@ class TimeAxisViewItem : public Selectable
|
||||
/** should the item show its selected status */
|
||||
bool should_show_selection;
|
||||
|
||||
/** should the item respond to events */
|
||||
bool _sensitive;
|
||||
|
||||
/**
|
||||
* The unique item name of this Item
|
||||
* Each item upon a time axis must have a unique id
|
||||
|
Loading…
Reference in New Issue
Block a user