13
0

SessionDialog: hide created-with column in Ardour, use a tooltip.

This commit is contained in:
Robin Gareus 2017-08-17 16:47:27 +02:00
parent a4ee2d3c17
commit e62e040502
2 changed files with 14 additions and 6 deletions

View File

@ -569,7 +569,8 @@ SessionDialog::populate_session_templates ()
row[session_template_columns.name] = "Meta: " + (*s)->name;
row[session_template_columns.path] = "urn:ardour:" + (*s)->path;
row[session_template_columns.description] = (*s)->description;
row[session_template_columns.created_with] = _("{Factory Template}");
row[session_template_columns.created_with_short] = _("{Factory Template}");
row[session_template_columns.created_with_long] = _("{Factory Template}");
}
@ -582,7 +583,8 @@ SessionDialog::populate_session_templates ()
row[session_template_columns.name] = (*x).name;
row[session_template_columns.path] = (*x).path;
row[session_template_columns.description] = (*x).description;
row[session_template_columns.created_with] = (*x).created_with;
row[session_template_columns.created_with_long] = (*x).created_with;
row[session_template_columns.created_with_short] = (*x).created_with.substr(0, (*x).created_with.find(" "));
}
//Add an explicit 'Empty Template' item
@ -590,7 +592,8 @@ SessionDialog::populate_session_templates ()
row[session_template_columns.name] = (_("Empty Template"));
row[session_template_columns.path] = string();
row[session_template_columns.description] = _("An empty session with factory default settings.");
row[session_template_columns.created_with] = _("{Factory Template}");
row[session_template_columns.created_with_short] = _("{Factory Template}");
row[session_template_columns.created_with_long] = _("{Factory Template}");
//auto-select the first item in the list
Gtk::TreeModel::Row first = template_model->children()[0];
@ -678,7 +681,10 @@ SessionDialog::setup_new_session_page ()
template_chooser.set_model (template_model);
template_chooser.set_size_request(300,400);
template_chooser.append_column (_("Template"), session_template_columns.name);
template_chooser.append_column (_("Created With"), session_template_columns.created_with);
#ifdef MIXBUS
template_chooser.append_column (_("Created With"), session_template_columns.created_with_short);
#endif
template_chooser.set_tooltip_column(4); // created_with_long
template_chooser.set_headers_visible (true);
template_chooser.get_selection()->set_mode (SELECTION_SINGLE);
template_chooser.get_selection()->signal_changed().connect (sigc::mem_fun (*this, &SessionDialog::template_row_selected));

View File

@ -153,13 +153,15 @@ private:
add (name);
add (path);
add (description);
add (created_with);
add (created_with_short);
add (created_with_long);
}
Gtk::TreeModelColumn<std::string> name;
Gtk::TreeModelColumn<std::string> path;
Gtk::TreeModelColumn<std::string> description;
Gtk::TreeModelColumn<std::string> created_with;
Gtk::TreeModelColumn<std::string> created_with_short;
Gtk::TreeModelColumn<std::string> created_with_long;
};
SessionTemplateColumns session_template_columns;