Merge branch 'master' of git.waves.com:waves/tracks

Conflicts:
	gtk2_ardour/ui/tracks_preferences.xml
This commit is contained in:
Valeriy Kamyshniy 2014-09-12 16:13:41 +03:00
commit 5340eebadf
89 changed files with 816 additions and 554 deletions

3
.gitignore vendored
View file

@ -45,7 +45,8 @@ tags
/doc/html/
/doc/latex/
/tools/osx_packaging/Resources/
/tools/osx_packaging/Tracks
/tools/osx_packaging/Info.plist
# translations
/gtk2_ardour/po/*.mo

View file

@ -34,10 +34,10 @@ AddTracksDialog::AddTracksDialog ()
, _increment_button (get_waves_button ("increment_button"))
, _cancel_button (get_waves_button ("cancel_button"))
, _ok_button (get_waves_button ("ok_button"))
, _tracks_format_combo (get_combo_box_text ("tracks_format_combo"))
, _tracks_format_dropdown (get_waves_dropdown ("tracks_format_dropdown"))
, _tracks_counter_entry (get_entry("tracks_counter_entry"))
{
populate_tracks_format_combo();
populate_tracks_format_dropdown();
_tracks_counter_entry.set_text("1");
_cancel_button.signal_clicked.connect (sigc::mem_fun (*this, &AddTracksDialog::on_cancel_button));
@ -47,15 +47,9 @@ AddTracksDialog::AddTracksDialog ()
}
void
AddTracksDialog::populate_tracks_format_combo ()
AddTracksDialog::populate_tracks_format_dropdown ()
{
std::vector<std::string> track_format_strings;
track_format_strings.push_back(TrackFormat::FormatMono);
track_format_strings.push_back(TrackFormat::FormatStereo);
set_popdown_strings (_tracks_format_combo, track_format_strings);
_tracks_format_combo.set_sensitive (track_format_strings.size() > 1);
_tracks_format_combo.set_active_text(TrackFormat::FormatMono);
_tracks_format_dropdown.set_text(TrackFormat::FormatMono);
}
void
@ -127,7 +121,7 @@ AddTracksDialog::input_channels ()
{
ChanCount channel_count;
string track_format = _tracks_format_combo.get_active_text();
string track_format = _tracks_format_dropdown.get_text();
if( track_format == TrackFormat::FormatMono )
channel_count.set(DataType::AUDIO, 1);
@ -143,6 +137,6 @@ void
AddTracksDialog::setup ()
{
set_track_count(1);
_tracks_format_combo.set_active_text(TrackFormat::FormatMono);
_tracks_format_dropdown.set_text(TrackFormat::FormatMono);
}

View file

@ -32,10 +32,10 @@ private:
WavesButton& _cancel_button;
WavesButton& _ok_button;
Gtk::ComboBoxText& _tracks_format_combo;
WavesDropdown& _tracks_format_dropdown;
Gtk::Entry& _tracks_counter_entry;
void populate_tracks_format_combo();
void populate_tracks_format_dropdown();
void on_cancel_button (WavesButton*);
void on_ok_button (WavesButton*);

View file

@ -121,6 +121,7 @@ ARDOUR_UI::populate_display_format_dropdown ()
{
static std::vector<string> display_formats;
_display_format_dropdown->clear_items ();
display_formats.clear ();
display_formats.push_back("Timecode");
display_formats.push_back("Time");
@ -134,45 +135,49 @@ ARDOUR_UI::populate_display_format_dropdown ()
if( !_session )
return;
string format = _session->config.get_display_format();
AudioClock::Mode mode;
if ( format == "Time" )
mode = AudioClock::MinSec;
else if ( format == "Samples" )
mode = AudioClock::Frames;
if( format == "Timecode" )
mode = AudioClock::Timecode;
if( time_info_box )
time_info_box->set_mode (mode);
if ( big_clock )
primary_clock->set_mode (mode);
AudioClock::Mode mode = primary_clock->mode();
string format;
if (AudioClock::Timecode == mode)
format = display_formats[0];
else if (AudioClock::MinSec == mode)
format = display_formats[1];
else format = display_formats[2];
_display_format_dropdown->set_text( format );
}
void
ARDOUR_UI::populate_timecode_source_dropdown ()
{
static std::vector<string> timecode_selector;
static std::vector<string> timecode_source;
_timecode_source_dropdown->clear_items ();
timecode_selector.push_back("Internal");
timecode_selector.push_back("MTC");
timecode_selector.push_back("LTC");
for(int i = 0; i < timecode_selector.size(); ++i)
timecode_source.clear();
timecode_source.push_back("Internal");
timecode_source.push_back("MTC");
timecode_source.push_back("LTC");
for(int i = 0; i < timecode_source.size(); ++i)
{
_timecode_source_dropdown->add_menu_item (timecode_selector[i], &timecode_selector[i]);
_timecode_source_dropdown->add_menu_item (timecode_source[i], &timecode_source[i]);
}
if( !_session )
return;
string timecode_source = _session->config.get_timecode_source();
bool use_external_timecode_source = _session->config.get_external_sync ();
_timecode_source_dropdown->set_text( timecode_source );
if (use_external_timecode_source)
{
if ( Config->get_sync_source() == MTC )
_timecode_source_dropdown->set_text (timecode_source[1]);//"MTC"
else
_timecode_source_dropdown->set_text (timecode_source[2]);//"LTC"
} else
{
_timecode_source_dropdown->set_text (timecode_source[0]);//Internal
}
}
void
@ -187,8 +192,6 @@ ARDOUR_UI::on_display_format_dropdown_item_clicked (WavesDropdown* from_which, v
mode = AudioClock::MinSec;
else if ( format == "Samples" )
mode = AudioClock::Frames;
_session->config.set_display_format(format);
if( time_info_box )
time_info_box->set_mode (mode);
@ -200,7 +203,19 @@ void
ARDOUR_UI::on_timecode_source_dropdown_item_clicked (WavesDropdown* from_which, void* my_cookie)
{
string timecode_source = *((string*)my_cookie);
_session->config.set_timecode_source(timecode_source);
if ( timecode_source == "Intermal" )
{
_session->config.set_external_sync (false);
} else if ( timecode_source == "MTC" )
{
Config->set_sync_source (MTC);
_session->config.set_external_sync (true);
} else if ( timecode_source == "LTC" )
{
Config->set_sync_source (LTC);
_session->config.set_external_sync (true);
}
}
void

View file

@ -173,7 +173,7 @@
<Option name="transport punch rect" value="6d2828e5"/>
<Option name="trim handle locked" value="ea0f0f28"/>
<Option name="trim handle" value="1900ff44"/>
<Option name="verbose canvas cursor" value="fffd2ebc"/>
<Option name="verbose canvas cursor" value="ffffffbc"/>
<Option name="vestigial frame" value="0000000f"/>
<Option name="video timeline bar" value="303030ff"/>
<Option name="region base" value="7FA82Bff"/>

View file

@ -266,7 +266,13 @@ Editor::Editor ()
, inspector_home (get_container ("inspector_home"))
, _master_bus_ui_home (get_container ("master_bus_ui_home"))
, vpacker (get_v_box ("vpacker"))
, timebars_vbox (get_v_box ("timebars_vbox"))
, marker_lane_hbox (get_h_box ("marker_lane_hbox"))
, skip_button (get_waves_button ("skip_button"))
, global_tracks_button (get_waves_button ("global_tracks_button"))
, add_marker_button (get_waves_button ("add_marker_button"))
, global_solo_button (get_waves_button ("global_solo_button"))
, global_rec_button (get_waves_button ("global_rec_button"))
, _tool_marker_button (get_waves_button ("tool_marker_button"))
, _tool_arrow_button (get_waves_button ("tool_arrow_button"))
, _tool_zoom_button (get_waves_button ("tool_zoom_button"))
@ -641,6 +647,9 @@ Editor::Editor ()
setup_toolbar ();
ARDOUR_UI::Blink.connect (sigc::mem_fun(*this, &Editor::solo_blink));
global_solo_button.signal_clicked.connect (sigc::mem_fun(*this,&Editor::global_solo_clicked));
set_zoom_focus (zoom_focus);
set_visible_track_count (_visible_track_count);
_snap_type = SnapToBeat;
@ -5650,3 +5659,35 @@ Editor::ui_parameter_changed (string parameter)
}
}
}
void
Editor::solo_blink (bool onoff)
{
if (_session == 0) {
return;
}
if (_session->soloing() || _session->listening()) {
if (onoff) {
global_solo_button.set_active (true);
} else {
global_solo_button.set_active (false);
}
} else {
global_solo_button.set_active (false);
}
}
void
Editor::global_solo_clicked (WavesButton*)
{
if (!_session) {
return;
}
if (_session->soloing()) {
_session->set_solo (_session->get_routes(), false);
} else if (_session->listening()) {
_session->set_listen (_session->get_routes(), false);
}
}

View file

@ -714,6 +714,10 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
Gtk::Container& _master_bus_ui_home;
MasterBusUI* _master_bus_ui;
Gtk::VBox& vpacker;
Gtk::VBox& timebars_vbox;
Gtk::HBox& marker_lane_hbox;
WavesButton& skip_button;
WavesButton& global_tracks_button;
std::stack<Gdk::Cursor*> _cursor_stack;
Gdk::Cursor* current_canvas_cursor;
@ -1619,6 +1623,10 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
Gtk::Label toolbar_selection_cursor_label;
WavesButton& add_marker_button;
WavesButton& global_solo_button;
void solo_blink (bool);
WavesButton& global_rec_button;
void global_solo_clicked (WavesButton*);
Gtkmm2ext::TearOff* _mouse_mode_tearoff;
WavesButton& _tool_marker_button;

View file

@ -648,7 +648,7 @@ Editor::mouse_add_new_marker (framepos_t where, bool is_cd, bool is_xrun)
markerprefix = "xrun";
flags = Location::IsMark;
} else {
markerprefix = "mark";
markerprefix = _(Marker::default_new_marker_prefix);
}
if (_session) {

View file

@ -1950,7 +1950,7 @@ Editor::add_location_mark (framepos_t where)
select_new_marker = true;
_session->locations()->next_available_name(markername,"mark");
_session->locations()->next_available_name(markername,_(Marker::default_new_marker_prefix));
if (!choose_new_marker_name(markername)) {
return;
}
@ -2101,7 +2101,7 @@ Editor::set_mark ()
framepos_t const pos = _session->audible_frame ();
string markername;
_session->locations()->next_available_name (markername, "mark");
_session->locations()->next_available_name (markername, _(Marker::default_new_marker_prefix));
if (!choose_new_marker_name (markername)) {
return;

View file

@ -392,9 +392,11 @@ Editor::update_ruler_visibility ()
if (pos != old_unit_pos) {
marker_group->move (ArdourCanvas::Duple (0.0, pos - old_unit_pos));
}
marker_lane_hbox.show ();
marker_group->show();
pos += Marker::marker_height(); // marker_bar->y0() - marker_bar->y1();
} else {
marker_lane_hbox.hide ();
marker_group->hide();
}
@ -403,9 +405,11 @@ Editor::update_ruler_visibility ()
if (pos != old_unit_pos) {
skip_group->move (ArdourCanvas::Duple (0.0, pos - old_unit_pos));
}
skip_button.show ();
skip_group->show();
pos += Marker::marker_height(); // skip_bar->y1() - skip_bar->y0();
} else {
skip_button.hide ();
skip_group->hide();
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 B

After

Width:  |  Height:  |  Size: 218 B

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,012 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 786 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 815 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 769 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 B

View file

@ -1011,7 +1011,7 @@ LocationUI::add_new_location()
if (_session) {
framepos_t where = _session->audible_frame();
_session->locations()->next_available_name(markername,"mark");
_session->locations()->next_available_name(markername,_(Marker::default_new_marker_prefix));
Location *location = new Location (*_session, where, where, markername, Location::IsMark);
if (Config->get_name_new_markers()) {
newest_location = location;

View file

@ -55,7 +55,8 @@ using namespace Gtkmm2ext;
PBD::Signal1<void,Marker*> Marker::CatchDeletion;
const double Marker::_marker_height = 18.0;
const double Marker::_marker_height = 17.0;
const char * Marker::default_new_marker_prefix = N_("MARKER");
static const double name_padding = 10.0;
@ -99,8 +100,12 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Container& parent, guint32 rgba,
set_color_rgba (rgba);
if (type == Mark) {
_line_shown = true;
}
/* setup name pixbuf sizes */
name_font = get_font_for_style (N_("MarkerText"));
name_font = Pango::FontDescription (ARDOUR_UI::config()->get_canvasvar_SmallFont());
Gtk::Label foo;
@ -115,9 +120,7 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Container& parent, guint32 rgba,
_name_item->set_font_description (name_font);
/* white with 95% opacity */
_name_item->set_color (ArdourCanvas::rgba_to_color (1.0,1.0,1.0,0.95));
_name_item->set_position (ArdourCanvas::Duple (_label_offset, (_marker_height / 2.0) - (name_height / 2.0) - 2.0));
set_has_scene_change (true);
_name_item->set_position (ArdourCanvas::Duple (_label_offset, (_marker_height / 2.0) - (name_height / 2.0)));
set_name (annotation.c_str());
@ -338,7 +341,7 @@ Marker::set_show_line (bool s)
void
Marker::setup_line ()
{
if (_shown && (_selected || _line_shown || ARDOUR::Profile->get_trx())) {
if ((Profile->get_trx() && _type == Mark) || (_shown && ((!Profile->get_trx() && _selected) || _line_shown))) {
if (_track_canvas_line == 0) {
@ -414,16 +417,16 @@ Marker::setup_name_display ()
if (_have_scene_change) {
name_width = (double) pixel_width (_("MIDI"), name_font);
/* coordinates of rect that will surround "MIDI */
/* coordinates of rect that will surround "MIDI" */
ArdourCanvas::Rect r;
int midi_height;
pixel_size (X_("MIDI"), name_font, name_width, midi_height);
r.x0 = 2.0;
r.x1 = r.x1 + name_width + 7.0;
r.y0 = 2.0;
r.y1 = r.y0 + _marker_height - 4.0;
if (_scene_change_text == 0) {
_scene_change_rect = new ArdourCanvas::Rectangle (group);
_scene_change_text = new ArdourCanvas::Text (group);
@ -437,14 +440,18 @@ Marker::setup_name_display ()
_scene_change_text->set_font_description (name_font);
_scene_change_text->set_color (ArdourCanvas::rgba_to_color (1.0, 1.0, 1.0, 0.95));
_scene_change_text->set (_("MIDI"));
_scene_change_text->set (X_("MIDI"));
_scene_change_text->set_position (ArdourCanvas::Duple (4.0, (_marker_height / 2.0) - (name_height / 2.0) - 2.0));
/* 4 pixels left margin, place it in the vertical middle.
*/
_scene_change_text->set_position (ArdourCanvas::Duple (4.0, (_marker_height / 2.0) - (name_height / 2.0)));
r.y0 = _scene_change_text->position().y - 2.0;
r.y1 = r.y0 + name_height + 4.0;
_scene_change_rect->set (r);
scene_change_width = r.x1;
} else {
if (_scene_change_text) {
delete _scene_change_text;

View file

@ -97,6 +97,8 @@ class Marker : public sigc::trackable
static double marker_height() { return _marker_height; }
static const char * default_new_marker_prefix;
protected:
PublicEditor& editor;
ARDOUR::Location* _location;

View file

@ -259,6 +259,7 @@ MixerStrip::init ()
_session->engine().Stopped.connect (*this, invalidator (*this), boost::bind (&MixerStrip::engine_stopped, this), gui_context());
_session->engine().Running.connect (*this, invalidator (*this), boost::bind (&MixerStrip::engine_running, this), gui_context());
_session->RecordStateChanged.connect (*this, invalidator (*this), boost::bind (&MixerStrip::on_record_state_changed, this), gui_context());
/* ditto for this button and busses */
@ -422,6 +423,9 @@ MixerStrip::begin_name_edit ()
if( _route->is_master () )
return;
if ( (ARDOUR_UI::instance()->the_session()->record_status()==Session::Recording) && (_route->record_enabled()) )
return;
boost::shared_ptr<AudioTrack> audio_track = boost::dynamic_pointer_cast<AudioTrack>(_route);
if( audio_track && audio_track->is_master_track() )
return;
@ -436,6 +440,23 @@ MixerStrip::begin_name_edit ()
_name_entry.start_editing (0);
}
void
MixerStrip::route_rec_enable_changed ()
{
RouteUI::route_rec_enable_changed ();
on_record_state_changed ();
}
void
MixerStrip::on_record_state_changed ()
{
if ( !ARDOUR_UI::instance()->the_session() )
return;
if ( (ARDOUR_UI::instance()->the_session()->record_status()==Session::Recording) && (_route->record_enabled()) )
end_name_edit (RESPONSE_CANCEL);
}
void
MixerStrip::end_name_edit (int response)
{

View file

@ -128,6 +128,8 @@ class MixerStrip : public RouteUI
static const char* XMLColor[15];
void route_rec_enable_changed();
protected:
friend class Mixer_UI;
void set_packed (bool yn);
@ -172,6 +174,7 @@ class MixerStrip : public RouteUI
void selection_click (GdkEventButton* ev);
WavesButton& name_button;
void on_record_state_changed ();
Gtk::Entry& _name_entry;
void begin_name_edit ();

View file

@ -18,6 +18,9 @@
*/
#include <gdkmm/cursor.h>
#include "gtkmm2ext/cursors.h"
#include "utils.h"
#include "mouse_cursors.h"
#include "editor_xpms"
@ -111,27 +114,66 @@ MouseCursors::drop_all ()
delete expand_up_down; expand_up_down = 0;
}
Gdk::Cursor*
MouseCursors::make_cursor (const char* name, int hotspot_x, int hotspot_y)
{
Gtkmm2ext::CursorInfo* info = Gtkmm2ext::CursorInfo::lookup_cursor_info (name);
if (info) {
hotspot_x = info->x;
hotspot_y = info->y;
}
Glib::RefPtr<Gdk::Pixbuf> p (::get_icon (name, _cursor_set));
return new Gdk::Cursor (Gdk::Display::get_default(), p, hotspot_x, hotspot_y);
}
void
MouseCursors::set_cursor_set (const std::string& name)
{
using namespace Glib;
using namespace Gdk;
drop_all ();
_cursor_set = name;
{
RefPtr<Pixbuf> p (::get_icon ("zoom_in_cursor", _cursor_set));
zoom_in = new Cursor (Display::get_default(), p, 10, 5);
}
/* these will throw exceptions if their images cannot be found.
the default hotspot coordinates will be overridden by any
data found by Gtkmm2ext::Cursors::load_cursor_info(). the values
here from the set of cursors used by Ardour; new cursor/icon
sets should come with a hotspot info file.
*/
{
RefPtr<Pixbuf> p (::get_icon ("zoom_out_cursor", _cursor_set));
zoom_out = new Cursor (Display::get_default(), p, 5, 5);
}
zoom_in = make_cursor ("zoom_in_cursor", 10, 5);
zoom_out = make_cursor ("zoom_out_cursor", 5, 5);
scissors = make_cursor ("scissors", 5, 0);
grabber = make_cursor ("grabber", 5, 0);
grabber_note = make_cursor ("grabber_note", 5, 10);
grabber_edit_point = make_cursor ("grabber_edit_point", 5, 17);
left_side_trim = make_cursor ("trim_left_cursor", 5, 11);
anchored_left_side_trim = make_cursor ("anchored_trim_left_cursor", 5, 11);
right_side_trim = make_cursor ("trim_right_cursor", 23, 11);
anchored_right_side_trim = make_cursor ("anchored_trim_right_cursor", 23, 11);
left_side_trim_right_only = make_cursor ("trim_left_cursor_right_only", 5, 11);
right_side_trim_left_only = make_cursor ("trim_right_cursor_left_only", 23, 11);
fade_in = make_cursor ("fade_in_cursor", 0, 0);
fade_out = make_cursor ("fade_out_cursor", 29, 0);
resize_left = make_cursor ("resize_left_cursor", 3, 10);
resize_top_left = make_cursor ("resize_top_left_cursor", 3, 3);
resize_top = make_cursor ("resize_top_cursor", 10, 3);
resize_top_right = make_cursor ("resize_top_right_cursor", 18, 3);
resize_right = make_cursor ("resize_right_cursor", 24, 10);
resize_bottom_right = make_cursor ("resize_bottom_right_cursor", 18, 18);
resize_bottom = make_cursor ("resize_bottom_cursor", 10, 24);
resize_bottom_left = make_cursor ("resize_bottom_left_cursor", 3, 18);
move = make_cursor ("move_cursor", 11, 11);
expand_left_right = make_cursor ("expand_left_right_cursor", 11, 4);
expand_up_down = make_cursor ("expand_up_down_cursor", 4, 11);
selector = make_cursor ("i_beam_cursor", 4, 11);
Color fbg ("#ffffff");
Color ffg ("#000000");
Gdk::Color fbg ("#ffffff");
Gdk::Color ffg ("#000000");
{
RefPtr<Bitmap> source = Bitmap::create ((char const *) fader_cursor_bits, fader_cursor_width, fader_cursor_height);
@ -152,136 +194,8 @@ MouseCursors::set_cursor_set (const std::string& name)
transparent = new Cursor (bits, bits, c, c, 0, 0);
}
{
char pix[4] = { 0, 0, 0, 0 };
RefPtr<Bitmap> bits = Bitmap::create (pix, 2, 2);
Color c;
transparent = new Cursor (bits, bits, c, c, 0, 0);
}
{
RefPtr<Pixbuf> p (::get_icon ("scissors", _cursor_set));
scissors = new Cursor (Display::get_default(), p, 5, 0);
}
{
RefPtr<Pixbuf> p (::get_icon ("grabber", _cursor_set));
grabber = new Cursor (Display::get_default(), p, 5, 0);
}
{
RefPtr<Pixbuf> p (::get_icon ("grabber_note", _cursor_set));
grabber_note = new Cursor (Display::get_default(), p, 5, 10);
}
{
RefPtr<Pixbuf> p (::get_icon ("grabber_edit_point", _cursor_set));
grabber_edit_point = new Cursor (Display::get_default(), p, 5, 17);
}
cross_hair = new Cursor (CROSSHAIR);
trimmer = new Cursor (SB_H_DOUBLE_ARROW);
{
RefPtr<Pixbuf> p (::get_icon ("trim_left_cursor", _cursor_set));
left_side_trim = new Cursor (Display::get_default(), p, 5, 11);
}
{
RefPtr<Pixbuf> p (::get_icon ("anchored_trim_left_cursor", _cursor_set));
anchored_left_side_trim = new Cursor (Display::get_default(), p, 5, 11);
}
{
RefPtr<Pixbuf> p (::get_icon ("trim_right_cursor", _cursor_set));
right_side_trim = new Cursor (Display::get_default(), p, 23, 11);
}
{
RefPtr<Pixbuf> p (::get_icon ("anchored_trim_right_cursor", _cursor_set));
anchored_right_side_trim = new Cursor (Display::get_default(), p, 23, 11);
}
{
RefPtr<Pixbuf> p (::get_icon ("trim_left_cursor_right_only", _cursor_set));
left_side_trim_right_only = new Cursor (Display::get_default(), p, 5, 11);
}
{
RefPtr<Pixbuf> p (::get_icon ("trim_right_cursor_left_only", _cursor_set));
right_side_trim_left_only = new Cursor (Display::get_default(), p, 23, 11);
}
{
RefPtr<Pixbuf> p (::get_icon ("fade_in_cursor", _cursor_set));
fade_in = new Cursor (Display::get_default(), p, 0, 0);
}
{
RefPtr<Pixbuf> p (::get_icon ("fade_out_cursor", _cursor_set));
fade_out = new Cursor (Display::get_default(), p, 29, 0);
}
{
RefPtr<Pixbuf> p (::get_icon ("resize_left_cursor", _cursor_set));
resize_left = new Cursor (Display::get_default(), p, 3, 10);
}
{
RefPtr<Pixbuf> p (::get_icon ("resize_top_left_cursor", _cursor_set));
resize_top_left = new Cursor (Display::get_default(), p, 3, 3);
}
{
RefPtr<Pixbuf> p (::get_icon ("resize_top_cursor", _cursor_set));
resize_top = new Cursor (Display::get_default(), p, 10, 3);
}
{
RefPtr<Pixbuf> p (::get_icon ("resize_top_right_cursor", _cursor_set));
resize_top_right = new Cursor (Display::get_default(), p, 18, 3);
}
{
RefPtr<Pixbuf> p (::get_icon ("resize_right_cursor", _cursor_set));
resize_right = new Cursor (Display::get_default(), p, 24, 10);
}
{
RefPtr<Pixbuf> p (::get_icon ("resize_bottom_right_cursor", _cursor_set));
resize_bottom_right = new Cursor (Display::get_default(), p, 18, 18);
}
{
RefPtr<Pixbuf> p (::get_icon ("resize_bottom_cursor", _cursor_set));
resize_bottom = new Cursor (Display::get_default(), p, 10, 24);
}
{
RefPtr<Pixbuf> p (::get_icon ("resize_bottom_left_cursor", _cursor_set));
resize_bottom_left = new Cursor (Display::get_default(), p, 3, 18);
}
{
RefPtr<Pixbuf> p (::get_icon ("move_cursor", _cursor_set));
move = new Cursor (Display::get_default(), p, 11, 11);
}
{
RefPtr<Pixbuf> p (::get_icon ("expand_left_right_cursor", _cursor_set));
expand_left_right = new Cursor (Display::get_default(), p, 11, 4);
}
{
RefPtr<Pixbuf> p (::get_icon ("expand_up_down_cursor", _cursor_set));
expand_up_down = new Cursor (Display::get_default(), p, 4, 11);
}
{
RefPtr<Pixbuf> p (::get_icon ("i_beam_cursor", _cursor_set));
selector = new Cursor (Display::get_default(), p, 4, 11);
}
time_fx = new Cursor (SIZING);
wait = new Cursor (WATCH);
timebar = new Cursor(LEFT_PTR);

View file

@ -77,6 +77,7 @@ public:
std::string _cursor_set;
void drop_all ();
Gdk::Cursor* make_cursor (const char* name, int hotspot_x = 0, int hotspot_y = 0);
};
#endif /* __gtk2_ardour_mouse_cursors__ */

View file

@ -119,6 +119,7 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed,
, upper_drop_indicator(get_event_box ("upper_drop_indicator"))
, lower_drop_indicator(get_event_box ("lower_drop_indicator"))
{
sess->RecordStateChanged.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::on_record_state_changed, this), gui_context());
}
void
@ -2284,9 +2285,15 @@ RouteTimeAxisView::can_edit_name () const
if( audio_track && audio_track->is_master_track() )
return false;
Session *session = ARDOUR_UI::instance()->the_session();
if (session == 0) {
return false;
}
/* we do not allow track name changes if it is record enabled
*/
return !_route->record_enabled();
return !( (session->record_status() == Session::Recording) && (_route->record_enabled()) );
}
void
@ -2693,3 +2700,20 @@ RouteTimeAxisView::control_ebox_resize_ended()
enable_header_dnd ();
}
}
void
RouteTimeAxisView::route_rec_enable_changed()
{
RouteUI::route_rec_enable_changed ();
on_record_state_changed ();
}
void
RouteTimeAxisView::on_record_state_changed ()
{
if ( !ARDOUR_UI::instance()->the_session() )
return;
if ( (ARDOUR_UI::instance()->the_session()->record_status()==Session::Recording) && (_route->record_enabled()) )
end_name_edit (RESPONSE_CANCEL);
}

View file

@ -157,6 +157,8 @@ public:
PBD::Signal3<void, const PBD::ID&, const PBD::ID&, bool> relative_tracks_reorder_request;
void route_rec_enable_changed();
protected:
friend class StreamView;
@ -329,6 +331,8 @@ private:
void remove_child (boost::shared_ptr<TimeAxisView>);
void update_playlist_tip ();
void display_route_color ();
void on_record_state_changed ();
};
#endif /* __ardour_route_time_axis_h__ */

