move utility functions into a dedicated namespace
authorRobin Gareus <robin@gareus.org>
Wed, 25 Jun 2014 19:27:37 +0000 (21:27 +0200)
committerRobin Gareus <robin@gareus.org>
Wed, 25 Jun 2014 19:47:54 +0000 (21:47 +0200)
107 files changed:
gtk2_ardour/about.cc
gtk2_ardour/actions.cc
gtk2_ardour/add_route_dialog.cc
gtk2_ardour/add_video_dialog.cc
gtk2_ardour/ardour_button.cc
gtk2_ardour/ardour_dialog.cc
gtk2_ardour/ardour_ui.cc
gtk2_ardour/ardour_ui2.cc
gtk2_ardour/ardour_ui_ed.cc
gtk2_ardour/ardour_window.cc
gtk2_ardour/audio_clock.cc
gtk2_ardour/audio_region_editor.cc
gtk2_ardour/audio_region_view.cc
gtk2_ardour/audio_streamview.cc
gtk2_ardour/audio_time_axis.cc
gtk2_ardour/automation_controller.cc
gtk2_ardour/automation_line.cc
gtk2_ardour/automation_streamview.cc
gtk2_ardour/automation_time_axis.cc
gtk2_ardour/axis_view.cc
gtk2_ardour/big_clock_window.cc
gtk2_ardour/bundle_manager.cc
gtk2_ardour/crossfade_edit.cc
gtk2_ardour/editor.cc
gtk2_ardour/editor_actions.cc
gtk2_ardour/editor_audio_import.cc
gtk2_ardour/editor_canvas.cc
gtk2_ardour/editor_cursors.cc
gtk2_ardour/editor_cursors.h
gtk2_ardour/editor_drag.cc
gtk2_ardour/editor_group_tabs.cc
gtk2_ardour/editor_mouse.cc
gtk2_ardour/editor_ops.cc
gtk2_ardour/editor_regions.cc
gtk2_ardour/editor_route_groups.cc
gtk2_ardour/editor_routes.cc
gtk2_ardour/editor_rulers.cc
gtk2_ardour/editor_snapshots.cc
gtk2_ardour/editor_tempodisplay.cc
gtk2_ardour/engine_dialog.cc
gtk2_ardour/export_file_notebook.cc
gtk2_ardour/export_video_dialog.cc
gtk2_ardour/gain_meter.cc
gtk2_ardour/generic_pluginui.cc
gtk2_ardour/global_port_matrix.cc
gtk2_ardour/global_signals.h
gtk2_ardour/group_tabs.cc
gtk2_ardour/hit.cc
gtk2_ardour/io_selector.cc
gtk2_ardour/keyeditor.cc
gtk2_ardour/level_meter.cc
gtk2_ardour/location_ui.cc
gtk2_ardour/main.cc
gtk2_ardour/marker.cc
gtk2_ardour/meter_patterns.cc
gtk2_ardour/meter_strip.cc
gtk2_ardour/meterbridge.cc
gtk2_ardour/midi_region_view.cc
gtk2_ardour/midi_streamview.cc
gtk2_ardour/midi_time_axis.cc
gtk2_ardour/mixer_group_tabs.cc
gtk2_ardour/mixer_strip.cc
gtk2_ardour/mixer_ui.cc
gtk2_ardour/monitor_section.cc
gtk2_ardour/mono_panner.cc
gtk2_ardour/mouse_cursors.cc
gtk2_ardour/option_editor.cc
gtk2_ardour/panner2d.cc
gtk2_ardour/panner_ui.cc
gtk2_ardour/plugin_ui.cc
gtk2_ardour/port_insert_ui.cc
gtk2_ardour/port_matrix.cc
gtk2_ardour/port_matrix_column_labels.cc
gtk2_ardour/port_matrix_row_labels.cc
gtk2_ardour/processor_box.cc
gtk2_ardour/public_editor.h
gtk2_ardour/rc_option_editor.cc
gtk2_ardour/region_editor.cc
gtk2_ardour/region_gain_line.cc
gtk2_ardour/region_layering_order_editor.cc
gtk2_ardour/region_view.cc
gtk2_ardour/return_ui.cc
gtk2_ardour/rhythm_ferret.cc
gtk2_ardour/route_group_dialog.cc
gtk2_ardour/route_params_ui.cc
gtk2_ardour/route_time_axis.cc
gtk2_ardour/route_ui.cc
gtk2_ardour/send_ui.cc
gtk2_ardour/session_dialog.cc
gtk2_ardour/sfdb_ui.cc
gtk2_ardour/soundcloud_export_selector.cc
gtk2_ardour/startup.cc
gtk2_ardour/step_entry.cc
gtk2_ardour/stereo_panner.cc
gtk2_ardour/streamview.cc
gtk2_ardour/tempo_dialog.cc
gtk2_ardour/theme_manager.cc
gtk2_ardour/time_axis_view.cc
gtk2_ardour/time_axis_view_item.cc
gtk2_ardour/transcode_video_dialog.cc
gtk2_ardour/ui_config.h
gtk2_ardour/utils.cc
gtk2_ardour/utils.h
gtk2_ardour/verbose_cursor.cc
gtk2_ardour/video_image_frame.cc
gtk2_ardour/video_monitor.cc
gtk2_ardour/video_timeline.cc

index 309673849e710dcbe608aeeda86d9a78dc53b1d6..05226c03baa90e02e33f23a1123de9ab2c7da42a 100644 (file)
@@ -30,7 +30,6 @@
 #include "ardour/version.h"
 #include "ardour/filesystem_paths.h"
 
-#include "utils.h"
 #include "version.h"
 
 #include "about.h"
index 05d120e2276bc70b00ad32073b9497aba3944169..f208c6c8d3516486e431db7d831cb1024e90d266 100644 (file)
@@ -36,7 +36,6 @@
 
 #include "gtkmm2ext/actions.h"
 
-#include "utils.h"
 #include "actions.h"
 #include "i18n.h"
 
index 8837e9f468f567b6fd3dbea0013f1caf59fc53f4..94e4369aae3432cd97f979a015541eafd23bdddc 100644 (file)
@@ -46,6 +46,7 @@ using namespace Gtkmm2ext;
 using namespace std;
 using namespace PBD;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 
 std::vector<std::string> AddRouteDialog::channel_combo_strings;
 
index 5c58b7abcd4b71da8f98b4c44620c4e77cbe3414..b8ede24ae3590b04d4a709a23c4c8a06e79c7e8c 100644 (file)
@@ -33,7 +33,6 @@
 #include "ardour/session.h"
 #include "ardour_ui.h"
 
-#include "utils.h"
 #include "add_video_dialog.h"
 #include "utils_videotl.h"
 #include "i18n.h"
index cc36fa483d902793218ad3eebd0fd6ec6557cc9e..b01d093825977236ec1c7864195e65e5e534b336 100644 (file)
@@ -88,7 +88,7 @@ ArdourButton::ArdourButton (Element e)
        , _hovering (false)
        , _focused (false)
 {
-       ColorsChanged.connect (sigc::mem_fun (*this, &ArdourButton::color_handler));
+       ARDOUR_UI_UTILS::ColorsChanged.connect (sigc::mem_fun (*this, &ArdourButton::color_handler));
 }
 
 ArdourButton::ArdourButton (const std::string& str, Element e)
index d0d85c5cbe86056d274fd54ca94b8c03302920e5..34027ca0c3600f3f207e2b460034234a15662389 100644 (file)
@@ -32,6 +32,7 @@
 using namespace std;
 using namespace Gtk;
 using namespace Gtkmm2ext;
+using namespace ARDOUR_UI_UTILS;
 
 ArdourDialog::ArdourDialog (string title, bool modal, bool use_seperator)
        : Dialog (title, modal, use_seperator)
index d9ac37e36f5c94b038def8a136da7cfaa70746d4..a8d883422bb2cb66aa1c8602ab98243b3d31cb25 100644 (file)
@@ -138,6 +138,7 @@ typedef uint64_t microseconds_t;
 #include "i18n.h"
 
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtkmm2ext;
 using namespace Gtk;
index e9efb1d03aee94d8d0d61a0112045c3eef31e098..f78d096000a13f5181ef94483bdd9ef91002c587 100644 (file)
@@ -64,6 +64,7 @@ using namespace PBD;
 using namespace Gtkmm2ext;
 using namespace Gtk;
 using namespace Glib;
+using namespace ARDOUR_UI_UTILS;
 
 int
 ARDOUR_UI::setup_windows ()
index 454c657e6e90479f86c7342cc210136e14b7818c..6c69f4279345ee5d4f02436dfa9484df658a470a 100644 (file)
@@ -51,7 +51,6 @@
 #include "actions.h"
 #include "mixer_ui.h"
 #include "startup.h"
-#include "utils.h"
 #include "window_manager.h"
 #include "global_port_matrix.h"
 #include "location_ui.h"
index b50a83c31f673ab5fff2a460ffde2baa4f33a787..6b325aca8534325d9f73fb96c52fdeb53e6a937d 100644 (file)
@@ -30,6 +30,7 @@
 using namespace std;
 using namespace Gtk;
 using namespace Gtkmm2ext;
+using namespace ARDOUR_UI_UTILS;
 
 ArdourWindow::ArdourWindow (string title)
        : Window ()
index 64358eaadffd5a924752fa94695f97a13720d2a7..0c7f41f6ebe699b4b48d43a9a631df8ef0753119 100644 (file)
@@ -45,6 +45,7 @@
 #include "i18n.h"
 
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtk;
 using namespace std;
index 730cd99b37cf2cb8c9f700930bf096a1dd4300fd..2041d20335feb17e289c4d488db29f4817214416 100644 (file)
@@ -32,7 +32,6 @@
 #include "audio_region_editor.h"
 #include "audio_region_view.h"
 #include "ardour_ui.h"
-#include "utils.h"
 #include "gui_thread.h"
 
 #include "i18n.h"
index e15d83125ab2dd987e372e06f2a79aae6aecf7f9..72bf08e79939a41d7fc8cf62788056918276194d 100644 (file)
@@ -57,7 +57,6 @@
 #include "control_point.h"
 #include "ghostregion.h"
 #include "audio_time_axis.h"
-#include "utils.h"
 #include "rgb_macros.h"
 #include "gui_thread.h"
 #include "ardour_ui.h"
index 0520b1846c769902c70b48389a33b9c6867062f1..bc5052c3907e8ac50e122fda00c16a740954383f 100644 (file)
@@ -46,7 +46,6 @@
 #include "ardour_ui.h"
 #include "rgb_macros.h"
 #include "gui_thread.h"
-#include "utils.h"
 
 #include "i18n.h"
 
index 25e981acbac5727b9e33e65a94741107a23bf263..8c022abdb74e66cc2cd1f1259a61e7767cca1944 100644 (file)
@@ -60,6 +60,7 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtk;
 using namespace Editing;
index a80a4742327cf41eadd782287b83b0af455c9af9..a75faf747c2fe3751fb67b633084d74c681cad93 100644 (file)
@@ -28,7 +28,6 @@
 #include "ardour/session.h"
 
 #include "ardour_ui.h"
-#include "utils.h"
 #include "automation_controller.h"
 #include "gui_thread.h"
 
index 784071258174d6282cd9e0308d6e79ce77e8ff1f..1cfd7eeb48d4a7c657d27d0142d7b35bb9a53bf6 100644 (file)
@@ -51,7 +51,6 @@
 #include "rgb_macros.h"
 #include "ardour_ui.h"
 #include "public_editor.h"
-#include "utils.h"
 #include "selection.h"
 #include "time_axis_view.h"
 #include "point_selection.h"
index 797f2741aa077b806ccfcde78106d132861d4b63..53c643c0270ff4990007fccc00f27b855ef64081 100644 (file)
@@ -40,7 +40,6 @@
 #include "ardour_ui.h"
 #include "rgb_macros.h"
 #include "gui_thread.h"
-#include "utils.h"
 
 using namespace std;
 using namespace ARDOUR;
index c6238e67111c9de0d9795e0d4d71362ab64b896d..3b00fc69b6cdb1e6c9597eb97b34984aa2b1ecac 100644 (file)
@@ -51,6 +51,7 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtk;
 using namespace Gtkmm2ext;
index 7a449843e09055a306e6b9148eb7a9a6e5752c7b..41efbf86aed65ed0f8ea39eb6044bdb3144be58f 100644 (file)
@@ -43,6 +43,7 @@ using namespace std;
 using namespace Gtk;
 using namespace Gtkmm2ext;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 
 list<Gdk::Color> AxisView::used_colors;
 
index c67ae38074f9a8ca71e5787393c6f1682bb976ff..28b7b286ab075dedfe478f91c0f11bf72c913cda 100644 (file)
@@ -31,6 +31,7 @@
 
 using std::min;
 using std::string;
+using namespace ARDOUR_UI_UTILS;
 
 BigClockWindow::BigClockWindow (AudioClock& c) 
        : ArdourWindow (_("Big Clock"))
index 035046c10b6b4eb4313ce5395f50d7ed888b00a2..6dc34d33884c74336de12dca817a773465540621 100644 (file)
@@ -34,6 +34,7 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 
 BundleEditorMatrix::BundleEditorMatrix (Gtk::Window* parent, Session* session, boost::shared_ptr<Bundle> bundle)
        : PortMatrix (parent, session, DataType::NIL)
index c545a02b464451fe1747be91f8ac818e2ddf9470..02d3ceb4bb77e6df8555ddec776a755ed9f0d268 100644 (file)
@@ -49,7 +49,6 @@
 #include "crossfade_edit.h"
 #include "rgb_macros.h"
 #include "keyboard.h"
-#include "utils.h"
 #include "gui_thread.h"
 #include "actions.h"
 
index 3925a528b938a09e81c17598ed3bba98257629cd..98fdad2ef255abac2f0c696c81878a17a36b8b2c 100644 (file)
 
 using namespace std;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtk;
 using namespace Glib;
