mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
the usual blob of fixes. note the requirement for ComboBoxText::set_active_text()
git-svn-id: svn://localhost/trunk/ardour2@160 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
7aee3d6fbf
commit
3436df6eab
21 changed files with 1029 additions and 598 deletions
|
|
@ -1,4 +1,5 @@
|
|||
<ui>
|
||||
|
||||
<menubar name='Main' action='MainMenu'>
|
||||
<menu name='Session' action='Session'>
|
||||
<menuitem action='New'/>
|
||||
|
|
@ -47,4 +48,30 @@
|
|||
<menuitem action='ToggleBigClock'/>
|
||||
</menu>
|
||||
</menubar>
|
||||
|
||||
<popup name='redirectmenu'>
|
||||
<menuitem action='newplugin'/>
|
||||
<menuitem action='newinsert'/>
|
||||
<menuitem action='newsend'/>
|
||||
<separator/>
|
||||
<menuitem action='clear'/>
|
||||
<separator/>
|
||||
<menuitem action='cut'/>
|
||||
<menuitem action='copy'/>
|
||||
<menuitem action='paste'/>
|
||||
<separator/>
|
||||
<menuitem action='rename'/>
|
||||
<separator/>
|
||||
<menuitem action='selectall'/>
|
||||
<menuitem action='deselectall'/>
|
||||
<separator/>
|
||||
<menuitem action='activate'/>
|
||||
<menuitem action='deactivate'/>
|
||||
<separator/>
|
||||
<menuitem action='activate_all'/>
|
||||
<menuitem action='deactivate_all'/>
|
||||
<separator/>
|
||||
<menuitem action='edit'/>
|
||||
</popup>
|
||||
|
||||
</ui>
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@
|
|||
#include "ardour_ui.h"
|
||||
|
||||
|
||||
ArdourDialog::ArdourDialog (string title, bool modal)
|
||||
: Dialog (title, modal)
|
||||
ArdourDialog::ArdourDialog (string title, bool modal, bool use_seperator)
|
||||
: Dialog (title, modal, use_seperator)
|
||||
{
|
||||
session = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace ARDOUR {
|
|||
class ArdourDialog : public Gtk::Dialog
|
||||
{
|
||||
public:
|
||||
ArdourDialog (std::string title, bool modal = false);
|
||||
ArdourDialog (std::string title, bool modal = false, bool use_separator = false);
|
||||
~ArdourDialog();
|
||||
|
||||
bool on_enter_notify_event (GdkEventCrossing*);
|
||||
|
|
|
|||
|
|
@ -30,14 +30,14 @@ using namespace Gtk;
|
|||
ArdourMessage::ArdourMessage (Gtk::Window* parent,
|
||||
string name, string msg,
|
||||
bool grab_focus, bool auto_run)
|
||||
: ArdourDialog (name)
|
||||
: ArdourDialog (name),
|
||||
label (msg, 0.5, 0.5)
|
||||
{
|
||||
label.set_text (msg);
|
||||
label.set_alignment (0.5, 0.5);
|
||||
label.set_name (X_("PrompterLabel"));
|
||||
label.show ();
|
||||
|
||||
get_vbox()->pack_start (label);
|
||||
|
||||
|
||||
Button* ok_button = add_button (Stock::OK, RESPONSE_ACCEPT);
|
||||
|
||||
set_name (X_("Prompter"));
|
||||
|
|
|
|||
|
|
@ -1087,7 +1087,7 @@ If you still wish to quit, please use the\n\n\
|
|||
}
|
||||
}
|
||||
|
||||
quit();
|
||||
quit ();
|
||||
}
|
||||
|
||||
int
|
||||
|
|
@ -1100,7 +1100,7 @@ ARDOUR_UI::ask_about_saving_session (string what)
|
|||
msg = string_compose(_("Save and %1"), what);
|
||||
window.add_button (msg, RESPONSE_ACCEPT);
|
||||
msg = string_compose(_("Just %1"), what);
|
||||
window.add_button (msg, RESPONSE_REJECT);
|
||||
window.add_button (msg, RESPONSE_APPLY);
|
||||
msg = string_compose(_("Don't %1"), what);
|
||||
window.add_button (msg, RESPONSE_REJECT);
|
||||
|
||||
|
|
@ -1138,7 +1138,9 @@ ARDOUR_UI::ask_about_saving_session (string what)
|
|||
window.hide ();
|
||||
|
||||
switch (r) {
|
||||
case RESPONSE_ACCEPT:
|
||||
case RESPONSE_ACCEPT: // save and get out of here
|
||||
return 1;
|
||||
case RESPONSE_APPLY: // get out of here
|
||||
return 0;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
public:
|
||||
ARDOUR_UI (int *argcp, char **argvp[], string rcfile);
|
||||
~ARDOUR_UI();
|
||||
|
||||
|
||||
void show ();
|
||||
bool shown() { return shown_flag; }
|
||||
|
||||
|
|
@ -700,4 +700,5 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
Glib::RefPtr<Gtk::ActionGroup> common_actions;
|
||||
};
|
||||
|
||||
|
||||
#endif /* __ardour_gui_h__ */
|
||||
|
|
|
|||
|
|
@ -5,32 +5,27 @@
|
|||
|
||||
style "very_small_text"
|
||||
{
|
||||
fontset="-*-helvetica-medium-r-normal-*-8-*-*-*-p-*-*-*"
|
||||
font ="-*-helvetica-medium-r-normal-*-*-80-*-*-p-*-*"
|
||||
font ="sans-8"
|
||||
}
|
||||
|
||||
style "small_text"
|
||||
{
|
||||
fontset="-*-helvetica-medium-r-normal-*-10-*-*-*-p-*-*-*"
|
||||
font ="-*-helvetica-medium-r-normal-*-*-100-*-*-p-*-*"
|
||||
font ="sans-10"
|
||||
}
|
||||
|
||||
style "small_bold_text"
|
||||
{
|
||||
fontset="-*-helvetica-bold-r-normal-*-10-*-*-*-p-*-*-*"
|
||||
font ="-*-helvetica-bold-r-normal-*-*-100-*-*-p-*-*"
|
||||
font="sans-bold-10"
|
||||
}
|
||||
|
||||
style "medium_bold_text"
|
||||
{
|
||||
fontset="-*-helvetica-bold-r-normal-*-12-*-*-*-p-*-*-*"
|
||||
font ="-*-helvetica-bold-r-normal-*-*-120-*-*-p-*-*"
|
||||
font ="sans-bold-12"
|
||||
}
|
||||
|
||||
style "medium_text"
|
||||
{
|
||||
fontset="-*-helvetica-medium-r-normal-*-12-*-*-*-p-*-*-*"
|
||||
font ="-*-helvetica-medium-r-normal-*-*-120-*-*-p-*-*"
|
||||
font="sans-12"
|
||||
}
|
||||
|
||||
style "red_medium_text" = "medium_text"
|
||||
|
|
@ -43,52 +38,48 @@ style "red_medium_text" = "medium_text"
|
|||
|
||||
style "large_text"
|
||||
{
|
||||
fontset="-*-helvetica-bold-r-normal-*-18-*-*-*-p-*-*-*"
|
||||
font ="-*-helvetica-bold-r-normal-*-*-180-*-*-p-*-*"
|
||||
font ="sans-18"
|
||||
}
|
||||
|
||||
style "larger_bold_text"
|
||||
{
|
||||
fontset="-*-helvetica-bold-r-normal-*-14-*-*-*-p-*-*-*"
|
||||
font ="-*-helvetica-bold-r-normal-*-*-140-*-*-p-*-*"
|
||||
font ="sans-14"
|
||||
}
|
||||
|
||||
style "plugin_name_text"
|
||||
{
|
||||
fontset="-*-helvetica-bold-o-*-*-25-*-*-*-p-*-*-*"
|
||||
font="-*-helvetica-bold-o-*-*-25-*-*-*-p-*-*-*"
|
||||
font="sans-bold-25"
|
||||
fg[NORMAL] = { 0.80, 0.80, 0.70 }
|
||||
}
|
||||
|
||||
style "plugin_maker_text"
|
||||
{
|
||||
fontset="-*-helvetica-bold-o-*-*-14-*-*-*-p-*-*-*"
|
||||
font="-*-helvetica-bold-o-*-*-14-*-*-*-p-*-*-*"
|
||||
font="sans-bold-14"
|
||||
fg[NORMAL] = { 0.80, 0.80, 0.70 }
|
||||
}
|
||||
|
||||
style "first_action_message"
|
||||
{
|
||||
font="-*-helvetica-medium-r-*-*-34-350-*-*-*-*-*-*"
|
||||
fontset="-*-helvetica-medium-r-*-*-34-350-*-*-*-*-*-*"
|
||||
font="mono-35"
|
||||
fontset="mono-35"
|
||||
}
|
||||
|
||||
style "verbose_canvas_cursor"
|
||||
{
|
||||
font="-*-helvetica-medium-r-*-*-*-240-*-*-*-*-*-*"
|
||||
fontset="-*-helvetica-medium-r-*-*-*-240-*-*-*-*-*-*"
|
||||
font="sans-24"
|
||||
fontset="sans-24"
|
||||
}
|
||||
|
||||
style "marker_text"
|
||||
{
|
||||
font="-*-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"
|
||||
fontset="-*-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"
|
||||
font="sans-10"
|
||||
fontset="sans-10"
|
||||
}
|
||||
|
||||
style "time_axis_view_item_name"
|
||||
{
|
||||
font="-*-helvetica-medium-r-normal-*-*-100-*-*-p-*-*-1"
|
||||
fontset="-*-helvetica-medium-r-normal-*-*-100-*-*-p-*-*-1"
|
||||
font="sans-10"
|
||||
fontset="sans-10"
|
||||
}
|
||||
|
||||
style "default_base" = "medium_text"
|
||||
|
|
@ -168,8 +159,8 @@ style "black_mackie_menu_bar" = "medium_bold_text"
|
|||
|
||||
style "default_buttons_menus" = "default_base"
|
||||
{
|
||||
fontset="-*-helvetica-medium-r-normal-*-12-*-*-*-p-*-*-*"
|
||||
font ="-*-helvetica-medium-r-normal-*-*-120-*-*-p-*-*"
|
||||
fontset="sans-12"
|
||||
font ="sans-12"
|
||||
|
||||
fg[ACTIVE] = { 0, 0, 0 }
|
||||
|
||||
|
|
@ -182,14 +173,14 @@ style "default_buttons_menus" = "default_base"
|
|||
|
||||
style "very_small_button" = "default_buttons_menus"
|
||||
{
|
||||
fontset="-*-helvetica-medium-r-normal-*-8-*-*-*-p-*-*-*"
|
||||
font ="-*-helvetica-medium-r-normal-*-*-80-*-*-p-*-*"
|
||||
fontset="sans-8"
|
||||
font ="sans-8"
|
||||
}
|
||||
|
||||
style "small_button" = "default_buttons_menus"
|
||||
{
|
||||
fontset="-*-helvetica-medium-r-normal-*-10-*-*-*-p-*-*-*"
|
||||
font ="-*-helvetica-medium-r-normal-*-*-100-*-*-p-*-*"
|
||||
fontset="sans-10"
|
||||
font ="sans-10"
|
||||
}
|
||||
|
||||
style "very_small_red_active_and_selected_button" = "very_small_button"
|
||||
|
|
@ -218,8 +209,8 @@ style "track_rec_enable_button" = "small_button"
|
|||
|
||||
style "mixer_rec_enable_button" = "track_rec_enable_button"
|
||||
{
|
||||
fontset="-*-helvetica-medium-r-normal-*-8-*-*-*-p-*-*-*"
|
||||
font ="-*-helvetica-medium-r-normal-*-*-80-*-*-p-*-*"
|
||||
fontset="sans-8"
|
||||
font ="sans-8"
|
||||
}
|
||||
|
||||
style "solo_button" = "small_button"
|
||||
|
|
@ -233,8 +224,8 @@ style "solo_button" = "small_button"
|
|||
|
||||
style "mixer_solo_button" = "solo_button"
|
||||
{
|
||||
fontset="-*-helvetica-medium-r-normal-*-8-*-*-*-p-*-*-*"
|
||||
font ="-*-helvetica-medium-r-normal-*-*-80-*-*-p-*-*"
|
||||
fontset="sans-8"
|
||||
font ="sans-8"
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -248,8 +239,8 @@ style "mute_button" = "small_button"
|
|||
|
||||
style "mixer_mute_button" = "mute_button"
|
||||
{
|
||||
fontset="-*-helvetica-medium-r-normal-*-8-*-*-*-p-*-*-*"
|
||||
font ="-*-helvetica-medium-r-normal-*-*-80-*-*-p-*-*"
|
||||
fontset="sans-8"
|
||||
font ="sans-8"
|
||||
}
|
||||
|
||||
style "track_loop_button" = "small_button"
|
||||
|
|
@ -270,8 +261,8 @@ style "mixer_red_active_button" = "very_small_button"
|
|||
|
||||
style "time_button" = "default_buttons_menus"
|
||||
{
|
||||
fontset="-*-helvetica-medium-r-normal-*-8-*-*-*-p-*-*-*"
|
||||
font ="-*-helvetica-medium-r-normal-*-*-80-*-*-p-*-*"
|
||||
fontset="sans-8"
|
||||
font ="sans-8"
|
||||
}
|
||||
|
||||
style "transport_button" = "very_small_button"
|
||||
|
|
@ -316,8 +307,8 @@ style "ardour_progressbars" = "default_buttons_menus"
|
|||
|
||||
style "options_window" = "default_base"
|
||||
{
|
||||
fontset="-*-helvetica-bold-r-normal-*-12-*-*-*-p-*-*-*"
|
||||
font ="-*-helvetica-bold-r-normal-*-*-120-*-*-p-*-*"
|
||||
fontset="sans-bold-12"
|
||||
font ="sans-bold-12"
|
||||
fg[PRELIGHT] = { 0.80, 0.80, 0.70 }
|
||||
}
|
||||
|
||||
|
|
@ -344,8 +335,8 @@ style "red_when_active" = "medium_text"
|
|||
|
||||
style "xrun_warn"
|
||||
{
|
||||
font ="-*-helvetica-bold-r-normal-*-*-180-*-*-p-*-*"
|
||||
fontset="-*-helvetica-bold-r-normal-*-18-*-*-*-p-*-*-*"
|
||||
font ="sans-bold-18"
|
||||
fontset="sans-bold-18"
|
||||
|
||||
fg[NORMAL] = { 1.0, 1.0, 1.0 }
|
||||
fg[ACTIVE] = { 1.0, 1.0, 1.0 }
|
||||
|
|
@ -482,14 +473,14 @@ style "small_red_on_black_entry" = "small_bold_text"
|
|||
|
||||
style "big_clock_display" = "medium_entry"
|
||||
{
|
||||
fontset = "-*-courier-bold-r-*-*-34-*-*-*-*-*-*-*"
|
||||
font = "-*-courier-bold-r-*-*-34-*-*-*-*-*-*-*"
|
||||
fontset = "sans-34"
|
||||
font = "sans-34"
|
||||
}
|
||||
|
||||
style "transport_clock_display"
|
||||
{
|
||||
fontset = "-*-helvetica-bold-r-*-*-18-*-*-*-*-*-*-*"
|
||||
font = "-*-helvetica-bold-r-*-*-18-*-*-*-*-*-*-*"
|
||||
fontset = "sans-bold-18"
|
||||
font = "sans-bold-18"
|
||||
|
||||
fg[NORMAL] = { 0.66, 0.97, 0.18 }
|
||||
fg[ACTIVE] = { 1.0, 0, 0.0 }
|
||||
|
|
@ -505,8 +496,8 @@ style "transport_clock_display"
|
|||
|
||||
style "tempo_meter_clock_display"
|
||||
{
|
||||
fontset = "-*-helvetica-bold-r-*-*-8-*-*-*-*-*-*-*"
|
||||
font = "-*-helvetica-bold-r-*-*-8-*-*-*-*-*-*-*"
|
||||
fontset = "sans-bold-8"
|
||||
font = "sans-bold-8"
|
||||
fg[NORMAL] = { 1.0, 1.0, 1.0 }
|
||||
fg[ACTIVE] = { 1.0, 1.0, 0.0 }
|
||||
fg[SELECTED] = { 1.0, 0, 0 }
|
||||
|
|
@ -814,7 +805,7 @@ style "meter_metrics_strip" = "default_base"
|
|||
|
||||
style "no_session_msg"
|
||||
{
|
||||
font = "-*-helvetica-medium-r-*-*-34-350-*-*-*-*-*-*"
|
||||
font = "sans-34"
|
||||
}
|
||||
|
||||
style "location_row_button" = "default_buttons_menus"
|
||||
|
|
|
|||
|
|
@ -237,6 +237,7 @@ AutomationLine::AutomationLine (string name, TimeAxisView& tv, ArdourCanvas::Gro
|
|||
|
||||
line = new ArdourCanvas::Line (*group);
|
||||
line->property_width_pixels() = (guint)1;
|
||||
line->set_data ("line", this);
|
||||
|
||||
line->signal_event().connect (mem_fun (*this, &AutomationLine::event_handler));
|
||||
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ Editor::Editor (AudioEngine& eng)
|
|||
initialize_canvas ();
|
||||
|
||||
track_canvas_scroller.add (track_canvas);
|
||||
track_canvas_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_NEVER);
|
||||
track_canvas_scroller.set_policy (POLICY_NEVER, POLICY_NEVER);
|
||||
track_canvas_scroller.set_name ("TrackCanvasScroller");
|
||||
|
||||
track_canvas_scroller.get_vadjustment()->signal_value_changed().connect (mem_fun(*this, &Editor::tie_vertical_scrolling));
|
||||
|
|
@ -343,7 +343,7 @@ Editor::Editor (AudioEngine& eng)
|
|||
edit_hscrollbar.signal_size_allocate().connect (mem_fun(*this, &Editor::hscroll_slider_allocate));
|
||||
|
||||
time_canvas_scroller.add (time_canvas);
|
||||
time_canvas_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_NEVER);
|
||||
time_canvas_scroller.set_policy (POLICY_NEVER, POLICY_NEVER);
|
||||
time_canvas_scroller.set_hadjustment (*track_canvas_scroller.get_hadjustment());
|
||||
time_canvas_scroller.set_name ("TimeCanvasScroller");
|
||||
|
||||
|
|
@ -441,17 +441,14 @@ Editor::Editor (AudioEngine& eng)
|
|||
edit_packer.set_homogeneous (false);
|
||||
edit_packer.set_name ("EditorWindow");
|
||||
|
||||
// edit_packer.attach (edit_hscroll_left_arrow_event, 0, 1, 0, 1, Gtk::FILL, 0, 0, 0);
|
||||
// edit_packer.attach (edit_hscroll_slider, 1, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, 0, 0, 0);
|
||||
// edit_packer.attach (edit_hscroll_right_arrow_event, 2, 3, 0, 1, Gtk::FILL, 0, 0, 0);
|
||||
edit_packer.attach (edit_hscrollbar, 1, 2, 0, 1, FILL|EXPAND, FILL, 0, 0);
|
||||
|
||||
edit_packer.attach (time_button_event_box, 0, 1, 1, 2, FILL, FILL, 0, 0);
|
||||
edit_packer.attach (time_button_event_box, 0, 1, 1, 2, FILL, FILL, 0, 0);
|
||||
edit_packer.attach (time_canvas_event_box, 1, 2, 1, 2, FILL|EXPAND, FILL, 0, 0);
|
||||
|
||||
edit_packer.attach (edit_controls_scroller, 0, 1, 2, 3, FILL, FILL|EXPAND, 0, 0);
|
||||
edit_packer.attach (edit_controls_scroller, 0, 1, 2, 3, FILL,FILL, 0, 0);
|
||||
edit_packer.attach (track_canvas_event_box, 1, 2, 2, 3, FILL|EXPAND, FILL|EXPAND, 0, 0);
|
||||
edit_packer.attach (edit_vscrollbar, 2, 3, 2, 3, FILL, FILL|EXPAND, 0, 0);
|
||||
edit_packer.attach (edit_vscrollbar, 2, 3, 2, 3, FILL, FILL|EXPAND, 0, 0);
|
||||
|
||||
edit_frame.set_name ("BaseFrame");
|
||||
edit_frame.set_shadow_type (SHADOW_IN);
|
||||
|
|
@ -462,38 +459,30 @@ Editor::Editor (AudioEngine& eng)
|
|||
ARDOUR_UI::instance()->tooltips().set_tip (zoom_in_button, _("Zoom in"));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (zoom_out_button, _("Zoom out"));
|
||||
|
||||
// zoom_onetoone_button.set_name ("EditorTimeButton");
|
||||
zoom_out_full_button.set_name ("EditorTimeButton");
|
||||
// ARDOUR_UI::instance()->tooltips().set_tip (zoom_onetoone_button, _("Zoom in 1:1"));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (zoom_out_full_button, _("Zoom to session"));
|
||||
|
||||
zoom_in_button.add (*(manage (new Gtk::Image (Gdk::Pixbuf::create_from_xpm_data(zoom_in_button_xpm)))));
|
||||
zoom_out_button.add (*(manage (new Gtk::Image (Gdk::Pixbuf::create_from_xpm_data(zoom_out_button_xpm)))));
|
||||
zoom_out_full_button.add (*(manage (new Gtk::Image (Gdk::Pixbuf::create_from_xpm_data(zoom_out_full_button_xpm)))));
|
||||
// zoom_onetoone_button.add (*(manage (new Gtk::Image (zoom_onetoone_button_xpm))));
|
||||
|
||||
|
||||
zoom_in_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::temporal_zoom_step), false));
|
||||
zoom_out_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::temporal_zoom_step), true));
|
||||
zoom_out_full_button.signal_clicked().connect (mem_fun(*this, &Editor::temporal_zoom_session));
|
||||
// zoom_onetoone_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::temporal_zoom), 1.0));
|
||||
|
||||
zoom_indicator_box.pack_start (zoom_out_button, false, false);
|
||||
zoom_indicator_box.pack_start (zoom_in_button, false, false);
|
||||
zoom_indicator_box.pack_start (zoom_range_clock, false, false);
|
||||
// zoom_indicator_box.pack_start (zoom_onetoone_button, false, false);
|
||||
zoom_indicator_box.pack_start (zoom_out_full_button, false, false);
|
||||
|
||||
zoom_indicator_label.set_text (_("Zoom Span"));
|
||||
zoom_indicator_label.set_name ("ToolBarLabel");
|
||||
|
||||
|
||||
zoom_indicator_vbox.set_spacing (3);
|
||||
zoom_indicator_vbox.set_border_width (3);
|
||||
zoom_indicator_vbox.pack_start (zoom_indicator_label, false, false);
|
||||
zoom_indicator_vbox.pack_start (zoom_indicator_box, false, false);
|
||||
|
||||
|
||||
bottom_hbox.set_border_width (3);
|
||||
bottom_hbox.set_spacing (3);
|
||||
|
||||
|
|
@ -1008,73 +997,6 @@ Editor::on_realize ()
|
|||
null_cursor = new Gdk::Cursor(empty_pixmap, empty_bitmap, white, white, 0, 0);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::track_canvas_allocate (Gtk::Allocation alloc)
|
||||
{
|
||||
canvas_width = alloc.get_width();
|
||||
canvas_height = alloc.get_height();
|
||||
|
||||
if (session == 0 && !ARDOUR_UI::instance()->will_create_new_session_automatically()) {
|
||||
|
||||
Pango::FontDescription font = get_font_for_style (N_("FirstActionMessage"));
|
||||
|
||||
const char *txt1 = _("Start a new session\n");
|
||||
const char *txt2 = _("via Session menu");
|
||||
|
||||
/* this mess of code is here to find out how wide this text is and
|
||||
position the message in the center of the editor window. there
|
||||
are two lines, so we use the longer of the the lines to
|
||||
compute width, and multiply the height by 2.
|
||||
*/
|
||||
|
||||
int pixel_height;
|
||||
int pixel_width;
|
||||
|
||||
/* this is a dummy widget that exists so that we can get the
|
||||
style from the RC file.
|
||||
*/
|
||||
|
||||
Label foo (_(txt2));
|
||||
Glib::RefPtr<Pango::Layout> layout;
|
||||
foo.set_name ("NoSessionMessage");
|
||||
foo.ensure_style ();
|
||||
|
||||
layout = foo.create_pango_layout (_(txt2));
|
||||
layout->set_font_description (font);
|
||||
layout->get_pixel_size (pixel_width, pixel_height);
|
||||
|
||||
if (first_action_message == 0) {
|
||||
|
||||
char txt[strlen(txt1)+strlen(txt2)+1];
|
||||
|
||||
/* merge both lines */
|
||||
|
||||
strcpy (txt, _(txt1));
|
||||
strcat (txt, _(txt2));
|
||||
|
||||
first_action_message = new ArdourCanvas::Text (*track_canvas.root());
|
||||
first_action_message->property_font_desc() = font;
|
||||
first_action_message->property_fill_color_rgba() = color_map[cFirstActionMessage];
|
||||
first_action_message->property_x() = (gdouble) (canvas_width - pixel_width) / 2.0;
|
||||
first_action_message->property_y() = (gdouble) (canvas_height/2.0) - (2.0 * (pixel_height));
|
||||
first_action_message->property_anchor() = ANCHOR_NORTH_WEST;
|
||||
first_action_message->property_text() = ustring (txt);
|
||||
|
||||
} else {
|
||||
|
||||
/* center it */
|
||||
first_action_message->property_x() = (gdouble) (canvas_width - pixel_width) / 2.0;
|
||||
first_action_message->property_y() = (gdouble) (canvas_height/2.0) - (2.0 * (pixel_height));
|
||||
}
|
||||
}
|
||||
|
||||
zoom_range_clock.set ((jack_nframes_t) (canvas_width * frames_per_unit));
|
||||
edit_cursor->set_position (edit_cursor->current_frame);
|
||||
playhead_cursor->set_position (playhead_cursor->current_frame);
|
||||
reset_scrolling_region (&alloc);
|
||||
|
||||
Resized (); /* EMIT_SIGNAL */
|
||||
}
|
||||
|
||||
void
|
||||
Editor::queue_session_control_changed (Session::ControlType t)
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include <libgnomecanvasmm/init.h>
|
||||
#include <jack/types.h>
|
||||
|
||||
#include "ardour_ui.h"
|
||||
#include "editor.h"
|
||||
#include "waveview.h"
|
||||
#include "simplerect.h"
|
||||
|
|
@ -82,10 +83,10 @@ Editor::initialize_canvas ()
|
|||
{
|
||||
ArdourCanvas::init ();
|
||||
ardour_canvas_type_init ();
|
||||
|
||||
/* don't try to center the canvas */
|
||||
|
||||
/* adjust sensitivity for "picking" items */
|
||||
|
||||
// GNOME_CANVAS(track_canvas)->close_enough = 2;
|
||||
track_canvas.set_center_scroll_region (false);
|
||||
|
||||
track_canvas.signal_event().connect (bind (mem_fun (*this, &Editor::track_canvas_event), (ArdourCanvas::Item*) 0));
|
||||
track_canvas.set_name ("EditorMainCanvas");
|
||||
|
|
@ -259,67 +260,92 @@ Editor::initialize_canvas ()
|
|||
}
|
||||
|
||||
void
|
||||
Editor::reset_scrolling_region (Gtk::Allocation* alloc)
|
||||
Editor::track_canvas_allocate (Gtk::Allocation alloc)
|
||||
{
|
||||
guint32 last_canvas_unit;
|
||||
double height;
|
||||
guint32 canvas_alloc_height, canvas_alloc_width;
|
||||
TrackViewList::iterator i;
|
||||
static bool first_time = true;
|
||||
|
||||
/* We need to make sure that the canvas always has its
|
||||
scrolling region set to larger of:
|
||||
canvas_width = alloc.get_width();
|
||||
canvas_height = alloc.get_height();
|
||||
|
||||
- the size allocated for it (within the container its packed in)
|
||||
- the size required to see the entire session
|
||||
if (session == 0 && !ARDOUR_UI::instance()->will_create_new_session_automatically()) {
|
||||
|
||||
If we don't ensure at least the first of these, the canvas
|
||||
does some wierd and in my view unnecessary stuff to center
|
||||
itself within the allocated area, which causes bad, bad
|
||||
results.
|
||||
|
||||
XXX GnomeCanvas has fixed this, and has an option to
|
||||
control the centering behaviour.
|
||||
*/
|
||||
Pango::FontDescription font = get_font_for_style (N_("FirstActionMessage"));
|
||||
|
||||
last_canvas_unit = (guint32) ceil ((float) max_frames / frames_per_unit);
|
||||
cerr << "font for style = "
|
||||
<< font.get_family() << ' '
|
||||
<< font.get_size() << ' '
|
||||
<< font.get_weight() << ' '
|
||||
<< font.get_variant() << ' '
|
||||
<< endmsg;
|
||||
|
||||
height = 0;
|
||||
const char *txt1 = _("Start a new session\n");
|
||||
const char *txt2 = _("via Session menu");
|
||||
|
||||
if (session) {
|
||||
for (i = track_views.begin(); i != track_views.end(); ++i) {
|
||||
if ((*i)->control_parent) {
|
||||
height += (*i)->effective_height;
|
||||
height += track_spacing;
|
||||
}
|
||||
}
|
||||
/* this mess of code is here to find out how wide this text is and
|
||||
position the message in the center of the editor window. there
|
||||
are two lines, so we use the longer of the the lines to
|
||||
compute width, and multiply the height by 2.
|
||||
*/
|
||||
|
||||
int pixel_height;
|
||||
int pixel_width;
|
||||
|
||||
if (height) {
|
||||
height -= track_spacing;
|
||||
/* this is a dummy widget that exists so that we can get the
|
||||
style from the RC file.
|
||||
*/
|
||||
|
||||
Label foo (_(txt2));
|
||||
Glib::RefPtr<Pango::Layout> layout;
|
||||
|
||||
top_hbox.pack_start (foo);
|
||||
foo.set_name ("FirstActionMessage");
|
||||
foo.ensure_style ();
|
||||
|
||||
layout = foo.create_pango_layout (_(txt2));
|
||||
layout->set_font_description (font);
|
||||
layout->set_font_description (font);
|
||||
layout->get_pixel_size (pixel_width, pixel_height);
|
||||
|
||||
top_hbox.remove (foo);
|
||||
|
||||
if (first_action_message == 0) {
|
||||
|
||||
char txt[strlen(txt1)+strlen(txt2)+1];
|
||||
|
||||
/* merge both lines */
|
||||
|
||||
strcpy (txt, _(txt1));
|
||||
strcat (txt, _(txt2));
|
||||
|
||||
first_action_message = new ArdourCanvas::Text (*track_canvas.root());
|
||||
first_action_message->property_font_desc() = font;
|
||||
first_action_message->property_fill_color_rgba() = color_map[cFirstActionMessage];
|
||||
first_action_message->property_x() = (gdouble) (canvas_width - pixel_width) / 2.0;
|
||||
first_action_message->property_y() = (gdouble) (canvas_height/2.0) - (2.0 * (pixel_height));
|
||||
first_action_message->property_anchor() = ANCHOR_NORTH_WEST;
|
||||
first_action_message->property_text() = ustring (txt);
|
||||
|
||||
} else {
|
||||
|
||||
/* center it */
|
||||
first_action_message->property_x() = (gdouble) (canvas_width - pixel_width) / 2.0;
|
||||
first_action_message->property_y() = (gdouble) (canvas_height/2.0) - (2.0 * (pixel_height));
|
||||
}
|
||||
}
|
||||
|
||||
canvas_height = (guint32) height;
|
||||
|
||||
if (alloc) {
|
||||
canvas_alloc_height = alloc->get_height();
|
||||
canvas_alloc_width = alloc->get_width();
|
||||
} else {
|
||||
canvas_alloc_height = track_canvas.get_height();
|
||||
canvas_alloc_width = track_canvas.get_width();
|
||||
}
|
||||
zoom_range_clock.set ((jack_nframes_t) (canvas_width * frames_per_unit));
|
||||
edit_cursor->set_position (edit_cursor->current_frame);
|
||||
playhead_cursor->set_position (playhead_cursor->current_frame);
|
||||
reset_scrolling_region (&alloc);
|
||||
|
||||
canvas_height = max (canvas_height, canvas_alloc_height);
|
||||
track_canvas.set_scroll_region ( 0.0, 0.0, max (last_canvas_unit, canvas_alloc_width), canvas_height);
|
||||
|
||||
if (edit_cursor) edit_cursor->set_length (canvas_alloc_height);
|
||||
if (playhead_cursor) playhead_cursor->set_length (canvas_alloc_height);
|
||||
if (edit_cursor) edit_cursor->set_length (canvas_height);
|
||||
if (playhead_cursor) playhead_cursor->set_length (canvas_height);
|
||||
|
||||
if (marker_drag_line) {
|
||||
marker_drag_line_points.back().set_x(canvas_height);
|
||||
// cerr << "set mlA points, nc = " << marker_drag_line_points.num_points << endl;
|
||||
marker_drag_line->property_points() = marker_drag_line_points;
|
||||
}
|
||||
|
||||
if (range_marker_drag_rect) {
|
||||
range_marker_drag_rect->property_y1() = 0.0;
|
||||
range_marker_drag_rect->property_y2() = (double) canvas_height;
|
||||
|
|
@ -353,6 +379,65 @@ Editor::reset_scrolling_region (Gtk::Allocation* alloc)
|
|||
} else {
|
||||
redisplay_tempo ();
|
||||
}
|
||||
|
||||
Resized (); /* EMIT_SIGNAL */
|
||||
}
|
||||
|
||||
void
|
||||
Editor::reset_scrolling_region (Gtk::Allocation* alloc)
|
||||
{
|
||||
guint32 last_canvas_unit;
|
||||
double height;
|
||||
guint32 canvas_alloc_height, canvas_alloc_width;
|
||||
TrackViewList::iterator i;
|
||||
|
||||
/* We need to make sure that the canvas always has its
|
||||
scrolling region set to larger of:
|
||||
|
||||
- the size allocated for it (within the container its packed in)
|
||||
- the size required to see the entire session
|
||||
|
||||
If we don't ensure at least the first of these, the canvas
|
||||
does some wierd and in my view unnecessary stuff to center
|
||||
itself within the allocated area, which causes bad, bad
|
||||
results.
|
||||
|
||||
XXX GnomeCanvas has fixed this, and has an option to
|
||||
control the centering behaviour.
|
||||
*/
|
||||
|
||||
#if 0
|
||||
last_canvas_unit = (guint32) ceil ((float) max_frames / frames_per_unit);
|
||||
|
||||
height = 0;
|
||||
|
||||
if (session) {
|
||||
for (i = track_views.begin(); i != track_views.end(); ++i) {
|
||||
if ((*i)->control_parent) {
|
||||
height += (*i)->effective_height;
|
||||
height += track_spacing;
|
||||
}
|
||||
}
|
||||
|
||||
if (height) {
|
||||
height -= track_spacing;
|
||||
}
|
||||
}
|
||||
|
||||
canvas_height = (guint32) height;
|
||||
#endif
|
||||
|
||||
if (alloc) {
|
||||
canvas_alloc_height = alloc->get_height();
|
||||
canvas_alloc_width = alloc->get_width();
|
||||
} else {
|
||||
canvas_alloc_height = track_canvas.get_height();
|
||||
canvas_alloc_width = track_canvas.get_width();
|
||||
}
|
||||
|
||||
canvas_height = 0;
|
||||
canvas_height = max (canvas_height, canvas_alloc_height);
|
||||
track_canvas.set_scroll_region ( 0.0, 0.0, max (last_canvas_unit, canvas_alloc_width), canvas_height);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id$
|
||||
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
|
|
@ -98,26 +100,17 @@ ExportDialog::ExportDialog(PublicEditor& e, AudioRegion* r)
|
|||
editor (e),
|
||||
format_table (9, 2),
|
||||
format_frame (_("FORMAT")),
|
||||
channel_count_label (_("CHANNELS")),
|
||||
channel_count_align(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, 0.0, 0.0),
|
||||
header_format_label (_("FILE TYPE")),
|
||||
header_format_align(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, 0.0, 0.0),
|
||||
bitdepth_format_label (_("SAMPLE FORMAT")),
|
||||
bitdepth_format_align(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, 0.0, 0.0),
|
||||
endian_format_label (_("SAMPLE ENDIANNESS")),
|
||||
endian_format_align(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, 0.0, 0.0),
|
||||
sample_rate_label (_("SAMPLE RATE")),
|
||||
sample_rate_align(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, 0.0, 0.0),
|
||||
src_quality_label (_("CONVERSION QUALITY")),
|
||||
src_quality_align(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, 0.0, 0.0),
|
||||
dither_type_label (_("DITHER TYPE")),
|
||||
dither_type_align(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, 0.0, 0.0),
|
||||
cue_file_label (_("CD MARKER FILE TYPE")),
|
||||
cue_file_align(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, 0.0, 0.0),
|
||||
cue_file_label (_("CD MARKER FILE TYPE"), 1.0, 0.5),
|
||||
channel_count_label (_("CHANNELS"), 1.0, 0.5),
|
||||
header_format_label (_("FILE TYPE"), 1.0, 0.5),
|
||||
bitdepth_format_label (_("SAMPLE FORMAT"), 1.0, 0.5),
|
||||
endian_format_label (_("SAMPLE ENDIANNESS"), 1.0, 0.5),
|
||||
sample_rate_label (_("SAMPLE RATE"), 1.0, 0.5),
|
||||
src_quality_label (_("CONVERSION QUALITY"), 1.0, 0.5),
|
||||
dither_type_label (_("DITHER TYPE"), 1.0, 0.5),
|
||||
cuefile_only_checkbox (_("EXPORT CD MARKER FILE ONLY")),
|
||||
file_frame (_("EXPORT TO FILE")),
|
||||
file_browse_button (_("Browse")),
|
||||
ok_button (_("Export")),
|
||||
track_selector_button (_("Specific tracks ..."))
|
||||
{
|
||||
guint32 n;
|
||||
|
|
@ -207,7 +200,6 @@ ExportDialog::ExportDialog(PublicEditor& e, AudioRegion* r)
|
|||
track_selector_button.set_name ("EditorGTKButton");
|
||||
track_selector_button.signal_clicked().connect (mem_fun(*this, &ExportDialog::track_selector_button_click));
|
||||
|
||||
get_vbox()->pack_start (button_box, false, false);
|
||||
get_vbox()->pack_start (progress_bar, false, false);
|
||||
|
||||
Gtkmm2ext::set_size_request_to_display_given_text (file_entry, X_("Kg/quite/a/reasonable/size/for/files/i/think"), 5, 8);
|
||||
|
|
@ -222,23 +214,33 @@ ExportDialog::ExportDialog(PublicEditor& e, AudioRegion* r)
|
|||
file_frame.set_name (FRAME_NAME);
|
||||
|
||||
/* pop_strings needs to be created on the stack because set_popdown_strings()
|
||||
* takes a reference. */
|
||||
takes a reference.
|
||||
*/
|
||||
|
||||
vector<string> pop_strings = internationalize(sample_rates);
|
||||
Gtkmm2ext::set_popdown_strings (sample_rate_combo, pop_strings);
|
||||
pop_strings = internationalize(sample_rates);
|
||||
sample_rate_combo.set_active_text (pop_strings.front());
|
||||
pop_strings = internationalize(src_quality);
|
||||
Gtkmm2ext::set_popdown_strings (src_quality_combo, pop_strings);
|
||||
src_quality_combo.set_active_text (pop_strings.front());
|
||||
pop_strings = internationalize(dither_types);
|
||||
Gtkmm2ext::set_popdown_strings (dither_type_combo, pop_strings);
|
||||
dither_type_combo.set_active_text (pop_strings.front());
|
||||
pop_strings = internationalize(channel_strings);
|
||||
Gtkmm2ext::set_popdown_strings (channel_count_combo, pop_strings);
|
||||
channel_count_combo.set_active_text (pop_strings.front());
|
||||
pop_strings = internationalize((const char **) sndfile_header_formats_strings);
|
||||
Gtkmm2ext::set_popdown_strings (header_format_combo, pop_strings);
|
||||
header_format_combo.set_active_text (pop_strings.front());
|
||||
pop_strings = internationalize((const char **) sndfile_bitdepth_formats_strings);
|
||||
Gtkmm2ext::set_popdown_strings (bitdepth_format_combo, pop_strings);
|
||||
bitdepth_format_combo.set_active_text (pop_strings.front());
|
||||
pop_strings = internationalize((const char **) sndfile_endian_formats_strings);
|
||||
Gtkmm2ext::set_popdown_strings (endian_format_combo, pop_strings);
|
||||
endian_format_combo.set_active_text (pop_strings.front());
|
||||
pop_strings = internationalize(cue_file_types);
|
||||
Gtkmm2ext::set_popdown_strings (cue_file_combo, pop_strings);
|
||||
cue_file_combo.set_active_text (pop_strings.front());
|
||||
|
||||
/* this will re-sensitized as soon as a non RIFF/WAV
|
||||
header format is chosen.
|
||||
|
|
@ -322,57 +324,40 @@ ExportDialog::ExportDialog(PublicEditor& e, AudioRegion* r)
|
|||
format_table.set_row_spacings (5);
|
||||
|
||||
if (!audio_region) {
|
||||
channel_count_align.add(channel_count_label);
|
||||
format_table.attach (channel_count_align, 0, 1, 0, 1);
|
||||
format_table.attach (channel_count_label, 0, 1, 0, 1);
|
||||
format_table.attach (channel_count_combo, 1, 2, 0, 1);
|
||||
}
|
||||
|
||||
header_format_align.add(header_format_label);
|
||||
format_table.attach (header_format_align, 0, 1, 1, 2);
|
||||
format_table.attach (header_format_label, 0, 1, 1, 2);
|
||||
format_table.attach (header_format_combo, 1, 2, 1, 2);
|
||||
|
||||
bitdepth_format_align.add(bitdepth_format_label);
|
||||
format_table.attach (bitdepth_format_align, 0, 1, 2, 3);
|
||||
format_table.attach (bitdepth_format_label, 0, 1, 2, 3);
|
||||
format_table.attach (bitdepth_format_combo, 1, 2, 2, 3);
|
||||
|
||||
endian_format_align.add(endian_format_label);
|
||||
format_table.attach (endian_format_align, 0, 1, 3, 4);
|
||||
format_table.attach (endian_format_label, 0, 1, 3, 4);
|
||||
format_table.attach (endian_format_combo, 1, 2, 3, 4);
|
||||
|
||||
sample_rate_align.add(sample_rate_label);
|
||||
format_table.attach (sample_rate_align, 0, 1, 4, 5);
|
||||
format_table.attach (sample_rate_label, 0, 1, 4, 5);
|
||||
format_table.attach (sample_rate_combo, 1, 2, 4, 5);
|
||||
|
||||
src_quality_align.add(src_quality_label);
|
||||
format_table.attach (src_quality_align, 0, 1, 5, 6);
|
||||
format_table.attach (src_quality_label, 0, 1, 5, 6);
|
||||
format_table.attach (src_quality_combo, 1, 2, 5, 6);
|
||||
|
||||
dither_type_align.add(dither_type_label);
|
||||
format_table.attach (dither_type_align, 0, 1, 6, 7);
|
||||
format_table.attach (dither_type_label, 0, 1, 6, 7);
|
||||
format_table.attach (dither_type_combo, 1, 2, 6, 7);
|
||||
|
||||
cue_file_align.add(cue_file_label);
|
||||
format_table.attach (cue_file_align, 0, 1, 7, 8);
|
||||
format_table.attach (cue_file_label, 0, 1, 7, 8);
|
||||
format_table.attach (cue_file_combo, 1, 2, 7, 8);
|
||||
format_table.attach (cuefile_only_checkbox, 0, 2, 8, 9);
|
||||
|
||||
|
||||
button_box.set_border_width (6);
|
||||
button_box.set_spacing (20);
|
||||
button_box.set_homogeneous (true);
|
||||
|
||||
cancel_button.add (cancel_label);
|
||||
|
||||
button_box.pack_start (ok_button, false, true);
|
||||
button_box.pack_start (cancel_button, false, true);
|
||||
|
||||
ok_button.set_name ("EditorGTKButton");
|
||||
cancel_button.set_name ("EditorGTKButton");
|
||||
file_entry.set_name ("ExportFileDisplay");
|
||||
|
||||
signal_delete_event().connect (mem_fun(*this, &ExportDialog::window_closed));
|
||||
ok_button.signal_clicked().connect (mem_fun(*this, &ExportDialog::do_export));
|
||||
cancel_button.signal_clicked().connect (mem_fun(*this, &ExportDialog::end_dialog));
|
||||
|
||||
ok_button = add_button (Stock::OK, RESPONSE_ACCEPT);
|
||||
ok_button->signal_clicked().connect (mem_fun(*this, &ExportDialog::do_export));
|
||||
cancel_button = add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
||||
cancel_button->signal_clicked().connect (mem_fun(*this, &ExportDialog::end_dialog));
|
||||
|
||||
file_browse_button.set_name ("EditorGTKButton");
|
||||
file_browse_button.signal_clicked().connect (mem_fun(*this, &ExportDialog::initiate_browse));
|
||||
|
|
@ -947,9 +932,9 @@ ExportDialog::do_export ()
|
|||
return;
|
||||
}
|
||||
|
||||
ok_button.set_sensitive(false);
|
||||
ok_button->set_sensitive(false);
|
||||
save_state();
|
||||
|
||||
|
||||
set_modal (true);
|
||||
|
||||
spec.path = filepath;
|
||||
|
|
@ -1123,7 +1108,7 @@ ExportDialog::end_dialog ()
|
|||
}
|
||||
|
||||
set_modal (false);
|
||||
ok_button.set_sensitive(true);
|
||||
ok_button->set_sensitive(true);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -76,43 +76,34 @@ class ExportDialog : public ArdourDialog
|
|||
ARDOUR::AudioRegion* audio_region;
|
||||
Gtk::VBox track_vpacker;
|
||||
Gtk::HBox hpacker;
|
||||
Gtk::HBox button_box;
|
||||
|
||||
Gtk::Table format_table;
|
||||
Gtk::Frame format_frame;
|
||||
|
||||
Gtk::Label cue_file_label;
|
||||
Gtk::ComboBoxText cue_file_combo;
|
||||
|
||||
Gtk::Label channel_count_label;
|
||||
Gtk::Alignment channel_count_align;
|
||||
Gtk::ComboBoxText channel_count_combo;
|
||||
|
||||
Gtk::Label header_format_label;
|
||||
Gtk::Alignment header_format_align;
|
||||
Gtk::ComboBoxText header_format_combo;
|
||||
|
||||
Gtk::Label bitdepth_format_label;
|
||||
Gtk::Alignment bitdepth_format_align;
|
||||
Gtk::ComboBoxText bitdepth_format_combo;
|
||||
|
||||
Gtk::Label endian_format_label;
|
||||
Gtk::Alignment endian_format_align;
|
||||
Gtk::ComboBoxText endian_format_combo;
|
||||
|
||||
Gtk::Label sample_rate_label;
|
||||
Gtk::Alignment sample_rate_align;
|
||||
Gtk::ComboBoxText sample_rate_combo;
|
||||
|
||||
Gtk::Label src_quality_label;
|
||||
Gtk::Alignment src_quality_align;
|
||||
Gtk::ComboBoxText src_quality_combo;
|
||||
|
||||
Gtk::Label dither_type_label;
|
||||
Gtk::Alignment dither_type_align;
|
||||
Gtk::ComboBoxText dither_type_combo;
|
||||
|
||||
Gtk::Label cue_file_label;
|
||||
Gtk::Alignment cue_file_align;
|
||||
Gtk::ComboBoxText cue_file_combo;
|
||||
|
||||
Gtk::CheckButton cuefile_only_checkbox;
|
||||
|
||||
Gtk::Frame file_frame;
|
||||
|
|
@ -120,8 +111,8 @@ class ExportDialog : public ArdourDialog
|
|||
Gtk::HBox file_hbox;
|
||||
Gtk::Button file_browse_button;
|
||||
|
||||
Gtk::Button ok_button;
|
||||
Gtk::Button cancel_button;
|
||||
Gtk::Button* ok_button;
|
||||
Gtk::Button* cancel_button;
|
||||
Gtk::Label cancel_label;
|
||||
Gtk::ProgressBar progress_bar;
|
||||
Gtk::ScrolledWindow track_scroll;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -322,7 +322,7 @@ int
|
|||
main (int argc, char *argv[])
|
||||
{
|
||||
ARDOUR::AudioEngine *engine;
|
||||
char *null_file_list[] = { 0 };
|
||||
vector<Glib::ustring> null_file_list;
|
||||
|
||||
gtk_set_locale ();
|
||||
|
||||
|
|
@ -337,7 +337,6 @@ main (int argc, char *argv[])
|
|||
text_receiver.listen_to (info);
|
||||
text_receiver.listen_to (fatal);
|
||||
text_receiver.listen_to (warning);
|
||||
|
||||
|
||||
if (parse_opts (argc, argv)) {
|
||||
exit (1);
|
||||
|
|
@ -357,8 +356,8 @@ main (int argc, char *argv[])
|
|||
unsetenv("GTK_RC_FILES");
|
||||
}
|
||||
|
||||
gtk_rc_set_default_files (null_file_list);
|
||||
|
||||
RC::set_default_files (null_file_list);
|
||||
|
||||
cout << _("Ardour/GTK ")
|
||||
<< VERSIONSTRING
|
||||
<< _("\n (built using ")
|
||||
|
|
@ -411,17 +410,13 @@ main (int argc, char *argv[])
|
|||
engine = new ARDOUR::AudioEngine (jack_client_name);
|
||||
ARDOUR::init (*engine, use_vst, try_hw_optimization, handler2);
|
||||
ui->set_engine (*engine);
|
||||
}
|
||||
|
||||
catch (AudioEngine::NoBackendAvailable& err) {
|
||||
} catch (AudioEngine::NoBackendAvailable& err) {
|
||||
gui_jack_error ();
|
||||
error << string_compose (_("Could not connect to JACK server as \"%1\""), jack_client_name) << endmsg;
|
||||
return -1;
|
||||
}
|
||||
|
||||
catch (failed_constructor& err) {
|
||||
} catch (failed_constructor& err) {
|
||||
error << _("could not initialize Ardour.") << endmsg;
|
||||
exit (1);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* load session, if given */
|
||||
|
|
@ -484,9 +479,10 @@ To create it from the command line, start ardour as \"ardour --new %1"), path)
|
|||
}
|
||||
}
|
||||
|
||||
ui->run (text_receiver);
|
||||
if (!ui->set_quit_context ()) {
|
||||
ui->run (text_receiver);
|
||||
}
|
||||
|
||||
delete ui;
|
||||
ui = 0;
|
||||
|
||||
out:
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ using namespace ARDOUR;
|
|||
using namespace Gtk;
|
||||
|
||||
PluginSelector::PluginSelector (PluginManager *mgr)
|
||||
: Dialog (_("ardour: plugins"), true, false)
|
||||
: ArdourDialog (_("ardour: plugins"), true, false)
|
||||
{
|
||||
set_position (Gtk::WIN_POS_MOUSE);
|
||||
set_name ("PluginSelectorWindow");
|
||||
|
|
@ -58,6 +58,9 @@ PluginSelector::PluginSelector (PluginManager *mgr)
|
|||
ladspa_display.append_column (_("# Outputs"), lcols.outs);
|
||||
ladspa_display.set_headers_visible (true);
|
||||
ladspa_display.set_reorderable (false);
|
||||
lscroller.set_border_width(10);
|
||||
lscroller.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
|
||||
lscroller.add(ladspa_display);
|
||||
|
||||
amodel = Gtk::ListStore::create(acols);
|
||||
added_list.set_model (amodel);
|
||||
|
|
@ -78,6 +81,9 @@ PluginSelector::PluginSelector (PluginManager *mgr)
|
|||
vst_display.append_column (_("# Outputs"), vcols.outs);
|
||||
vst_display.set_headers_visible (true);
|
||||
vst_display.set_reorderable (false);
|
||||
vscroller.set_border_width(10);
|
||||
vscroller.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
|
||||
vscroller.add(vst_display);
|
||||
|
||||
for (int i = 0; i <=2; i++) {
|
||||
column = vst_display.get_column(i);
|
||||
|
|
@ -94,7 +100,7 @@ PluginSelector::PluginSelector (PluginManager *mgr)
|
|||
|
||||
btn_add->set_name("PluginSelectorButton");
|
||||
btn_remove->set_name("PluginSelectorButton");
|
||||
|
||||
|
||||
Gtk::Table* table = manage(new Gtk::Table(7, 10));
|
||||
table->set_size_request(750, 500);
|
||||
table->attach(notebook, 0, 7, 0, 5);
|
||||
|
|
@ -111,10 +117,10 @@ PluginSelector::PluginSelector (PluginManager *mgr)
|
|||
get_vbox()->pack_start (*table);
|
||||
|
||||
using namespace Gtk::Notebook_Helpers;
|
||||
notebook.pages().push_back (TabElem (ladspa_display, _("LADSPA")));
|
||||
notebook.pages().push_back (TabElem (lscroller, _("LADSPA")));
|
||||
#ifdef VST_SUPPORT
|
||||
if (Config->get_use_vst()) {
|
||||
notebook.pages().push_back (TabElem (vst_display, _("VST")));
|
||||
notebook.pages().push_back (TabElem (vscroller, _("VST")));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -122,12 +128,6 @@ PluginSelector::PluginSelector (PluginManager *mgr)
|
|||
//ladspa_display.set_name("PluginSelectorDisplay");
|
||||
ladspa_display.set_name("PluginSelectorList");
|
||||
added_list.set_name("PluginSelectorList");
|
||||
|
||||
//ladspa_display.clist().column(0).set_auto_resize (false);
|
||||
//ladspa_display.clist().column(0).set_width(470);
|
||||
|
||||
//ladspa_display.clist().column(1).set_auto_resize (true);
|
||||
//o_selector.clist().column(0).set_auto_resize (true);
|
||||
|
||||
ladspa_display.signal_button_press_event().connect_notify (mem_fun(*this, &PluginSelector::row_clicked));
|
||||
#ifdef VST_SUPPORT
|
||||
|
|
@ -139,6 +139,8 @@ PluginSelector::PluginSelector (PluginManager *mgr)
|
|||
btn_update->signal_clicked().connect (mem_fun(*this, &PluginSelector::btn_update_clicked));
|
||||
btn_add->signal_clicked().connect(mem_fun(*this, &PluginSelector::btn_add_clicked));
|
||||
btn_remove->signal_clicked().connect(mem_fun(*this, &PluginSelector::btn_remove_clicked));
|
||||
|
||||
input_refiller ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -163,17 +165,10 @@ PluginSelector::set_session (Session* s)
|
|||
void
|
||||
PluginSelector::_input_refiller (void *arg)
|
||||
{
|
||||
|
||||
((PluginSelector *) arg)->input_refiller ();
|
||||
}
|
||||
|
||||
/*
|
||||
void
|
||||
PluginSelector::_output_refiller (void *arg)
|
||||
{
|
||||
((PluginSelector *) arg)->output_refiller ();
|
||||
}
|
||||
*/
|
||||
|
||||
int compare(const void *left, const void *right)
|
||||
{
|
||||
return strcmp(*((char**)left), *((char**)right));
|
||||
|
|
@ -182,17 +177,16 @@ int compare(const void *left, const void *right)
|
|||
void
|
||||
PluginSelector::input_refiller ()
|
||||
{
|
||||
//const gchar *rowdata[4];
|
||||
guint row;
|
||||
list<PluginInfo *> &plugs = manager->ladspa_plugin_info ();
|
||||
list<PluginInfo *>::iterator i;
|
||||
char ibuf[16], obuf[16];
|
||||
|
||||
lmodel->clear();
|
||||
#ifdef VST_SUPPORT
|
||||
vmodel->clear();
|
||||
#endif
|
||||
// Insert into GTK list
|
||||
for (row = 0, i=plugs.begin(); i != plugs.end(); ++i, ++row) {
|
||||
//rowdata[0] = (*i)->name.c_str();
|
||||
//rowdata[1] = (*i)->category.c_str();
|
||||
|
||||
snprintf (ibuf, sizeof(ibuf)-1, "%d", (*i)->n_inputs);
|
||||
snprintf (obuf, sizeof(obuf)-1, "%d", (*i)->n_outputs);
|
||||
|
||||
|
|
@ -202,12 +196,9 @@ PluginSelector::input_refiller ()
|
|||
newrow[lcols.ins] = ibuf;
|
||||
newrow[lcols.outs] = obuf;
|
||||
newrow[lcols.plugin] = *i;
|
||||
//clist.insert_row (row, rowdata);
|
||||
//clist.rows().back().set_data (*i);
|
||||
}
|
||||
|
||||
//clist.set_sort_column (0);
|
||||
//clist.sort ();
|
||||
lmodel->set_sort_column (0, Gtk::SORT_ASCENDING);
|
||||
}
|
||||
|
||||
#ifdef VST_SUPPORT
|
||||
|
|
@ -228,8 +219,6 @@ PluginSelector::vst_refiller ()
|
|||
|
||||
// Insert into GTK list
|
||||
for (row = 0, i=plugs.begin(); i != plugs.end(); ++i, ++row) {
|
||||
//rowdata[0] = (*i)->name.c_str();
|
||||
//rowdata[1] = (*i)->category.c_str();
|
||||
|
||||
snprintf (ibuf, sizeof(ibuf)-1, "%d", (*i)->n_inputs);
|
||||
snprintf (obuf, sizeof(obuf)-1, "%d", (*i)->n_outputs);
|
||||
|
|
@ -240,30 +229,10 @@ PluginSelector::vst_refiller ()
|
|||
newrow[vcols.outs] = obuf;
|
||||
newrow[vcols.plugin] = i;
|
||||
}
|
||||
|
||||
//clist.set_sort_column (0);
|
||||
//clist.sort ();
|
||||
vmodel->set_sort_column (0, Gtk::SORT_ASCENDING);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
void
|
||||
PluginSelector::output_refiller ()
|
||||
{
|
||||
const gchar *rowdata[2];
|
||||
guint row;
|
||||
list<PluginInfo*>::iterator i;
|
||||
|
||||
// Insert into GTK list
|
||||
|
||||
for (row = 0, i = added_plugins.begin(); i != added_plugins.end(); ++i, ++row){
|
||||
rowdata[0] = (*i)->name.c_str();
|
||||
clist.insert_row (row, rowdata);
|
||||
clist.rows().back().set_data (*i);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
void
|
||||
PluginSelector::use_plugin (PluginInfo* pi)
|
||||
{
|
||||
|
|
@ -316,7 +285,6 @@ PluginSelector::btn_remove_clicked()
|
|||
row++;
|
||||
}
|
||||
added_plugins.erase(i);
|
||||
//o_selector.rescan();
|
||||
o_selected_plug = -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace ARDOUR {
|
|||
class Plugin;
|
||||
}
|
||||
|
||||
class PluginSelector : public Gtk::Dialog
|
||||
class PluginSelector : public ArdourDialog
|
||||
{
|
||||
public:
|
||||
PluginSelector (ARDOUR::PluginManager *);
|
||||
|
|
@ -44,9 +44,10 @@ class PluginSelector : public Gtk::Dialog
|
|||
private:
|
||||
ARDOUR::Session* session;
|
||||
Gtk::Notebook notebook;
|
||||
Gtk::ScrolledWindow lscroller;
|
||||
Gtk::ScrolledWindow vscroller;
|
||||
|
||||
// page 1
|
||||
//Gtkmm2ext::Selector ladspa_display;
|
||||
struct LadspaColumns : public Gtk::TreeModel::ColumnRecord {
|
||||
LadspaColumns () {
|
||||
add (name);
|
||||
|
|
@ -100,7 +101,6 @@ class PluginSelector : public Gtk::Dialog
|
|||
static void _vst_refiller (void *);
|
||||
void vst_refiller ();
|
||||
#endif
|
||||
//Gtkmm2ext::Selector o_selector;
|
||||
|
||||
ARDOUR::PluginInfo* i_selected_plug;
|
||||
|
||||
|
|
@ -112,8 +112,7 @@ class PluginSelector : public Gtk::Dialog
|
|||
list<ARDOUR::PluginInfo*> added_plugins;
|
||||
|
||||
static void _input_refiller (void *);
|
||||
//static void _output_refiller (void *);
|
||||
|
||||
|
||||
void input_refiller ();
|
||||
void row_clicked(GdkEventButton *);
|
||||
void btn_add_clicked();
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ PluginUIWindow::PluginUIWindow (AudioEngine &engine, PluginInsert& insert, bool
|
|||
VSTPluginUI* vpu = new VSTPluginUI (insert, *vp);
|
||||
|
||||
_pluginui = vpu;
|
||||
add (*vpu);
|
||||
get_vbox()->add (*vpu);
|
||||
vpu->package (*this);
|
||||
|
||||
} else {
|
||||
|
|
@ -92,7 +92,7 @@ PluginUIWindow::PluginUIWindow (AudioEngine &engine, PluginInsert& insert, bool
|
|||
PluginUI* pu = new PluginUI (engine, insert, scrollable);
|
||||
|
||||
_pluginui = pu;
|
||||
add (*pu);
|
||||
get_vbox()->add (*pu);
|
||||
|
||||
signal_map_event().connect (mem_fun (*pu, &PluginUI::start_updating));
|
||||
signal_unmap_event().connect (mem_fun (*pu, &PluginUI::stop_updating));
|
||||
|
|
@ -233,9 +233,6 @@ PluginUI::build (AudioEngine &engine)
|
|||
frame->add (*box);
|
||||
hpacker.pack_start(*frame, true, true);
|
||||
|
||||
box->set_border_width (5);
|
||||
box->set_spacing (1);
|
||||
|
||||
/* find all ports. build control elements for all appropriate control ports */
|
||||
|
||||
for (i = 0; i < plugin.parameter_count(); ++i) {
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ RedirectBox::RedirectBox (Placement pcmnt, Session& sess, Route& rt, PluginSelec
|
|||
_route.redirects_changed.connect (mem_fun(*this, &RedirectBox::redirects_changed));
|
||||
|
||||
redirect_eventbox.signal_enter_notify_event().connect (bind (sigc::ptr_fun (RedirectBox::enter_box), this));
|
||||
redirect_eventbox.signal_leave_notify_event().connect (bind (sigc::ptr_fun (RedirectBox::leave_box), this));
|
||||
//redirect_eventbox.signal_leave_notify_event().connect (bind (sigc::ptr_fun (RedirectBox::leave_box), this));
|
||||
|
||||
redirect_display.signal_button_press_event().connect (mem_fun(*this, &RedirectBox::redirect_button));
|
||||
redirect_display.signal_button_release_event().connect (mem_fun(*this, &RedirectBox::redirect_button));
|
||||
|
|
@ -262,7 +262,9 @@ RedirectBox::redirect_button (GdkEventButton *ev)
|
|||
{
|
||||
Redirect *redirect;
|
||||
TreeModel::Row row = *(redirect_display.get_selection()->get_selected());
|
||||
redirect = row[columns.redirect];
|
||||
|
||||
if (row)
|
||||
redirect = row[columns.redirect];
|
||||
|
||||
switch (ev->type) {
|
||||
case GDK_BUTTON_PRESS:
|
||||
|
|
@ -374,6 +376,7 @@ void
|
|||
RedirectBox::choose_plugin ()
|
||||
{
|
||||
sigc::connection newplug_connection = _plugin_selector.PluginCreated.connect (mem_fun(*this,&RedirectBox::insert_plugin_chosen));
|
||||
_plugin_selector.show_all();
|
||||
_plugin_selector.run ();
|
||||
newplug_connection.disconnect();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -409,9 +409,11 @@ url_decode (string& url)
|
|||
Pango::FontDescription
|
||||
get_font_for_style (string widgetname)
|
||||
{
|
||||
Gtk::Window window (WINDOW_TOPLEVEL);
|
||||
Gtk::Label foobar;
|
||||
Glib::RefPtr<Style> style;
|
||||
|
||||
window.add (foobar);
|
||||
foobar.set_name (widgetname);
|
||||
foobar.ensure_style();
|
||||
|
||||
|
|
|
|||
|
|
@ -230,7 +230,13 @@ UI::quit ()
|
|||
void
|
||||
UI::do_quit ()
|
||||
{
|
||||
Main::quit();
|
||||
longjmp (quit_context, 1);
|
||||
}
|
||||
|
||||
int
|
||||
UI::set_quit_context()
|
||||
{
|
||||
return setjmp (quit_context);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#include <queue>
|
||||
#include <map>
|
||||
|
||||
#include <setjmp.h>
|
||||
#include <pthread.h>
|
||||
#include <gtkmm/widget.h>
|
||||
#include <gtkmm/style.h>
|
||||
|
|
@ -77,6 +78,7 @@ class UI : public AbstractUI
|
|||
|
||||
/* Gtk-UI specific interfaces */
|
||||
|
||||
int set_quit_context ();
|
||||
void set_tip (Gtk::Widget *, const gchar *txt, const gchar *hlp = 0);
|
||||
void set_state (Gtk::Widget *w, Gtk::StateType state);
|
||||
void idle_add (int (*)(void *), void *);
|
||||
|
|
@ -191,6 +193,8 @@ class UI : public AbstractUI
|
|||
void color_selection_done (bool status);
|
||||
bool color_selection_deleted (GdkEventAny *);
|
||||
bool color_picked;
|
||||
|
||||
jmp_buf quit_context;
|
||||
};
|
||||
|
||||
template<class UI_CLASS> void *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue