summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-08-17 16:47:27 +0200
committerRobin Gareus <robin@gareus.org>2017-08-17 16:47:27 +0200
commite62e040502ac35213ce11353c9c1e7a487eb941f (patch)
tree4c987f62a84a660f44af653fb5fbf5fc25e99684 /gtk2_ardour
parenta4ee2d3c1743245b2c0bb8ec65c09974b130cce5 (diff)
SessionDialog: hide created-with column in Ardour, use a tooltip.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/session_dialog.cc14
-rw-r--r--gtk2_ardour/session_dialog.h6
2 files changed, 14 insertions, 6 deletions
diff --git a/gtk2_ardour/session_dialog.cc b/gtk2_ardour/session_dialog.cc
index dadc803596..7a9e1589ba 100644
--- a/gtk2_ardour/session_dialog.cc
+++ b/gtk2_ardour/session_dialog.cc
@@ -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));
diff --git a/gtk2_ardour/session_dialog.h b/gtk2_ardour/session_dialog.h
index 8aced6c90d..ff630c2cd5 100644
--- a/gtk2_ardour/session_dialog.h
+++ b/gtk2_ardour/session_dialog.h
@@ -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;