index 74e931000f0519e1fc6a90557676ec9a11933fc5..1d19aca9c40e4823eaf0fc24601dd4614c434561 100644 (file)
@@ -50,6 +50,7 @@ using namespace Gtk;
 using namespace Glib;
 using namespace std;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Editing;
 
index 6eae37628f013494e2ac4f0901af7416d6f5a7c5..3b9fe20727f1d3425e3c07283cb3c6059c4d16ff 100644 (file)
@@ -52,7 +52,6 @@
 #include "audio_time_axis.h"
 #include "midi_time_axis.h"
 #include "session_import_dialog.h"
-#include "utils.h"
 #include "gui_thread.h"
 #include "interthread_progress_window.h"
 #include "mouse_cursors.h"
index 2f37a877ea71e20698a05ba466587ffbdccaf72e..79404c53c7a65be59bc49e7e3a9da8110724246d 100644 (file)
@@ -56,6 +56,7 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtk;
 using namespace Glib;
index dd9970c730e80ac912a713053d265fb169f32b40..12dab1e83d46e870c53b1335a542434f41c720ff 100644 (file)
@@ -24,7 +24,6 @@
 #include "canvas/debug.h"
 #include "canvas/scroll_group.h"
 
-#include "utils.h"
 #include "editor_cursors.h"
 #include "editor.h"
 
index 9eab63452b72e6193f8e1ebb63e433976547eba7..7915e37205c00da167b40cbe1764f1e677fcd36c 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include "pbd/signals.h"
+#include "ardour/types.h"
 
 #include "canvas/arrow.h"
 #include "canvas/line.h"
index 4019eb24c2242a2b7f24efa3c38e45f4e86ba89d..05e24fa84cc74c746e549fafee7dda8bbd43d04f 100644 (file)
@@ -50,7 +50,6 @@
 #include "ardour_ui.h"
 #include "gui_thread.h"
 #include "control_point.h"
-#include "utils.h"
 #include "region_gain_line.h"
 #include "editor_drag.h"
 #include "audio_time_axis.h"
index f53326636ef49de057f970d09d8a435b73835be3..fb7081df2ca265894033aa62b04810c6d9e8f832 100644 (file)
@@ -35,6 +35,7 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 
 EditorGroupTabs::EditorGroupTabs (Editor* e)
        : EditorComponent (e)
index 32616417ccad8eafff7c25dc57c9673aaeb8e6b8..479a3f272e4f05aa52f7efb74f2779016a3f6f46 100644 (file)
@@ -60,7 +60,6 @@
 #include "automation_time_axis.h"
 #include "control_point.h"
 #include "prompter.h"
-#include "utils.h"
 #include "selection.h"
 #include "keyboard.h"
 #include "editing.h"
index cb1a4a11e45edd35b5447cfa47a26475699e8344..54be3c857f4da23527cc4d03c367899c13a60469 100644 (file)
@@ -89,7 +89,6 @@
 #include "strip_silence_dialog.h"
 #include "time_axis_view.h"
 #include "transpose_dialog.h"
-#include "utils.h"
 
 #include "i18n.h"
 
