[gvfs] Add GSettings schemas
- From: Tomas Bzatek <tbzatek src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] Add GSettings schemas
- Date: Fri, 12 Nov 2010 17:35:09 +0000 (UTC)
commit 168001c43fa8d890ada7131fe0c3abdec56640e9
Author: Tomas Bzatek <tbzatek redhat com>
Date: Fri Nov 12 18:16:43 2010 +0100
Add GSettings schemas
configure.ac | 2 +
daemon/Makefile.am | 29 +++++++++++++++++++++++-
daemon/gvfs-dns-sd.convert | 3 ++
daemon/gvfs-enums.h | 33 ++++++++++++++++++++++++++++
daemon/gvfs-smb.convert | 2 +
daemon/org.gnome.system.dns_sd.gschema.xml | 14 +++++++++++
daemon/org.gnome.system.smb.gschema.xml | 9 +++++++
7 files changed, 91 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index cd14dfb..4688864 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,8 @@ AC_TYPE_SIGNAL
AC_TYPE_SIZE_T
AC_TYPE_UID_T
+GLIB_GSETTINGS
+
AH_VERBATIM([_GNU_SOURCE],
[/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 0879c78..024ec4e 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -26,6 +26,9 @@ libraries = \
$(top_builddir)/common/libgvfscommon.la \
$(GLIB_LIBS) $(DBUS_LIBS) $(KEYRING_LIBS)
+gvfs_gschemas =
+gvfs_gschemas_convert =
+
# D-BUS service file
%.service: %.service.in ../config.log
$(AM_V_GEN) $(SED) -e "s|\ libexecdir\@|$(libexecdir)|" $< > $@
@@ -55,6 +58,8 @@ mount_in_files += smb.mount.in smb-browse.mount.in
if HAVE_SAMBA
mount_DATA += smb.mount smb-browse.mount
libexec_PROGRAMS += gvfsd-smb-browse gvfsd-smb
+gvfs_gschemas += org.gnome.system.smb.gschema.xml
+gvfs_gschemas_convert += gvfs-smb.convert
endif
mount_in_files += cdda.mount.in
@@ -93,6 +98,8 @@ mount_in_files += dns-sd.mount.in
if HAVE_AVAHI
mount_DATA += dns-sd.mount
libexec_PROGRAMS += gvfsd-dnssd
+gvfs_gschemas += org.gnome.system.dns_sd.gschema.xml
+gvfs_gschemas_convert += gvfs-dns-sd.convert
endif
mount_in_files += archive.mount.in
@@ -107,10 +114,19 @@ mount_DATA += afc.mount
libexec_PROGRAMS += gvfsd-afc
endif
-EXTRA_DIST = gvfs-daemon.service.in $(mount_in_files) obexftp-marshal.list
+EXTRA_DIST = \
+ gvfs-daemon.service.in \
+ $(mount_in_files) \
+ obexftp-marshal.list \
+ $(gvfs_gschemas) \
+ $(convert_DATA) \
+ $(NULL)
DISTCLEANFILES = gvfs-daemon.service $(mount_DATA)
+CLEANFILES = \
+ $(gsettings__enum_file) \
+ *.gschema.valid
noinst_PROGRAMS = \
gvfsd-test \
@@ -465,3 +481,14 @@ gvfsd_afc_LDADD = \
$(libraries) \
$(AFC_LIBS)
+
+# GSettings stuff
+gsettings_ENUM_NAMESPACE = org.gnome.system.gvfs
+gsettings_ENUM_FILES = gvfs-enums.h
+
+gsettings_SCHEMAS = $(gvfs_gschemas)
+
+ GSETTINGS_RULES@
+
+gvfs_gschemas_convertdir = $(datadir)/GConf/gsettings
+gvfs_gschemas_convert_DATA = $(gvfs_gschemas_convert)
diff --git a/daemon/gvfs-dns-sd.convert b/daemon/gvfs-dns-sd.convert
new file mode 100644
index 0000000..d81c3f5
--- /dev/null
+++ b/daemon/gvfs-dns-sd.convert
@@ -0,0 +1,3 @@
+[org.gnome.system.dns_sd]
+display-local = /system/dns_sd/display_local
+extra-domains = /system/dns_sd/extra_domains
diff --git a/daemon/gvfs-enums.h b/daemon/gvfs-enums.h
new file mode 100644
index 0000000..5d2c287
--- /dev/null
+++ b/daemon/gvfs-enums.h
@@ -0,0 +1,33 @@
+/* GIO - GLib Input, Output and Streaming Library
+ *.
+ * Copyright (C) 2010 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: Tomas Bzatek <tbzatek redhat com>
+ */
+
+#ifndef __gvfs_enums_h__
+#define __gvfs_enums_h__
+
+typedef enum
+{
+ G_DNS_SD_DISPLAY_MODE_DISABLED,
+ G_DNS_SD_DISPLAY_MODE_SEPARATE,
+ G_DNS_SD_DISPLAY_MODE_MERGED
+} GDnsSdDisplayMode;
+
+#endif /* __gvfs_enums_h__ */
diff --git a/daemon/gvfs-smb.convert b/daemon/gvfs-smb.convert
new file mode 100644
index 0000000..a3388d9
--- /dev/null
+++ b/daemon/gvfs-smb.convert
@@ -0,0 +1,2 @@
+[org.gnome.system.smb]
+workgroup = /system/smb/workgroup
diff --git a/daemon/org.gnome.system.dns_sd.gschema.xml b/daemon/org.gnome.system.dns_sd.gschema.xml
new file mode 100644
index 0000000..edc6d4a
--- /dev/null
+++ b/daemon/org.gnome.system.dns_sd.gschema.xml
@@ -0,0 +1,14 @@
+<schemalist>
+ <schema id="org.gnome.system.dns_sd" path="/system/dns-sd/">
+ <key name="display-local" enum="org.gnome.system.gvfs.GDnsSdDisplayMode">
+ <default>'merged'</default>
+ <summary>How to display local DNS-SD service</summary>
+ <description>Possible values are "merged", "separate" and "disabled".</description>
+ </key>
+ <key name="extra-domains" type="s">
+ <default>''</default>
+ <summary>Extra domains to look for DNS-SD services in</summary>
+ <description>Comma separated list of DNS-SD domains that should be visible in the "network:///" location.</description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/daemon/org.gnome.system.smb.gschema.xml b/daemon/org.gnome.system.smb.gschema.xml
new file mode 100644
index 0000000..58a2215
--- /dev/null
+++ b/daemon/org.gnome.system.smb.gschema.xml
@@ -0,0 +1,9 @@
+<schemalist>
+ <schema id="org.gnome.system.smb" path="/system/smb/">
+ <key name="workgroup" type="s">
+ <default>''</default>
+ <summary>SMB workgroup</summary>
+ <description>The Windows networking workgroup or domain that the user is part of. In order for a new workgroup to fully take effect the user may need to log out and log back in.</description>
+ </key>
+ </schema>
+</schemalist>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]