summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Sateler <fsateler@debian.org>2019-07-25 21:07:04 -0400
committerFelipe Sateler <fsateler@debian.org>2019-07-25 21:07:04 -0400
commitc9be96628c03c575b7ce48965b454f163235c081 (patch)
tree9368ddfb3d20652369a0c4832cae53a1d93d7f0d
parent51c8716be735d44534bfdaf1fa377d36fc4740a4 (diff)
parent2f5843b4f9e5d91ff99b910b2c4c72005e4e228d (diff)
Update upstream source from tag 'upstream/1.1'
Update to upstream version '1.1' with Debian dir 7065d92cb7dc0742676f6c20ba497e5243b41de5
-rw-r--r--doc/README.html.in15
-rw-r--r--meson.build3
-rw-r--r--src/meson.build1
-rw-r--r--src/paprefs.cc82
4 files changed, 51 insertions, 50 deletions
diff --git a/doc/README.html.in b/doc/README.html.in
index 6184849..38417f5 100644
--- a/doc/README.html.in
+++ b/doc/README.html.in
@@ -37,6 +37,11 @@ General Public License for more details.</p>
<h2><a name="news">News</a></h2>
+<div class="news-date">Fri Jan 25 2019: </div> <p class="news-text"><a
+href="@PACKAGE_URL@paprefs-1.1.tar.xz">Version 1.1</a> released; replace
+dbus-glib and libdbus with gdbus, use module-combine-sink instead of
+module-combine</p>
+
<div class="news-date">Sun Jul 29 2018: </div> <p class="news-text"><a
href="@PACKAGE_URL@paprefs-1.0.tar.xz">Version 1.0</a> released; replace GConf
with GSettings, port from GTK 2 to GTK 3, change build system from Autotools to
@@ -107,17 +112,19 @@ compilation and <tt>ninja -C build install</tt> (as root) for installation of
<p>The current release is <a href="@PACKAGE_URL@paprefs-@PACKAGE_VERSION@.tar.gz">@PACKAGE_VERSION@</a></p>
-<p>Get <tt>paprefs</tt>'s development sources from the <a href="http://git-scm.org/">GIT</a> <a href="git://anongit.freedesktop.org/pulseaudio/paprefs">repository</a> (<a href="http://cgit.freedesktop.org/pulseaudio/paprefs">web interface</a>): </p>
+<p>Get <tt>paprefs</tt>'s development sources from the <a href="http://git-scm.com/">Git</a> <a href="https://gitlab.freedesktop.org/pulseaudio/paprefs.git">repository</a> (<a href="https://gitlab.freedesktop.org/pulseaudio/paprefs">web interface</a>): </p>
-<pre>git clone git://anongit.freedesktop.org/pulseaudio/paprefs</pre>
+<pre>git clone https://gitlab.freedesktop.org/pulseaudio/paprefs.git</pre>
<h2><a name="bugs">Bug Reports</a></h2>
-<p>Bugs can be reported on the freedesktop.org bug tracker: <a href="https://bugs.freedesktop.org/enter_bug.cgi?product=PulseAudio">https://bugs.freedesktop.org/enter_bug.cgi?product=PulseAudio</a>. You need to report your bugs against PulseAudio, because there's no separate product on the bug tracker for paprefs.</p>
+<p>Here's the list of open bug reports: <a href="https://gitlab.freedesktop.org/pulseaudio/paprefs/issues">https://gitlab.freedesktop.org/pulseaudio/paprefs/issues</a></p>
+
+<p>And here you can create a new bug report: <a href="https://gitlab.freedesktop.org/pulseaudio/paprefs/issues/new">https://gitlab.freedesktop.org/pulseaudio/paprefs/issues/new</a></p>
<h2><a name="patches">Contributing Code</a></h2>
-<p>If you have patches for paprefs, send them to the <a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss">PulseAudio mailing list</a> (requires subscription). The best (but not mandatory) way to send patches is with the <tt>git send-email</tt> tool. Here are some <a href="https://www.freedesktop.org/wiki/Software/PulseAudio/HowToUseGitSendEmail/">instructions for git send-email</a>.</p>
+<p>If you have patches for paprefs, the primary method for submitting them is by creating a merge request in <a href="https://gitlab.freedesktop.org/pulseaudio/paprefs">GitLab</a>. Alternatively, you can send patches to the <a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss">PulseAudio mailing list</a> (requires subscription).</p>
</body>
</html>
diff --git a/meson.build b/meson.build
index a762731..b2e8e68 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
project('paprefs', 'cpp',
license: 'GPL2+',
- version: '1.0',
+ version: '1.1',
meson_version: '>=0.40.1'
)
@@ -14,7 +14,6 @@ i18n = import('i18n')
gtkmm = dependency('gtkmm-3.0')
giomm = dependency('giomm-2.4', version: '>= 2.26')
sigc = dependency('sigc++-2.0')
-dbus_glib = dependency('dbus-glib-1')
libpulse = dependency('libpulse')
lynx = find_program('lynx', required: with_lynx)
diff --git a/src/meson.build b/src/meson.build
index 54740eb..32a1945 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -6,7 +6,6 @@ paprefs_dependencies = [
giomm,
gtkmm,
sigc,
- dbus_glib,
libpulse,
]
diff --git a/src/paprefs.cc b/src/paprefs.cc
index 123fea5..af6d885 100644
--- a/src/paprefs.cc
+++ b/src/paprefs.cc
@@ -25,8 +25,8 @@
#include <gtkmm.h>
#include <libintl.h>
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus.h>
+#include <giomm/dbusconnection.h>
+#include <giomm/dbusproxy.h>
#include <gdk/gdkx.h>
#include <pulse/version.h>
@@ -120,6 +120,9 @@ public:
void installFiles(const char *a, const char *b);
void installModules(const char *a, const char *b);
+ void onPackageKitAppeared(const Glib::RefPtr<Gio::DBus::Connection>& connection, const Glib::ustring& name, const Glib::ustring& name_owner);
+ void onPackageKitVanished(const Glib::RefPtr<Gio::DBus::Connection>& connection, const Glib::ustring& name);
+
bool moduleExists(const gchar *name);
gchar *modulePath(const gchar *name);
@@ -339,36 +342,28 @@ void MainWindow::showInstallButton(Gtk::Button *button, bool available) {
}
void MainWindow::installFiles(const char *a, const char *b = NULL) {
- DBusGConnection *connection;
- DBusGProxy *proxy;
- gboolean ret;
- GError *error = NULL;
- const gchar *packages[] = {a, b, NULL};
-
- connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);
-
- proxy = dbus_g_proxy_new_for_name(connection,
- "org.freedesktop.PackageKit",
- "/org/freedesktop/PackageKit",
- "org.freedesktop.PackageKit.Modify");
-
- ret = dbus_g_proxy_call(
- proxy, "InstallProvideFiles", &error,
- G_TYPE_UINT, GDK_WINDOW_XID(get_window()->gobj()),
- G_TYPE_STRV, packages,
- G_TYPE_STRING, "show-confirm-search,hide-finished",
- G_TYPE_INVALID, G_TYPE_INVALID);
-
- if (!ret) {
- g_warning("Installation failed: %s", error->message);
- g_error_free(error);
+ Glib::RefPtr<Gio::DBus::Proxy> proxy;
+ const std::vector<Glib::ustring> packages = {a, b};
+
+ proxy = Gio::DBus::Proxy::create_for_bus_sync(Gio::DBus::BusType::BUS_TYPE_SESSION,
+ "org.freedesktop.PackageKit",
+ "/org/freedesktop/PackageKit",
+ "org.freedesktop.PackageKit.Modify");
+
+ Glib::VariantContainerBase params = Glib::VariantContainerBase::create_tuple(std::vector<Glib::VariantBase>({
+ Glib::Variant<guint>::create(GDK_WINDOW_XID(get_window()->gobj())),
+ Glib::Variant<std::vector<Glib::ustring>>::create(packages),
+ Glib::Variant<Glib::ustring>::create("show-confirm-search,hide-finished")
+ }));
+
+ try {
+ proxy->call_sync("InstallProvideFiles", params);
+
+ checkForModules();
+ updateSensitive();
+ } catch (const Glib::Error& err) {
+ g_warning("Installation failed: %s", err.what().c_str());
}
-
- g_object_unref(proxy);
- dbus_g_connection_unref(connection);
-
- checkForModules();
- updateSensitive();
}
void MainWindow::installModules(const char *a, const char *b = NULL) {
@@ -420,7 +415,7 @@ void MainWindow::writeToGSettingsCombine() {
combineSettings->delay();
if (combineCheckButton->get_active()) {
- combineSettings->set_string("name0", Glib::ustring("module-combine"));
+ combineSettings->set_string("name0", Glib::ustring("module-combine-sink"));
combineSettings->set_string("args0", Glib::ustring(""));
combineSettings->set_boolean("enabled", true);
@@ -728,19 +723,20 @@ void MainWindow::checkForModules() {
}
void MainWindow::checkForPackageKit() {
+ Gio::DBus::watch_name(Gio::DBus::BusType::BUS_TYPE_SESSION,
+ "org.freedesktop.PackageKit",
+ sigc::mem_fun(*this, &MainWindow::onPackageKitAppeared),
+ sigc::mem_fun(*this, &MainWindow::onPackageKitVanished));
+}
- DBusError err;
- dbus_error_init(&err);
- DBusConnection *sessionBus = dbus_bus_get(DBUS_BUS_SESSION, &err);
+void MainWindow::onPackageKitAppeared(const Glib::RefPtr<Gio::DBus::Connection>& connection,const Glib::ustring& name,const Glib::ustring& name_owner) {
+ packageKitAvailable = TRUE;
+ updateSensitive();
+}
- if(dbus_error_is_set(&err)) {
- g_warning("Error connecting to DBus: %s", err.message);
- packageKitAvailable = FALSE;
- } else {
- packageKitAvailable = dbus_bus_name_has_owner(sessionBus, "org.freedesktop.PackageKit", NULL);
- dbus_connection_unref(sessionBus);
- }
- dbus_error_free(&err);
+void MainWindow::onPackageKitVanished(const Glib::RefPtr<Gio::DBus::Connection>& connection,const Glib::ustring& name) {
+ packageKitAvailable = FALSE;
+ updateSensitive();
}