@@ -7043,7 +7042,7 @@ Editor::lock ()
        if (!lock_dialog) {
                lock_dialog = new Gtk::Dialog (string_compose (_("%1: Locked"), PROGRAM_NAME), true);
 
-               Gtk::Image* padlock = manage (new Gtk::Image (::get_icon ("padlock_closed")));
+               Gtk::Image* padlock = manage (new Gtk::Image (ARDOUR_UI_UTILS::get_icon ("padlock_closed")));
                lock_dialog->get_vbox()->pack_start (*padlock);
 
                ArdourButton* b = manage (new ArdourButton);
index 54e520d8aac0a9de22ecf2f2dff660dbca27db99..4113b6d00b571f9451bc65c6b9dab903a806c3ea 100644 (file)
@@ -53,6 +53,7 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtk;
 using namespace Glib;
index 5d01ef207f5405d9a91a281dad649fcb77ea9d2e..d74ba50d64bca7f8cb9045c9e6fae80fc5eb2bf6 100644 (file)
@@ -51,6 +51,7 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtk;
 using Gtkmm2ext::Keyboard;
index 5da4979824e43d1f053546a28bf6f09104983a8f..605f90486cbf37ea97908a30dae1e79943f901f6 100644 (file)
@@ -53,6 +53,7 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtk;
 using namespace Gtkmm2ext;
index 908a3ca7cb7a19cb78df7541710290e01043adf1..d1a002e60248271259b9aa574ae0fdfbe9f410f1 100644 (file)
@@ -51,7 +51,6 @@
 #include "time_axis_view.h"
 #include "editor_drag.h"
 #include "editor_cursors.h"
-#include "utils.h"
 
 #include "i18n.h"
 
index 08b5acddc82c19305dfd73af474aa304941555e1..ed49ef35b3c3dca02bf4b4dc6cf4a05509437a65 100644 (file)
@@ -32,6 +32,7 @@ using namespace std;
 using namespace PBD;
 using namespace Gtk;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 
 EditorSnapshots::EditorSnapshots (Editor* e)
        : EditorComponent (e)
index fab99fc0b28ce03e435888134b3c69d107c3d4ad..44d0154dd48ad493bd83dbaf3c9e7a5d58b6ebd8 100644 (file)
@@ -50,7 +50,6 @@
 #include "time_axis_view.h"
 #include "ardour_ui.h"
 #include "tempo_lines.h"
-#include "utils.h"
 
 #include "i18n.h"
 
index b50a1ffd6008925c24c7df1cfb772ea7f2de8e55..27cf9b771990a58f931c05058ead443a3d1ae3be 100644 (file)
@@ -58,6 +58,7 @@ using namespace Gtk;
 using namespace Gtkmm2ext;
 using namespace PBD;
 using namespace Glib;
+using namespace ARDOUR_UI_UTILS;
 
 static const unsigned int midi_tab = 2;
 static const unsigned int latency_tab = 1; /* zero-based, page zero is the main setup page */
index c313038e0578d1338c0ae2796663498ada2f0ba7..ae924c10e3d9ae754f9afc25c7582c30d2fe6161 100644 (file)
@@ -27,6 +27,7 @@
 #include "i18n.h"
 
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 
 ExportFileNotebook::ExportFileNotebook () :
index a9d0f99ad1246623199dd31d4e4d8cfc888dae11..e5f189073724075d3044b5d46fcfe784692f2886 100644 (file)
@@ -51,7 +51,6 @@
 #include "ardour/session_metadata.h"
 #include "ardour/broadcast_info.h"
 
-#include "utils.h"
 #include "opts.h"
 #include "export_video_dialog.h"
 #include "utils_videotl.h"
index 7e781cafd93cd1d6724f33f68dfd89264a229c2b..76a7c3540e051520b22e762cde145640997ccb0c 100644 (file)
@@ -54,6 +54,7 @@
 #include "i18n.h"
 
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtkmm2ext;
 using namespace Gtk;
index e4a31119fc6014ddc78c89164971b7154bfc6446..2ecfcca44f99f01cab457ad7a26880f38b7125d7 100644 (file)
@@ -45,7 +45,6 @@
 #include "ardour_ui.h"
 #include "prompter.h"
 #include "plugin_ui.h"
-#include "utils.h"
 #include "gui_thread.h"
 #include "automation_controller.h"
 
index 218cfe7a1cadb2d0b112a013ceabcf843cc9d95c..706b4b672752038e893703b3cd71d5968cbff890 100644 (file)
@@ -32,6 +32,7 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 
 GlobalPortMatrix::GlobalPortMatrix (Gtk::Window* p, Session* s, DataType t)
        : PortMatrix (p, s, t)
index 3bd6f100a96cdc6df015fc7c88f9bdcdc04225ec..f1abb8dbb8795852b4b2cbfc9092a480c4b88f89 100644 (file)
@@ -22,7 +22,9 @@
 
 #include <sigc++/signal.h>
 
+namespace ARDOUR_UI_UTILS {
 extern sigc::signal<void>  ColorsChanged;
 extern sigc::signal<void>  DPIReset;
+} // namespace
 
 #endif /* __gtk_ardour_global_signals_h__ */
index 9dd9dd51e3a07526a0b3c6450f3f9cd9346fe2c3..a996cd8dff1d4c40be303d73f1999b1f9687b729 100644 (file)
@@ -34,6 +34,7 @@
 using namespace std;
 using namespace Gtk;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using Gtkmm2ext::Keyboard;
 
 list<Gdk::Color> GroupTabs::_used_colors;
index c06160f3b2c1df0e6fb95c9c2ebb35f68643564a..43dc8ce3474866a7b1b7a4ed6f6340bed65c2be9 100644 (file)
@@ -24,7 +24,6 @@
 
 #include "midi_region_view.h"
 #include "public_editor.h"
-#include "utils.h"
 #include "hit.h"
 
 using namespace ARDOUR;
index 31f8cfa1cb70d251bbfffda7685addc04c734f0d..270ed8ce32bfd75368c60b2250ee3ee92d85c62b 100644 (file)
@@ -36,6 +36,7 @@
 #include "i18n.h"
 
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace Gtk;
 
 IOSelector::IOSelector (Gtk::Window* p, ARDOUR::Session* session, boost::shared_ptr<ARDOUR::IO> io)
index f23e24695888cb937f51fa5c663747c2b382478d..409f89dfaf57411a267f995443015a78b7e29b83 100644 (file)
@@ -38,7 +38,6 @@
 #include "actions.h"
 #include "keyboard.h"
 #include "keyeditor.h"
-#include "utils.h"
 
 #include "i18n.h"
 
index 94b8d63d7f3290f7cf6c622815d684ac614209c0..1a6f59f1b04f9347dc0362e591a414f4ef8c75c6 100644 (file)
@@ -37,6 +37,7 @@
 #include "i18n.h"
 
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtkmm2ext;
 using namespace Gtk;
index 169fd4925882dcf14ed2cd82db80ce4f0800e759..f4a9b7ea07f980d6b341cebf468779126b699b37 100644 (file)
@@ -38,6 +38,7 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtk;
 using namespace Gtkmm2ext;
index 5dd3695dc9036b9fdb0209c49b873b61b60e3cc2..d924d9b30a6f55243a2e885b47f0830cb7879956 100644 (file)
@@ -49,7 +49,6 @@
 #include <gtkmm2ext/utils.h>
 
 #include "version.h"
-#include "utils.h"
 #include "ardour_ui.h"
 #include "opts.h"
 #include "enums.h"
index 1374d96127cea2eb56b25c56e0663ec3007a6578..af201286a9bd1f53997478ca92982a94ac33a781 100644 (file)
@@ -47,6 +47,7 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace Gtkmm2ext;
 
 PBD::Signal1<void,Marker*> Marker::CatchDeletion;
index c3b5a914eca6758d2fbc6155781cb74bb733ec1f..55eb16246a532e5fcc2e4d66de8614827adceee6 100644 (file)
@@ -31,6 +31,7 @@
 #include "i18n.h"
 
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtk;
 using namespace Gtkmm2ext;
index 92f1a0e1c0b911ca73ced749d66046905efd2cd8..ee3ed52c7fa107d3cd6024f2a6032d1c44c82304 100644 (file)
@@ -48,6 +48,7 @@
 #include "i18n.h"
 
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtk;
 using namespace Gtkmm2ext;
index 4d2a0c7b3b0e8c4861455944e3ae6ea80443ac49..5da4d3fdb55ad1efb3cd5fff5e54abc5ecfa5c79 100644 (file)
@@ -57,6 +57,7 @@
 #include "i18n.h"
 
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtk;
 using namespace Glib;
index 503c1756e9c079d19da34f391d5a3004a5a66103..00cbad773374db329ec7f08202640db347f95883 100644 (file)
@@ -68,7 +68,6 @@
 #include "rgb_macros.h"
 #include "selection.h"
 #include "streamview.h"
-#include "utils.h"
 #include "patch_change_dialog.h"
 #include "verbose_cursor.h"
 #include "ardour_ui.h"
index 3dd39a51774ddc15f98381444dec8b4380322e8f..97ce7ed9399c98223814b8224b9ef9230219caf0 100644 (file)
@@ -52,6 +52,7 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Editing;
 
index 8ced280661ec9f6806acfe53294d38b5abc784db..c37916dbf0c95b7056b1c8f7668e8a7ec57570d3 100644 (file)
@@ -91,6 +91,7 @@
 #include "i18n.h"
 
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtk;
 using namespace Gtkmm2ext;
index 964849c515b68a2e688f3259c4bc315d85b8c0b0..e7c14ca113fc78ac3e2fa415e8ca0414b8f3a85f 100644 (file)
@@ -37,6 +37,7 @@
 using namespace std;
 using namespace Gtk;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 
 MixerGroupTabs::MixerGroupTabs (Mixer_UI* m)
index bf5977c0c9530787e46f3035c6ed94314b4efeac..981b6913c360ce43e7ae57b9b7481bd04fab528e 100644 (file)
@@ -69,6 +69,7 @@
 #include "i18n.h"
 
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtk;
 using namespace Gtkmm2ext;
index 3ceb44bde70d98133c558ce3fca503acb926fcce..8534d40d327df5360698eaa9c070e34402675bf9 100644 (file)
@@ -60,6 +60,7 @@
 #include "i18n.h"
 
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtk;
 using namespace Glib;
index 46d500dac6e6021056c08c2173bd81596c7a14e7..a816dd397dce3daaa6044a400e16ed3141cd6d3e 100644 (file)
@@ -40,6 +40,7 @@
 #include "i18n.h"
 
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace Gtk;
 using namespace Gtkmm2ext;
 using namespace PBD;
index c9f46e12b85793b6a020e5d814ba50b16a0556f7..fad2c09b644cdd3a6bcb693777c40630f8425b5d 100644 (file)
@@ -50,6 +50,7 @@
 using namespace std;
 using namespace Gtk;
 using namespace Gtkmm2ext;
+using namespace ARDOUR_UI_UTILS;
 
 static const int pos_box_size = 9;
 static const int lr_box_size = 15;
index 0aab5423472d51c80ea36745ff6c50a4ac214285..4ba5c66688c86ee92e172dad1f821ff56adaba67 100644 (file)
@@ -22,6 +22,8 @@
 #include "mouse_cursors.h"
 #include "editor_xpms"
 
+using namespace ARDOUR_UI_UTILS;
+
 MouseCursors::MouseCursors ()
        : cross_hair (0)
        , trimmer (0)
index 33926d6523afffb37b5c767cc18fa949f6c47d06..f163ec8f3d780aa832e97a3a938c492b9807563b 100644 (file)
@@ -29,7 +29,6 @@
 
 #include "option_editor.h"
 #include "gui_thread.h"
-#include "utils.h"
 #include "i18n.h"
 
 using namespace std;
index 35f573bcf11db0e877b9c3981673bea86e7c6cb8..abb47a98730a7f599b52e7726f10026d1aa862e0 100644 (file)
@@ -44,6 +44,7 @@
 using namespace std;
 using namespace Gtk;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using Gtkmm2ext::Keyboard;
 
index d15f8efc3a0f036e33f2abbadeb6b448d17e30d7..ec25fad32ca1b5b0ac08f17062d87132785b3c4d 100644 (file)
@@ -31,7 +31,6 @@
 #include "ardour_ui.h"
 #include "panner_ui.h"
 #include "panner2d.h"
-#include "utils.h"
 #include "gui_thread.h"
 #include "stereo_panner.h"
 #include "mono_panner.h"
index 190fd2ad969bddb5f6b1a0c253fc86aa8ac0fbe0..440dc805316c713cb15c8f1340d81bed6dc27a49 100644 (file)
@@ -73,6 +73,7 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtkmm2ext;
 using namespace Gtk;
index 2a982eabc1504e2fd414146114b0a5582addca91..a742740e5a607148ef3f84b53a466b516d2082b6 100644 (file)
@@ -28,7 +28,6 @@
 #include "ardour/session.h"
 
 #include "port_insert_ui.h"
-#include "utils.h"
 #include "gui_thread.h"
 #include "i18n.h"
 
index 6bd9d962629d499c007760ac22fc584c6232062c..aa1c853ed8c3dd5a7ebe9f8e28ac7d4c766fd78d 100644 (file)
@@ -43,6 +43,7 @@
 using namespace std;
 using namespace Gtk;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 
 /** PortMatrix constructor.
  *  @param session Our session.
index 1f5a21feec22daa38a9cef20161ce1340ca1522d..8e18dbea7a173032874e2aeffe6d696279609904 100644 (file)
@@ -23,7 +23,6 @@
 #include "port_matrix_column_labels.h"
 #include "port_matrix.h"
 #include "port_matrix_body.h"
-#include "utils.h"
 
 #include "i18n.h"
 
index de921a6cb71336c3cbc165ebd1cc18c5ceab7a9a..998a234bf353044703e328cb3fa0ad8c201774bc 100644 (file)
@@ -26,7 +26,6 @@
 #include "port_matrix.h"
 #include "port_matrix_body.h"
 #include "i18n.h"
-#include "utils.h"
 
 using namespace std;
 
index 56d2d371ebb7d242009be0755a945941fcf21936..4122d9687d83e3b8924150a58e5fd2c63d09cd61 100644 (file)
@@ -76,7 +76,6 @@
 #include "return_ui.h"
 #include "route_processor_selection.h"
 #include "send_ui.h"
-#include "utils.h"
 
 #include "i18n.h"
 
index 35c75e469e7c73e3284ce3f1b3764ea6db62affc..184cb77d5246caec74aab40f3c608692b2cb1e18 100644 (file)
@@ -84,6 +84,11 @@ class VerboseCursor;
 class XMLNode;
 struct SelectionRect;
 
+namespace ARDOUR_UI_UTILS {
+bool relay_key_press (GdkEventKey* ev, Gtk::Window* win);
+bool forward_key_press (GdkEventKey* ev);
+}
+
 using ARDOUR::framepos_t;
 using ARDOUR::framecnt_t;
 
@@ -408,8 +413,8 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible, publi
 
        static PublicEditor* _instance;
 
-       friend bool relay_key_press (GdkEventKey*, Gtk::Window*);
-       friend bool forward_key_press (GdkEventKey*);
+       friend bool ARDOUR_UI_UTILS::relay_key_press (GdkEventKey*, Gtk::Window*);
+       friend bool ARDOUR_UI_UTILS::forward_key_press (GdkEventKey*);
 
        PBD::Signal0<void> SnapChanged;
        PBD::Signal0<void> MouseModeChanged;
index 3e5f3bf080d523a97a336ce8fc578bd187d15919..59b8cdc025390286fb6c87961ddd5b75336e6e98 100644 (file)
@@ -61,6 +61,7 @@ using namespace Gtk;
 using namespace Gtkmm2ext;
 using namespace PBD;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 
 class ClickOptions : public OptionEditorBox
 {
index 564938ad5c75479704ab3df4e585c9af3bce4154..511314dfc598212ef33cd1542bcbceb6d440aa39 100644 (file)
@@ -33,7 +33,6 @@
 #include "main_clock.h"
 #include "gui_thread.h"
 #include "region_editor.h"
-#include "utils.h"
 
 #include "i18n.h"
 
index dda81dd059132a04110ba067ff324e1f1d2e9e82..43cd0e5140c3d0f7362d10cbf37c11081d41b6d7 100644 (file)
@@ -27,7 +27,6 @@
 #include "control_point.h"
 #include "region_gain_line.h"
 #include "audio_region_view.h"
-#include "utils.h"
 
 #include "time_axis_view.h"
 #include "editor.h"
index a7d73afc64a2fc5e479dfbc2e219af124ecb6f59..7a1a2c21405c964e417d657e09da7566abe3b107 100644 (file)
@@ -36,6 +36,7 @@
 using namespace std;
 using namespace Gtk;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 
 RegionLayeringOrderEditor::RegionLayeringOrderEditor (PublicEditor& pe)
        : ArdourWindow (_("RegionLayeringOrderEditor"))
index 1c086825915ecfed5a9b3c2b31ded0865ad9152a..d45164ee4279e1a17d344c30f9f2046d22996aa4 100644 (file)
@@ -54,6 +54,7 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Editing;
 using namespace Gtk;
index 9e86abd17128a1425e393cdc9efc38cc2e4c8f73..16c4720577579e037514aab841e0e608a0b9dacc 100644 (file)
@@ -23,7 +23,6 @@
 #include "ardour/rc_configuration.h"
 #include "ardour/return.h"
 
-#include "utils.h"
 #include "return_ui.h"
 #include "io_selector.h"
 #include "ardour_ui.h"
index 5a59b5ce5dfc3979e6e06c37e2387626e52f8a83..ec5ebc93a1117d74419e556b506fbac559ab7a83 100644 (file)
@@ -31,7 +31,6 @@
 #include "rhythm_ferret.h"
 #include "audio_region_view.h"
 #include "editor.h"
-#include "utils.h"
 #include "time_axis_view.h"
 
 #include "i18n.h"
index 0919a715ae5760782ec1b001629be8d0eaa613b9..f659a683d435b453d29b6d02e267e087e577f7fb 100644 (file)
@@ -34,6 +34,7 @@
 
 using namespace Gtk;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace std;
 using namespace PBD;
 
index 7e8cdfcf6f33ccd9781d8942dab00481a1d0a3d1..f1677c4c2a44375218bdea2859213a586d9594c2 100644 (file)
@@ -46,7 +46,6 @@
 #include "return_ui.h"
 #include "route_params_ui.h"
 #include "send_ui.h"
-#include "utils.h"
 
 #include "i18n.h"
 
index be761894fc22baeba2a4332f3a156a6d5c56705d..463d40b7843b89e0f7daf71eb761dba35a483c35 100644 (file)
@@ -80,6 +80,7 @@
 #include "i18n.h"
 
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Gtkmm2ext;
 using namespace Gtk;
index caf7199930325d653649f79cd3224bdc37edad04..529842d02d2f949eda95ba96491bf3264f1c0ce0 100644 (file)
@@ -58,6 +58,7 @@
 using namespace Gtk;
 using namespace Gtkmm2ext;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 
 uint32_t RouteUI::_max_invert_buttons = 3;
index 7e3b0e775a932471c2b33087da5021165c546477..d571d018b73a705ef3d74fa7b77b22ebfa4c5a3d 100644 (file)
@@ -24,7 +24,6 @@
 #include "ardour/send.h"
 #include "ardour/rc_configuration.h"
 
-#include "utils.h"
 #include "send_ui.h"
 #include "io_selector.h"
 #include "ardour_ui.h"
index aad6cdedbadf9ec904775e3402f32f60cfc0bc98..7b1b212b8108a591a01691f0e75e2f3bdd21481f 100644 (file)
@@ -55,6 +55,7 @@ using namespace Gdk;
 using namespace Glib;
 using namespace PBD;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 
 static string poor_mans_glob (string path)
 {
index 72cd75abb1f703f303377958cbe2dd3000074251..da29eb75a84a17cca6bb1f193d678a8f4c98a483 100644 (file)
@@ -64,7 +64,6 @@
 #include "prompter.h"
 #include "sfdb_ui.h"
 #include "editing.h"
-#include "utils.h"
 #include "gain_meter.h"
 #include "main_clock.h"
 #include "public_editor.h"
index 8ecdf5d49bbb3ddda997f64dcb56243bd697cd13..e9ef5a3060e09724d2db3f0810131d9aa1968f55 100644 (file)
@@ -71,7 +71,7 @@ SoundcloudExportSelector::SoundcloudExportSelector () :
        sc_table.set_row_spacings (5);
        sc_frame->add (sc_table);
 
-       sc_table.attach ( *(Gtk::manage (new Gtk::Image (get_icon (X_("soundcloud"))))) , 0, 1,  0, 2);
+       sc_table.attach ( *(Gtk::manage (new Gtk::Image (ARDOUR_UI_UTILS::get_icon (X_("soundcloud"))))) , 0, 1,  0, 2);
 
        sc_table.attach (soundcloud_username_label,    0, 1,  1, 2);
        sc_table.attach (soundcloud_username_entry,    1, 3,  1, 2);
index 8482a6cb2268bcd5517d28bdd800914ff1931bde..38074e932a00ffeaa5c26441a9ea6fbc541c6051 100644 (file)
@@ -55,6 +55,7 @@ using namespace Gdk;
 using namespace Glib;
 using namespace PBD;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 
 ArdourStartup* ArdourStartup::the_startup = 0;
 
index 8a04f4b03b6ed5a2980b6258437ddeb624ab15d5..2039f50a0a416aa423143e344e4793f687464888 100644 (file)
@@ -42,6 +42,7 @@ using namespace Glib;
 using namespace Gtkmm2ext;
 using namespace PBD;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 
 static void
 _note_off_event_handler (GtkWidget* /*widget*/, int note, gpointer arg)
