beatwaves.net

Interactive dialogs are not easy...

This week I've been working on Ardour's spiffy new interactive format selection dialog. I thought I had already done all the hard work last week with all that set algebra stuff, but alas, the dialog part was quite challenging also.

The dialog has a set of compatibility items and a set of formats categorized by their quality (see screenshot below). The currently selected quality always reflects that of the selected format. All selected compatibility items form global restraints. All formats that do not fit these restraints are marked red and selecting a red item clears conflicting compatibility selections.

One of the problems (from the programmers point of view) with this dialog is that the selectable compatibility items and selections interact. If gtkmm (the GUI library C++ interface) had a better selections of signals emitted by different GUI actions, it wouldn't be a problem. But the only good signal to listen to is the selections (from TreeView::get_selection) signal_changed, which is emitted always when the selection changes. This includes the situation when the selection is changed from within the code, as well as changes made by the user. The problem with this is, that if code propagated selection changes are not ignored by the selection handler, it will often lead to an infinite signal exchange between the GUI and engine, which will eventually cause a crash.

The signal problem was not my only problem. Some things like clearing several compatibility items at once proved to be difficult also, but nevertheless it's mostly done now. I still need to do some work on the encoding options, which will change according to the selected format, more on that later...

Here are the screenshots I promised last week :)

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
times (minus five) equals minus ten
Solve this math question and enter the solution with digits. E.g. for "two plus four = ?" enter "6".