summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/editor_regions.cc43
-rw-r--r--gtk2_ardour/editor_regions.h3
-rw-r--r--gtk2_ardour/editor_selection.cc2
-rw-r--r--gtk2_ardour/editor_sources.cc7
-rw-r--r--gtk2_ardour/editor_sources.h2
5 files changed, 27 insertions, 30 deletions
diff --git a/gtk2_ardour/editor_regions.cc b/gtk2_ardour/editor_regions.cc
index 8515efbdcf..32e7a67b8c 100644
--- a/gtk2_ardour/editor_regions.cc
+++ b/gtk2_ardour/editor_regions.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2005 Paul Davis
+ Copyright (C) 2000-2018 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -268,10 +268,7 @@ EditorRegions::EditorRegions (Editor* e)
_display.signal_enter_notify_event().connect (sigc::mem_fun (*this, &EditorRegions::enter_notify), false);
_display.signal_leave_notify_event().connect (sigc::mem_fun (*this, &EditorRegions::leave_notify), false);
- // _display.signal_popup_menu().connect (sigc::bind (sigc::mem_fun (*this, &Editor::show__display_context_menu), 1, 0));
-
- //ARDOUR_UI::instance()->secondary_clock.mode_changed.connect (sigc::mem_fun(*this, &Editor::redisplay_regions));
- ARDOUR_UI::instance()->primary_clock->mode_changed.connect (sigc::mem_fun(*this, &EditorRegions::update_all_rows));
+ ARDOUR_UI::instance()->primary_clock->mode_changed.connect (sigc::mem_fun(*this, &EditorRegions::clock_format_changed));
e->EditorFreeze.connect (editor_freeze_connection, MISSING_INVALIDATOR, boost::bind (&EditorRegions::freeze_tree_model, this), gui_context());
e->EditorThaw.connect (editor_thaw_connection, MISSING_INVALIDATOR, boost::bind (&EditorRegions::thaw_tree_model, this), gui_context());
@@ -534,12 +531,20 @@ EditorRegions::update_row (boost::shared_ptr<Region> region)
}
void
-EditorRegions::update_all_rows ()
+EditorRegions::clock_format_changed ()
{
if (!_session) {
return;
}
+ PropertyChange change;
+ change.add (ARDOUR::Properties::start);
+ change.add (ARDOUR::Properties::length);
+ change.add (ARDOUR::Properties::position);
+ change.add (ARDOUR::Properties::sync_position);
+ change.add (ARDOUR::Properties::fade_in);
+ change.add (ARDOUR::Properties::fade_out);
+
RegionRowMap::iterator i;
for (i = region_row_map.begin(); i != region_row_map.end(); ++i) {
@@ -548,8 +553,7 @@ EditorRegions::update_all_rows ()
boost::shared_ptr<Region> region = (*j)[_columns.region];
- PropertyChange c;
- populate_row(region, (*j), c);
+ populate_row(region, (*j), change);
}
}
@@ -625,8 +629,8 @@ EditorRegions::format_position (samplepos_t pos, char* buf, size_t bufsize, bool
void
EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row const &row, PBD::PropertyChange const &what_changed)
{
- //the grid is most interested in the regions that are *visible* in the editor. this is a perfect place to flag changes to the grid cache
- //maybe update the grid here
+ //the grid is most interested in the regions that are *visible* in the editor.
+ //this is a convenient place to flag changes to the grid cache, on a visible region
PropertyChange grid_interests;
grid_interests.add (ARDOUR::Properties::position);
grid_interests.add (ARDOUR::Properties::length);
@@ -635,19 +639,14 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
_editor->mark_region_boundary_cache_dirty();
}
- //note: do this in populate_row
- {
- Gdk::Color c;
- bool missing_source = boost::dynamic_pointer_cast<SilentFileSource>(region->source()) != NULL;
- if (missing_source) {
- // c.set_rgb(65535,0,0); // FIXME: error color from style
- set_color_from_rgba (c, UIConfiguration::instance().color ("region list missing source"));
- } else {
- set_color_from_rgba (c, UIConfiguration::instance().color ("region list whole file"));
- }
-
- row[_columns.color_] = c;
+ Gdk::Color c;
+ bool missing_source = boost::dynamic_pointer_cast<SilentFileSource>(region->source()) != NULL;
+ if (missing_source) {
+ set_color_from_rgba (c, UIConfiguration::instance().color ("region list missing source"));
+ } else {
+ set_color_from_rgba (c, UIConfiguration::instance().color ("region list whole file"));
}
+ row[_columns.color_] = c;
boost::shared_ptr<AudioRegion> audioregion = boost::dynamic_pointer_cast<AudioRegion>(region);
diff --git a/gtk2_ardour/editor_regions.h b/gtk2_ardour/editor_regions.h
index f3543bac0b..94124e98ad 100644
--- a/gtk2_ardour/editor_regions.h
+++ b/gtk2_ardour/editor_regions.h
@@ -165,7 +165,8 @@ private:
void populate_row_source (boost::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row);
void update_row (boost::shared_ptr<ARDOUR::Region>);
- void update_all_rows ();
+
+ void clock_format_changed ();
void drag_data_received (
Glib::RefPtr<Gdk::DragContext> const &, gint, gint, Gtk::SelectionData const &, guint, guint
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc
index 7b917f0d5a..a876eddba8 100644
--- a/gtk2_ardour/editor_selection.cc
+++ b/gtk2_ardour/editor_selection.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2006 Paul Davis
+ Copyright (C) 2000-2018 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gtk2_ardour/editor_sources.cc b/gtk2_ardour/editor_sources.cc
index 5834aa4eaf..3ba9468c49 100644
--- a/gtk2_ardour/editor_sources.cc
+++ b/gtk2_ardour/editor_sources.cc
@@ -200,10 +200,7 @@ EditorSources::EditorSources (Editor* e)
_display.signal_enter_notify_event().connect (sigc::mem_fun (*this, &EditorSources::enter_notify), false);
_display.signal_leave_notify_event().connect (sigc::mem_fun (*this, &EditorSources::leave_notify), false);
- // _display.signal_popup_menu().connect (sigc::bind (sigc::mem_fun (*this, &Editor::show__display_context_menu), 1, 0));
-
- //ARDOUR_UI::instance()->secondary_clock.mode_changed.connect (sigc::mem_fun(*this, &Editor::redisplay_regions));
- ARDOUR_UI::instance()->primary_clock->mode_changed.connect (sigc::mem_fun(*this, &EditorSources::update_all_rows));
+ ARDOUR_UI::instance()->primary_clock->mode_changed.connect (sigc::mem_fun(*this, &EditorSources::clock_format_changed));
e->EditorFreeze.connect (editor_freeze_connection, MISSING_INVALIDATOR, boost::bind (&EditorSources::freeze_tree_model, this), gui_context());
e->EditorThaw.connect (editor_thaw_connection, MISSING_INVALIDATOR, boost::bind (&EditorSources::thaw_tree_model, this), gui_context());
@@ -460,7 +457,7 @@ EditorSources::selection_changed ()
}
void
-EditorSources::update_all_rows ()
+EditorSources::clock_format_changed ()
{
TreeModel::iterator i;
TreeModel::Children rows = _model->children();
diff --git a/gtk2_ardour/editor_sources.h b/gtk2_ardour/editor_sources.h
index 89b5e418d9..8eef1bc442 100644
--- a/gtk2_ardour/editor_sources.h
+++ b/gtk2_ardour/editor_sources.h
@@ -116,7 +116,7 @@ private:
void add_source (boost::shared_ptr<ARDOUR::Source>);
void remove_source (boost::shared_ptr<ARDOUR::Source>);
- void update_all_rows ();
+ void clock_format_changed ();
void drag_data_received (
Glib::RefPtr<Gdk::DragContext> const &, gint, gint, Gtk::SelectionData const &, guint, guint