summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-10-17 20:40:39 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-10-17 20:40:39 +0000
commit0ef71e47de8870e74f02b457cb513930df514266 (patch)
tree6c1e093957805161c88ac6294bfc3c6534f95e7f /libs
parentfe7c3976c9382bb9f19797034dece570eefcbf01 (diff)
reduce calls to fit_to_pixels(); flip back to old fix for rec regions botch; executable stack fix; avoid delete this in MementoCommand lifetime management
git-svn-id: svn://localhost/ardour2/trunk@988 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/session_state.cc7
-rw-r--r--libs/ardour/session_time.cc1
-rw-r--r--libs/ardour/sse_functions.s4
-rw-r--r--libs/gtkmm2ext/gtk_ui.cc6
-rw-r--r--libs/pbd/pbd/memento_command.h17
5 files changed, 28 insertions, 7 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index c302633918..e577dfb94a 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -1291,6 +1291,13 @@ Session::XMLRegionFactory (const XMLNode& node, bool full)
nchans = atoi (prop->value().c_str());
}
+
+ if ((prop = node.property ("name")) == 0) {
+ cerr << "no name for this region\n";
+ abort ();
+ }
+ cerr << "name of this region = " << prop->value() << endl;
+
if ((prop = node.property (X_("source-0"))) == 0) {
if ((prop = node.property ("source")) == 0) {
diff --git a/libs/ardour/session_time.cc b/libs/ardour/session_time.cc
index dfaab9d4c4..abe4f50696 100644
--- a/libs/ardour/session_time.cc
+++ b/libs/ardour/session_time.cc
@@ -26,6 +26,7 @@
#include <ardour/timestamps.h>
#include <pbd/error.h>
+#include <pbd/stacktrace.h>
#include <ardour/ardour.h>
#include <ardour/configuration.h>
diff --git a/libs/ardour/sse_functions.s b/libs/ardour/sse_functions.s
index 7df689188c..934ce6887a 100644
--- a/libs/ardour/sse_functions.s
+++ b/libs/ardour/sse_functions.s
@@ -524,6 +524,8 @@ x86_sse_compute_peak:
.size x86_sse_compute_peak, .-x86_sse_compute_peak
#; end proc
-
+#ifdef __ELF__
+.section .note.GNU-stack,"",%progbits
+#endif
diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc
index 55a6bebb02..177e4f3dbb 100644
--- a/libs/gtkmm2ext/gtk_ui.cc
+++ b/libs/gtkmm2ext/gtk_ui.cc
@@ -253,7 +253,11 @@ static bool idle_quit ()
void
UI::do_quit ()
{
- Glib::signal_idle().connect (sigc::ptr_fun (idle_quit));
+ if (getenv ("ARDOUR_RUNNING_UNDER_VALGRIND")) {
+ Main::quit ();
+ } else {
+ Glib::signal_idle().connect (sigc::ptr_fun (idle_quit));
+ }
}
void
diff --git a/libs/pbd/pbd/memento_command.h b/libs/pbd/pbd/memento_command.h
index f257e63233..715e9d33e3 100644
--- a/libs/pbd/pbd/memento_command.h
+++ b/libs/pbd/pbd/memento_command.h
@@ -30,10 +30,20 @@ using std::endl;
#include <sigc++/slot.h>
#include <typeinfo>
+/* grrr, strict C++ says that static member functions are not C functions, but we also want
+ to be able to pack this into a sigc::ptr_fun and not sigc::mem_fun, so we have to make
+ it a genuine function rather than a member.
+*/
+
+static void object_death (Command* mc) {
+ delete mc;
+}
+
/** This command class is initialized with before and after mementos
* (from Stateful::get_state()), so undo becomes restoring the before
* memento, and redo is restoring the after memento.
*/
+
template <class obj_T>
class MementoCommand : public Command
{
@@ -43,8 +53,9 @@ class MementoCommand : public Command
XMLNode *after
)
: obj(object), before(before), after(after) {
- obj.GoingAway.connect (sigc::mem_fun (*this, &MementoCommand<obj_T>::object_death));
+ obj.GoingAway.connect (sigc::bind (sigc::ptr_fun (object_death), static_cast<Command*>(this)));
}
+
~MementoCommand () {
GoingAway();
if (before) {
@@ -91,10 +102,6 @@ class MementoCommand : public Command
protected:
obj_T &obj;
XMLNode *before, *after;
-
- void object_death () {
- delete this;
- }
};
#endif // __lib_pbd_memento_h__