From 53bf1a65e8b0ac701fb101233a127006a0e5c9a1 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Wed, 31 Jul 2013 19:38:32 +1000 Subject: [PATCH 1/4] Fix two minor memory leaks in pending state dialog --- gtk2_ardour/ardour_ui.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 3ee2c95689..ec911a4fcd 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -3737,8 +3737,8 @@ ARDOUR_UI::session_dialog (std::string msg) int ARDOUR_UI::pending_state_dialog () { - HBox* hbox = new HBox(); - Image* image = new Image (Stock::DIALOG_QUESTION, ICON_SIZE_DIALOG); + HBox* hbox = manage (new HBox()); + Image* image = manage (new Image (Stock::DIALOG_QUESTION, ICON_SIZE_DIALOG)); ArdourDialog dialog (_("Crash Recovery"), true); Label message (string_compose (_("\ This session appears to have been in the\n\ From b540d0e4bc858c22395c1960cf07f006cff5da01 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Wed, 31 Jul 2013 19:53:28 +1000 Subject: [PATCH 2/4] Fix check button handling in Memory Warning Dialog --- gtk2_ardour/ardour_ui.cc | 15 +++++---------- gtk2_ardour/ardour_ui.h | 1 - 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index ec911a4fcd..4902968db8 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -827,13 +827,6 @@ ARDOUR_UI::starting () return 0; } -void -ARDOUR_UI::no_memory_warning () -{ - XMLNode node (X_("no-memory-warning")); - Config->add_instant_xml (node); -} - void ARDOUR_UI::check_memory_locking () { @@ -890,9 +883,6 @@ ARDOUR_UI::check_memory_locking () VBox* vbox = msg.get_vbox(); HBox hbox; CheckButton cb (_("Do not show this window again")); - - cb.signal_toggled().connect (sigc::mem_fun (*this, &ARDOUR_UI::no_memory_warning)); - hbox.pack_start (cb, true, false); vbox->pack_start (hbox); cb.show(); @@ -903,6 +893,11 @@ ARDOUR_UI::check_memory_locking () editor->ensure_float (msg); msg.run (); + + if (cb.get_active()) { + XMLNode node (X_("no-memory-warning")); + Config->add_instant_xml (node); + } } } } diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 0253c1ec0a..ff324fd6f9 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -692,7 +692,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr bool first_idle (); - void no_memory_warning (); void check_memory_locking (); bool check_audioengine(); From 28525d7b6907a7a7a33beb4197354c776cec0272 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Thu, 15 Aug 2013 20:35:33 +1000 Subject: [PATCH 3/4] Forward declare NSM_Client class in ardour_ui.h nsm.h pulls in winsock2.h and with the mingw build and it causes endless warnings from the compiler --- gtk2_ardour/ardour_ui.cc | 1 + gtk2_ardour/ardour_ui.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 4902968db8..e3c446ecc2 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -101,6 +101,7 @@ typedef uint64_t microseconds_t; #include "missing_plugin_dialog.h" #include "mixer_ui.h" #include "mouse_cursors.h" +#include "nsm.h" #include "opts.h" #include "pingback.h" #include "processor_box.h" diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index ff324fd6f9..20edfe03eb 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -72,7 +72,6 @@ #include "ardour_window.h" #include "editing.h" #include "meterbridge.h" -#include "nsm.h" #include "ui_config.h" #include "enums.h" #include "visibility_group.h" @@ -105,6 +104,7 @@ class SpeakerDialog; class ThemeManager; class TimeInfoBox; class MidiTracer; +class NSM_Client; class LevelMeterHBox; class GlobalPortMatrixWindow; class GUIObjectState; From 5d8425c3df9cf8020508e5de73ad7d9cfb2ce97e Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Fri, 11 Oct 2013 13:59:12 +1000 Subject: [PATCH 4/4] Remove random character at start of wscript file --- libs/ardour/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ardour/wscript b/libs/ardour/wscript index e91d019dd5..4d569837bb 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -1,4 +1,4 @@ -1#!/usr/bin/env python +#!/usr/bin/env python from waflib.extras import autowaf as autowaf from waflib import Options import os