13
0
Commit Graph

11850 Commits

Author SHA1 Message Date
1b561446b8 GenericUI: rationalize Autostate button sizing
When there was a knobtable in the ControlUI, the behavior of the
automation state button changed by displaying one-char state as in track
headers. Factor out that logic to depend on a new boolean property of
the ControlUI, which should be set with set_short_autostate().

This regroups sizing logic in a single place and avoids future
discrepancies between the actual caption and the size allocated for it,
when several use-cases for smaller buttons are added.
2017-08-29 12:06:33 +02:00
6d0b009995 Refactor update_io_button
Check, in order, if the io is connected to another Ardour route, then a
user bundle, then some physical ports with simple configuration, and
lastly another client.

Before, Routes were considered connected as long as every io port
connected to that route, even if the channel order was mixed or worse if
all ports were connected to the same channel. Now Routes and Bundles are
considered connected if they are exclusively connected, in the right
order, to all their ports with matching datatype.
2017-08-28 19:43:28 +02:00
7d553eea80 Editor zoom: add 2hour and 24hour zoom limits. 2017-08-27 10:25:09 -05:00
7e300c93f2 Editor zooming: right-click on summary -> context menu -> reset to session extents. 2017-08-26 23:32:02 -05:00
631629b8e7 Editor zoom: add zoom_to_extents() 2017-08-26 23:06:29 -05:00
1c145ccfc3 Editor zooming: Config preference to define how much zooming will be easily allowed beyond the session_ui_extents() 2017-08-26 22:44:58 -05:00
49765f8897 Editor zooming:
Add config setting for playhead-scroll-speed.
Default to 100% for now, but for new users we might later default it to something slower.
If you want to scroll quickly, it is preferred to zoom out first, then scroll.
2017-08-26 22:44:58 -05:00
71d9ea7270 Editor zooming: Tweak the Summary to stop at right edge, use session_gui_extents(). 2017-08-26 22:44:58 -05:00
901432f030 Editor zooming: refactor zoom-limiting code into editor::session_gui_extents. 2017-08-26 22:44:58 -05:00
9b87279eca Editor zooming:
New function session_gui_extents() reports the extents of all playlists.
  ToDo: include region playlists, when they become available.
also:  slow-down autoscroll (ToDo:  make a config variable for this)
2017-08-26 22:44:58 -05:00
e9f4c5fc1c Editor zooming: Initialize leftmost_frame, for sessions that start at high timecodes. 2017-08-26 22:44:58 -05:00
8c556fcbdc Fix too restrictive Lua sandbox
Don't limit the environment when evaluating bytecode (factory function).
2017-08-26 15:42:14 +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
5aeb5f0c7d Remove unneeded test
The for loop will not be executed if |port_connections| is empty, no
need to check beforehand.
2017-08-25 21:35:18 +02:00
e7473c4c52 Track Templates: tweaks to MIDI Bus description text. 2017-08-24 21:21:38 -05:00
0e9dab6aab Allow to send immediate PC messages without closing the dialog.
Perhaps every change should trigger a PC (without "Apply") button?!
2017-08-24 23:41:21 +02:00
18cf003aa9 Fix typo in dea8ee7f 2017-08-24 16:20:51 +02:00
dea8ee7f38 Make clicks on io menu bundles always connect
If a bundle was already connected, a click on the corresponding entry
disconnected it, essentially giving toggle semantics to the io menus.
This behavior has three problems:

 — When clicking on a not yet connected bundle, the new bundle replaces
   any already connected one. This is not consistent with a toggle mode.
 — It is a less discoverable and less easy way to disconnect a bundle
   than the already present "Disconnect" menu entry.
 — Bundles that match the I/O channels only partially (recently added to cater
   for e.g. MIDI+STEREO tracks connecting to Master) are never
   considered "connected" because the channels are not connected 1:1.
   Those will thus never toggle, making the behavior inconsistent.

Change the semantics to ensure a bundle is connected on click instead.
2017-08-24 15:41:40 +02:00
cc7243d4ce when connecting to sigc signals, use sigc methods, not boost::bind 2017-08-24 09:31:52 -04:00
08e564dc2e Fix session-open after selecting new, template, then back 2017-08-24 02:08:32 +02:00
74fada443d Make the output menu able to connect partial matches
Use the new partial connection feature of IO::connect_ports_to_bundle.
2017-08-23 23:31:28 +02:00
cc63df7e8d Populate strips output menus with a more user-friendly heuristic
Ensure the master bus is the first proposed bundle if it is present.
Also propose internal route inputs before physical outs or other
software via JACK.

Last, but not least, add to the menu not only exactly matching bundles,
but also bundles that have the same number of channels than the route
output when considering only the DataType we think the user wants to
use. This covers both the case of a MIDI+STEREO instrument track
connecting to master, and the case of a STEREO track connecting to a
MIDI+STEREO vocoder track.
2017-08-23 23:31:10 +02:00
452e22e9c9 Improve maybe_add_bundle_to_output_menu
Avoid proposing the monitor section in the list if the current route is
not the master bus. Also allow the caller to pass a DataType as argument
to allow partial bundle match on that datatype only.
2017-08-23 22:59:43 +02:00
8119026bc8 Use port enumeration instead of manual indexed loop 2017-08-23 22:59:43 +02:00
ce9bdd1db0 Generalise heuristic for user-intended main type of a route's IO
The heuristic currently used to display port connections in a
compact user-friendly way only considers Audio and MIDI data types.

Replace it by a better heuristic that does essentially the same thing
with all DataTypes, assuming they are ordered by likeliness of usage.
Currently the result is the same since there are only two DataTypes.
2017-08-23 22:59:38 +02:00
f90a70e774 Remove never changing and/or unused arguments 2017-08-23 22:10:51 +02:00
5f2132e9cc Fix Route-template file suffix 2017-08-23 21:33:29 +02:00
ea5d75a05b Use new separate_by_channel API 2017-08-23 21:33:29 +02:00
337d5b3e4a Track Templates: Add verbose descriptions for the built-in track types. 2017-08-22 16:20:26 -05:00
c0e513de76 Track templates: clean-up widget sensitivity based on selection. 2017-08-22 14:35:50 -05:00
62fc4621e5 RouteDialog: implicit "Add (+close)" on <enter> or double-click 2017-08-22 17:28:08 +02:00
201d536ee9 Reset RouteDialog: name edited by-user
* after each "Add" operation
* when cleaning the name field
2017-08-22 17:07:42 +02:00
28a7e4a3e0 Tweak RouteDialog bottom area 2017-08-22 16:45:14 +02:00
052ca8e0de Track Templates: yet another layout tweak. 2017-08-22 09:19:11 -05:00
9d1a793fec Mark session dirty after applying MIDI transform 2017-08-22 04:12:18 +02:00
d2371a6a90 MIDI Transform channel-count 1..16 (not 0..15) 2017-08-22 04:09:19 +02:00
05247255fe Add Lua bindings for ArdourUI's translate_order()
e.g. calculate the route insert position:
print (ArdourUI.translate_order (ArdourUI.InsertAt.BeforeSelection))
2017-08-22 03:12:07 +02:00
39a3705d3a RouteDialog: retain prior type selection 2017-08-22 02:17:22 +02:00
3164f4ac30 remove debug output 2017-08-22 02:11:56 +02:00
735d791e42 RouteDialog: Move built-in types into template list experiment 2017-08-22 02:03:47 +02:00
efd7293847 Fix spacing in french usage strings 2017-08-21 19:46:04 +02:00
f0387f07bd AddRouteDialog: Indicate Type: template 2017-08-21 16:10:48 +02: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