index 02ee7708f80f725d05ba8c89a007d25f2942f489..ab923a47be737fece200eed8b01b2792b2f71b12 100644 (file)
@@ -49,6 +49,7 @@
 using namespace std;
 using namespace Gtk;
 using namespace Gtkmm2ext;
+using namespace ARDOUR_UI_UTILS;
 
 static const int pos_box_size = 8;
 static const int lr_box_size = 15;
index 970c1616c1ccd0817dce4ef5db966f609c145473..9eecc80dd7fd80de28ced468cb2bb81c02453a48 100644 (file)
@@ -49,6 +49,7 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Editing;
 
index b601734beeae4ee4a442d547ad63d287f3e72e0e..7c0e510aff8fd92dbcddb388788db25d7d109f6c 100644 (file)
@@ -26,7 +26,6 @@
 #include "ardour/rc_configuration.h"
 
 #include "tempo_dialog.h"
-#include "utils.h"
 
 #include "i18n.h"
 
index eec9eb5eee1e95d045ed598980bcd7b9e5c13049..38f8aac4c91b1a2dbe18a2832b772a50d8f5e325 100644 (file)
@@ -51,9 +51,12 @@ using namespace std;
 using namespace Gtk;
 using namespace PBD;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 
-sigc::signal<void> ColorsChanged;
-sigc::signal<void,uint32_t> ColorChanged;
+namespace ARDOUR_UI_UTILS {
+       sigc::signal<void> ColorsChanged;
+       sigc::signal<void,uint32_t> ColorChanged;
+}
 
 ThemeManager::ThemeManager()
        : ArdourWindow (_("Theme Manager"))
index 044094375bed67f4d3d660f87c6e973e805cbc26..15a70304f61a9312f0c89cfeebcd57025d46770c 100644 (file)
@@ -58,6 +58,7 @@ using namespace std;
 using namespace Gtk;
 using namespace Gdk;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace PBD;
 using namespace Editing;
 using namespace ArdourCanvas;
index ff708c24da1d0495c2295a7965a18a42a6ad6ec0..f3fc01bd0625d3ddbb631ad3da7a8c2c49009776 100644 (file)
@@ -56,6 +56,7 @@ using namespace Editing;
 using namespace Glib;
 using namespace PBD;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace Gtkmm2ext;
 
 Pango::FontDescription TimeAxisViewItem::NAME_FONT;
index 7917668d1b13a47f561762926105f1ca2222bcad..16bfc36995c0268145c9c7aefea0cf4e8080de94 100644 (file)
@@ -41,7 +41,6 @@
 #include "ardour_ui.h"
 #include "gui_thread.h"
 
-#include "utils.h"
 #include "opts.h"
 #include "transcode_video_dialog.h"
 #include "utils_videotl.h"
index a5bba2c87cba8479552fa518e6c5225224502965..0000eb63f50652fd0d21ab0240860fe67f18084b 100644 (file)
@@ -116,7 +116,7 @@ class UIConfiguration : public PBD::Stateful
        std::string get_##var () const { return var.get(); }                    \
        bool set_##var (const std::string& val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret;  }
 #define CANVAS_FONT_VARIABLE(var,name) \
-       Pango::FontDescription get_##var () const { return sanitized_font (var.get()); } \
+       Pango::FontDescription get_##var () const { return ARDOUR_UI_UTILS::sanitized_font (var.get()); } \
        bool set_##var (const std::string& val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret;  }
 #include "canvas_vars.h"
 #undef  CANVAS_VARIABLE
index d17d28b07234db5769834e0421727de795908919..3df4f9ace51dd967cc2b2c3fb1d526e8bbe4b85d 100644 (file)
@@ -64,7 +64,9 @@ using namespace Glib;
 using namespace PBD;
 using Gtkmm2ext::Keyboard;
 
-sigc::signal<void>  DPIReset;
+namespace ARDOUR_UI_UTILS {
+       sigc::signal<void>  DPIReset;
+}
 
 #ifdef PLATFORM_WINDOWS
 #define random() rand()
@@ -77,7 +79,7 @@ sigc::signal<void>  DPIReset;
  * @param s true to make sensitive, false to make insensitive
  */
 void
-add_item_with_sensitivity (Menu_Helpers::MenuList& m, Menu_Helpers::MenuElem e, bool s)
+ARDOUR_UI_UTILS::add_item_with_sensitivity (Menu_Helpers::MenuList& m, Menu_Helpers::MenuElem e, bool s)
 {
        m.push_back (e);
        if (!s) {
@@ -87,7 +89,7 @@ add_item_with_sensitivity (Menu_Helpers::MenuList& m, Menu_Helpers::MenuElem e,
 
 
 gint
-just_hide_it (GdkEventAny */*ev*/, Gtk::Window *win)
+ARDOUR_UI_UTILS::just_hide_it (GdkEventAny */*ev*/, Gtk::Window *win)
 {
        win->hide ();
        return 0;
@@ -102,7 +104,7 @@ just_hide_it (GdkEventAny */*ev*/, Gtk::Window *win)
 */
 
 unsigned char*
-xpm2rgb (const char** xpm, uint32_t& w, uint32_t& h)
+ARDOUR_UI_UTILS::xpm2rgb (const char** xpm, uint32_t& w, uint32_t& h)
 {
        static long vals[256], val;
        uint32_t t, x, y, colors, cpp;
@@ -144,7 +146,7 @@ xpm2rgb (const char** xpm, uint32_t& w, uint32_t& h)
 }
 
 unsigned char*
-xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h)
+ARDOUR_UI_UTILS::xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h)
 {
        static long vals[256], val;
        uint32_t t, x, y, colors, cpp;
@@ -221,7 +223,7 @@ xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h)
  * that we might add here later.
  */
 Pango::FontDescription
-sanitized_font (std::string const& name)
+ARDOUR_UI_UTILS::sanitized_font (std::string const& name)
 {
        Pango::FontDescription fd (name);
 
@@ -233,7 +235,7 @@ sanitized_font (std::string const& name)
 }
 
 Pango::FontDescription
-get_font_for_style (string widgetname)
+ARDOUR_UI_UTILS::get_font_for_style (string widgetname)
 {
        Gtk::Window window (WINDOW_TOPLEVEL);
        Gtk::Label foobar;
@@ -262,7 +264,7 @@ get_font_for_style (string widgetname)
 }
 
 uint32_t
-rgba_from_style (string style, uint32_t r, uint32_t g, uint32_t b, uint32_t a, string attr, int state, bool rgba)
+ARDOUR_UI_UTILS::rgba_from_style (string style, uint32_t r, uint32_t g, uint32_t b, uint32_t a, string attr, int state, bool rgba)
 {
        /* In GTK+2, styles aren't set up correctly if the widget is not
           attached to a toplevel window that has a screen pointer.
@@ -321,7 +323,7 @@ rgba_from_style (string style, uint32_t r, uint32_t g, uint32_t b, uint32_t a, s
 }
 
 bool
-rgba_p_from_style (string style, float *r, float *g, float *b, string attr, int state)
+ARDOUR_UI_UTILS::rgba_p_from_style (string style, float *r, float *g, float *b, string attr, int state)
 {
        static Gtk::Window* window = 0;
        assert (r && g && b);
@@ -368,7 +370,7 @@ rgba_p_from_style (string style, float *r, float *g, float *b, string attr, int
 }
 
 void
-set_color_from_rgb (Gdk::Color& c, uint32_t rgb)
+ARDOUR_UI_UTILS::set_color_from_rgb (Gdk::Color& c, uint32_t rgb)
 {
        /* Gdk::Color color ranges are 16 bit, so scale from 8 bit by
           multiplying by 256.
@@ -377,7 +379,7 @@ set_color_from_rgb (Gdk::Color& c, uint32_t rgb)
 }
 
 void
-set_color_from_rgba (Gdk::Color& c, uint32_t rgba)
+ARDOUR_UI_UTILS::set_color_from_rgba (Gdk::Color& c, uint32_t rgba)
 {
        /* Gdk::Color color ranges are 16 bit, so scale from 8 bit by
           multiplying by 256.
@@ -386,7 +388,7 @@ set_color_from_rgba (Gdk::Color& c, uint32_t rgba)
 }
 
 uint32_t
-gdk_color_to_rgba (Gdk::Color const& c)
+ARDOUR_UI_UTILS::gdk_color_to_rgba (Gdk::Color const& c)
 {
        /* since alpha value is not available from a Gdk::Color, it is
           hardcoded as 0xff (aka 255 or 1.0)
@@ -401,7 +403,7 @@ gdk_color_to_rgba (Gdk::Color const& c)
 }
 
 uint32_t
-contrasting_text_color (uint32_t c)
+ARDOUR_UI_UTILS::contrasting_text_color (uint32_t c)
 {
        double r, g, b, a;
        ArdourCanvas::color_to_rgba (c, r, g, b, a);
@@ -434,7 +436,7 @@ contrasting_text_color (uint32_t c)
 }
 
 bool
-relay_key_press (GdkEventKey* ev, Gtk::Window* win)
+ARDOUR_UI_UTILS::relay_key_press (GdkEventKey* ev, Gtk::Window* win)
 {
        PublicEditor& ed (PublicEditor::instance());
 
@@ -450,13 +452,13 @@ relay_key_press (GdkEventKey* ev, Gtk::Window* win)
 }
 
 bool
-forward_key_press (GdkEventKey* ev)
+ARDOUR_UI_UTILS::forward_key_press (GdkEventKey* ev)
 {
-        return PublicEditor::instance().on_key_press_event(ev);
+       return PublicEditor::instance().on_key_press_event(ev);
 }
 
 bool
-emulate_key_event (Gtk::Widget* w, unsigned int keyval)
+ARDOUR_UI_UTILS::emulate_key_event (Gtk::Widget* w, unsigned int keyval)
 {
        GdkDisplay  *display = gtk_widget_get_display (GTK_WIDGET(w->gobj()));
        GdkKeymap   *keymap  = gdk_keymap_get_for_display (display);
@@ -485,7 +487,7 @@ emulate_key_event (Gtk::Widget* w, unsigned int keyval)
 }
 
 bool
-key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
+ARDOUR_UI_UTILS::key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
 {
        GtkWindow* win = window.gobj();
        GtkWidget* focus = gtk_window_get_focus (win);
@@ -656,7 +658,7 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
 }
 
 Glib::RefPtr<Gdk::Pixbuf>
-get_xpm (std::string name)
+ARDOUR_UI_UTILS::get_xpm (std::string name)
 {
        if (!xpm_map[name]) {
 
@@ -681,7 +683,7 @@ get_xpm (std::string name)
 }
 
 vector<string>
-get_icon_sets ()
+ARDOUR_UI_UTILS::get_icon_sets ()
 {
        Searchpath spath(ARDOUR::ardour_data_search_path());
        spath.add_subdirectory_to_paths ("icons");
@@ -706,7 +708,7 @@ get_icon_sets ()
 }
 
 std::string
-get_icon_path (const char* cname, string icon_set)
+ARDOUR_UI_UTILS::get_icon_path (const char* cname, string icon_set)
 {
        std::string data_file_path;
        string name = cname;
@@ -742,7 +744,7 @@ get_icon_path (const char* cname, string icon_set)
 }
 
 Glib::RefPtr<Gdk::Pixbuf>
-get_icon (const char* cname, string icon_set)
+ARDOUR_UI_UTILS::get_icon (const char* cname, string icon_set)
 {
        Glib::RefPtr<Gdk::Pixbuf> img;
        try {
@@ -756,6 +758,7 @@ get_icon (const char* cname, string icon_set)
        return img;
 }
 
+namespace ARDOUR_UI_UTILS {
 Glib::RefPtr<Gdk::Pixbuf>
 get_icon (const char* cname)
 {
@@ -770,9 +773,10 @@ get_icon (const char* cname)
 
        return img;
 }
+}
 
 string
-longest (vector<string>& strings)
+ARDOUR_UI_UTILS::longest (vector<string>& strings)
 {
        if (strings.empty()) {
                return string ("");
@@ -800,7 +804,7 @@ longest (vector<string>& strings)
 }
 
 bool
-key_is_legal_for_numeric_entry (guint keyval)
+ARDOUR_UI_UTILS::key_is_legal_for_numeric_entry (guint keyval)
 {
        /* we assume that this does not change over the life of the process 
         */
@@ -883,8 +887,9 @@ key_is_legal_for_numeric_entry (guint keyval)
 
        return false;
 }
+
 void
-set_pango_fontsize ()
+ARDOUR_UI_UTILS::set_pango_fontsize ()
 {
        long val = ARDOUR::Config->get_font_scale();
 
@@ -900,7 +905,7 @@ set_pango_fontsize ()
 }
 
 void
-reset_dpi ()
+ARDOUR_UI_UTILS::reset_dpi ()
 {
        long val = ARDOUR::Config->get_font_scale();
        set_pango_fontsize ();
@@ -912,7 +917,7 @@ reset_dpi ()
 }
 
 void
-resize_window_to_proportion_of_monitor (Gtk::Window* window, int max_width, int max_height)
+ARDOUR_UI_UTILS::resize_window_to_proportion_of_monitor (Gtk::Window* window, int max_width, int max_height)
 {
        Glib::RefPtr<Gdk::Screen> screen = window->get_screen ();
        Gdk::Rectangle monitor_rect;
@@ -927,7 +932,7 @@ resize_window_to_proportion_of_monitor (Gtk::Window* window, int max_width, int
 
 /** Replace _ with __ in a string; for use with menu item text to make underscores displayed correctly */
 string
-escape_underscores (string const & s)
+ARDOUR_UI_UTILS::escape_underscores (string const & s)
 {
        string o;
        string::size_type const N = s.length ();
@@ -945,7 +950,7 @@ escape_underscores (string const & s)
 
 /** Replace < and > with &lt; and &gt; respectively to make < > display correctly in markup strings */
 string
-escape_angled_brackets (string const & s)
+ARDOUR_UI_UTILS::escape_angled_brackets (string const & s)
 {
        string o = s;
        boost::replace_all (o, "<", "&lt;");
@@ -954,7 +959,7 @@ escape_angled_brackets (string const & s)
 }
 
 Gdk::Color
-unique_random_color (list<Gdk::Color>& used_colors)
+ARDOUR_UI_UTILS::unique_random_color (list<Gdk::Color>& used_colors)
 {
        Gdk::Color newcolor;
 
@@ -995,7 +1000,7 @@ unique_random_color (list<Gdk::Color>& used_colors)
 }
 
 string 
-rate_as_string (float r)
+ARDOUR_UI_UTILS::rate_as_string (float r)
 {
        char buf[32];
        if (fmod (r, 1000.0f)) {
index 4ff563080ab52b676ab3936c07cc6d202dee6d03..a99246632e139bea0d55370a763c48f8bcde6916 100644 (file)
@@ -47,6 +47,8 @@ namespace ArdourCanvas {
        class Item;
 }
 
+namespace ARDOUR_UI_UTILS {
+
 extern sigc::signal<void>  DPIReset;
 
 gint   just_hide_it (GdkEventAny*, Gtk::Window*);
@@ -96,4 +98,5 @@ Gdk::Color unique_random_color (std::list<Gdk::Color> &);
 
 std::string rate_as_string (float r);
 
+} // namespace
 #endif /* __ardour_gtk_utils_h__ */
index 66071c8e8465c0759962ac43db4c9cfef9d8b12c..e1c37f591bbc198ff77743a5deff529cca729e35 100644 (file)
@@ -30,7 +30,6 @@
 #include "editor.h"
 #include "editor_drag.h"
 #include "main_clock.h"
-#include "utils.h"
 #include "verbose_cursor.h"
 
 #include "i18n.h"
index de2480e8f0fcb795296de92015c197e0f4ac2410..43f12aa9f35aa0754bd698554560181e5e24d12b 100644 (file)
@@ -23,7 +23,6 @@
 #include "ardour_ui.h"
 #include "video_image_frame.h"
 #include "public_editor.h"
-#include "utils.h"
 #include "canvas/container.h"
 #include "utils_videotl.h"
 
index b901071296b6310b0a71eae03594a39968328850..fe91554158873d3e92608bd41da43cd076c77a7e 100644 (file)
@@ -32,6 +32,7 @@
 
 using namespace std;
 using namespace PBD;
+using namespace ARDOUR_UI_UTILS;
 
 VideoMonitor::VideoMonitor (PublicEditor *ed, std::string xjadeo_bin_path)
        : editor (ed)
index dff98218abf49658a7108dfa4f260d4fdc4251a7..815d19b7e782cce95b799c85cad77226d3f47814 100644 (file)
@@ -34,7 +34,6 @@
 #include "ardour_ui.h"
 #include "public_editor.h"
 #include "gui_thread.h"
-#include "utils.h"
 #include "utils_videotl.h"
 #include "rgb_macros.h"
 #include "video_timeline.h"