Roland Mas, 2012-03-23 11:25:26 +0100 :

> Hi,
>
> Please find attached a git patch fixing #664863 by introducing a new
> setting allowing to control whether the Jack server should be stopped
> when qjackctl exits.  I'll also send it to the upstream author (as a
> simple patch).

Actually, please use the following one.  dpkg-source and git both
conspire to make my life harder, and parts of the patch were omitted in
the previous email.

>From 316ed9b289af8c01962c3b7f56d9b9f9f7463e75 Mon Sep 17 00:00:00 2001
From: Roland Mas <lola...@debian.org>
Date: Fri, 23 Mar 2012 11:13:49 +0100
Subject: [PATCH] Make "stop jackd on quit" configurable (closes: #664863)

---
 debian/changelog                                   |    6 +
 debian/patches/10_optional-stopjack-on-close.patch |  133 ++++++++++++++++++++
 debian/patches/series                              |    1 +
 3 files changed, 140 insertions(+), 0 deletions(-)
 create mode 100644 debian/patches/10_optional-stopjack-on-close.patch

diff --git a/debian/changelog b/debian/changelog
index 66da30d..8b0f1c9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+qjackctl (0.3.8-1+lld1) UNRELEASED; urgency=low
+
+  * Make "stop jackd on quit" configurable (closes: #664863)
+
+ -- Roland Mas <lola...@debian.org>  Fri, 23 Mar 2012 11:40:21 +0100
+
 qjackctl (0.3.8-1) unstable; urgency=low
 
   * New upstream release.
diff --git a/debian/patches/10_optional-stopjack-on-close.patch b/debian/patches/10_optional-stopjack-on-close.patch
new file mode 100644
index 0000000..ca17564
--- /dev/null
+++ b/debian/patches/10_optional-stopjack-on-close.patch
@@ -0,0 +1,133 @@
+Description: Make "stop jackd on quit" configurable (closes: #664863)
+ Added a setting to make the killing of jackd on application exit
+ optional and configurable.  The default value is to kill jackd, so
+ as to preserve the previous behaviour.
+Author: Roland Mas <lola...@debian.org>
+Bug-Debian: http://bugs.debian.org/664863
+
+Index: qjackctl/src/qjackctlSetup.cpp
+===================================================================
+--- qjackctl.orig/src/qjackctlSetup.cpp
++++ qjackctl/src/qjackctlSetup.cpp
+@@ -67,6 +67,7 @@
+ //	sServerName              = m_settings.value("/ServerName").toString();
+ 	bStartJack               = m_settings.value("/StartJack", false).toBool();
+ //	bStartJackCmd            = m_settings.value("/StartJackCmd", false).toBool();
++	bStopJack                = m_settings.value("/StopJack", true).toBool();
+ 	bStartupScript           = m_settings.value("/StartupScript", false).toBool();
+ 	sStartupScriptShell      = m_settings.value("/StartupScriptShell").toString();
+ 	bPostStartupScript       = m_settings.value("/PostStartupScript", false).toBool();
+@@ -177,6 +178,7 @@
+ //	m_settings.setValue("/ServerName",              sServerName);
+ 	m_settings.setValue("/StartJack",               bStartJack);
+ //	m_settings.setValue("/StartJackCmd",            bStartJackCmd);
++	m_settings.setValue("/StopJack",                bStopJack);
+ 	m_settings.setValue("/StartupScript",           bStartupScript);
+ 	m_settings.setValue("/StartupScriptShell",      sStartupScriptShell);
+ 	m_settings.setValue("/PostStartupScript",       bPostStartupScript);
+Index: qjackctl/src/qjackctlSetupForm.ui
+===================================================================
+--- qjackctl.orig/src/qjackctlSetupForm.ui
++++ qjackctl/src/qjackctlSetupForm.ui
+@@ -3741,6 +3741,25 @@
+              </widget>
+             </item>
+             <item>
++             <widget class="QCheckBox" name="StopJackCheckBox">
++              <property name="font">
++               <font>
++                <weight>50</weight>
++                <bold>false</bold>
++               </font>
++              </property>
++              <property name="toolTip">
++               <string>Whether to stop JACK audio server on application quit</string>
++              </property>
++              <property name="text">
++               <string>Stop JACK audio server on application &amp;quit</string>
++              </property>
++              <property name="shortcut">
++               <string>Alt+Q</string>
++              </property>
++             </widget>
++            </item>
++            <item>
+              <widget class="QCheckBox" name="QueryCloseCheckBox">
+               <property name="font">
+                <font>
+Index: qjackctl/src/qjackctlSetup.h
+===================================================================
+--- qjackctl.orig/src/qjackctlSetup.h
++++ qjackctl/src/qjackctlSetup.h
+@@ -107,6 +107,9 @@
+ 	bool bStartJack;
+ 	bool bStartJackCmd;
+ 
++	// Server stop options.
++	bool bStopJack;
++
+ 	// User supplied command line.
+ 	QString sCmdLine;
+ 
+Index: qjackctl/src/qjackctlMainForm.cpp
+===================================================================
+--- qjackctl.orig/src/qjackctlMainForm.cpp
++++ qjackctl/src/qjackctlMainForm.cpp
+@@ -415,7 +415,8 @@
+ qjackctlMainForm::~qjackctlMainForm (void)
+ {
+ 	// Stop server, if not already...
+-	stopJackServer();
++	if (m_pSetup->bStopJack)
++		stopJackServer();
+ 
+ #ifdef CONFIG_DBUS
+ 	if (m_pDBusLogWatcher)
+@@ -764,6 +765,7 @@
+ 
+ 	// Check if JACK daemon is currently running...
+ 	if (bQueryClose && m_pJack  && m_pJack->state() == QProcess::Running
++	    	&& m_pSetup->bStopJack
+ 		&& (m_pSetup->bQueryClose || m_pSetup->bQueryShutdown)) {
+ 		bQueryClose = (QMessageBox::warning(this,
+ 			tr("Warning") + " - " QJACKCTL_SUBTITLE1,
+@@ -821,7 +823,8 @@
+ 		if (m_pSystemTray)
+ 			m_pSystemTray->close();
+ 		// Stop any service out there...
+-		stopJackServer();
++		if (m_pSetup->bStopJack)
++			stopJackServer();
+ 	}
+ 
+ 	return bQueryClose;
+Index: qjackctl/src/qjackctlSetupForm.cpp
+===================================================================
+--- qjackctl.orig/src/qjackctlSetupForm.cpp
++++ qjackctl/src/qjackctlSetupForm.cpp
+@@ -373,6 +373,9 @@
+ 	QObject::connect(m_ui.StartJackCheckBox,
+ 		SIGNAL(stateChanged(int)),
+ 		SLOT(optionsChanged()));
++	QObject::connect(m_ui.StopJackCheckBox,
++		SIGNAL(stateChanged(int)),
++		SLOT(optionsChanged()));
+ 	QObject::connect(m_ui.QueryCloseCheckBox,
+ 		SIGNAL(stateChanged(int)),
+ 		SLOT(optionsChanged()));
+@@ -585,6 +588,7 @@
+ 
+ 	// Other misc options...
+ 	m_ui.StartJackCheckBox->setChecked(m_pSetup->bStartJack);
++	m_ui.StopJackCheckBox->setChecked(m_pSetup->bStopJack);
+ 	m_ui.QueryCloseCheckBox->setChecked(m_pSetup->bQueryClose);
+ 	m_ui.KeepOnTopCheckBox->setChecked(m_pSetup->bKeepOnTop);
+ 	m_ui.SystemTrayCheckBox->setChecked(m_pSetup->bSystemTray);
+@@ -1796,6 +1800,7 @@
+ 		m_pSetup->iConnectionsIconSize     = m_ui.ConnectionsIconSizeComboBox->currentIndex();
+ 		m_pSetup->sConnectionsFont         = m_ui.ConnectionsFontTextLabel->font().toString();
+ 		m_pSetup->bStartJack               = m_ui.StartJackCheckBox->isChecked();
++		m_pSetup->bStopJack                = m_ui.StopJackCheckBox->isChecked();
+ 		m_pSetup->bQueryClose              = m_ui.QueryCloseCheckBox->isChecked();
+ 		m_pSetup->bKeepOnTop               = m_ui.KeepOnTopCheckBox->isChecked();
+ 		m_pSetup->bSystemTray              = m_ui.SystemTrayCheckBox->isChecked();
diff --git a/debian/patches/series b/debian/patches/series
index a655f7e..b7d626d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 00_settings.patch
+10_optional-stopjack-on-close.patch
-- 
1.7.9.1

Roland.
-- 
Roland Mas

You can't second-guess ineffability, I always say.
  -- Aziraphale, in Good Omens (Terry Pratchett and Neil Gaiman)
_______________________________________________
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Reply via email to