View file

@ -185,7 +185,7 @@ class RouteUI : public Gtk::EventBox, public WavesUI, public virtual AxisView
void mute_changed(void*);
void listen_changed(void*);
virtual void processors_changed (ARDOUR::RouteProcessorChange) {}
void route_rec_enable_changed();
virtual void route_rec_enable_changed();
void session_rec_enable_changed();
void build_solo_menu ();

View file

@ -1,76 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<Dialog title=" " resizeable="False">
<style name="generic_control"
winfont ="Arial 10"
macfont ="Helvetica 10"/>
<style name="generic_button"
style="generic_control"
fgnormal="#BFBFBF"
bgnormal="#6C6C6C"
fgactive="#BFBFBF"
bgactive="#454545"
fghover="#CCCCCC"
bghover="#898989"
fgdisabled ="#959595"
bordercolor="#7E7E7E"
borderwidth="0 0 0 0" />
<Layout width="140" height="180">
<Label style ="generic_control"
justify="center"
text="Add Track"
x="0"
y="0"
width="140"
height="25"/>
<ComboBoxText style="generic_control"
id="tracks_format_combo"
x="5"
y="40"
width="130"
height="25" />
<Button style="generic_button"
id="decrement_button"
text="-"
x="5"
y="105"
width="25"
height="25"/>
<style name="generic_control"
winfont ="Arial 10"
macfont ="Helvetica 10"
fgnormal="#BFBFBF"
bgnormal="#6C6C6C"
fgactive="#BFBFBF"
bgactive="#454545"
fghover="#CCCCCC"
bghover="#898989"/>
<style name="generic_button"
style="generic_control"
fgnormal="#BFBFBF"
bgnormal="#6C6C6C"
fgactive="#BFBFBF"
bgactive="#454545"
fghover="#CCCCCC"
bghover="#898989"
fgdisabled ="#959595"
bordercolor="#7E7E7E"
borderwidth="0 0 0 0"/>
<Layout width="140"
height="180">
<Label style ="generic_control"
justify="center"
text="Add Track"
x="0"
y="0"
width="140"
height="25"/>
<Dropdown id="tracks_format_dropdown"
style="generic_control"
x="5"
y="40"
width="130"
height="25"
normalicon="added_track_format_dropdown"
activeicon="added_track_format_dropdown_active"
prelighticon="added_track_format_dropdown_prelight"
inactiveicon="added_track_format_dropdown_inactive">
<dropdownitem title="MONO"/>
<dropdownitem title="STEREO"/>
</Dropdown>
<Entry style="generic_control"
id="tracks_counter_entry"
text="1"
justify="center"
x="35"
y="105"
width="70"
height="25"/>
<Button style="generic_button"
id="increment_button"
text="+"
x="110"
y="105"
width="25"
height="25"/>
<Button style="generic_button"
id="cancel_button"
text="CANCEL"
x="0"
y="155"
width="69"
height="25"/>
<Button style="generic_button"
id="ok_button"
text="OK"
x="70"
y="155"
width="69"
height="25"/>
</Layout>
<Button style="generic_button"
id="decrement_button"
text="-"
x="5"
y="105"
width="25"
height="25"/>
<Entry style="generic_control"
id="tracks_counter_entry"
text="1"
justify="center"
x="35"
y="105"
width="70"
height="25"/>
<Button style="generic_button"
id="increment_button"
text="+"
x="110"
y="105"
width="25"
height="25"/>
<Button style="generic_button"
id="cancel_button"
text="CANCEL"
x="0"
y="155"
width="69"
height="25"/>
<Button style="generic_button"
id="ok_button"
text="OK"
x="70"
y="155"
width="69"
height="25"/>
</Layout>
</Dialog>

View file

@ -30,9 +30,7 @@
<iconbutton id="tracks_button"
width="48" height="51"
normalicon="tracks"
activeicon="tracks_active"
prelighticon="tracks_prelight"/>
activeicon="tracks_active"/>
<Layout width="407" height="51">
<icon source="top_bar_background.png"/>
<HBox id="time_info_box_home"
@ -41,21 +39,19 @@
<HBox id="primary_clock_home"
x="132"
y="6"/>
<dropdown id="display_format_dropdown"
bgnormal="#43919A"
fgnormal="#ffffff"
fgactive="#ffffff"
fghover="#ffffff"
winfont ="Arial 8"
macfont ="Helvetica 8"
x="200"
y="28"
width="63"
height="18"
normalicon="topbar_button"
activeicon="topbar_button_active"
prelighticon="topbar_button_prelight"/>
<dropdown id="display_format_dropdown"
bgnormal="#43919A"
fgnormal="#ffffff"
fgactive="#ffffff"
fghover="#ffffff"
winfont ="Arial 8"
macfont ="Helvetica 8"
x="200"
y="28"
width="63"
height="18"
normalicon="topbar_button"
activeicon="topbar_button_active"/>
<Iconbutton id="bit_depth_button"
fgnormal="#ffffff"
fgactive="#ffffff"
@ -67,8 +63,7 @@
width="63"
height="18"
normalicon="topbar_button_upper"
activeicon="topbar_button_upper_active"
prelighticon="topbar_button_upper_prelight"/>
activeicon="topbar_button_upper_active"/>
<Iconbutton id="frame_rate_button"
winfont ="Arial 8"
fgnormal="#ffffff"
@ -80,37 +75,33 @@
width="63"
height="18"
normalicon="topbar_button"
activeicon="topbar_button_active"
prelighticon="topbar_button_prelight"/>
<dropdown id="sample_rate_dropdown"
bgnormal="#43919A"
fgnormal="#ffffff"
fgactive="#ffffff"
fghover="#ffffff"
winfont ="Arial 8"
macfont ="Helvetica 8"
x="269"
y="28"
width="63"
height="18"
normalicon="topbar_button"
activeicon="topbar_button_active"
prelighticon="topbar_button_prelight"/>
<dropdown id="timecode_selector_dropdown"
bgnormal="#43919A"
fgnormal="#ffffff"
fgactive="#ffffff"
fghover="#ffffff"
winfont ="Arial 8"
macfont ="Helvetica 8"
x="338"
y="5"
width="63"
height="18"
normalicon="topbar_button_upper"
activeicon="topbar_button_upper_active"
prelighticon="topbar_button_upper_prelight"/>
activeicon="topbar_button_active"/>
<dropdown id="sample_rate_dropdown"
bgnormal="#43919A"
fgnormal="#ffffff"
fgactive="#ffffff"
fghover="#ffffff"
winfont ="Arial 8"
macfont ="Helvetica 8"
x="269"
y="28"
width="63"
height="18"
normalicon="topbar_button"
activeicon="topbar_button_active"/>
<dropdown id="timecode_selector_dropdown"
bgnormal="#43919A"
fgnormal="#ffffff"
fgactive="#ffffff"
fghover="#ffffff"
winfont ="Arial 8"
macfont ="Helvetica 8"
x="338"
y="5"
width="63"
height="18"
normalicon="topbar_button_upper"
activeicon="topbar_button_upper_active"/>
</Layout>
<EventBox bgnormal="#383838"
width="17"
@ -198,14 +189,12 @@
width="79" height="25"
normalicon="mode_stereo_out"
activeicon="mode_stereo_out_active"
prelighticon="mode_stereo_out_prelight"
active="true"/>
<iconbutton id="mode_multi_out_button"
tooltip="Multi Out Mode"
width="79" height="25"
normalicon="mode_multi_out"
activeicon="mode_multi_out_active"
prelighticon="mode_multi_out_prelight"/>
activeicon="mode_multi_out_active"/>
</VBox>
</HBox>
</EventBox>
@ -216,20 +205,17 @@
tooltip="Show/Hide Inspector"
width="48" height="26"
normalicon="inspector_on"
activeicon="inspector_on_active"
prelighticon="inspector_on_prelight"/>
activeicon="inspector_on_active"/>
<iconbutton id="mixer_on_button"
tooltip="Show/Hide Mixer"
width="48" height="26"
normalicon="mixer_on"
activeicon="mixer_on_active"
prelighticon="mixer_on_prelight"/>
activeicon="mixer_on_active"/>
<iconbutton id="meter_bridge_on_button"
tooltip="Show/Hide Meter Bridge"
width="48" height="26"
normalicon="meter_bridge_on"
activeicon="meter_bridge_on_active"
prelighticon="meter_bridge_on_prelight"/>
activeicon="meter_bridge_on_active"/>
<Layout width="54"
height="26"
bgnormal="#3E3E3E"/>
@ -237,44 +223,37 @@
tooltip="Rewind"
width="34" height="26"
normalicon="transport_start"
activeicon="transport_start_active"
prelighticon="transport_start_prelight"/>
activeicon="transport_start_active"/>
<iconbutton id="transport_end_button"
tooltip="Forward"
width="34" height="26"
normalicon="transport_end"
activeicon="transport_end_active"
prelighticon="transport_end_prelight"/>
activeicon="transport_end_active"/>
<iconbutton id="transport_play_button"
tooltip="Play"
width="34" height="26"
normalicon="transport_play"
activeicon="transport_play_active"
prelighticon="transport_play_prelight"/>
activeicon="transport_play_active"/>
<iconbutton id="transport_record_button"
tooltip="Record"
width="34" height="26"
normalicon="transport_record"
activeicon="transport_record_active"
prelighticon="transport_record_prelight"/>
activeicon="transport_record_active"/>
<iconbutton id="transport_stop_button"
tooltip="Stop"
width="34" height="26"
normalicon="transport_stop"
activeicon="transport_stop_active"
prelighticon="transport_stop_prelight"/>
activeicon="transport_stop_active"/>
<iconbutton id="transport_loop_button"
tooltip="Loop"
width="34" height="26"
normalicon="transport_loop"
activeicon="transport_loop_active"
prelighticon="transport_loop_prelight"/>
activeicon="transport_loop_active"/>
<iconbutton id="lock_session_button"
tooltip="Lock"
width="34" height="26"
normalicon="lock_session"
activeicon="lock_session_active"
prelighticon="lock_session_prelight"/>
activeicon="lock_session_active"/>
<Layout width="60"
height="26"
bgnormal="#3E3E3E"/>
@ -282,26 +261,22 @@
tooltip="Range Select Tool"
width="34" height="26"
normalicon="tool_marker"
activeicon="tool_marker_active"
prelighticon="tool_marker_prelight"/>
activeicon="tool_marker_active"/>
<iconbutton id="tool_arrow_button"
tooltip="Pointer Tool"
width="34" height="26"
normalicon="tool_arrow"
activeicon="tool_arrow_active"
prelighticon="tool_arrow_prelight"/>
activeicon="tool_arrow_active"/>
<iconbutton id="tool_cut_button"
tooltip="Split Tool"
width="34" height="26"
normalicon="tool_cut"
activeicon="tool_cut_active"
prelighticon="tool_cut_prelight"/>
activeicon="tool_cut_active"/>
<iconbutton id="tool_zoom_button"
tooltip="Zoom Tool"
width="34" height="26"
normalicon="tool_zoom"
activeicon="tool_zoom_active"
prelighticon="tool_zoom_prelight"/>
activeicon="tool_zoom_active"/>
<HBox box.pack="end" spacing ="1">
<Adjustment id="temporal_zoom_adjustment"
minvalue="0"
@ -340,8 +315,7 @@
tooltip="Media Button"
width="48" height="26"
normalicon="media_button"
activeicon="media_button_active"
prelighticon="media_button_prelight"/>
activeicon="media_button_active"/>
</HBox>
</HBox>
</EventBox>
@ -369,61 +343,55 @@
<Table id="edit_packer"
rows="2"
columns="2">
<Layout width="234" height="86"
table.leftattach="0"
table.rightattach="1"
table.topattach="0"
table.bottomattach="1"
table.xfill="false"
table.yfill="false">
<Button id="markers_dropdown"
text="Marker"
x="0"
y="0"
width="200"
height="16"
winfont ="Arial 8"
macfont ="Helvetica 8"
normalicon="top_bar_button"
activeicon="top_bar_button"
prelighticon="top_bar_button"/>
<VBox id="timebars_vbox" spacing="1"
borderwidth="1"
table.leftattach="0"
table.rightattach="1"
table.topattach="0"
table.bottomattach="1"
table.xfill="false"
table.yfill="false">
<HBox id="marker_lane_hbox" spacing="1">
<iconbutton id="marker_button"
width="177"
height="16"
normalicon="marker_button"
activeicon="marker_button"/>
<iconbutton id="add_marker_button"
text="+"
x="200"
y="0"
width="34"
height="16"
winfont ="Arial 8"
macfont ="Helvetica 8"
normalicon="add_marker_button"
activeicon="add_marker_button"
prelighticon="add_marker_button"/>
<Button id="skip_button"
text="SKIP"
x="0"
y="18"
width="234"
height="12"
winfont ="Arial 8"
macfont ="Helvetica 8"/>
<iconbutton id="global_tracks_dropdown"
text="GLOBAL TRACKS"
winfont ="Arial 8"
macfont ="Helvetica 8"
x="0"
y="36"
width="139"
height="18"
normalicon="global_tracks_button"
activeicon="global_tracks_button"
prelighticon="global_tracks_button"/>
<EventBox id="master_bus_ui_home"
x="0"
y="54"
height="32"
width="53"
height="16"
normalicon="add_marker_button"
activeicon="add_marker_button"/>
</HBox>
<iconbutton id="skip_button"
width="234"
bgnormal="#ff00ff"/>
</Layout>
height="18"
normalicon="skip_button"
activeicon="skip_button"/>
<HBox id="global_tracks_hbox" spacing="1">
<iconbutton id="global_tracks_button"
height="24"
width="139"
normalicon="global_tracks_button"
activeicon="global_tracks_button"/>
<iconbutton id="global_rec_button"
height="24"
width="42"
normalicon="global_rec_button"
activeicon="global_rec_button"/>
<iconbutton id="global_solo_button"
height="24"
width="42"
normalicon="global_solo_button"
activeicon="global_solo_button_active"/>
</HBox>
<EventBox id="master_bus_ui_home"
x="0"
y="19"
height="24"
width="234"
bgnormal="#ff00ff"/>
</VBox>
<Layout id="controls_layout"
hadjustment="unused_adjustment"
vadjustment="vertical_adjustment"

View file

@ -13,65 +13,62 @@
bghover="#898989"
fgdisabled ="#959595"
bordercolor="#7E7E7E"
borderwidth="1 1 0 0" />
borderwidth="1 1 0 0"/>
<Layout bgnormal="#1F1F1F" x="0" y="0" width="619" height="623">
<VBox x="2" y="1">
<Layout bgnormal="#A0A0A0" width="107" height="1"/>
<Button
id="audio_settings_tab_button"
text="AUDIO\nSYSTEM\nSETTINGS"
fgnormal="#C1C1C1"
fgactive="#CDCDCD"
bgnormal="#1F1F1F"
bgactive="#565656"
bghover="#2f2f2f"
winfont ="Arial Bold 10"
macfont ="Helvetica Bold 10"
width="107" height="65"/>
<Layout bgnormal="#A0A0A0" width="107" height="1"/>
<Button
id="midi_settings_tab_button"
text="MIDI\nSYSTEM\nSETTINGS"
fgnormal="#C1C1C1"
fgactive="#CDCDCD"
bgnormal="#1F1F1F"
bgactive="#565656"
bghover="#2f2f2f"
winfont ="Arial Bold 10"
macfont ="Helvetica Bold 10"
width="107" height="65"/>
<Layout bgnormal="#A0A0A0" width="107" height="1"/>
<Button
id="session_settings_tab_button"
text="SESSION\nSETTINGS"
fgnormal="#C1C1C1"
fgactive="#CDCDCD"
bgnormal="#1F1F1F"
bgactive="#565656"
bghover="#2f2f2f"
winfont ="Arial Bold 10"
macfont ="Helvetica Bold 10"
width="107" height="65"/>
<Layout bgnormal="#A0A0A0" width="107" height="1"/>
<EventBox bgnormal="#A0A0A0" width="107" height="1"/>
<Iconbutton id="audio_settings_tab_button"
width="107"
height="65"
normalicon="preferences_audio_settings_tab_button"
activeicon="preferences_audio_settings_tab_button_active"
prelighticon="preferences_audio_settings_tab_button_prelight"/>
<EventBox bgnormal="#A0A0A0" width="107" height="1"/>
<Iconbutton id="midi_settings_tab_button"
width="107"
height="65"
normalicon="preferences_midi_settings_tab_button"
activeicon="preferences_midi_settings_tab_button_active"
prelighticon="preferences_midi_settings_tab_button_prelight"/>
<EventBox bgnormal="#A0A0A0" width="107" height="1"/>
<Iconbutton id="session_settings_tab_button"
width="107"
height="65"
normalicon="preferences_session_settings_tab_button"
activeicon="preferences_session_settings_tab_button_active"
prelighticon="preferences_session_settings_tab_button_prelight"/>
<EventBox bgnormal="#A0A0A0" width="107" height="1"/>
</VBox>
<Layout bgnormal="#565656" x="113" y="559" width="505" height="63">
<Button
id="ok_button"
text="OK"
style="generic_button"
x="275" y="18" width="71" height="28"/>
<Button
id="cancel_button"
text="CANCEL"
style="generic_button"
x="347" y="18" width="71" height="28"/>
<Button
id="apply_button"
text="APPLY"
style="generic_button"
x="419" y="18" width="71" height="28"/>
<Iconbutton id="ok_button"
style="generic_button"
x="275"
y="18"
width="71"
height="28"
normalicon="preferences_ok_button"
activeicon="preferences_ok_button_active"
prelighticon="preferences_ok_button_prelight"/>
<Iconbutton id="cancel_button"
style="generic_button"
x="347"
y="18"
width="71"
height="28"
normalicon="preferences_cancel_button"
activeicon="preferences_cancel_button_active"
prelighticon="preferences_cancel_button_prelight"/>
<Iconbutton id="apply_button"
style="generic_button"
x="419"
y="18"
width="71"
height="28"
normalicon="preferences_apply_button"
activeicon="preferences_apply_button_active"
prelighticon="preferences_apply_button_prelight"/>
</Layout>
<Layout id="midi_settings_layout" bgnormal="#565656" x="113" y="1" width="505" height="557" visible="true">
<Layout bgnormal="#000000" x="21" y="20" width="291" height="19">
@ -108,8 +105,18 @@
x="7"
y="3"/>
</Layout>
<Layout bgnormal="#000000" x="447" y="20" width="14" height="19" />
<ScrolledWindow x="21" y="62" bgnormal="#565656" width="440" height="218" hscroll="never" vscroll="auto">
<Layout bgnormal="#000000"
x="447"
y="20"
width="14"
height="19"/>
<ScrolledWindow bgnormal="#565656"
x="21"
y="62"
width="440"
height="218"
hscroll="never"
vscroll="auto">
<HBox>
<VBox id="midi_device_list">
</VBox>
@ -117,11 +124,20 @@
</ScrolledWindow>
</Layout>
<Layout id="audio_settings_layout" bgnormal="#000000" x="113" y="1" width="505" height="558" visible="true">
<Layout bgnormal="#565656" x="0" y="0" width="505" height="100">
<Label style="generic_control" text="AUDIO ENGINE" x="12" y="17"/>
<Layout bgnormal="#565656"
x="0"
y="0"
width="505"
height="100">
<Label style="generic_control"
text="AUDIO ENGINE"
x="0"
y="15"
width="88"
horzalignment="end"/>
<Dropdown style="generic_button"
id="engine_dropdown"
x="97"
x="96"
y="12"
width="126"
height="20"
@ -130,18 +146,33 @@
prelighticon="preference_device_dropdown_prelight"
inactiveicon="preference_device_dropdown_inactive"/>
<Label style="generic_control" text="INTERFACE" x="12" y="47"/>
<Label style="generic_control"
text="INTERFACE"
x="0"
y="43"
width="88"
horzalignment="end"/>
<Dropdown style="generic_button"
id="device_dropdown"
<<<<<<< HEAD
x="97"
y="42"
=======
x="96"
y="40"
>>>>>>> e5c87df6cc4ebef877f5d0e002ce543f2a3f563f
width="126"
height="20"
normalicon="preference_device_dropdown"
activeicon="preference_device_dropdown_active"
prelighticon="preference_device_dropdown_prelight"
prelighticon="preference_device_dropdown_prelight"
inactiveicon="preference_device_dropdown_inactive"/>
<Label style="generic_control" text="SAMPLE RATE" x="231" y="17"/>
<Label style="generic_control"
text="SAMPLE RATE"
x="223"
y="15"
width="80"
horzalignment="end"/>
<Dropdown style="generic_button"
id="sample_rate_dropdown"
x="311"
@ -152,11 +183,16 @@
activeicon="preference_rate_buffer_dropdown_active"
prelighticon="preference_rate_buffer_dropdown_prelight"
inactiveicon="preference_rate_buffer_dropdown_inactive"/>
<Label style="generic_control" text="BUFFER SIZE" x="231" y="47"/>
<Label style="generic_control"
text="BUFFER SIZE"
x="223"
y="43"
width="80"
horzalignment="end"/>
<Dropdown style="generic_button"
id="buffer_size_dropdown"
x="311"
y="42"
y="40"
width="90"
height="20"
normalicon="preference_rate_buffer_dropdown"
@ -164,10 +200,15 @@
prelighticon="preference_rate_buffer_dropdown_prelight"
inactiveicon="preference_rate_buffer_dropdown_inactive"/>
<Button id="control_panel_button"
style="generic_button"
text="DEVICE\nCONTROL\nPANEL"
x="407" y="12" width="84" height="48"/>
<Iconbutton id="control_panel_button"
style="generic_button"
x="407"
y="12"
width="85"
height="49"
normalicon="preferences_device_control_panel_button"
activeicon="preferences_device_control_panel_button_active"
prelighticon="preferences_device_control_panel_button_prelight"/>
<Label id="latency_label" style="generic_control" text="INPUT LATENCY:" x="16" y="74 " width="476"/>
</Layout>
@ -175,27 +216,24 @@
<Label style="generic_control" text="CHANNEL CONFIGURATION MODE" fgnormal="#ffffff"
winfont ="Arial Bold 10"
macfont ="Helvetica Bold 10"
x="17" y="15"/>
<Button id="multi_out_button"
style="generic_button"
text="MULTI OUT"
fgnormal="#C2C2C2"
fgactive="#FFFFFF"
bgactive="#1CA3B3"
fghover="#CECECE"
winfont ="Arial Bold 10"
macfont ="Helvetica Bold 10"
x="280" y="6" width="106" height="28"/>
<Button id="stereo_out_button"
text="STEREO OUT"
style="generic_button"
fgnormal="#C2C2C2"
fgactive="#FFFFFF"
bgactive="#1CA3B3"
fghover="#CECECE"
winfont ="Arial Bold 10"
macfont ="Helvetica Bold 10"
x="387" y="6" width="106" height="28"/>
x="18" y="12"/>
<iconbutton id="multi_out_button"
text="MULTI OUT"
x="280"
y="6"
width="106"
height="28"
normalicon="preferences_multi_out_button"
activeicon="preferences_multi_out_button_active"
prelighticon="preferences_multi_out_button_prelight"/>
<Iconbutton id="stereo_out_button"
x="387"
y="6"
width="106"
height="28"
normalicon="preferences_stereo_out_button"
activeicon="preferences_stereo_out_button_active"
prelighticon="preferences_stereo_out_button_prelight"/>
</Layout>
<Layout bgnormal="#565656" x="0" y="141" width="505" height="416">
<Layout bgnormal="#862579" x="16" y="13" width="3" height="41"/>
@ -285,26 +323,41 @@
</VBox>
</HBox>
</ScrolledWindow>
<Button
id="name_tracks_after_driver_button"
text="NAME TRACK\nAFTER DRIVER"
style="generic_button"
x="16" y="369" width="136" height="39"/>
<Button
id="reset_tracks_name_to_default_button"
text="RESET TRACK\nNAMES TO DEFAULT"
style="generic_button"
x="153" y="369" width="136" height="39"/>
<Button
id="yes_button"
text="YES"
style="generic_button"
x="292" y="369" width="52" height="39"/>
<Button
id="no_button"
text="NO"
style="generic_button"
x="345" y="369" width="52" height="39"/>
<Iconbutton id="name_tracks_after_driver_button"
style="generic_button"
x="16"
y="369"
width="136"
height="39"
normalicon="preference_name_track_after_driver_button"
activeicon="preference_name_track_after_driver_active"
prelighticon="preference_name_track_after_driver_prelight"/>
<Iconbutton id="reset_tracks_name_to_default_button"
x="153"
y="369"
width="136"
height="39"
normalicon="preference_reset_track_names_button"
activeicon="preference_reset_track_names_button_active"
prelighticon="preference_reset_track_names_button_prelight"/>
<Iconbutton id="yes_button"
text="YES"
x="292"
y="369"
width="52"
height="39"
normalicon="preference_yes_button"
activeicon="preference_yes_button_active"
prelighticon="preference_yes_button_prelight"/>
<Iconbutton id="no_button"
text="NO"
x="345"
y="369"
width="52"
height="39"
normalicon="preference_no_button"
activeicon="preference_no_button_active"
prelighticon="preference_no_button_prelight"/>
</Layout>
</Layout>
<Layout id="session_settings_layout" bgnormal="#565656" x="113" y="1" width="505" height="557" visible="false">
@ -407,13 +460,21 @@
<dropdownitem title="2 Min"/>
</Dropdown>
<Label style="generic_control" text="DEFAULT FOLDER FOR NEW SESSION" x = "24" y = "290" />
<Button
id = "browse_default_folder"
text = "Browse"
style = "generic_button"
x = "24" y = "310" width = "100" height = "28"/>
<Label id="default_open_path" style="generic_control" text="" x = "135" y = "315" />
<Label style="generic_control" text="DEFAULT FOLDER FOR NEW SESSION" x = "24" y = "290"/>
<Iconbutton style = "generic_button"
id = "browse_default_folder"
x = "24"
y = "310"
width = "71"
height = "28"
normalicon="preferences_browse_button"
activeicon="preferences_browse_button_active"
prelighticon="preferences_browse_button_prelight"/>
<Label id="default_open_path"
style="generic_control"
text=""
x = "105"
y = "315"/>
</Layout>
</Layout>
</Dialog>

