mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 12:16:30 +01:00
option editor and some prompters, misc stuff. this commit message contains no apostrophes.
git-svn-id: svn://localhost/trunk/ardour2@69 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
a0ee84a673
commit
c71fc0272d
10 changed files with 168 additions and 195 deletions
|
|
@ -117,7 +117,7 @@ Editor::hscroll_slider_button_press (GdkEventButton *ev)
|
||||||
|
|
||||||
edit_hscroll_drag_last = x;
|
edit_hscroll_drag_last = x;
|
||||||
edit_hscroll_dragging = true;
|
edit_hscroll_dragging = true;
|
||||||
Gtk::Main::grab_add (edit_hscroll_slider);
|
edit_hscroll_slider.add_modal_grab();
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
@ -164,7 +164,7 @@ Editor::hscroll_slider_button_release (GdkEventButton *ev)
|
||||||
// lets do a tempo redisplay now only, because it is dog slow
|
// lets do a tempo redisplay now only, because it is dog slow
|
||||||
tempo_map_changed (Change (0));
|
tempo_map_changed (Change (0));
|
||||||
edit_hscroll_dragging = false;
|
edit_hscroll_dragging = false;
|
||||||
Gtk::Main::grab_remove (edit_hscroll_slider);
|
edit_hscroll_slider.remove_modal_grab();
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ Editor::kbd_driver (sigc::slot<void,GdkEvent*> theslot, bool use_track_canvas, b
|
||||||
double dx, dy;
|
double dx, dy;
|
||||||
GdkEvent ev;
|
GdkEvent ev;
|
||||||
GdkModifierType mask;
|
GdkModifierType mask;
|
||||||
GdkWindow evw (track_canvas->get_window().get_pointer (x, y, mask));
|
GdkWindow evw (track_canvas.get_window()->get_pointer (x, y, mask));
|
||||||
bool doit = false;
|
bool doit = false;
|
||||||
|
|
||||||
if (use_track_canvas && gdk_window_get_pointer (track_canvas_event_box.get_window()->gobj(),
|
if (use_track_canvas && gdk_window_get_pointer (track_canvas_event_box.get_window()->gobj(),
|
||||||
|
|
|
||||||
|
|
@ -264,9 +264,9 @@ Editor::session_going_away ()
|
||||||
/* rip everything out of the list displays */
|
/* rip everything out of the list displays */
|
||||||
|
|
||||||
region_list_clear (); // no clear() method in gtkmm 1.2
|
region_list_clear (); // no clear() method in gtkmm 1.2
|
||||||
route_list.clear ();
|
route_display_model.clear ();
|
||||||
named_selection_display.clear ();
|
named_selection_model.clear ();
|
||||||
edit_group_list.clear ();
|
group_model.clear ();
|
||||||
|
|
||||||
edit_cursor_clock.set_session (0);
|
edit_cursor_clock.set_session (0);
|
||||||
selection_start_clock.set_session (0);
|
selection_start_clock.set_session (0);
|
||||||
|
|
|
||||||
|
|
@ -85,14 +85,14 @@ Editor::event_frame (GdkEvent* event, double* pcx, double* pcy)
|
||||||
case GDK_BUTTON_PRESS:
|
case GDK_BUTTON_PRESS:
|
||||||
case GDK_2BUTTON_PRESS:
|
case GDK_2BUTTON_PRESS:
|
||||||
case GDK_3BUTTON_PRESS:
|
case GDK_3BUTTON_PRESS:
|
||||||
gnome_canvas_w2c_d (GNOME_CANVAS(track_canvas), event->button.x, event->button.y, pcx, pcy);
|
gnome_canvas_w2c_d (GNOME_CANVAS(&track_canvas), event->button.x, event->button.y, pcx, pcy);
|
||||||
break;
|
break;
|
||||||
case GDK_MOTION_NOTIFY:
|
case GDK_MOTION_NOTIFY:
|
||||||
gnome_canvas_w2c_d (GNOME_CANVAS(track_canvas), event->motion.x, event->motion.y, pcx, pcy);
|
gnome_canvas_w2c_d (GNOME_CANVAS(&track_canvas), event->motion.x, event->motion.y, pcx, pcy);
|
||||||
break;
|
break;
|
||||||
case GDK_ENTER_NOTIFY:
|
case GDK_ENTER_NOTIFY:
|
||||||
case GDK_LEAVE_NOTIFY:
|
case GDK_LEAVE_NOTIFY:
|
||||||
gnome_canvas_w2c_d (GNOME_CANVAS(track_canvas), event->crossing.x, event->crossing.y, pcx, pcy);
|
gnome_canvas_w2c_d (GNOME_CANVAS(&track_canvas), event->crossing.x, event->crossing.y, pcx, pcy);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
warning << string_compose (_("Editor::event_frame() used on unhandled event type %1"), event->type) << endmsg;
|
warning << string_compose (_("Editor::event_frame() used on unhandled event type %1"), event->type) << endmsg;
|
||||||
|
|
@ -724,8 +724,7 @@ Editor::button_press_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType i
|
||||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::Shift)) {
|
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::Shift)) {
|
||||||
if (clicked_trackview) {
|
if (clicked_trackview) {
|
||||||
if (!current_stepping_trackview) {
|
if (!current_stepping_trackview) {
|
||||||
TimeoutSig t;
|
step_timeout = Glib::signal_timeout().connect (mem_fun(*this, &Editor::track_height_step_timeout), 500);
|
||||||
step_timeout = t.connect (mem_fun(*this, &Editor::track_height_step_timeout), 500);
|
|
||||||
current_stepping_trackview = clicked_trackview;
|
current_stepping_trackview = clicked_trackview;
|
||||||
}
|
}
|
||||||
gettimeofday (&last_track_height_step_timestamp, 0);
|
gettimeofday (&last_track_height_step_timestamp, 0);
|
||||||
|
|
@ -761,8 +760,7 @@ Editor::button_press_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType i
|
||||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::Shift)) {
|
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::Shift)) {
|
||||||
if (clicked_trackview) {
|
if (clicked_trackview) {
|
||||||
if (!current_stepping_trackview) {
|
if (!current_stepping_trackview) {
|
||||||
TimeoutSig t;
|
step_timeout = Glib::signal_timeout().connect (mem_fun(*this, &Editor::track_height_step_timeout), 500);
|
||||||
step_timeout = t.connect (mem_fun(*this, &Editor::track_height_step_timeout), 500);
|
|
||||||
current_stepping_trackview = clicked_trackview;
|
current_stepping_trackview = clicked_trackview;
|
||||||
}
|
}
|
||||||
gettimeofday (&last_track_height_step_timestamp, 0);
|
gettimeofday (&last_track_height_step_timestamp, 0);
|
||||||
|
|
@ -1449,7 +1447,7 @@ Editor::motion_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_ty
|
||||||
event might do, its a good tradeoff.
|
event might do, its a good tradeoff.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
track_canvas->get_pointer (x, y);
|
track_canvas.get_pointer (x, y);
|
||||||
|
|
||||||
if (current_stepping_trackview) {
|
if (current_stepping_trackview) {
|
||||||
/* don't keep the persistent stepped trackview if the mouse moves */
|
/* don't keep the persistent stepped trackview if the mouse moves */
|
||||||
|
|
@ -1540,7 +1538,7 @@ Editor::motion_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_ty
|
||||||
}
|
}
|
||||||
|
|
||||||
handled:
|
handled:
|
||||||
track_canvas_motion (item, event);
|
track_canvas_motion (event);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
not_handled:
|
not_handled:
|
||||||
|
|
@ -4450,19 +4448,17 @@ Editor::mouse_rename_region (GnomeCanvasItem* item, GdkEvent* event)
|
||||||
prompter.set_prompt (_("Name for region:"));
|
prompter.set_prompt (_("Name for region:"));
|
||||||
prompter.set_initial_text (clicked_regionview->region.name());
|
prompter.set_initial_text (clicked_regionview->region.name());
|
||||||
prompter.show_all ();
|
prompter.show_all ();
|
||||||
prompter.done.connect (Main::quit.slot());
|
prompter.chosen.connect(sigc::ptr_fun(Gtk::Main::quit));
|
||||||
|
switch (prompter.run ()) {
|
||||||
Main::run ();
|
case GTK_RESPONSE_ACCEPT:
|
||||||
|
|
||||||
if (prompter.status == Prompter::cancelled) {
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
string str;
|
string str;
|
||||||
|
|
||||||
prompter.get_result(str);
|
prompter.get_result(str);
|
||||||
clicked_regionview->region.set_name (str);
|
if (str.length()) {
|
||||||
|
|
||||||
|
clicked_regionview->region.set_name (str);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1469,7 +1469,7 @@ Editor::insert_region_list_drag (AudioRegion& region)
|
||||||
AudioTimeAxisView *atv = 0;
|
AudioTimeAxisView *atv = 0;
|
||||||
Playlist *playlist;
|
Playlist *playlist;
|
||||||
|
|
||||||
track_canvas->get_pointer (x, y);
|
track_canvas.get_pointer (x, y);
|
||||||
|
|
||||||
gnome_canvas_window_to_world (GNOME_CANVAS(track_canvas), x, y, &wx, &wy);
|
gnome_canvas_window_to_world (GNOME_CANVAS(track_canvas), x, y, &wx, &wy);
|
||||||
|
|
||||||
|
|
@ -2904,7 +2904,7 @@ Editor::freeze_route ()
|
||||||
interthread_progress_window->set_title (_("ardour: freeze"));
|
interthread_progress_window->set_title (_("ardour: freeze"));
|
||||||
interthread_progress_window->set_position (Gtk::WIN_POS_MOUSE);
|
interthread_progress_window->set_position (Gtk::WIN_POS_MOUSE);
|
||||||
interthread_progress_window->show_all ();
|
interthread_progress_window->show_all ();
|
||||||
interthread_progress_bar.set_percentage (0.0f);
|
interthread_progress_bar.set_fraction (0.0f);
|
||||||
interthread_progress_label.set_text ("");
|
interthread_progress_label.set_text ("");
|
||||||
interthread_cancel_label.set_text (_("Cancel Freeze"));
|
interthread_cancel_label.set_text (_("Cancel Freeze"));
|
||||||
current_interthread_info = &itt;
|
current_interthread_info = &itt;
|
||||||
|
|
@ -2918,7 +2918,7 @@ Editor::freeze_route ()
|
||||||
|
|
||||||
pthread_create (&itt.thread, 0, _freeze_thread, this);
|
pthread_create (&itt.thread, 0, _freeze_thread, this);
|
||||||
|
|
||||||
track_canvas_scroller.get_window()->set_cursor (GDK_WATCH);
|
track_canvas_scroller.get_window()->set_cursor (Gdk::WATCH);
|
||||||
|
|
||||||
while (!itt.done && !itt.cancel) {
|
while (!itt.done && !itt.cancel) {
|
||||||
gtk_main_iteration ();
|
gtk_main_iteration ();
|
||||||
|
|
@ -3070,7 +3070,7 @@ Editor::cut_copy_points (CutCopyOp op)
|
||||||
void
|
void
|
||||||
Editor::cut_copy_regions (CutCopyOp op)
|
Editor::cut_copy_regions (CutCopyOp op)
|
||||||
{
|
{
|
||||||
typedef map<AudioPlaylist*,AudioPlaylist*> PlaylistMapping;
|
typedef std::map<AudioPlaylist*,AudioPlaylist*> PlaylistMapping;
|
||||||
PlaylistMapping pmap;
|
PlaylistMapping pmap;
|
||||||
jack_nframes_t first_position = max_frames;
|
jack_nframes_t first_position = max_frames;
|
||||||
set<Playlist*> freezelist;
|
set<Playlist*> freezelist;
|
||||||
|
|
@ -3166,7 +3166,7 @@ Editor::mouse_paste ()
|
||||||
{
|
{
|
||||||
gint x, y;
|
gint x, y;
|
||||||
double wx, wy;
|
double wx, wy;
|
||||||
track_canvas->get_pointer (x, y);
|
track_canvas.get_pointer (x, y);
|
||||||
|
|
||||||
gnome_canvas_window_to_world (GNOME_CANVAS(track_canvas), x, y, &wx, &wy);
|
gnome_canvas_window_to_world (GNOME_CANVAS(track_canvas), x, y, &wx, &wy);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ OptionEditor::OptionEditor (ARDOUR_UI& uip, PublicEditor& ed, Mixer_UI& mixui)
|
||||||
vbox->set_spacing (4);
|
vbox->set_spacing (4);
|
||||||
vbox->pack_start(notebook);
|
vbox->pack_start(notebook);
|
||||||
|
|
||||||
delete_event.connect (mem_fun(*this, &OptionEditor::wm_close));
|
signal_delete_event().connect (mem_fun(*this, &OptionEditor::wm_close));
|
||||||
|
|
||||||
notebook.set_show_tabs (true);
|
notebook.set_show_tabs (true);
|
||||||
notebook.set_show_border (true);
|
notebook.set_show_border (true);
|
||||||
|
|
@ -266,19 +266,19 @@ OptionEditor::set_session (Session *s)
|
||||||
if (!s->smpte_drop_frames) {
|
if (!s->smpte_drop_frames) {
|
||||||
// non-drop frames
|
// non-drop frames
|
||||||
if (s->smpte_frames_per_second == 24.0)
|
if (s->smpte_frames_per_second == 24.0)
|
||||||
smpte_fps_combo.get_entry ()->set_text (_("24 FPS"));
|
smpte_fps_combo.set_active_text (_("24 FPS"));
|
||||||
else if (s->smpte_frames_per_second == 25.0)
|
else if (s->smpte_frames_per_second == 25.0)
|
||||||
smpte_fps_combo.get_entry ()->set_text (_("25 FPS"));
|
smpte_fps_combo.set_active_text (_("25 FPS"));
|
||||||
else if (s->smpte_frames_per_second == 30.0)
|
else if (s->smpte_frames_per_second == 30.0)
|
||||||
smpte_fps_combo.get_entry ()->set_text (_("30 FPS"));
|
smpte_fps_combo.set_active_text (_("30 FPS"));
|
||||||
else
|
else
|
||||||
smpte_fps_combo.get_entry ()->set_text (_("???"));
|
smpte_fps_combo.set_active_text (_("???"));
|
||||||
} else {
|
} else {
|
||||||
// drop frames
|
// drop frames
|
||||||
if (floor(s->smpte_frames_per_second) == 29.0)
|
if (floor(s->smpte_frames_per_second) == 29.0)
|
||||||
smpte_fps_combo.get_entry ()->set_text (_("30 FPS drop"));
|
smpte_fps_combo.set_active_text (_("30 FPS drop"));
|
||||||
else
|
else
|
||||||
smpte_fps_combo.get_entry ()->set_text (_("???"));
|
smpte_fps_combo.set_active_text (_("???"));
|
||||||
}
|
}
|
||||||
|
|
||||||
smpte_offset_clock.set_session (s);
|
smpte_offset_clock.set_session (s);
|
||||||
|
|
@ -296,7 +296,7 @@ OptionEditor::set_session (Session *s)
|
||||||
|
|
||||||
/* set up port assignments */
|
/* set up port assignments */
|
||||||
|
|
||||||
map<MIDI::Port*,vector<RadioButton*> >::iterator res;
|
std::map<MIDI::Port*,vector<RadioButton*> >::iterator res;
|
||||||
|
|
||||||
if (session->mtc_port()) {
|
if (session->mtc_port()) {
|
||||||
if ((res = port_toggle_buttons.find (session->mtc_port())) != port_toggle_buttons.end()) {
|
if ((res = port_toggle_buttons.find (session->mtc_port())) != port_toggle_buttons.end()) {
|
||||||
|
|
@ -333,8 +333,8 @@ OptionEditor::set_session (Session *s)
|
||||||
plugins_on_rec_button.set_active (session->get_recording_plugins ());
|
plugins_on_rec_button.set_active (session->get_recording_plugins ());
|
||||||
verify_remove_last_capture_button.set_active (Config->get_verify_remove_last_capture());
|
verify_remove_last_capture_button.set_active (Config->get_verify_remove_last_capture());
|
||||||
|
|
||||||
layer_mode_combo.get_entry()->set_text (layer_mode_strings[session->get_layer_model()]);
|
layer_mode_combo.set_active_text (layer_mode_strings[session->get_layer_model()]);
|
||||||
xfade_model_combo.get_entry()->set_text (xfade_model_strings[session->get_xfade_model()]);
|
xfade_model_combo.set_active_text (xfade_model_strings[session->get_xfade_model()]);
|
||||||
|
|
||||||
short_xfade_adjustment.set_value ((Crossfade::short_xfade_length() / (float) session->frame_rate()) * 1000.0);
|
short_xfade_adjustment.set_value ((Crossfade::short_xfade_length() / (float) session->frame_rate()) * 1000.0);
|
||||||
|
|
||||||
|
|
@ -354,33 +354,33 @@ OptionEditor::set_session (Session *s)
|
||||||
|
|
||||||
// meter stuff
|
// meter stuff
|
||||||
if (session->meter_falloff() == 0.0f) {
|
if (session->meter_falloff() == 0.0f) {
|
||||||
meter_falloff_combo.get_entry ()->set_text (_("Off"));
|
meter_falloff_combo.set_active_text (_("Off"));
|
||||||
} else if (session->meter_falloff() <= 0.3f) {
|
} else if (session->meter_falloff() <= 0.3f) {
|
||||||
meter_falloff_combo.get_entry ()->set_text (_("Slowest"));
|
meter_falloff_combo.set_active_text (_("Slowest"));
|
||||||
} else if (session->meter_falloff() <= 0.4f) {
|
} else if (session->meter_falloff() <= 0.4f) {
|
||||||
meter_falloff_combo.get_entry ()->set_text (_("Slow"));
|
meter_falloff_combo.set_active_text (_("Slow"));
|
||||||
} else if (session->meter_falloff() <= 0.8f) {
|
} else if (session->meter_falloff() <= 0.8f) {
|
||||||
meter_falloff_combo.get_entry ()->set_text (_("Medium"));
|
meter_falloff_combo.set_active_text (_("Medium"));
|
||||||
} else if (session->meter_falloff() <= 1.4f) {
|
} else if (session->meter_falloff() <= 1.4f) {
|
||||||
meter_falloff_combo.get_entry ()->set_text (_("Fast"));
|
meter_falloff_combo.set_active_text (_("Fast"));
|
||||||
} else if (session->meter_falloff() <= 2.0f) {
|
} else if (session->meter_falloff() <= 2.0f) {
|
||||||
meter_falloff_combo.get_entry ()->set_text (_("Faster"));
|
meter_falloff_combo.set_active_text (_("Faster"));
|
||||||
} else {
|
} else {
|
||||||
meter_falloff_combo.get_entry ()->set_text (_("Fastest"));
|
meter_falloff_combo.set_active_text (_("Fastest"));
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ((int) floor (session->meter_hold())) {
|
switch ((int) floor (session->meter_hold())) {
|
||||||
case 0:
|
case 0:
|
||||||
meter_hold_combo.get_entry ()->set_text (_("Off"));
|
meter_hold_combo.set_active_text (_("Off"));
|
||||||
break;
|
break;
|
||||||
case 40:
|
case 40:
|
||||||
meter_hold_combo.get_entry ()->set_text (_("Short"));
|
meter_hold_combo.set_active_text (_("Short"));
|
||||||
break;
|
break;
|
||||||
case 100:
|
case 100:
|
||||||
meter_hold_combo.get_entry ()->set_text (_("Medium"));
|
meter_hold_combo.set_active_text (_("Medium"));
|
||||||
break;
|
break;
|
||||||
case 200:
|
case 200:
|
||||||
meter_hold_combo.get_entry ()->set_text (_("Long"));
|
meter_hold_combo.set_active_text (_("Long"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -410,32 +410,32 @@ OptionEditor::setup_path_options()
|
||||||
|
|
||||||
session_raid_entry.set_name ("OptionsEntry");
|
session_raid_entry.set_name ("OptionsEntry");
|
||||||
|
|
||||||
session_raid_entry.activate.connect (mem_fun(*this, &OptionEditor::raid_path_changed));
|
session_raid_entry.signal_activate().connect (mem_fun(*this, &OptionEditor::raid_path_changed));
|
||||||
|
|
||||||
session_raid_entry.signal_focus_in_event()().connect (mem_fun (Keyboard::the_keyboard(), &Keyboard::focus_in_handler));
|
session_raid_entry.signal_focus_in_event().connect (mem_fun (Keyboard::the_keyboard(), &Keyboard::focus_in_handler));
|
||||||
session_raid_entry.signal_focus_out_event()().connect (bind (mem_fun(*this, &OptionEditor::focus_out_event_handler), &OptionEditor::raid_path_changed));
|
session_raid_entry.signal_focus_out_event().connect (bind (mem_fun(*this, &OptionEditor::focus_out_event_handler), &OptionEditor::raid_path_changed));
|
||||||
|
|
||||||
label = manage(new Label(_("session RAID path")));
|
label = manage(new Label(_("session RAID path")));
|
||||||
label->set_name ("OptionsLabel");
|
label->set_name ("OptionsLabel");
|
||||||
path_table.attach (*label, 0, 1, 0, 1, 0, 0);
|
path_table.attach (*label, 0, 1, 0, 1, FILL|EXPAND, FILL);
|
||||||
path_table.attach (session_raid_entry, 1, 3, 0, 1, Gtk::FILL|Gtk::EXPAND, 0);
|
path_table.attach (session_raid_entry, 1, 3, 0, 1, Gtk::FILL|Gtk::EXPAND, FILL);
|
||||||
|
|
||||||
label = manage(new Label(_("Native Format")));
|
label = manage(new Label(_("Native Format")));
|
||||||
label->set_name ("OptionsLabel");
|
label->set_name ("OptionsLabel");
|
||||||
path_table.attach (*label, 0, 1, 1, 2, 0, 0);
|
path_table.attach (*label, 0, 1, 1, 2, FILL|EXPAND, FILL);
|
||||||
path_table.attach (native_format_combo, 1, 3, 1, 2, Gtk::FILL|Gtk::EXPAND, 0);
|
path_table.attach (native_format_combo, 1, 3, 1, 2, Gtk::FILL|Gtk::EXPAND, FILL);
|
||||||
|
|
||||||
vector<string> nfstrings = internationalize (native_format_strings);
|
vector<string> nfstrings = internationalize (native_format_strings);
|
||||||
|
|
||||||
set_popdown_strings (native_format_combo, nfstrings);
|
set_popdown_strings (native_format_combo, nfstrings);
|
||||||
native_format_combo.get_popwin()->signal_unmap_event().connect (mem_fun(*this, &OptionEditor::native_format_chosen));
|
native_format_combo.signal_unmap_event().connect (mem_fun(*this, &OptionEditor::native_format_chosen));
|
||||||
|
|
||||||
fixup_combo_size (native_format_combo, nfstrings);
|
fixup_combo_size (native_format_combo, nfstrings);
|
||||||
|
|
||||||
if (Config->get_native_format_is_bwf()) {
|
if (Config->get_native_format_is_bwf()) {
|
||||||
native_format_combo.get_entry()->set_text (native_format_strings[0]);
|
native_format_combo.set_active_text (native_format_strings[0]);
|
||||||
} else {
|
} else {
|
||||||
native_format_combo.get_entry()->set_text (native_format_strings[1]);
|
native_format_combo.set_active_text (native_format_strings[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
path_table.show_all();
|
path_table.show_all();
|
||||||
|
|
@ -489,7 +489,7 @@ OptionEditor::setup_fade_options ()
|
||||||
dumb.push_back (lmode_strings[Session::AddHigher]);
|
dumb.push_back (lmode_strings[Session::AddHigher]);
|
||||||
set_popdown_strings (layer_mode_combo, dumb);
|
set_popdown_strings (layer_mode_combo, dumb);
|
||||||
|
|
||||||
layer_mode_combo.get_popwin()->signal_unmap_event().connect (mem_fun(*this, &OptionEditor::layer_mode_chosen));
|
layer_mode_combo.signal_unmap_event().connect (mem_fun(*this, &OptionEditor::layer_mode_chosen));
|
||||||
|
|
||||||
fixup_combo_size (layer_mode_combo, layer_mode_strings);
|
fixup_combo_size (layer_mode_combo, layer_mode_strings);
|
||||||
|
|
||||||
|
|
@ -507,7 +507,7 @@ OptionEditor::setup_fade_options ()
|
||||||
dumb.push_back (xfade_model_strings[ShortCrossfade]);
|
dumb.push_back (xfade_model_strings[ShortCrossfade]);
|
||||||
set_popdown_strings (xfade_model_combo, dumb);
|
set_popdown_strings (xfade_model_combo, dumb);
|
||||||
|
|
||||||
xfade_model_combo.get_popwin()->signal_unmap_event().connect (mem_fun(*this, &OptionEditor::xfade_model_chosen));
|
xfade_model_combo.signal_unmap_event().connect (mem_fun(*this, &OptionEditor::xfade_model_chosen));
|
||||||
|
|
||||||
fixup_combo_size (xfade_model_combo, xfade_model_strings);
|
fixup_combo_size (xfade_model_combo, xfade_model_strings);
|
||||||
|
|
||||||
|
|
@ -534,7 +534,7 @@ OptionEditor::setup_fade_options ()
|
||||||
hbox->pack_start (short_xfade_slider, true, true);
|
hbox->pack_start (short_xfade_slider, true, true);
|
||||||
fade_packer.pack_start (*hbox, false, false);
|
fade_packer.pack_start (*hbox, false, false);
|
||||||
|
|
||||||
short_xfade_adjustment.value_changed.connect (mem_fun(*this, &OptionEditor::short_xfade_adjustment_changed));
|
short_xfade_adjustment.signal_value_changed().connect (mem_fun(*this, &OptionEditor::short_xfade_adjustment_changed));
|
||||||
|
|
||||||
fade_packer.show_all ();
|
fade_packer.show_all ();
|
||||||
}
|
}
|
||||||
|
|
@ -558,7 +558,7 @@ OptionEditor::layer_mode_chosen (GdkEventAny* ev)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
string which = layer_mode_combo.get_entry()->get_text ();
|
string which = layer_mode_combo.get_active_text ();
|
||||||
|
|
||||||
if (which == layer_mode_strings[Session::LaterHigher]) {
|
if (which == layer_mode_strings[Session::LaterHigher]) {
|
||||||
session->set_layer_model (Session::LaterHigher);
|
session->set_layer_model (Session::LaterHigher);
|
||||||
|
|
@ -577,7 +577,7 @@ OptionEditor::xfade_model_chosen (GdkEventAny* ev)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
string which = xfade_model_combo.get_entry()->get_text ();
|
string which = xfade_model_combo.get_active_text ();
|
||||||
|
|
||||||
if (which == xfade_model_strings[FullCrossfade]) {
|
if (which == xfade_model_strings[FullCrossfade]) {
|
||||||
session->set_xfade_model (FullCrossfade);
|
session->set_xfade_model (FullCrossfade);
|
||||||
|
|
@ -705,7 +705,7 @@ OptionEditor::setup_display_options ()
|
||||||
dumb.push_back (_("Medium"));
|
dumb.push_back (_("Medium"));
|
||||||
dumb.push_back (_("Long"));
|
dumb.push_back (_("Long"));
|
||||||
set_popdown_strings (meter_hold_combo, dumb);
|
set_popdown_strings (meter_hold_combo, dumb);
|
||||||
meter_hold_combo.get_popwin()->signal_unmap_event().connect (mem_fun(*this, &OptionEditor::meter_hold_chosen));
|
meter_hold_combo.signal_unmap_event().connect (mem_fun(*this, &OptionEditor::meter_hold_chosen));
|
||||||
hbox = manage (new HBox);
|
hbox = manage (new HBox);
|
||||||
hbox->set_border_width (8);
|
hbox->set_border_width (8);
|
||||||
hbox->set_spacing (8);
|
hbox->set_spacing (8);
|
||||||
|
|
@ -724,7 +724,7 @@ OptionEditor::setup_display_options ()
|
||||||
dumb.push_back (_("Faster"));
|
dumb.push_back (_("Faster"));
|
||||||
dumb.push_back (_("Fastest"));
|
dumb.push_back (_("Fastest"));
|
||||||
set_popdown_strings (meter_falloff_combo, dumb);
|
set_popdown_strings (meter_falloff_combo, dumb);
|
||||||
meter_falloff_combo.get_popwin()->signal_unmap_event().connect (mem_fun(*this, &OptionEditor::meter_falloff_chosen));
|
meter_falloff_combo.signal_unmap_event().connect (mem_fun(*this, &OptionEditor::meter_falloff_chosen));
|
||||||
hbox = manage (new HBox);
|
hbox = manage (new HBox);
|
||||||
hbox->set_border_width (8);
|
hbox->set_border_width (8);
|
||||||
hbox->set_spacing (8);
|
hbox->set_spacing (8);
|
||||||
|
|
@ -751,7 +751,7 @@ gint
|
||||||
OptionEditor::meter_hold_chosen (GdkEventAny* ev)
|
OptionEditor::meter_hold_chosen (GdkEventAny* ev)
|
||||||
{
|
{
|
||||||
if (session) {
|
if (session) {
|
||||||
string str = meter_hold_combo.get_entry()->get_text();
|
string str = meter_hold_combo.get_active_text();
|
||||||
|
|
||||||
if (str == _("Off")) {
|
if (str == _("Off")) {
|
||||||
session->set_meter_hold (0);
|
session->set_meter_hold (0);
|
||||||
|
|
@ -771,7 +771,7 @@ gint
|
||||||
OptionEditor::meter_falloff_chosen (GdkEventAny* ev)
|
OptionEditor::meter_falloff_chosen (GdkEventAny* ev)
|
||||||
{
|
{
|
||||||
if (session) {
|
if (session) {
|
||||||
string str = meter_falloff_combo.get_entry()->get_text();
|
string str = meter_falloff_combo.get_active_text();
|
||||||
|
|
||||||
if (str == _("Off")) {
|
if (str == _("Off")) {
|
||||||
session->set_meter_falloff (0.0f);
|
session->set_meter_falloff (0.0f);
|
||||||
|
|
@ -835,9 +835,9 @@ OptionEditor::setup_sync_options ()
|
||||||
|
|
||||||
slave_type_combo.set_use_arrows_always (true);
|
slave_type_combo.set_use_arrows_always (true);
|
||||||
slave_type_combo.set_value_in_list (true, false);
|
slave_type_combo.set_value_in_list (true, false);
|
||||||
slave_type_combo.get_entry()->set_editable (false);
|
slave_type_combo.set_editable (false);
|
||||||
slave_type_combo.get_entry()->set_name ("OptionsEntry");
|
slave_type_combo.set_name ("OptionsEntry");
|
||||||
slave_type_combo.get_popwin()->signal_unmap_event().connect (mem_fun(*this, &OptionEditor::slave_type_chosen));
|
slave_type_combo.signal_unmap_event().connect (mem_fun(*this, &OptionEditor::slave_type_chosen));
|
||||||
|
|
||||||
dumb.clear ();
|
dumb.clear ();
|
||||||
dumb.push_back (X_("24 FPS"));
|
dumb.push_back (X_("24 FPS"));
|
||||||
|
|
@ -846,7 +846,7 @@ OptionEditor::setup_sync_options ()
|
||||||
dumb.push_back (X_("30 FPS non-drop"));
|
dumb.push_back (X_("30 FPS non-drop"));
|
||||||
|
|
||||||
set_popdown_strings (smpte_fps_combo, dumb);
|
set_popdown_strings (smpte_fps_combo, dumb);
|
||||||
smpte_fps_combo.get_popwin()->signal_unmap_event().connect (mem_fun(*this, &OptionEditor::smpte_fps_chosen));
|
smpte_fps_combo.signal_unmap_event().connect (mem_fun(*this, &OptionEditor::smpte_fps_chosen));
|
||||||
|
|
||||||
smpte_offset_clock.set_mode (AudioClock::SMPTE);
|
smpte_offset_clock.set_mode (AudioClock::SMPTE);
|
||||||
smpte_offset_clock.ValueChanged.connect (mem_fun(*this, &OptionEditor::smpte_offset_chosen));
|
smpte_offset_clock.ValueChanged.connect (mem_fun(*this, &OptionEditor::smpte_offset_chosen));
|
||||||
|
|
@ -918,7 +918,7 @@ gint
|
||||||
OptionEditor::smpte_fps_chosen (GdkEventAny* ev)
|
OptionEditor::smpte_fps_chosen (GdkEventAny* ev)
|
||||||
{
|
{
|
||||||
if (session) {
|
if (session) {
|
||||||
string str = smpte_fps_combo.get_entry()->get_text();
|
string str = smpte_fps_combo.get_active_text();
|
||||||
|
|
||||||
if (str == X_("24 FPS")) {
|
if (str == X_("24 FPS")) {
|
||||||
session->set_smpte_type (24.0, false);
|
session->set_smpte_type (24.0, false);
|
||||||
|
|
@ -980,7 +980,7 @@ OptionEditor::setup_midi_options ()
|
||||||
|
|
||||||
newpair.first = i->second;
|
newpair.first = i->second;
|
||||||
|
|
||||||
table->attach (*(manage (new Label (i->first))), 0, 1, n+2, n+3, 0, 0);
|
table->attach (*(manage (new Label (i->first))), 0, 1, n+2, n+3,FILL|EXPAND, FILL );
|
||||||
tb = manage (new ToggleButton (_("online")));
|
tb = manage (new ToggleButton (_("online")));
|
||||||
tb->set_name ("OptionEditorToggleButton");
|
tb->set_name ("OptionEditorToggleButton");
|
||||||
|
|
||||||
|
|
@ -997,19 +997,19 @@ OptionEditor::setup_midi_options ()
|
||||||
tb->set_active (!(*i).second->input()->offline());
|
tb->set_active (!(*i).second->input()->offline());
|
||||||
tb->signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::port_online_toggled), (*i).second, tb));
|
tb->signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::port_online_toggled), (*i).second, tb));
|
||||||
(*i).second->input()->OfflineStatusChanged.connect (bind (mem_fun(*this, &OptionEditor::map_port_online), (*i).second, tb));
|
(*i).second->input()->OfflineStatusChanged.connect (bind (mem_fun(*this, &OptionEditor::map_port_online), (*i).second, tb));
|
||||||
table->attach (*tb, 1, 2, n+2, n+3, 0, 0);
|
table->attach (*tb, 1, 2, n+2, n+3, FILL|EXPAND, FILL);
|
||||||
|
|
||||||
tb = manage (new ToggleButton ());
|
tb = manage (new ToggleButton ());
|
||||||
tb->set_name ("OptionEditorToggleButton");
|
tb->set_name ("OptionEditorToggleButton");
|
||||||
tb->signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::port_trace_in_toggled), (*i).second, tb));
|
tb->signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::port_trace_in_toggled), (*i).second, tb));
|
||||||
tb->set_size_request (10, 10);
|
tb->set_size_request (10, 10);
|
||||||
table->attach (*tb, 2, 3, n+2, n+3, 0, 0);
|
table->attach (*tb, 2, 3, n+2, n+3, FILL|EXPAND, FILL);
|
||||||
|
|
||||||
tb = manage (new ToggleButton ());
|
tb = manage (new ToggleButton ());
|
||||||
tb->set_name ("OptionEditorToggleButton");
|
tb->set_name ("OptionEditorToggleButton");
|
||||||
tb->signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::port_trace_out_toggled), (*i).second, tb));
|
tb->signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::port_trace_out_toggled), (*i).second, tb));
|
||||||
tb->set_size_request (10, 10);
|
tb->set_size_request (10, 10);
|
||||||
table->attach (*tb, 3, 4, n+2, n+3, 0, 0);
|
table->attach (*tb, 3, 4, n+2, n+3, FILL|EXPAND, FILL);
|
||||||
|
|
||||||
rb = manage (new RadioButton ());
|
rb = manage (new RadioButton ());
|
||||||
newpair.second.push_back (rb);
|
newpair.second.push_back (rb);
|
||||||
|
|
@ -1017,9 +1017,9 @@ OptionEditor::setup_midi_options ()
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
first_mtc_button = rb;
|
first_mtc_button = rb;
|
||||||
} else {
|
} else {
|
||||||
rb->set_group (first_mtc_button->group());
|
rb->set_group (first_mtc_button->get_group());
|
||||||
}
|
}
|
||||||
table->attach (*rb, 4, 5, n+2, n+3, 0, 0);
|
table->attach (*rb, 4, 5, n+2, n+3, FILL|EXPAND, FILL);
|
||||||
rb->signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::mtc_port_chosen), (*i).second, rb));
|
rb->signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::mtc_port_chosen), (*i).second, rb));
|
||||||
|
|
||||||
if (Config->get_mtc_port_name() == i->first) {
|
if (Config->get_mtc_port_name() == i->first) {
|
||||||
|
|
@ -1032,9 +1032,9 @@ OptionEditor::setup_midi_options ()
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
first_mmc_button = rb;
|
first_mmc_button = rb;
|
||||||
} else {
|
} else {
|
||||||
rb->set_group (first_mmc_button->group());
|
rb->set_group (first_mmc_button->get_group());
|
||||||
}
|
}
|
||||||
table->attach (*rb, 6, 7, n+2, n+3, 0, 0);
|
table->attach (*rb, 6, 7, n+2, n+3, FILL|EXPAND, FILL);
|
||||||
rb->signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::mmc_port_chosen), (*i).second, rb));
|
rb->signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::mmc_port_chosen), (*i).second, rb));
|
||||||
|
|
||||||
if (Config->get_mmc_port_name() == i->first) {
|
if (Config->get_mmc_port_name() == i->first) {
|
||||||
|
|
@ -1047,9 +1047,9 @@ OptionEditor::setup_midi_options ()
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
first_midi_button = rb;
|
first_midi_button = rb;
|
||||||
} else {
|
} else {
|
||||||
rb->set_group (first_midi_button->group());
|
rb->set_group (first_midi_button->get_group());
|
||||||
}
|
}
|
||||||
table->attach (*rb, 8, 9, n+2, n+3, 0, 0);
|
table->attach (*rb, 8, 9, n+2, n+3, FILL|EXPAND, FILL);
|
||||||
rb->signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::midi_port_chosen), (*i).second, rb));
|
rb->signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::midi_port_chosen), (*i).second, rb));
|
||||||
|
|
||||||
if (Config->get_midi_port_name() == i->first) {
|
if (Config->get_midi_port_name() == i->first) {
|
||||||
|
|
@ -1431,16 +1431,16 @@ OptionEditor::session_control_changed (Session::ControlType t)
|
||||||
case Session::SlaveType:
|
case Session::SlaveType:
|
||||||
switch (session->slave_source()) {
|
switch (session->slave_source()) {
|
||||||
case Session::None:
|
case Session::None:
|
||||||
slave_type_combo.get_entry()->set_text (positional_sync_strings[Session::None]);
|
slave_type_combo.set_active_text (positional_sync_strings[Session::None]);
|
||||||
break;
|
break;
|
||||||
case Session::MTC:
|
case Session::MTC:
|
||||||
slave_type_combo.get_entry()->set_text (positional_sync_strings[Session::MTC]);
|
slave_type_combo.set_active_text (positional_sync_strings[Session::MTC]);
|
||||||
break;
|
break;
|
||||||
case Session::JACK:
|
case Session::JACK:
|
||||||
slave_type_combo.get_entry()->set_text (positional_sync_strings[Session::JACK]);
|
slave_type_combo.set_active_text (positional_sync_strings[Session::JACK]);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
slave_type_combo.get_entry()->set_text (_("--unknown--"));
|
slave_type_combo.set_active_text (_("--unknown--"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1480,7 +1480,7 @@ OptionEditor::native_format_chosen (GdkEventAny *ignored)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool use_bwf = (native_format_combo.get_entry()->get_text() == native_format_strings[0]);
|
bool use_bwf = (native_format_combo.get_active_text() == native_format_strings[0]);
|
||||||
|
|
||||||
if (use_bwf != Config->get_native_format_is_bwf()) {
|
if (use_bwf != Config->get_native_format_is_bwf()) {
|
||||||
Config->set_native_format_is_bwf (use_bwf);
|
Config->set_native_format_is_bwf (use_bwf);
|
||||||
|
|
@ -1499,7 +1499,7 @@ OptionEditor::slave_type_chosen (GdkEventAny *ignored)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
which = slave_type_combo.get_entry()->get_text();
|
which = slave_type_combo.get_active_text();
|
||||||
|
|
||||||
if (which == positional_sync_strings[Session::None]) {
|
if (which == positional_sync_strings[Session::None]) {
|
||||||
session->request_slave_source (Session::None);
|
session->request_slave_source (Session::None);
|
||||||
|
|
@ -1536,13 +1536,13 @@ OptionEditor::setup_click_editor ()
|
||||||
click_path_entry.set_name ("OptionsEntry");
|
click_path_entry.set_name ("OptionsEntry");
|
||||||
click_emphasis_path_entry.set_name ("OptionsEntry");
|
click_emphasis_path_entry.set_name ("OptionsEntry");
|
||||||
|
|
||||||
click_path_entry.activate.connect (mem_fun(*this, &OptionEditor::click_sound_changed));
|
click_path_entry.signal_activate().connect (mem_fun(*this, &OptionEditor::click_sound_changed));
|
||||||
click_emphasis_path_entry.activate.connect (mem_fun(*this, &OptionEditor::click_emphasis_sound_changed));
|
click_emphasis_path_entry.signal_activate().connect (mem_fun(*this, &OptionEditor::click_emphasis_sound_changed));
|
||||||
|
|
||||||
click_path_entry.signal_focus_in_event()().connect (mem_fun (Keyboard::the_keyboard(), &Keyboard::focus_in_handler));
|
click_path_entry.signal_focus_in_event().connect (mem_fun (Keyboard::the_keyboard(), &Keyboard::focus_in_handler));
|
||||||
click_path_entry.signal_focus_out_event()().connect (bind (mem_fun(*this, &OptionEditor::focus_out_event_handler), &OptionEditor::click_sound_changed));
|
click_path_entry.signal_focus_out_event().connect (bind (mem_fun(*this, &OptionEditor::focus_out_event_handler), &OptionEditor::click_sound_changed));
|
||||||
click_emphasis_path_entry.signal_focus_in_event()().connect (mem_fun (Keyboard::the_keyboard(), &Keyboard::focus_in_handler));
|
click_emphasis_path_entry.signal_focus_in_event().connect (mem_fun (Keyboard::the_keyboard(), &Keyboard::focus_in_handler));
|
||||||
click_emphasis_path_entry.signal_focus_out_event()().connect (bind (mem_fun(*this, &OptionEditor::focus_out_event_handler), &OptionEditor::click_emphasis_sound_changed));
|
click_emphasis_path_entry.signal_focus_out_event().connect (bind (mem_fun(*this, &OptionEditor::focus_out_event_handler), &OptionEditor::click_emphasis_sound_changed));
|
||||||
|
|
||||||
click_browse_button.set_name ("EditorGTKButton");
|
click_browse_button.set_name ("EditorGTKButton");
|
||||||
click_emphasis_browse_button.set_name ("EditorGTKButton");
|
click_emphasis_browse_button.set_name ("EditorGTKButton");
|
||||||
|
|
@ -1559,15 +1559,15 @@ OptionEditor::setup_click_editor ()
|
||||||
|
|
||||||
label = manage(new Label(_("Click audio file")));
|
label = manage(new Label(_("Click audio file")));
|
||||||
label->set_name ("OptionsLabel");
|
label->set_name ("OptionsLabel");
|
||||||
click_table.attach (*label, 0, 1, 0, 1, 0, 0);
|
click_table.attach (*label, 0, 1, 0, 1, FILL|EXPAND, FILL);
|
||||||
click_table.attach (click_path_entry, 1, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, 0);
|
click_table.attach (click_path_entry, 1, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, FILL);
|
||||||
click_table.attach (click_browse_button, 2, 3, 0, 1, 0, 0);
|
click_table.attach (click_browse_button, 2, 3, 0, 1, FILL|EXPAND, FILL);
|
||||||
|
|
||||||
label = manage(new Label(_("Click emphasis audiofile")));
|
label = manage(new Label(_("Click emphasis audiofile")));
|
||||||
label->set_name ("OptionsLabel");
|
label->set_name ("OptionsLabel");
|
||||||
click_table.attach (*label, 0, 1, 1, 2, 0, 0);
|
click_table.attach (*label, 0, 1, 1, 2, FILL|EXPAND, FILL);
|
||||||
click_table.attach (click_emphasis_path_entry, 1, 2, 1, 2, Gtk::FILL|Gtk::EXPAND, 0);
|
click_table.attach (click_emphasis_path_entry, 1, 2, 1, 2, Gtk::FILL|Gtk::EXPAND, FILL);
|
||||||
click_table.attach (click_emphasis_browse_button, 2, 3, 1, 2, 0, 0);
|
click_table.attach (click_emphasis_browse_button, 2, 3, 1, 2, FILL|EXPAND, FILL);
|
||||||
|
|
||||||
hpacker->set_spacing (10);
|
hpacker->set_spacing (10);
|
||||||
hpacker->pack_start (*click_io_selector, false, false);
|
hpacker->pack_start (*click_io_selector, false, false);
|
||||||
|
|
@ -1639,16 +1639,16 @@ OptionEditor::setup_misc_options()
|
||||||
misc_packer.set_spacing (3);
|
misc_packer.set_spacing (3);
|
||||||
misc_packer.pack_start (*table, true, true);
|
misc_packer.pack_start (*table, true, true);
|
||||||
|
|
||||||
table->attach (hw_monitor_button, 0, 1, 0, 1, Gtk::FILL, 0, 8, 0);
|
table->attach (hw_monitor_button, 0, 1, 0, 1, Gtk::FILL, FILL, 8, 0);
|
||||||
table->attach (sw_monitor_button, 0, 1, 1, 2, Gtk::FILL, 0, 8, 0);
|
table->attach (sw_monitor_button, 0, 1, 1, 2, Gtk::FILL, FILL, 8, 0);
|
||||||
table->attach (plugins_stop_button, 0, 1, 2, 3, Gtk::FILL, 0, 8, 0);
|
table->attach (plugins_stop_button, 0, 1, 2, 3, Gtk::FILL, FILL, 8, 0);
|
||||||
table->attach (plugins_on_rec_button, 0, 1, 3, 4, Gtk::FILL, 0, 8, 0);
|
table->attach (plugins_on_rec_button, 0, 1, 3, 4, Gtk::FILL, FILL, 8, 0);
|
||||||
table->attach (verify_remove_last_capture_button, 0, 1, 4, 5, Gtk::FILL, 0, 8, 0);
|
table->attach (verify_remove_last_capture_button, 0, 1, 4, 5, Gtk::FILL, FILL, 8, 0);
|
||||||
|
|
||||||
table->attach (stop_rec_on_xrun_button, 1, 2, 0, 1, Gtk::FILL, 0, 8, 0);
|
table->attach (stop_rec_on_xrun_button, 1, 2, 0, 1, Gtk::FILL, FILL, 8, 0);
|
||||||
table->attach (stop_at_end_button, 1, 2, 1, 2, Gtk::FILL, 0, 8, 0);
|
table->attach (stop_at_end_button, 1, 2, 1, 2, Gtk::FILL, FILL, 8, 0);
|
||||||
table->attach (debug_keyboard_button, 1, 2, 2, 3, Gtk::FILL, 0, 8, 0);
|
table->attach (debug_keyboard_button, 1, 2, 2, 3, Gtk::FILL, FILL, 8, 0);
|
||||||
table->attach (speed_quieten_button, 1, 2, 3, 4, Gtk::FILL, 0, 8, 0);
|
table->attach (speed_quieten_button, 1, 2, 3, 4, Gtk::FILL, FILL, 8, 0);
|
||||||
|
|
||||||
Gtk::VBox* connect_box = manage (new VBox);
|
Gtk::VBox* connect_box = manage (new VBox);
|
||||||
connect_box->set_spacing (3);
|
connect_box->set_spacing (3);
|
||||||
|
|
@ -1837,11 +1837,11 @@ OptionEditor::setup_keyboard_options ()
|
||||||
}
|
}
|
||||||
|
|
||||||
set_popdown_strings (edit_modifier_combo, dumb);
|
set_popdown_strings (edit_modifier_combo, dumb);
|
||||||
edit_modifier_combo.get_popwin()->signal_unmap_event().connect (mem_fun(*this, &OptionEditor::edit_modifier_chosen));
|
edit_modifier_combo.signal_unmap_event().connect (mem_fun(*this, &OptionEditor::edit_modifier_chosen));
|
||||||
|
|
||||||
for (int x = 0; modifiers[x].name; ++x) {
|
for (int x = 0; modifiers[x].name; ++x) {
|
||||||
if (modifiers[x].modifier == Keyboard::edit_modifier ()) {
|
if (modifiers[x].modifier == Keyboard::edit_modifier ()) {
|
||||||
edit_modifier_combo.get_entry()->set_text (_(modifiers[x].name));
|
edit_modifier_combo.set_active_text (_(modifiers[x].name));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1850,25 +1850,25 @@ OptionEditor::setup_keyboard_options ()
|
||||||
label->set_name ("OptionsLabel");
|
label->set_name ("OptionsLabel");
|
||||||
label->set_alignment (1.0, 0.5);
|
label->set_alignment (1.0, 0.5);
|
||||||
|
|
||||||
keyboard_mouse_table.attach (*label, 0, 1, 0, 1, Gtk::FILL|Gtk::EXPAND, 0);
|
keyboard_mouse_table.attach (*label, 0, 1, 0, 1, Gtk::FILL|Gtk::EXPAND, FILL);
|
||||||
keyboard_mouse_table.attach (edit_modifier_combo, 1, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, 0);
|
keyboard_mouse_table.attach (edit_modifier_combo, 1, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, FILL);
|
||||||
|
|
||||||
label = manage (new Label (_("+ button")));
|
label = manage (new Label (_("+ button")));
|
||||||
label->set_name ("OptionsLabel");
|
label->set_name ("OptionsLabel");
|
||||||
|
|
||||||
keyboard_mouse_table.attach (*label, 3, 4, 0, 1, Gtk::FILL|Gtk::EXPAND, 0);
|
keyboard_mouse_table.attach (*label, 3, 4, 0, 1, Gtk::FILL|Gtk::EXPAND, FILL);
|
||||||
keyboard_mouse_table.attach (edit_button_spin, 4, 5, 0, 1, Gtk::FILL|Gtk::EXPAND, 0);
|
keyboard_mouse_table.attach (edit_button_spin, 4, 5, 0, 1, Gtk::FILL|Gtk::EXPAND, FILL);
|
||||||
|
|
||||||
edit_button_spin.set_name ("OptionsEntry");
|
edit_button_spin.set_name ("OptionsEntry");
|
||||||
edit_button_adjustment.set_value (Keyboard::edit_button());
|
edit_button_adjustment.set_value (Keyboard::edit_button());
|
||||||
edit_button_adjustment.value_changed.connect (mem_fun(*this, &OptionEditor::edit_button_changed));
|
edit_button_adjustment.signal_value_changed().connect (mem_fun(*this, &OptionEditor::edit_button_changed));
|
||||||
|
|
||||||
set_popdown_strings (delete_modifier_combo, dumb);
|
set_popdown_strings (delete_modifier_combo, dumb);
|
||||||
delete_modifier_combo.get_popwin()->signal_unmap_event().connect (mem_fun(*this, &OptionEditor::delete_modifier_chosen));
|
delete_modifier_combo.signal_unmap_event().connect (mem_fun(*this, &OptionEditor::delete_modifier_chosen));
|
||||||
|
|
||||||
for (int x = 0; modifiers[x].name; ++x) {
|
for (int x = 0; modifiers[x].name; ++x) {
|
||||||
if (modifiers[x].modifier == Keyboard::delete_modifier ()) {
|
if (modifiers[x].modifier == Keyboard::delete_modifier ()) {
|
||||||
delete_modifier_combo.get_entry()->set_text (_(modifiers[x].name));
|
delete_modifier_combo.set_active_text (_(modifiers[x].name));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1877,25 +1877,25 @@ OptionEditor::setup_keyboard_options ()
|
||||||
label->set_name ("OptionsLabel");
|
label->set_name ("OptionsLabel");
|
||||||
label->set_alignment (1.0, 0.5);
|
label->set_alignment (1.0, 0.5);
|
||||||
|
|
||||||
keyboard_mouse_table.attach (*label, 0, 1, 1, 2, Gtk::FILL|Gtk::EXPAND, 0);
|
keyboard_mouse_table.attach (*label, 0, 1, 1, 2, Gtk::FILL|Gtk::EXPAND, FILL);
|
||||||
keyboard_mouse_table.attach (delete_modifier_combo, 1, 2, 1, 2, Gtk::FILL|Gtk::EXPAND, 0);
|
keyboard_mouse_table.attach (delete_modifier_combo, 1, 2, 1, 2, Gtk::FILL|Gtk::EXPAND, FILL);
|
||||||
|
|
||||||
label = manage (new Label (_("+ button")));
|
label = manage (new Label (_("+ button")));
|
||||||
label->set_name ("OptionsLabel");
|
label->set_name ("OptionsLabel");
|
||||||
|
|
||||||
keyboard_mouse_table.attach (*label, 3, 4, 1, 2, Gtk::FILL|Gtk::EXPAND, 0);
|
keyboard_mouse_table.attach (*label, 3, 4, 1, 2, Gtk::FILL|Gtk::EXPAND, FILL);
|
||||||
keyboard_mouse_table.attach (delete_button_spin, 4, 5, 1, 2, Gtk::FILL|Gtk::EXPAND, 0);
|
keyboard_mouse_table.attach (delete_button_spin, 4, 5, 1, 2, Gtk::FILL|Gtk::EXPAND, FILL);
|
||||||
|
|
||||||
delete_button_spin.set_name ("OptionsEntry");
|
delete_button_spin.set_name ("OptionsEntry");
|
||||||
delete_button_adjustment.set_value (Keyboard::delete_button());
|
delete_button_adjustment.set_value (Keyboard::delete_button());
|
||||||
delete_button_adjustment.value_changed.connect (mem_fun(*this, &OptionEditor::delete_button_changed));
|
delete_button_adjustment.signal_value_changed().connect (mem_fun(*this, &OptionEditor::delete_button_changed));
|
||||||
|
|
||||||
set_popdown_strings (snap_modifier_combo, dumb);
|
set_popdown_strings (snap_modifier_combo, dumb);
|
||||||
snap_modifier_combo.get_popwin()->signal_unmap_event().connect (mem_fun(*this, &OptionEditor::snap_modifier_chosen));
|
snap_modifier_combo.signal_unmap_event().connect (mem_fun(*this, &OptionEditor::snap_modifier_chosen));
|
||||||
|
|
||||||
for (int x = 0; modifiers[x].name; ++x) {
|
for (int x = 0; modifiers[x].name; ++x) {
|
||||||
if (modifiers[x].modifier == (guint) Keyboard::snap_modifier ()) {
|
if (modifiers[x].modifier == (guint) Keyboard::snap_modifier ()) {
|
||||||
snap_modifier_combo.get_entry()->set_text (_(modifiers[x].name));
|
snap_modifier_combo.set_active_text (_(modifiers[x].name));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1904,8 +1904,8 @@ OptionEditor::setup_keyboard_options ()
|
||||||
label->set_name ("OptionsLabel");
|
label->set_name ("OptionsLabel");
|
||||||
label->set_alignment (1.0, 0.5);
|
label->set_alignment (1.0, 0.5);
|
||||||
|
|
||||||
keyboard_mouse_table.attach (*label, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, 0);
|
keyboard_mouse_table.attach (*label, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, FILL);
|
||||||
keyboard_mouse_table.attach (snap_modifier_combo, 1, 2, 2, 3, Gtk::FILL|Gtk::EXPAND, 0);
|
keyboard_mouse_table.attach (snap_modifier_combo, 1, 2, 2, 3, Gtk::FILL|Gtk::EXPAND, FILL);
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
gint
|
||||||
|
|
@ -1913,7 +1913,7 @@ OptionEditor::edit_modifier_chosen (GdkEventAny *ev)
|
||||||
{
|
{
|
||||||
string txt;
|
string txt;
|
||||||
|
|
||||||
txt = edit_modifier_combo.get_entry()->get_text();
|
txt = edit_modifier_combo.get_active_text();
|
||||||
|
|
||||||
for (int i = 0; modifiers[i].name; ++i) {
|
for (int i = 0; modifiers[i].name; ++i) {
|
||||||
if (txt == _(modifiers[i].name)) {
|
if (txt == _(modifiers[i].name)) {
|
||||||
|
|
@ -1929,7 +1929,7 @@ OptionEditor::delete_modifier_chosen (GdkEventAny *ev)
|
||||||
{
|
{
|
||||||
string txt;
|
string txt;
|
||||||
|
|
||||||
txt = delete_modifier_combo.get_entry()->get_text();
|
txt = delete_modifier_combo.get_active_text();
|
||||||
|
|
||||||
for (int i = 0; modifiers[i].name; ++i) {
|
for (int i = 0; modifiers[i].name; ++i) {
|
||||||
if (txt == _(modifiers[i].name)) {
|
if (txt == _(modifiers[i].name)) {
|
||||||
|
|
@ -1945,7 +1945,7 @@ OptionEditor::snap_modifier_chosen (GdkEventAny *ev)
|
||||||
{
|
{
|
||||||
string txt;
|
string txt;
|
||||||
|
|
||||||
txt = snap_modifier_combo.get_entry()->get_text();
|
txt = snap_modifier_combo.get_active_text();
|
||||||
|
|
||||||
for (int i = 0; modifiers[i].name; ++i) {
|
for (int i = 0; modifiers[i].name; ++i) {
|
||||||
if (txt == _(modifiers[i].name)) {
|
if (txt == _(modifiers[i].name)) {
|
||||||
|
|
|
||||||
|
|
@ -476,7 +476,7 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, MIDI::Contr
|
||||||
control_ui->combo = new Gtk::Combo;
|
control_ui->combo = new Gtk::Combo;
|
||||||
control_ui->combo->set_value_in_list(true, false);
|
control_ui->combo->set_value_in_list(true, false);
|
||||||
set_popdown_strings (*control_ui->combo, setup_scale_values(port_index, control_ui));
|
set_popdown_strings (*control_ui->combo, setup_scale_values(port_index, control_ui));
|
||||||
control_ui->combo->get_popwin()->signal_unmap_event(), mem_fun(*this, &PluginUI::control_combo_changed), control_ui));
|
control_ui->combo->signal_unmap_event().connect( mem_fun(*this, &PluginUI::control_combo_changed), control_ui);
|
||||||
plugin.ParameterChanged.connect (bind (mem_fun(*this, &PluginUI::parameter_changed), control_ui));
|
plugin.ParameterChanged.connect (bind (mem_fun(*this, &PluginUI::parameter_changed), control_ui));
|
||||||
control_ui->pack_start(control_ui->label, true, true);
|
control_ui->pack_start(control_ui->label, true, true);
|
||||||
control_ui->pack_start(*control_ui->combo, false, true);
|
control_ui->pack_start(*control_ui->combo, false, true);
|
||||||
|
|
@ -715,7 +715,7 @@ PluginUI::update_control_display (ControlUI* cui)
|
||||||
std::map<string,float>::iterator it;
|
std::map<string,float>::iterator it;
|
||||||
for (it = cui->combo_map->begin(); it != cui->combo_map->end(); ++it) {
|
for (it = cui->combo_map->begin(); it != cui->combo_map->end(); ++it) {
|
||||||
if (it->second == val) {
|
if (it->second == val) {
|
||||||
cui->combo->get_entry()->set_text(it->first);
|
cui->combo->set_active_text(it->first);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -750,7 +750,7 @@ gint
|
||||||
PluginUI::control_combo_changed (GdkEventAny* ignored, ControlUI* cui)
|
PluginUI::control_combo_changed (GdkEventAny* ignored, ControlUI* cui)
|
||||||
{
|
{
|
||||||
if (!cui->ignore_change) {
|
if (!cui->ignore_change) {
|
||||||
string value = cui->combo->get_entry()->get_text();
|
string value = cui->combo->get_active_text();
|
||||||
std::map<string,float> mapping = *cui->combo_map;
|
std::map<string,float> mapping = *cui->combo_map;
|
||||||
insert.set_parameter (cui->port_index, mapping[value]);
|
insert.set_parameter (cui->port_index, mapping[value]);
|
||||||
}
|
}
|
||||||
|
|
@ -874,7 +874,7 @@ PlugUIBase::PlugUIBase (PluginInsert& pi)
|
||||||
combo.set_use_arrows_always(true);
|
combo.set_use_arrows_always(true);
|
||||||
set_popdown_strings (combo, plugin.get_presets());
|
set_popdown_strings (combo, plugin.get_presets());
|
||||||
combo.set_active_text ("");
|
combo.set_active_text ("");
|
||||||
combo.get_popwin()->signal_unmap_event().connect(mem_fun(*this, &PlugUIBase::setting_selected));
|
combo.signal_unmap_event().connect(mem_fun(*this, &PlugUIBase::setting_selected));
|
||||||
|
|
||||||
save_button.set_name ("PluginSaveButton");
|
save_button.set_name ("PluginSaveButton");
|
||||||
save_button.signal_clicked().connect(mem_fun(*this, &PlugUIBase::save_plugin_setting));
|
save_button.signal_clicked().connect(mem_fun(*this, &PlugUIBase::save_plugin_setting));
|
||||||
|
|
@ -886,10 +886,9 @@ PlugUIBase::PlugUIBase (PluginInsert& pi)
|
||||||
gint
|
gint
|
||||||
PlugUIBase::setting_selected(GdkEventAny* ignored)
|
PlugUIBase::setting_selected(GdkEventAny* ignored)
|
||||||
{
|
{
|
||||||
Entry* entry = combo.get_entry();
|
if (combo.get_active_text().length() > 0) {
|
||||||
if (entry->get_text().length() > 0) {
|
if (!plugin.load_preset(combo.get_active_text())) {
|
||||||
if (!plugin.load_preset(entry->get_text())) {
|
warning << string_compose(_("Plugin preset %1 not found"), combo.get_active_text()) << endmsg;
|
||||||
warning << string_compose(_("Plugin preset %1 not found"), entry->get_text()) << endmsg;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -903,11 +902,10 @@ PlugUIBase::save_plugin_setting ()
|
||||||
prompter.set_prompt(_("Name for plugin settings:"));
|
prompter.set_prompt(_("Name for plugin settings:"));
|
||||||
|
|
||||||
prompter.show_all();
|
prompter.show_all();
|
||||||
prompter.done.connect(Main::quit.slot());
|
|
||||||
|
|
||||||
Main::run();
|
switch (prompter.run ()) {
|
||||||
|
case GTK_RESPONSE_ACCEPT:
|
||||||
|
|
||||||
if (prompter.status == Gtkmm2ext::Prompter::entered) {
|
|
||||||
string name;
|
string name;
|
||||||
|
|
||||||
prompter.get_result(name);
|
prompter.get_result(name);
|
||||||
|
|
@ -918,6 +916,7 @@ PlugUIBase::save_plugin_setting ()
|
||||||
combo.set_active_text (name);
|
combo.set_active_text (name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -687,27 +687,25 @@ void
|
||||||
RouteUI::route_rename ()
|
RouteUI::route_rename ()
|
||||||
{
|
{
|
||||||
ArdourPrompter name_prompter (true);
|
ArdourPrompter name_prompter (true);
|
||||||
|
string result;
|
||||||
name_prompter.set_prompt (_("new name: "));
|
name_prompter.set_prompt (_("new name: "));
|
||||||
name_prompter.set_initial_text (_route.name());
|
name_prompter.set_initial_text (_route.name());
|
||||||
name_prompter.done.connect (Gtk::Main::quit.slot());
|
|
||||||
name_prompter.show_all ();
|
name_prompter.show_all ();
|
||||||
|
|
||||||
Gtk::Main::run();
|
switch (name_prompter.run ()) {
|
||||||
|
|
||||||
if (name_prompter.status == Gtkmm2ext::Prompter::cancelled) {
|
case GTK_RESPONSE_ACCEPT:
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
string result;
|
|
||||||
name_prompter.get_result (result);
|
name_prompter.get_result (result);
|
||||||
|
if (result.length()) {
|
||||||
if (result.length() == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
strip_whitespace_edges (result);
|
strip_whitespace_edges (result);
|
||||||
_route.set_name (result, this);
|
_route.set_name (result, this);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteUI::name_changed (void *src)
|
RouteUI::name_changed (void *src)
|
||||||
|
|
|
||||||
|
|
@ -360,8 +360,24 @@ VisualTimeAxis::start_time_axis_rename()
|
||||||
|
|
||||||
name_prompter->set_prompt (_("new name: ")) ;
|
name_prompter->set_prompt (_("new name: ")) ;
|
||||||
ARDOUR_UI::instance()->allow_focus(true) ;
|
ARDOUR_UI::instance()->allow_focus(true) ;
|
||||||
name_prompter->done.connect (mem_fun(*this, &VisualTimeAxis::finish_time_axis_rename)) ;
|
|
||||||
name_prompter->show_all() ;
|
name_prompter->show_all() ;
|
||||||
|
|
||||||
|
switch (name_prompter->run ()) {
|
||||||
|
case GTK_RESPONSE_ACCEPT:
|
||||||
|
string result;
|
||||||
|
name_prompter->get_result (result);
|
||||||
|
if (editor.get_named_time_axis(result) != 0) {
|
||||||
|
ARDOUR_UI::instance()->popup_error (_("A track already exists with that name"));
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
set_time_axis_name(result, this) ;
|
||||||
|
}
|
||||||
|
delete name_prompter ;
|
||||||
|
name_prompter = 0 ;
|
||||||
|
label_view() ;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -369,37 +385,7 @@ VisualTimeAxis::start_time_axis_rename()
|
||||||
*
|
*
|
||||||
* @see start_time_axis_rename()
|
* @see start_time_axis_rename()
|
||||||
*/
|
*/
|
||||||
void
|
|
||||||
VisualTimeAxis::finish_time_axis_rename()
|
|
||||||
{
|
|
||||||
name_prompter->hide_all () ;
|
|
||||||
ARDOUR_UI::instance()->allow_focus (false) ;
|
|
||||||
|
|
||||||
if (name_prompter->status == Gtkmm2ext::Prompter::cancelled)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
string result ;
|
|
||||||
name_prompter->get_result (result) ;
|
|
||||||
//time_axis_name = result ;
|
|
||||||
|
|
||||||
if (editor.get_named_time_axis(result) != 0) {
|
|
||||||
ARDOUR_UI::instance()->popup_error (_("A track already exists with that name"));
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
|
|
||||||
set_time_axis_name(result, this) ;
|
|
||||||
|
|
||||||
delete name_prompter ;
|
|
||||||
name_prompter = 0 ;
|
|
||||||
label_view() ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handle the (re-)displaying of the TimeAxis name label
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
void
|
void
|
||||||
VisualTimeAxis::label_view()
|
VisualTimeAxis::label_view()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -220,12 +220,6 @@ class VisualTimeAxis : public TimeAxisView
|
||||||
*
|
*
|
||||||
* @see start_time_axis_rename()
|
* @see start_time_axis_rename()
|
||||||
*/
|
*/
|
||||||
void finish_time_axis_rename() ;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handle the (re-)displaying of the TimeAxis name label
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
virtual void label_view() ;
|
virtual void label_view() ;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue