diff options
author | Tanu Kaskinen <tanuk@iki.fi> | 2020-01-04 07:42:00 +0200 |
---|---|---|
committer | Tanu Kaskinen <tanuk@iki.fi> | 2021-08-25 18:48:03 +0300 |
commit | 4dadcc77ddf96998d31b4f54eaa1810b51507c06 (patch) | |
tree | c0407165f97b8e958c60ba3c86aae7197e1fa1fa | |
parent | 0b69621331ab34154e663fcb61fea36308be687c (diff) |
Fix indentation
Part-of: <https://gitlab.freedesktop.org/pulseaudio/paprefs/-/merge_requests/7>
-rw-r--r-- | src/paprefs.cc | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/src/paprefs.cc b/src/paprefs.cc index 1c2c390..c492e64 100644 --- a/src/paprefs.cc +++ b/src/paprefs.cc @@ -335,10 +335,10 @@ void MainWindow::onChangeUpnp() { } void MainWindow::showInstallButton(Gtk::Button *button, bool available) { - if (available || !packageKitAvailable) - button->hide(); - else - button->show(); + if (available || !packageKitAvailable) + button->hide(); + else + button->show(); } void MainWindow::installFiles(const char *a, const char *b = NULL) { @@ -370,16 +370,16 @@ void MainWindow::installFiles(const char *a, const char *b = NULL) { } void MainWindow::installModules(const char *a, const char *b = NULL) { - gchar *ma, *mb = NULL; + gchar *ma, *mb = NULL; - ma = modulePath (a); - if (b != NULL) - mb = modulePath (b); + ma = modulePath (a); + if (b != NULL) + mb = modulePath (b); - installFiles (ma, mb); + installFiles (ma, mb); - g_free (ma); - g_free (mb); + g_free (ma); + g_free (mb); } void MainWindow::onZeroconfDiscoverInstallButtonClicked() { @@ -673,38 +673,38 @@ void MainWindow::readFromGSettings() { } gchar * MainWindow::modulePath(const gchar *name) { - gchar *path, **versions; - - versions = g_strsplit(pa_get_library_version(), ".", 3); - if (versions[0] && versions[1]) { - gchar *pulsedir, *search; - - /* Remove the "/pulse-x.y/modules" suffix so we can dynamically inject - * it again with runtime library version numbers */ - pulsedir = g_strdup_printf ("%s", MODDIR); - if ((search = g_strrstr (pulsedir, G_DIR_SEPARATOR_S))) { - *search = '\0'; - if ((search = g_strrstr (pulsedir, G_DIR_SEPARATOR_S))) - *search = '\0'; - } - path = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "pulse-%s.%s" G_DIR_SEPARATOR_S "modules" G_DIR_SEPARATOR_S "%s", pulsedir, versions[0], versions[1], name); - g_free (pulsedir); - } else - path = g_build_filename (MODDIR, name, NULL); - g_strfreev(versions); + gchar *path, **versions; + + versions = g_strsplit(pa_get_library_version(), ".", 3); + if (versions[0] && versions[1]) { + gchar *pulsedir, *search; + + /* Remove the "/pulse-x.y/modules" suffix so we can dynamically inject + * it again with runtime library version numbers */ + pulsedir = g_strdup_printf ("%s", MODDIR); + if ((search = g_strrstr (pulsedir, G_DIR_SEPARATOR_S))) { + *search = '\0'; + if ((search = g_strrstr (pulsedir, G_DIR_SEPARATOR_S))) + *search = '\0'; + } + path = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "pulse-%s.%s" G_DIR_SEPARATOR_S "modules" G_DIR_SEPARATOR_S "%s", pulsedir, versions[0], versions[1], name); + g_free (pulsedir); + } else + path = g_build_filename (MODDIR, name, NULL); + g_strfreev(versions); - return path; + return path; } bool MainWindow::moduleExists(const gchar *name) { - gchar *path = modulePath (name); - bool ret; + gchar *path = modulePath (name); + bool ret; - ret = g_file_test (path, G_FILE_TEST_EXISTS); + ret = g_file_test (path, G_FILE_TEST_EXISTS); - g_free (path); + g_free (path); - return ret; + return ret; } void MainWindow::checkForModules() { |