summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2011-11-06 14:31:27 +0000
committerColin Guthrie <colin@mageia.org>2011-11-06 14:31:27 +0000
commit4fcee37cb92c689b43a0d8fc1d8e6b2764834cbf (patch)
tree0f379760dc9fc6c5a21035528eac8a1904ca3c3a
parent9e099811b0e421c056c669c658336e008c1c14fb (diff)
Do not require a recompile for each new PA version in order to detect the modules.HEADmaster
-rw-r--r--src/paprefs.cc9
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);