Commit Graph

30 Commits

Author SHA1 Message Date
30b087ab3d globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
2017-09-18 12:39:17 -04:00
f52f23b12d Fix scope in 4c077010a 2017-08-30 18:01:17 +02:00
4c077010ad Don't create empty description nodes.
Other places e.g. Route::save_as_template(), Session::save_template()
don't to that either.
2017-08-30 17:45:34 +02:00
b25b99216c Fix a compiler problem when building 'gtk2_ardour/template_dialog.cc' with MSVC
When setting up the 'TemplatesImported' signal, these 2 calls appear in the c'tor for class TemplateDialog:-

	boost::bind (&RouteTemplateManager::init, route_tm)
	boost::bind (&SessionTemplateManager::init, session_tm)

However - '&RouteTemplateManager::init' and '&SessionTemplateManager::init' are in fact the address of the same function. This seems to be causing a problem, either for boost::bind, or MSVC (or both).

In earlier builds they were 2 separate functions. So let's put them back that way (since the current code actually crashes the compiler!!)
2017-08-26 13:07:45 +01:00
cc7243d4ce when connecting to sigc signals, use sigc methods, not boost::bind 2017-08-24 09:31:52 -04:00
0034f246cb Fix some GUI side XML node mem-leaks 2017-08-20 22:26:54 +02:00
Johannes Mueller
258fa81d90 Strip trailing whitespace in template descriptions 2017-08-20 21:09:30 +02:00
Johannes Mueller
70addf1ed0 TemplateDialog: Lable the RESPONSE_OK button "Done" rather than "Ok"
Labeling it "Ok" would imply that by clicking it, descriptions would be saved
without further interaction. If we did so, we would also need to add a
cancel-button or handle simple closing of the dialog window appropriately.
2017-08-20 21:09:30 +02:00
Johannes Mueller
c6ecd2a6e1 TemplateDialog tweaks
* don't ask whether to save the description when renaming the template

* sane behavior when a template is deleted
2017-08-20 21:09:30 +02:00
Johannes Mueller
ea3f58a27f Clear and deactivate description editor widget when nothing is selected 2017-08-20 21:09:30 +02:00
Johannes Mueller
43b69e1fa3 TemplateDialog: keep private things private and header files simple 2017-08-20 21:09:30 +02:00
Johannes Mueller
c834e88e9e Ask user whether to save or discard unsaved template descriptions 2017-08-20 21:09:30 +02:00
Johannes Mueller
bd4db1e151 Remove the template description XMLNode before saving the template
... to avoid that the new template description is concatenated to the old one.
2017-08-20 21:09:30 +02:00
Johannes Mueller
908369ab3e Save template description at toplevel rather than in <Metadata/> 2017-08-20 21:09:30 +02:00
Johannes Mueller
e933db1a12 Make template descriptions editable in template manager 2017-08-20 21:09:30 +02:00
0a0eec2adc Session Metadata: add a Description field.
* This is a multi-line text field.
* If the session is a template, we might show this in the New Session dialog.
2017-08-14 14:08:17 -05:00
Johannes Mueller
0a462d1964 Rename the route in a route template when renaming the template 2017-07-20 20:10:23 +02:00
Johannes Mueller
b03ee727e9 Don't try to rename the route template state dir if it doesn't exist 2017-07-20 20:08:09 +02:00
6c5262012b required #include for earlier gcc 2017-07-15 13:43:39 -04:00
Johannes Mueller
66964aaab2 Force filename suffix and ask confirmation before overwriting ...
... existing files, when exporting template archives.
2017-07-15 11:37:27 +02:00
Johannes Mueller
ccff1c5dbd Only make the export button sensitive if there's something to export 2017-07-15 11:37:24 +02:00
Johannes Mueller
0da2d7bf8a Inflate template archives rather in .config/ardour5/ than in ...
`.config/ardour5/(templates|route_templates)`.

We put as toplevel directory of the archive `templates` or
`route_templates`. Then no matter if the user imports a session template or a
route template archives, we always put them into the correct folder.

As now the user can also import route templates while the
SessionTemplateManager is visible and vice versa, we need to signal the
successful import to the corresponding template manager. Therfor we introduce
the signal TemplatesImported.
2017-07-15 11:37:15 +02:00
Johannes Mueller
96a9437289 Switch to g_dir_make_tmp() to make the tmpdir. 2017-07-12 16:15:03 +02:00
Johannes Mueller
a73a5e9215 First draft of import and export templates
Don't use this now, except for testing as the archive format will change.

TBD:

* error handling
* check template would be overwritten by import
* dinstinguish between session and track templates
2017-07-12 16:15:03 +02:00
Johannes Mueller
a933cd58bc Some more error handling
Try to undo the renaming of the template dir in case the writing of the new
template file fails.
2017-07-12 16:15:03 +02:00
Johannes Mueller
13ddbfc0d7 Remove template dirs using PBD::remove_directory()
This makes sure that all state directories of the template are erased properly.
2017-07-12 16:15:03 +02:00
Johannes Mueller
b3407f1665 Adjust template names inside template files
This concernes:

* LV2 states:
LV2 states are stored in the template directories and their paths are stored
int the template files using absolute paths. Therefore we have to adjust the
template-dir property of every lv2 node referring to a state dir.

* Names of route templates.
The name of the route template is stored in the first child of the xml root
node in the property `name`. This needs to be adjusted when renaming the
template.

By now we rely on that only lv2 states and the route template name need to be
adjusted on renaming a template.
2017-07-12 16:15:03 +02:00
Johannes Mueller
a5ba520f75 Also handle Route templates
Following measures:

* Split up into two classes
  * TemplateDialog: the general dialog
  * TemplateManager: A widget to rename and remove templates

* Make TemplateManager abstract and derive a class for session templates and
  one for route templates. This is needed, as session templates and route
  templates are stored in a different way. Thus we need different methods to
  rename and remove them.
2017-07-12 16:15:03 +02:00
Johannes Mueller
6a973d5c42 Some cosmetics 2017-07-12 16:15:03 +02:00
Johannes Mueller
610d9fd3b9 First draft of a template management dialog
Goal is to a simple dialog that can rename and remove templates. This is
helpful in order to keep the template list tidy.

So far it works for session templates. Track templates tbd.
2017-07-12 16:15:03 +02:00