X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Feditor_region_list.cc;h=5b1b9c63deb855b86963a5307cf733157857a8b8;hb=99904735e066804358f1d0bd138a84f1e9ecda91;hp=5bf704f649851d70c0d9382984eec669387c0aaa;hpb=eb270e70a12c410cdd98585ad25bb6d8e384a4f5;p=ardour.git diff --git a/gtk2_ardour/editor_region_list.cc b/gtk2_ardour/editor_region_list.cc index 5bf704f649..5b1b9c63de 100644 --- a/gtk2_ardour/editor_region_list.cc +++ b/gtk2_ardour/editor_region_list.cc @@ -15,7 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id$ */ #include @@ -27,12 +26,14 @@ #include #include +#include #include #include #include "editor.h" #include "editing.h" +#include "keyboard.h" #include "ardour_ui.h" #include "gui_thread.h" #include "actions.h" @@ -85,6 +86,9 @@ Editor::add_region_to_region_display (boost::shared_ptr region) string str; TreeModel::Row row; Gdk::Color c; + bool missing_source; + + missing_source = boost::dynamic_pointer_cast(region->source()); if (!show_automatic_regions_in_region_list && region->automatic()) { return; @@ -124,7 +128,11 @@ Editor::add_region_to_region_display (boost::shared_ptr region) } else if (region->whole_file()) { row = *(region_list_model->append()); - set_color(c, rgba_from_style ("RegionListWholeFile", 0xff, 0, 0, 0, "fg", Gtk::STATE_NORMAL, false )); + if (missing_source) { + c.set_rgb(65535,0,0); // FIXME: error color from style + } else { + set_color(c, rgba_from_style ("RegionListWholeFile", 0xff, 0, 0, 0, "fg", Gtk::STATE_NORMAL, false )); + } row[region_list_columns.color_] = c; if (region->source()->name()[0] == '/') { // external file @@ -150,6 +158,10 @@ Editor::add_region_to_region_display (boost::shared_ptr region) } + if (missing_source) { + str += _(" (MISSING)"); + } + row[region_list_columns.name] = str; row[region_list_columns.region] = region;