[telegnome: 1/2] Remove dconf dependency
- From: Colin Watson <cjwatson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [telegnome: 1/2] Remove dconf dependency
- Date: Tue, 5 Feb 2019 22:32:35 +0000 (UTC)
commit 9579837553b2a8b0cdf5c89a8cd0ae6a322d605d
Author: Tomasz Miąsko <tomasz miasko gmail com>
Date: Tue Feb 5 00:00:00 2019 +0000
Remove dconf dependency
In the case of dconf gsettings backend, g_settings_reset can be used for
recursive delete. This does not introduce an explicit dependency on dconf.
README | 1 -
configure.ac | 2 +-
src/Makefile.am | 3 +--
src/prefs.vala | 14 +++-----------
4 files changed, 5 insertions(+), 15 deletions(-)
---
diff --git a/README b/README
index 32fc1f7..cd9b1b1 100644
--- a/README
+++ b/README
@@ -10,7 +10,6 @@ GLib >= 2.44
GTK+ >= 3.22
gdk-pixbuf >= 2.26
cairo >= 1.10
-dconf
uuid
If you want to rebuild the generated C files from their Vala source files,
diff --git a/configure.ac b/configure.ac
index 474eaa5..2e3597a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,7 @@ AC_DEFINE_UNQUOTED([SYSCONFDIR], "$sysconfdir", [System configuration directory.
AM_PROG_VALAC
AM_PATH_GLIB_2_0([2.44.0], [], [AC_MSG_ERROR([GLib >= 2.44.0 is required])], [gobject gio])
-PKG_CHECK_MODULES([TELEGNOME], [gtk+-3.0 >= 3.22 gdk-pixbuf-2.0 >= 2.26 cairo >= 1.10 dconf uuid])
+PKG_CHECK_MODULES([TELEGNOME], [gtk+-3.0 >= 3.22 gdk-pixbuf-2.0 >= 2.26 cairo >= 1.10 uuid])
AC_ARG_VAR([XMLLINT], [the xmllint program])
AC_PATH_PROG([XMLLINT], [xmllint])
diff --git a/src/Makefile.am b/src/Makefile.am
index 13cba05..ece44c6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,8 +3,7 @@ AM_CFLAGS = $(GLIB_CFLAGS) $(TELEGNOME_CFLAGS) $(VALA_CFLAGS)
AM_VALAFLAGS = \
--pkg posix \
--pkg gtk+-3.0 \
- --pkg cairo \
- --pkg dconf
+ --pkg cairo
bin_PROGRAMS = telegnome
diff --git a/src/prefs.vala b/src/prefs.vala
index 449119d..93383eb 100644
--- a/src/prefs.vala
+++ b/src/prefs.vala
@@ -238,7 +238,6 @@ public class Prefs : Object {
Channel channel;
channel_store.get (iter, Column.CHANNEL, out channel, -1);
- string old_uuid = channel.uuid;
#if VALA_0_36
channel_store.remove (ref iter);
#else
@@ -249,16 +248,9 @@ public class Prefs : Object {
/* Clear out settings debris from the deleted channel if
* possible.
*/
- if (settings.backend.get_type ().name () ==
- "DConfSettingsBackend") {
- var path = @"/org/gnome/telegnome/channel/$old_uuid/";
- var client = new DConf.Client ();
- try {
- client.write_sync (path, null);
- } catch (Error e) {
- assert_no_error (e);
- }
- }
+ var settings = channel.settings;
+ settings.reset ("");
+ settings.apply ();
}
public void show () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]