From dc2c38709b10785e870c206a62bd51105dba6065 Mon Sep 17 00:00:00 2001 From: Grygorii Zharun Date: Thu, 10 Apr 2014 08:55:30 -0500 Subject: [PATCH] [Summary] Merging in Poul's changes in profile.h [Deatails] Paul added a support into profile.h to determine if Tracks app is used [Reviewed by] [git-p4: depot-paths = "//Abdaw/dev_main/tracks/": change = 452233] --- gtk2_ardour/actions.cc | 4 +- gtk2_ardour/actions.h | 2 +- gtk2_ardour/ardour_ui.cc | 6 +- gtk2_ardour/ardour_ui2.cc | 11 +- gtk2_ardour/trx.menus.in | 692 +++++++++++++++++++++++++++++++++++ gtk2_ardour/wscript | 15 +- libs/ardour/ardour/profile.h | 6 +- wscript | 5 + 8 files changed, 728 insertions(+), 13 deletions(-) create mode 100644 gtk2_ardour/trx.menus.in diff --git a/gtk2_ardour/actions.cc b/gtk2_ardour/actions.cc index cefaeeb4cf..bdb6821f89 100644 --- a/gtk2_ardour/actions.cc +++ b/gtk2_ardour/actions.cc @@ -72,11 +72,11 @@ ActionManager::init () } void -ActionManager::load_menus () +ActionManager::load_menus (const string& menus_file) { std::string ui_file; - find_file_in_search_path (ardour_config_search_path(), "ardour.menus", ui_file); + find_file_in_search_path (ardour_config_search_path(), menus_file, ui_file); bool loaded = false; diff --git a/gtk2_ardour/actions.h b/gtk2_ardour/actions.h index f3fba51de5..50f9c20b82 100644 --- a/gtk2_ardour/actions.h +++ b/gtk2_ardour/actions.h @@ -30,7 +30,7 @@ namespace ActionManager { /* Ardour specific */ extern void init (); - extern void load_menus (); + extern void load_menus (const std::string& menus_file_name); /* not path, just name */ extern std::vector > session_sensitive_actions; extern std::vector > write_sensitive_actions; diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 76a8072dab..715cf9ec0b 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -491,7 +491,7 @@ ARDOUR_UI::post_engine () _tooltips.enable(); - ActionManager::load_menus (); + ActionManager::load_menus (ARDOUR_COMMAND_LINE::menus_file); if (setup_windows ()) { throw failed_constructor (); @@ -4239,10 +4239,12 @@ ARDOUR_UI::setup_profile () Profile->set_small_screen (); } - if (getenv ("ARDOUR_SAE")) { + if (g_getenv ("ARDOUR_SAE")) { Profile->set_sae (); Profile->set_single_package (); } + + Profile->set_trx (); } int diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc index e9ad631032..2a794827e0 100644 --- a/gtk2_ardour/ardour_ui2.cc +++ b/gtk2_ardour/ardour_ui2.cc @@ -357,13 +357,18 @@ ARDOUR_UI::setup_transport () tbox2->set_spacing (2); tbox->set_spacing (2); - tbox1->pack_start (midi_panic_button, false, false, 5); - tbox1->pack_start (click_button, false, false, 5); + if (!Profile->get_trx()) { + tbox1->pack_start (midi_panic_button, false, false, 5); + tbox1->pack_start (click_button, false, false, 5); + } + tbox1->pack_start (goto_start_button, false, false); tbox1->pack_start (goto_end_button, false, false); tbox1->pack_start (auto_loop_button, false, false); - tbox2->pack_start (play_selection_button, false, false); + if (!Profile->get_trx()) { + tbox2->pack_start (play_selection_button, false, false); + } tbox2->pack_start (roll_button, false, false); tbox2->pack_start (stop_button, false, false); tbox2->pack_start (rec_button, false, false, 5); diff --git a/gtk2_ardour/trx.menus.in b/gtk2_ardour/trx.menus.in new file mode 100644 index 0000000000..cc346d40aa --- /dev/null +++ b/gtk2_ardour/trx.menus.in @@ -0,0 +1,692 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#ifdef GTKOSX + + +#endif +#ifndef GTKOSX + + +#endif + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#ifndef GTKOSX + + +#endif + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#if 0 + +#endif + + + + + + + + + + + + + +#ifndef GTKOSX + +#endif + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index b7e01ee84d..18e23e0aef 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -682,11 +682,18 @@ def build(bld): obj.command_is_external = True obj.no_inputs = True obj.argv = menus_argv - obj.stdin = 'ardour.menus.in' - obj.stdout = 'ardour.menus' obj.dep_vars = ['GTKOSX'] - bld.install_files(os.path.join(bld.env['SYSCONFDIR'], 'ardour3'), - 'ardour.menus') + + if bld.is_defined('TRX_BUILD'): + obj.stdin = 'trx.menus.in' + obj.stdout = 'trx.menus' + bld.install_files(os.path.join(bld.env['SYSCONFDIR'], 'ardour3'), + 'trx.menus') + else: + obj.stdin = 'ardour.menus.in' + obj.stdout = 'ardour.menus' + bld.install_files(os.path.join(bld.env['SYSCONFDIR'], 'ardour3'), + 'ardour.menus') # Keybindings diff --git a/libs/ardour/ardour/profile.h b/libs/ardour/ardour/profile.h index 9346138e00..56d9ff62be 100644 --- a/libs/ardour/ardour/profile.h +++ b/libs/ardour/ardour/profile.h @@ -33,7 +33,8 @@ public: SmallScreen, SAE, SinglePackage, - LastElement + Trx, + LastElement, }; RuntimeProfile() { bits.resize (LastElement); } @@ -45,6 +46,9 @@ public: void set_sae () { bits[SAE] = true; } bool get_sae () const { return bits[SAE]; } + bool get_trx() const { return bits[Trx]; } + void set_trx() { bits[Trx] = true; } + void set_single_package () { bits[SinglePackage] = true; } bool get_single_package () const { return bits[SinglePackage]; } diff --git a/wscript b/wscript index 57c49215e3..505c6ebb73 100755 --- a/wscript +++ b/wscript @@ -430,6 +430,8 @@ def options(opt): autowaf.set_options(opt, debug_by_default=True) opt.add_option('--program-name', type='string', action='store', default='Ardour', dest='program_name', help='The user-visible name of the program being built') + opt.add_option ('--trx', action='store_true', default=True, dest='trx_build', + help='Whether to build for TRX') opt.add_option('--arch', type='string', action='store', dest='arch', help='Architecture-specific compiler flags') opt.add_option('--backtrace', action='store_true', default=True, dest='backtrace', @@ -579,6 +581,9 @@ def configure(conf): conf.env.append_value ('CXXFLAGS', '-DNO_PLUGIN_STATE') conf.define ('NO_PLUGIN_STATE', 1) + if Options.options.trx_build: + conf.define ('TRX_BUILD', 1) + if Options.options.lv2dir: conf.env['LV2DIR'] = Options.options.lv2dir else: