Commit graph

131 commits

Author SHA1 Message Date
Paul Davis
623df55653 make DEBUG_THREADED_SIGNALS use a little more efficient at runtime 2025-04-14 10:15:03 -06:00
Paul Davis
1911899d15 remove last of the remnants of "ardour-bindings" strings (library edition) 2025-03-19 20:19:24 -06:00
Paul Davis
effe0bd879 use Gtkmm2ext::BindingSet inside libgtkmm2ext 2025-03-10 18:48:49 -06:00
Robin Gareus
000c25edcc
Update gtkmm -> ytkmm header location (omnibus commit) 2025-02-01 15:25:14 +01:00
Mads Kiilerich
140670541f Use .inc.h for #include files that not are plain headers
Regular .h files *should* be self-contained and independent of previous
includes and guarded to only include once. Make it clear which files
that *doesn't* apply for at all.
2024-10-20 03:11:53 +02:00
Paul Davis
d5ad9ff033 libpbd/guis: move __invalidator() into PBD::EventLoop
we allow use of/dependency on sigc::trackable there, so this is
both legal but also sensible.

Leave the macro definition of invalidator(x) in gtkmm2ext/gui_thread.h
because it doesn't hurt and makes some sense for it to be there. No
reason for a source module that needs invalidator(x) to load EventLoop
decl.
2023-08-30 16:06:14 -06:00
Robin Gareus
efcef70d9a
Ensure that fatal does exit
Previously it was possible to just press "Esc" which closes the
dialog with Gtk::RESPONSE_DELETE_EVENT and Ardour continues
to run (and may or may not crash later).
2023-08-24 20:00:45 +02:00
Paul Davis
b0586763ba libpbd: changes to pre-registration of signal emitting threads
There is no need to preallocate request buffers for these threads - the event
loops that require them can allocate them when they discover and register the
pre-registered threads. This also means that event loops do not need to
register request buffer factories.
2023-04-21 13:43:46 -06:00
luz paz
fb55878375
Fix source typos (heirarchy->hierarchy) 2022-04-08 21:38:00 +02:00
Robin Gareus
50abcc74b5
Replace Glib::Threads with PBD::Thread (2/2) 2022-03-01 01:34:35 +01:00
Robin Gareus
5fb54c008d
Fix shortcut display in editor tooltips #8798
After the editor is attached as tab to the main window,
looking up keyboard bindings using get_toplevel() no longer
works.

This uses the widget-hierarchy just like ARDOUR_UI does.
2021-09-19 18:46:06 +02:00
Paul Davis
e057088195 remove unused, empty glib event source/callback code (was from an experiment during nutempo2 development) 2021-09-04 07:39:27 -06:00
Paul Davis
772d70ae4c use glib event callback to invoke per-thread code every time the GUI event loop does stuff 2021-08-13 12:51:29 -06:00
Robin Gareus
42f4e64d5f
Fix a moderate memory leak
periodic calls ARDOUR_UI::update_clocks() -> AudioClock::set()
-> 2+ calls to UI::set_tip() can easily accumulate 50MB/hour
when rolling.
2021-05-22 22:11:42 +02:00
Robin Gareus
e4e94e77c9
Transmitter::Debug implementation 1/2
This also sorts switch() and listen_to() statements in order
of severity: debug, info, warning, error, fatal, throw.
2020-10-13 21:58:26 +02:00
Paul Davis
b95cd280f1 use PROGRAM_NAME to name GUI thread 2020-04-30 11:03:49 -06:00
Robin Gareus
68cb914959
Set Arodur's main thread name to include "Ardour"
This is helpful when debugging by PID (adevices.sh most notably),
just "gui" is not usually helpful.
2020-04-30 18:24:22 +02:00
Robin Gareus
163a065543
Fix gcc-4.2/PPC builds
Old STL has an issue with ambiguity
   reverse_iterator rend();
   const_reverse_iterator rend() const;
2020-04-02 03:43:29 +02:00
Robin Gareus
5253c7eb8b
Tweak error-dump (when session load fails)
When limiting the message count (e.g. for display in a dialog),
use reverse order, and only print errors.

When loading a session fails, the most recent error is
more likely the real cause.
2020-03-31 18:58:12 +02:00
Robin Gareus
9e2b896516
Replace strftime() with Glib::DateTime()
This is mainly for windows compatibility "%F" is not supported.
An alternative would be to s/%F/%Y-%m-%d/ to produce the ISO date.
2020-03-08 23:31:51 +01:00
Robin Gareus
fa0a7d6739
Allow to limit error dump
This is in preparation of displaying verbose errors to the user.
2020-02-28 07:26:13 +01:00
Robin Gareus
61e53e303b
Fix ISO compliance 2020-01-18 19:09:36 +01:00
Robin Gareus
d7801ab7ee
Add timestamp to log -- #7877
This adds the time when a log message is displayed.
ARDOUR_UI::display_message() parses the prefix,
so the timestamp cannot be prefixed in the beforehand.

Still, UI::process_error_message() is called directly in
the same thread, so this makes no significant difference.
2020-01-18 18:18:05 +01:00
Robin Gareus
cec5ce8f45
Update canvas/UI lib GPL boilerplate and (C) from git log 2019-08-03 15:53:17 +02:00
Robin Gareus
e76e18af96
Use exit-status macros for compatibility 2/3 2019-07-04 22:21:35 +02:00
Paul Davis
df29e57cb4 ActionManager::get_all_actions() no longer includes <Actions> in the paths it returns, part 1 2019-03-20 11:15:22 -07:00
Paul Davis
758d0ca263 replace ::cast_dynamic() with relevant ActionManager::get_*_action() calls 2018-12-12 10:08:01 -05:00
Paul Davis
d1d8fd197d change ActionManager::find_action() back to ActionManager::get_action()
This avoids dozens or hundreds of unnecessary changes in gtk2_ardour code
2018-12-10 08:34:01 -05:00
Paul Davis
ad002d0de0 consolidate ActionMap and ActionManager APIs into a single namespace 2018-12-10 08:34:01 -05:00
Robin Gareus
4983eb565d Only update tooltips if there is an actual change -- #7268
Changing a tooltip resets the timeout. In one particular case,
while rolling, AudioClock::set() is calling set_tooltip() at a rate
faster than the tooltip timeout and prevents tooltip from showing at all
(even if there is no actual change to the tooltip text).
Alas, there is no trivial fix for this UI side and there may be other
such cases. A central check is more than practical.
2018-04-12 02:54:55 +02:00
Robin Gareus
f9e5e4360e Move more Gtkmm2ext widgets into libwidget 2017-07-17 21:06:04 +02:00
Robin Gareus
401eefec1c remove cruft (unused UI::ui_scale) 2017-05-05 14:00:30 +02:00
Robin Gareus
41216d200a Remove old modal get_color API. 2017-03-11 00:35:26 +01:00
Robin Gareus
3953879d4d add a timeout to flush_pending()
In some circumstances UI::flush_pending never returns, and all UI
interactive ends up being driven by
   while (gtk_events_pending()) { gtk_main_iteration(); }
This has various implications depending on the caller and usually results
in a crash at session-close or exit.
2016-07-25 14:13:52 +02:00
Paul Davis
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
Paul Davis
bc487bb4b0 replicate the remove-all-trailing whitespace commit(s) in master 2016-02-22 15:31:24 -05:00
Paul Davis
949163f806 more changes to Bindings, Keyboard APIs 2016-02-22 15:31:24 -05:00
Paul Davis
67e19c177f radically change Keyboard/Binding API design to disconnect Gtk::Action lookup from binding definition
We need this because we need binding information/objects before all
Actions have been defined.
2016-02-22 15:31:24 -05:00
Paul Davis
914af0f0c8 move ui_scale static member from ARDOUR_UI to GtkUI 2016-02-22 15:31:22 -05:00
Robin Gareus
ee541036b4 fix window-title (separate application name, thread name) 2015-12-29 11:03:09 +01:00
Paul Davis
0d9efc1148 redesign cross-thread registration/signalling system
This new design will work even when threads that need to receive
messages from RT threads are created *after* the RT threads. The
existing design would fail because the RT thread(s) would never
be known the later created threads, and so signals emitted by the
RT thread and causing call_slot() in the receiver would end up
being enqueued using a lock-protected list. The new design ensures
that communication always uses a lock-free FIFO instead
2015-12-28 10:14:17 -05:00
Paul Davis
3d1dcacfd8 use correct source for application name when labelling a window 2015-12-12 11:12:10 -05:00
Paul Davis
be6a43d4d3 use EventLoop::event_loop_name() 2015-12-12 11:12:10 -05:00
Robin Gareus
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
Paul Davis
4dc63966f0 globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
2015-10-04 14:51:05 -04:00
Paul Davis
0274aafdb0 store all error/info/etc messages in a list inside Gtkmm2ext::UI, and provide a method to dump them all to a std::ostream 2015-06-29 16:27:03 -04:00
Robin Gareus
83babb8a52 automatic error log window popup be gone. 2015-03-14 18:28:36 +01:00
Paul Davis
7152634104 set name of GUI event loop thread 2015-02-05 16:31:59 -05:00
Robin Gareus
6b3a8915f3 add abort() to non-reached code
This cleans up a lot of false-positives in static analysis
and also helps compilers to optimize code paths in general.
(tagging the fatal stingstream operator as ‘noreturn’ is
far less trivial)
2014-11-14 11:30:08 +01:00
Robin Gareus
36be1a3a9b plug some leaks 2014-06-15 13:24:41 +02:00