/*
- Copyright (C) 2008 Paul Davis
- Author: Sakari Bergen
-
- 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
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
+ * Copyright (C) 2008-2013 Sakari Bergen <sakari.bergen@beatwaves.net>
+ * Copyright (C) 2008-2017 Paul Davis <paul@linuxaudiosystems.com>
+ * Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net>
+ * Copyright (C) 2009-2012 David Robillard <d@drobilla.net>
+ * Copyright (C) 2013-2014 Colin Fletcher <colin.m.fletcher@googlemail.com>
+ * Copyright (C) 2015-2016 Tim Mayberry <mojofunk@gmail.com>
+ * Copyright (C) 2015-2019 Robin Gareus <robin@gareus.org>
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
#include <sstream>
#include <iomanip>
break;
}
- // label += _("from ");
-
- // label += "<span color=\"#7fff7f\">";
label += start;
-// label += "</span>";
-
label += _(" to ");
-
-// label += "<span color=\"#7fff7f\">";
label += end;
-// label += "</span>";
return label;
}
range_view.append_column (*label_col);
range_view.append_column (_("Length"), range_cols.length);
+ range_view.append_column (_("Creation Date"), range_cols.date);
}
void
row[range_cols.label] = construct_label (*it);
row[range_cols.length] = construct_length (*it);
+ Glib::DateTime gdt(Glib::DateTime::create_now_local ((*it)->timestamp()));
+ row[range_cols.timestamp] = (*it)->timestamp();
+ row[range_cols.date] = gdt.format ("%F %H:%M");;
+
+
add_range_to_selection (*it, false);
break;
range_view.append_column (*label_col);
range_view.append_column (_("Length"), range_cols.length);
+ range_view.append_column (_("Creation Date"), range_cols.date);
+
+ range_list->set_sort_column(5, Gtk::SORT_DESCENDING);
+ Gtk::TreeViewColumn* date_col = range_view.get_column(5); // date column
+ date_col->set_sort_column(7); // set sort as the timestamp
+
}
void
row[range_cols.name] = (*it)->name();
row[range_cols.label] = construct_label (*it);
row[range_cols.length] = construct_length (*it);
+
+ Glib::DateTime gdt(Glib::DateTime::create_now_local ((*it)->timestamp()));
+ row[range_cols.timestamp] = (*it)->timestamp();
+ row[range_cols.date] = gdt.format ("%F %H:%M");;
+
}
set_selection_from_state ();