Indicate current snapshot
Since 02b0ecdacb
, the selected snapshot is no longer the currently
active one. This adds a dedicated indicator for this.
This commit is contained in:
parent
b5d96f0de2
commit
df66482b89
|
@ -52,6 +52,7 @@ EditorSnapshots::EditorSnapshots ()
|
||||||
{
|
{
|
||||||
_snapshot_model = ListStore::create (_columns);
|
_snapshot_model = ListStore::create (_columns);
|
||||||
_snapshot_display.set_model (_snapshot_model);
|
_snapshot_display.set_model (_snapshot_model);
|
||||||
|
_snapshot_display.append_column ("", _columns.current_active);
|
||||||
_snapshot_display.append_column (_("Snapshot (dbl-click to load)"), _columns.visible_name);
|
_snapshot_display.append_column (_("Snapshot (dbl-click to load)"), _columns.visible_name);
|
||||||
_snapshot_display.append_column (_("Modified Date"), _columns.time_formatted);
|
_snapshot_display.append_column (_("Modified Date"), _columns.time_formatted);
|
||||||
_snapshot_display.set_size_request (75, -1);
|
_snapshot_display.set_size_request (75, -1);
|
||||||
|
@ -236,6 +237,11 @@ EditorSnapshots::redisplay ()
|
||||||
g_stat (s.c_str(), &gsb);
|
g_stat (s.c_str(), &gsb);
|
||||||
Glib::DateTime gdt(Glib::DateTime::create_now_local (gsb.st_mtime));
|
Glib::DateTime gdt(Glib::DateTime::create_now_local (gsb.st_mtime));
|
||||||
|
|
||||||
|
if (_session->snap_name() == display_name) {
|
||||||
|
row[_columns.current_active] = "\u25B6"; // BLACK RIGHT-POINTING TRIANGLE
|
||||||
|
} else {
|
||||||
|
row[_columns.current_active] = "";
|
||||||
|
}
|
||||||
row[_columns.visible_name] = display_name;
|
row[_columns.visible_name] = display_name;
|
||||||
row[_columns.real_name] = statename;
|
row[_columns.real_name] = statename;
|
||||||
row[_columns.time_formatted] = gdt.format ("%F %H:%M");
|
row[_columns.time_formatted] = gdt.format ("%F %H:%M");
|
||||||
|
|
|
@ -21,11 +21,12 @@
|
||||||
#ifndef __gtk_ardour_editor_snapshots_h__
|
#ifndef __gtk_ardour_editor_snapshots_h__
|
||||||
#define __gtk_ardour_editor_snapshots_h__
|
#define __gtk_ardour_editor_snapshots_h__
|
||||||
|
|
||||||
#include <gtkmm/widget.h>
|
#include "ardour/session_handle.h"
|
||||||
|
|
||||||
|
#include <gtkmm/liststore.h>
|
||||||
#include <gtkmm/scrolledwindow.h>
|
#include <gtkmm/scrolledwindow.h>
|
||||||
#include <gtkmm/treemodel.h>
|
#include <gtkmm/treemodel.h>
|
||||||
#include <gtkmm/treeview.h>
|
#include <gtkmm/treeview.h>
|
||||||
#include "editor_component.h"
|
|
||||||
|
|
||||||
class EditorSnapshots : public ARDOUR::SessionHandlePtr
|
class EditorSnapshots : public ARDOUR::SessionHandlePtr
|
||||||
{
|
{
|
||||||
|
@ -46,10 +47,12 @@ private:
|
||||||
|
|
||||||
struct Columns : public Gtk::TreeModel::ColumnRecord {
|
struct Columns : public Gtk::TreeModel::ColumnRecord {
|
||||||
Columns () {
|
Columns () {
|
||||||
|
add (current_active);
|
||||||
add (visible_name);
|
add (visible_name);
|
||||||
add (real_name);
|
add (real_name);
|
||||||
add (time_formatted);
|
add (time_formatted);
|
||||||
}
|
}
|
||||||
|
Gtk::TreeModelColumn<std::string> current_active;
|
||||||
Gtk::TreeModelColumn<std::string> visible_name;
|
Gtk::TreeModelColumn<std::string> visible_name;
|
||||||
Gtk::TreeModelColumn<std::string> real_name;
|
Gtk::TreeModelColumn<std::string> real_name;
|
||||||
Gtk::TreeModelColumn<std::string> time_formatted;
|
Gtk::TreeModelColumn<std::string> time_formatted;
|
||||||
|
|
Loading…
Reference in New Issue