View file

@ -44,7 +44,7 @@ VerboseCursor::VerboseCursor (Editor* editor)
{
_canvas_item = new ArdourCanvas::TrackingText (_editor->get_noscroll_group());
CANVAS_DEBUG_NAME (_canvas_item, "verbose canvas cursor");
_canvas_item->set_font_description (Pango::FontDescription (ARDOUR_UI::config()->get_canvasvar_LargerBoldFont()));
_canvas_item->set_font_description (Pango::FontDescription (ARDOUR_UI::config()->get_canvasvar_NormalFont()));
color_handler ();
ARDOUR_UI_UTILS::ColorsChanged.connect (sigc::mem_fun (*this, &VerboseCursor::color_handler));

View file

@ -23,6 +23,7 @@ WavesDropdown::WavesDropdown (const std::string& title)
: WavesIconButton (title)
{
signal_button_press_event().connect (sigc::mem_fun(*this, &WavesDropdown::on_mouse_pressed));
_menu.signal_hide ().connect (sigc::bind (sigc::mem_fun (*this, &CairoWidget::set_active), false));
}
WavesDropdown::~WavesDropdown ()
@ -33,6 +34,7 @@ bool
WavesDropdown::on_mouse_pressed (GdkEventButton*)
{
_menu.popup (sigc::mem_fun(this, &WavesDropdown::_on_popup_menu_position), 1, gtk_get_current_event_time());
set_active (true);
return true;
}

View file

@ -657,6 +657,33 @@ WavesUI::set_attributes (Gtk::Widget& widget, const XMLNode& definition, const X
}
label->set_justify (justification);
property = xml_property (definition, "horzalignment", styles, "center");
std::transform(property.begin(), property.end(), property.begin(), ::tolower);
Gtk::AlignmentEnum xalign = Gtk::ALIGN_CENTER;
if (property == "start") {
xalign = Gtk::ALIGN_START;
} else if (property == "end") {
xalign = Gtk::ALIGN_END;
} else if (property == "center") {
xalign = Gtk::ALIGN_CENTER;
} else {
dbg_msg ("Invalid horizontal alignment for Gtk::Label !");
}
property = xml_property (definition, "vertalignment", styles, "center");
std::transform(property.begin(), property.end(), property.begin(), ::tolower);
Gtk::AlignmentEnum yalign = Gtk::ALIGN_CENTER;
if (property == "top") {
yalign = Gtk::ALIGN_START;
} else if (property == "bottom") {
yalign = Gtk::ALIGN_END;
} else if (property == "center") {
yalign = Gtk::ALIGN_CENTER;
} else {
dbg_msg ("Invalid vertical alignment for Gtk::Label !");
}
label->set_alignment (xalign, yalign);
property = xml_property (definition, "ellipsize", styles, "none");
std::transform(property.begin(), property.end(), property.begin(), ::tolower);
Pango::EllipsizeMode ellipsize_mode = Pango::ELLIPSIZE_NONE;

View file

@ -30,8 +30,6 @@ CONFIG_VARIABLE (bool, use_region_fades, "use-region-fades", true)
CONFIG_VARIABLE (bool, show_region_fades, "show-region-fades", true)
CONFIG_VARIABLE (SampleFormat, native_file_data_format, "native-file-data-format", ARDOUR::FormatFloat)
CONFIG_VARIABLE (HeaderFormat, native_file_header_format, "native-file-header-format", ARDOUR::WAVE)
CONFIG_VARIABLE (std::string, display_format, "display-format", std::string("Timecode"))
CONFIG_VARIABLE (std::string, timecode_source, "timecode-source", std::string("Internal"))
CONFIG_VARIABLE (bool, auto_play, "auto-play", false)
CONFIG_VARIABLE (bool, auto_return, "auto-return", false)
CONFIG_VARIABLE (bool, auto_input, "auto-input", true)

View file

@ -1128,7 +1128,7 @@ WavesAudioBackend::_read_audio_data_from_device (const float* input_buffer, pfra
{
#if defined(PLATFORM_WINDOWS)
const float **buffer = (const float**)input_buffer;
size_t copied_bytes = nframes*sizeof(float*);
size_t copied_bytes = nframes*sizeof(float);
for(std::vector<WavesAudioPort*>::iterator it = _physical_audio_inputs.begin ();
it != _physical_audio_inputs.end();

View file

@ -1116,10 +1116,22 @@ long WCMRPortAudioDevice::ASIOMessageHook (long selector, long WCUNUSEDPARAM(val
{
switch(selector)
{
case kAsioResyncRequest:
m_ResyncRequested++;
std::cout << "\t\t\tWCMRPortAudioDevice::ASIOMessageHook -- kAsioResyncRequest" << std::endl;
m_pMyManager->NotifyClient (WCMRAudioDeviceManagerClient::RequestReset);
break;
case kAsioLatenciesChanged:
m_BufferSizeChangeRequested++;
std::cout << "\t\t\tWCMRPortAudioDevice::ASIOMessageHook -- kAsioLatenciesChanged" << std::endl;
m_pMyManager->NotifyClient (WCMRAudioDeviceManagerClient::RequestReset);
break;
case kAsioBufferSizeChange:
m_BufferSizeChangeRequested++;
std::cout << "\t\t\tWCMRPortAudioDevice::ASIOMessageHook -- m_BufferSizeChangeRequested" << std::endl;
SetEvent(m_hBufferSizeChangedEvent);
m_pMyManager->NotifyClient (WCMRAudioDeviceManagerClient::RequestReset);
break;
case kAsioResetRequest:
@ -1128,20 +1140,10 @@ long WCMRPortAudioDevice::ASIOMessageHook (long selector, long WCUNUSEDPARAM(val
m_pMyManager->NotifyClient (WCMRAudioDeviceManagerClient::RequestReset);
break;
case kAsioResyncRequest:
std::cout << "\t\t\tWCMRPortAudioDevice::ASIOMessageHook -- kAsioResyncRequest" << std::endl;
m_ResyncRequested++;
break;
case kAsioLatenciesChanged:
std::cout << "\t\t\tWCMRPortAudioDevice::ASIOMessageHook -- kAsioLatenciesChanged" << std::endl;
SetEvent(m_hBufferSizeChangedEvent);
m_BufferSizeChangeRequested++;
break;
case kAsioOverload:
m_DropsDetected++;
std::cout << "\t\t\tWCMRPortAudioDevice::ASIOMessageHook -- kAsioOverload" << std::endl;
m_DropsDetected++;
m_pMyManager->NotifyClient (WCMRAudioDeviceManagerClient::Dropout);
break;
}
return 0;
@ -1399,6 +1401,8 @@ int WCMRPortAudioDevice::AudioCallback( const float *pInputBuffer, float *pOutpu
m_IgnoreThisDrop = false; //We'll ignore once, just once!
else
m_DropsDetected++;
m_pMyManager->NotifyClient (WCMRAudioDeviceManagerClient::Dropout);
}
m_pInputData = pInputBuffer;

View file

@ -46,7 +46,7 @@ TrackingText::init ()
{
_canvas->MouseMotion.connect (sigc::mem_fun (*this, &TrackingText::pointer_motion));
set_ignore_events (true);
set_outline (true);
set_outline (false);
hide ();
}

View file

@ -47,15 +47,15 @@ CairoWidget::on_expose_event (GdkEventExpose *ev)
cairo_clip (cr);
/* paint expose area the color of the parent window bg
*/
*/
if (get_visible_window ()) {
Gdk::Color bg (get_parent_bg());
if (get_visible_window ()) {
Gdk::Color bg (get_parent_bg());
cairo_rectangle (cr, ev->area.x, ev->area.y, ev->area.width, ev->area.height);
cairo_set_source_rgb (cr, bg.get_red_p(), bg.get_green_p(), bg.get_blue_p());
cairo_fill (cr);
}
cairo_rectangle (cr, ev->area.x, ev->area.y, ev->area.width, ev->area.height);
cairo_set_source_rgb (cr, bg.get_red_p(), bg.get_green_p(), bg.get_blue_p());
cairo_fill (cr);
}
cairo_rectangle_t expose_area;
expose_area.x = ev->area.x;
@ -67,6 +67,11 @@ CairoWidget::on_expose_event (GdkEventExpose *ev)
cairo_destroy (cr);
Gtk::Widget* child = get_child ();
if (child) {
propagate_expose (*child, ev);
}
return true;
}

85
libs/gtkmm2ext/cursors.cc Normal file
View file

@ -0,0 +1,85 @@
/*
Copyright (C) 2014 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <sstream>
#include <fstream>
#include "gtkmm2ext/cursors.h"
using namespace Gtkmm2ext;
CursorInfo::Infos CursorInfo::infos;
CursorInfo::CursorInfo (const std::string& n, int hotspot_x, int hotspot_y)
: name (n)
, x (hotspot_x)
, y (hotspot_y)
{
}
int
CursorInfo::load_cursor_info (const std::string& path)
{
std::ifstream infofile (path.c_str());
if (!infofile) {
return -1;
}
std::stringstream s;
std::string name;
int x;
int y;
do {
s << infofile;
if (!infofile) {
break;
}
s >> name;
s >> x;
s >> y;
if (!s) {
break;
}
CursorInfo* ci = new CursorInfo (name, x, y);
infos[name] = ci;
} while (true);
return 0;
}
void
CursorInfo::drop_cursor_info ()
{
infos.clear ();
}
CursorInfo*
CursorInfo::lookup_cursor_info (const std::string& name)
{
Infos::iterator i = infos.find (name);
if (i == infos.end()) {
return 0;
}
return i->second;
}

View file

@ -0,0 +1,48 @@
/*
Copyright (C) 2014 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __gtkmm2ext_cursor_info_h___
#define __gtkmm2ext_cursor_info_h___
#include <string>
#include <map>
namespace Gtkmm2ext {
class CursorInfo
{
public:
static CursorInfo* lookup_cursor_info (const std::string& image_name);
static int load_cursor_info (const std::string& path);
static void drop_cursor_info ();
std::string name;
int x;
int y;
private:
CursorInfo (const std::string& image_name, int hotspot_x, int hotspot_y);
typedef std::map<std::string,CursorInfo*> Infos;
static Infos infos;
};
} /* namespace */
#endif /* __gtkmm2ext_cursor_info_h___ */

View file

@ -52,6 +52,7 @@ namespace Gtkmm2ext {
LIBGTKMM2EXT_API std::string fit_to_pixels (const std::string&, int pixel_width, Pango::FontDescription& font, int& actual_width, bool with_ellipses = false);
LIBGTKMM2EXT_API std::pair<std::string, double> fit_to_pixels (cairo_t *, std::string, double);
LIBGTKMM2EXT_API int pixel_width (const std::string& str, Pango::FontDescription& font);
LIBGTKMM2EXT_API void pixel_size (const std::string& str, Pango::FontDescription& font, int& width, int& height);
LIBGTKMM2EXT_API void get_ink_pixel_size (Glib::RefPtr<Pango::Layout>,
int& width, int& height);

View file

@ -586,6 +586,18 @@ Gtkmm2ext::pixel_width (const string& str, Pango::FontDescription& font)
return width;
}
void
Gtkmm2ext::pixel_size (const string& str, Pango::FontDescription& font, int& width, int& height)
{
Gtk::Label foo;
Glib::RefPtr<Pango::Layout> layout = foo.create_pango_layout ("");
layout->set_font_description (font);
layout->set_text (str);
Gtkmm2ext::get_ink_pixel_size (layout, width, height);
}
#if 0
string
Gtkmm2ext::fit_to_pixels (const string& str, int pixel_width, Pango::FontDescription& font, int& actual_width, bool with_ellipses)

View file

@ -36,6 +36,7 @@ gtkmm2ext_sources = [
'cell_renderer_pixbuf_toggle.cc',
'choice.cc',
'click_box.cc',
'cursors.cc',
'debug.cc',
'dndtreeview.cc',
'fader.cc',