Remove needless hbox in panner, get rid of some warnings in editor_rulers.cc, vst_pluginui.cc should compile, updated shuttle patch from Reuben Martin, get rid of extra include in ardour/vst_plugin.h
git-svn-id: svn://localhost/ardour2/trunk@559 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -652,8 +652,15 @@ ARDOUR_UI::shuttle_box_button_release (GdkEventButton* ev)
|
||||
shuttle_grabbed = false;
|
||||
shuttle_box.remove_modal_grab ();
|
||||
if (shuttle_behaviour == Sprung) {
|
||||
shuttle_fract = SHUTTLE_FRACT_SPEED1;
|
||||
session->request_transport_speed (1.0);
|
||||
if (session->get_auto_play() || roll_button.get_state()) {
|
||||
shuttle_fract = SHUTTLE_FRACT_SPEED1;
|
||||
session->request_transport_speed (1.0);
|
||||
stop_button.set_active (false);
|
||||
roll_button.set_active (true);
|
||||
} else {
|
||||
shuttle_fract = 0;
|
||||
session->request_transport_speed (0.0);
|
||||
}
|
||||
shuttle_box.queue_draw ();
|
||||
}
|
||||
return true;
|
||||
@@ -662,6 +669,8 @@ ARDOUR_UI::shuttle_box_button_release (GdkEventButton* ev)
|
||||
if (session->transport_rolling()) {
|
||||
shuttle_fract = SHUTTLE_FRACT_SPEED1;
|
||||
session->request_transport_speed (1.0);
|
||||
stop_button.set_active (false);
|
||||
roll_button.set_active (true);
|
||||
} else {
|
||||
shuttle_fract = 0;
|
||||
}
|
||||
|
||||
@@ -913,10 +913,10 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble upp
|
||||
if ((smpte.subframes % mark_modulo) == 0) {
|
||||
if (smpte.subframes == 0) {
|
||||
(*marks)[n].style = GtkCustomRulerMarkMajor;
|
||||
snprintf (buf, sizeof(buf), "%s%02ld:%02ld:%02ld:%02ld", smpte.negative ? "-" : "", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
|
||||
snprintf (buf, sizeof(buf), "%s%02u:%02u:%02u:%02u", smpte.negative ? "-" : "", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
|
||||
} else {
|
||||
(*marks)[n].style = GtkCustomRulerMarkMinor;
|
||||
snprintf (buf, sizeof(buf), ".%02ld", smpte.subframes);
|
||||
snprintf (buf, sizeof(buf), ".%02u", smpte.subframes);
|
||||
}
|
||||
} else {
|
||||
snprintf (buf, sizeof(buf)," ");
|
||||
@@ -945,7 +945,7 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble upp
|
||||
(*marks)[n].style = GtkCustomRulerMarkMinor;
|
||||
(*marks)[n].position = pos;
|
||||
}
|
||||
snprintf (buf, sizeof(buf), "%s%02ld:%02ld:%02ld:%02ld", smpte.negative ? "-" : "", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
|
||||
snprintf (buf, sizeof(buf), "%s%02u:%02u:%02u:%02u", smpte.negative ? "-" : "", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
|
||||
} else {
|
||||
snprintf (buf, sizeof(buf)," ");
|
||||
(*marks)[n].style = GtkCustomRulerMarkMicro;
|
||||
@@ -969,7 +969,7 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble upp
|
||||
} else {
|
||||
(*marks)[n].style = GtkCustomRulerMarkMinor;
|
||||
}
|
||||
snprintf (buf, sizeof(buf), "%s%02ld:%02ld:%02ld:%02ld", smpte.negative ? "-" : "", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
|
||||
snprintf (buf, sizeof(buf), "%s%02u:%02u:%02u:%02u", smpte.negative ? "-" : "", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
|
||||
} else {
|
||||
snprintf (buf, sizeof(buf)," ");
|
||||
(*marks)[n].style = GtkCustomRulerMarkMicro;
|
||||
@@ -989,7 +989,7 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble upp
|
||||
session->smpte_to_sample(smpte, pos, true /* use_offset */, false /* use_subframes */ );
|
||||
if ((smpte.hours % mark_modulo) == 0) {
|
||||
(*marks)[n].style = GtkCustomRulerMarkMajor;
|
||||
snprintf (buf, sizeof(buf), "%s%02ld:%02ld:%02ld:%02ld", smpte.negative ? "-" : "", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
|
||||
snprintf (buf, sizeof(buf), "%s%02u:%02u:%02u:%02u", smpte.negative ? "-" : "", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
|
||||
} else {
|
||||
snprintf (buf, sizeof(buf)," ");
|
||||
(*marks)[n].style = GtkCustomRulerMarkMicro;
|
||||
@@ -1011,7 +1011,7 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble upp
|
||||
if ((smpte.frames % mark_modulo) == 0) {
|
||||
(*marks)[n].style = GtkCustomRulerMarkMajor;
|
||||
(*marks)[n].position = pos;
|
||||
snprintf (buf, sizeof(buf), "%s%02ld:%02ld:%02ld:%02ld", smpte.negative ? "-" : "", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
|
||||
snprintf (buf, sizeof(buf), "%s%02u:%02u:%02u:%02u", smpte.negative ? "-" : "", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
|
||||
} else {
|
||||
snprintf (buf, sizeof(buf)," ");
|
||||
(*marks)[n].style = GtkCustomRulerMarkMicro;
|
||||
|
||||
@@ -68,8 +68,8 @@ PannerUI::PannerUI (IO& io, Session& s)
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (pan_automation_state_button, _("Pan automation mode"));
|
||||
ARDOUR_UI::instance()->tooltips().set_tip (pan_automation_style_button, _("Pan automation type"));
|
||||
|
||||
set_size_request_to_display_given_text (pan_automation_state_button, X_("M"), 2, 2);
|
||||
set_size_request_to_display_given_text (pan_automation_style_button, X_("M"), 2, 2);
|
||||
//set_size_request_to_display_given_text (pan_automation_state_button, X_("O"), 2, 2);
|
||||
//set_size_request_to_display_given_text (pan_automation_style_button, X_("0"), 2, 2);
|
||||
|
||||
pan_bar_packer.set_size_request (-1, 61);
|
||||
panning_viewport.set_size_request (61, 61);
|
||||
@@ -106,17 +106,13 @@ PannerUI::PannerUI (IO& io, Session& s)
|
||||
panning_link_button.set_name (X_("PanningLinkButton"));
|
||||
panning_link_direction_button.set_name (X_("PanningLinkDirectionButton"));
|
||||
|
||||
panning_link_box.pack_start (panning_link_button, true, true);
|
||||
panning_link_box.pack_start (panning_link_direction_button, true, true);
|
||||
panning_link_box.pack_start (pan_automation_state_button, true, true);
|
||||
|
||||
/* the pixmap will be reset at some point, but the key thing is that
|
||||
we need a pixmap in the button just to get started.
|
||||
*/
|
||||
|
||||
Gtk::HBox* pan_button_hbox = manage (new Gtk::HBox());
|
||||
|
||||
panning_link_box.pack_start (panning_link_button, true, true);
|
||||
panning_link_box.pack_start (panning_link_direction_button, true, true);
|
||||
pan_button_hbox->pack_start (panning_link_box, true, true);
|
||||
pan_button_hbox->pack_start (pan_automation_state_button, true, true);
|
||||
|
||||
panning_link_direction_button.add (*(manage (new Image (get_xpm("forwardblarrow.xpm")))));
|
||||
|
||||
panning_link_direction_button.signal_clicked().connect
|
||||
@@ -138,7 +134,7 @@ PannerUI::PannerUI (IO& io, Session& s)
|
||||
|
||||
pan_vbox.set_spacing (4);
|
||||
pan_vbox.pack_start (panning_viewport, Gtk::PACK_SHRINK);
|
||||
pan_vbox.pack_start (*pan_button_hbox, Gtk::PACK_SHRINK);
|
||||
pan_vbox.pack_start (panning_link_box, Gtk::PACK_SHRINK);
|
||||
|
||||
pack_start (pan_vbox, true, false);
|
||||
|
||||
@@ -500,13 +496,16 @@ PannerUI::pan_changed (void *src)
|
||||
|
||||
switch (_io.panner().size()) {
|
||||
case 0:
|
||||
panning_link_box.set_sensitive (false);
|
||||
panning_link_direction_button.set_sensitive (false);
|
||||
panning_link_button.set_sensitive (false);
|
||||
return;
|
||||
case 1:
|
||||
panning_link_box.set_sensitive (false);
|
||||
panning_link_direction_button.set_sensitive (false);
|
||||
panning_link_button.set_sensitive (false);
|
||||
break;
|
||||
default:
|
||||
panning_link_box.set_sensitive (true);
|
||||
panning_link_direction_button.set_sensitive (true);
|
||||
panning_link_button.set_sensitive (true);
|
||||
}
|
||||
|
||||
uint32_t nouts = _io.n_outputs();
|
||||
|
||||
@@ -217,8 +217,8 @@ class VSTPluginUI : public PlugUIBase, public Gtk::VBox
|
||||
~VSTPluginUI ();
|
||||
|
||||
gint get_preferred_height ();
|
||||
bool start_updating(GdkEventAny*) {}
|
||||
bool stop_updating(GdkEventAny*) {}
|
||||
bool start_updating(GdkEventAny*) {return false;}
|
||||
bool stop_updating(GdkEventAny*) {return false;}
|
||||
|
||||
int package (Gtk::Window&);
|
||||
|
||||
@@ -228,7 +228,7 @@ class VSTPluginUI : public PlugUIBase, public Gtk::VBox
|
||||
Gtk::HBox preset_box;
|
||||
Gtk::VBox vpacker;
|
||||
|
||||
gboolean configure_handler (GdkEventConfigure*, GtkSocket*);
|
||||
gboolean configure_handler (GdkEventConfigure*, Gtk::Socket*);
|
||||
void save_plugin_setting ();
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -19,16 +19,13 @@
|
||||
*/
|
||||
|
||||
#include <fst.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/vst_plugin.h>
|
||||
|
||||
#include "plugin_ui.h"
|
||||
#include "prompter.h"
|
||||
|
||||
#include "i18n.h"
|
||||
#include <gdk/gdkx.h>
|
||||
|
||||
using namespace Gtk;
|
||||
using namespace ARDOUR;
|
||||
@@ -65,42 +62,42 @@ VSTPluginUI::package (Gtk::Window& win)
|
||||
{
|
||||
/* for GTK+2, remove this: you cannot add to a realized socket */
|
||||
|
||||
socket.realize ();
|
||||
//socket.realize ();
|
||||
|
||||
/* forward configure events to plugin window */
|
||||
|
||||
win.signal_configure_event().connect (bind (mem_fun (*this, &VSTPluginUI::configure_handler), socket.gobj()));
|
||||
win.signal_configure_event().connect (bind (mem_fun (*this, &VSTPluginUI::configure_handler), &socket));
|
||||
|
||||
/* XXX in GTK2, use add_id() instead of steal, although add_id()
|
||||
assumes that the window's owner understands the XEmbed protocol.
|
||||
*/
|
||||
|
||||
socket.steal (fst_get_XID (vst.fst()));
|
||||
socket.add_id (fst_get_XID (vst.fst()));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
gboolean
|
||||
VSTPluginUI::configure_handler (GdkEventConfigure* ev, GtkSocket *socket)
|
||||
VSTPluginUI::configure_handler (GdkEventConfigure* ev, Gtk::Socket *socket)
|
||||
{
|
||||
XEvent event;
|
||||
|
||||
gint x, y;
|
||||
|
||||
if (socket->plug_window == NULL) {
|
||||
if (socket->gobj() == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
event.xconfigure.type = ConfigureNotify;
|
||||
event.xconfigure.event = GDK_WINDOW_XWINDOW (socket->plug_window);
|
||||
event.xconfigure.window = GDK_WINDOW_XWINDOW (socket->plug_window);
|
||||
event.xconfigure.event = GDK_WINDOW_XWINDOW (socket->get_window()->gobj());
|
||||
event.xconfigure.window = GDK_WINDOW_XWINDOW (socket->get_window()->gobj());
|
||||
|
||||
/* The ICCCM says that synthetic events should have root relative
|
||||
* coordinates. We still aren't really ICCCM compliant, since
|
||||
* we don't send events when the real toplevel is moved.
|
||||
*/
|
||||
gdk_error_trap_push ();
|
||||
gdk_window_get_origin (socket->plug_window, &x, &y);
|
||||
gdk_window_get_origin (socket->get_window()->gobj(), &x, &y);
|
||||
gdk_error_trap_pop ();
|
||||
|
||||
event.xconfigure.x = x;
|
||||
@@ -113,8 +110,8 @@ VSTPluginUI::configure_handler (GdkEventConfigure* ev, GtkSocket *socket)
|
||||
event.xconfigure.override_redirect = False;
|
||||
|
||||
gdk_error_trap_push ();
|
||||
XSendEvent (GDK_WINDOW_XDISPLAY (socket->plug_window),
|
||||
GDK_WINDOW_XWINDOW (socket->plug_window),
|
||||
XSendEvent (GDK_WINDOW_XDISPLAY (socket->get_window()->gobj()),
|
||||
GDK_WINDOW_XWINDOW (socket->get_window()->gobj()),
|
||||
False, StructureNotifyMask, &event);
|
||||
// gdk_display_sync (GDK_WINDOW_XDISPLAY (socket->plug_window));
|
||||
gdk_error_trap_pop ();
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include <ardour/stateful.h>
|
||||
#include <ardour/plugin_state.h>
|
||||
#include <ardour/plugin.h>
|
||||
#include <ardour/vst_plugin.h>
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
|
||||
Reference in New Issue
Block a user