summaryrefslogtreecommitdiff
path: root/extra/paprefs/do-not-require-recompile.patch
blob: 66d110b3eb40cbbbd6703097feb230be138af79d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 4fcee37cb92c689b43a0d8fc1d8e6b2764834cbf Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Sun, 6 Nov 2011 14:31:27 +0000
Subject: [PATCH] Do not require a recompile for each new PA version in order to detect the modules.

---
 src/paprefs.cc |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/paprefs.cc b/src/paprefs.cc
index 21fdc95..919b15c 100644
--- a/src/paprefs.cc
+++ b/src/paprefs.cc
@@ -637,9 +637,14 @@ void MainWindow::readFromGConf() {
 }
 
 gchar * MainWindow::modulePath(const gchar *name) {
-  gchar *path, *pulsedir, *c;
+  gchar *path, *pulsedir, *c, **versions;
 
-  pulsedir = g_strdup_printf ("pulse-%d.%d", PA_MAJOR, PA_MINOR);
+  versions = g_strsplit(pa_get_library_version(), ".", 3);
+  if (versions[0] && versions[1])
+    pulsedir = g_strdup_printf ("pulse-%s.%s", versions[0], versions[1]);
+  else
+    pulsedir = g_strdup_printf ("pulse-%d.%d", PA_MAJOR, PA_MINOR);
+  g_strfreev(versions);
 
   path = g_build_filename (MODLIBDIR, pulsedir, "modules", name, NULL);
   g_free (pulsedir);
-- 
1.6.3.3