[network-manager-applet/NETWORKMANAGER_APPLET_0_7] gconf: add schemas for applet values like notification prefs



commit 64f8eefe2fbf0a8c47150e9b65aa1cc810ac3cb7
Author: William Jon McCann <william jon mccann gmail com>
Date:   Tue Aug 25 17:57:16 2009 -0500

    gconf: add schemas for applet values like notification prefs

 Makefile.am          |   17 +++++++++++++
 configure.ac         |    3 ++
 nm-applet.schemas.in |   63 ++++++++++++++++++++++++++++++++++++++++++++++++++
 po/POTFILES.in       |    1 +
 4 files changed, 84 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 50441e2..e7098b4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,7 +28,14 @@ desktop_in_files = nm-connection-editor.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
+schemasdir   = @GCONF_SCHEMA_FILE_DIR@
+schemas_in_files = nm-applet.schemas.in
+schemas_DATA = $(schemas_in_files:.schemas.in=.schemas)
+ INTLTOOL_SCHEMAS_RULE@
+
+
 EXTRA_DIST += \
+	$(schemas_in_files) \
 	$(autostart_in_files) \
 	$(desktop_in_files) \
 	$(DBUS_126_CONF) \
@@ -37,8 +44,18 @@ EXTRA_DIST += \
 CLEANFILES = \
 	$(autostart_DATA) \
 	$(desktop_DATA) \
+	$(schemas_DATA) \
 	$(dbusservice_DATA)
 
 DISTCLEANFILES = intltool-extract intltool-merge intltool-update
 
 ACLOCAL_AMFLAGS = -I m4
+
+install-data-local:
+if GCONF_SCHEMAS_INSTALL
+	if test -z "$(DESTDIR)" ; then \
+	for p in $(schemas_DATA) ; do \
+	GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/$$p >&1 > /dev/null; \
+	done \
+	fi
+endif
diff --git a/configure.ac b/configure.ac
index 1a8ae69..5634746 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,6 +16,9 @@ AM_PROG_CC_C_O
 AC_PROG_INSTALL
 AC_PROG_LIBTOOL
 
+AC_PATH_PROG(GCONFTOOL, gconftool-2)
+AM_GCONF_SOURCE_2
+
 dnl ensure that when the Automake generated makefile calls aclocal,
 dnl it honours the $ACLOCAL_FLAGS environment variable
 ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
diff --git a/nm-applet.schemas.in b/nm-applet.schemas.in
new file mode 100644
index 0000000..75930e1
--- /dev/null
+++ b/nm-applet.schemas.in
@@ -0,0 +1,63 @@
+<gconfschemafile>
+  <schemalist>
+
+    <schema>
+      <key>/schemas/apps/nm-applet/disable-connected-notifications</key>
+      <applyto>/apps/nm-applet/disable-connected-notifications</applyto>
+      <owner>nm-applet</owner>
+      <type>bool</type>
+      <default>TRUE</default>
+      <locale name="C">
+        <short>Disable connected notifications</short>
+        <long>
+          Set this to TRUE to disable notifications when connecting to
+          a network.
+        </long>
+      </locale>
+    </schema>
+    <schema>
+      <key>/schemas/apps/nm-applet/disable-disconnected-notifications</key>
+      <applyto>/apps/nm-applet/disable-disconnected-notifications</applyto>
+      <owner>nm-applet</owner>
+      <type>bool</type>
+      <default>TRUE</default>
+      <locale name="C">
+        <short>Disable disconnected notifications</short>
+        <long>
+          Set this to TRUE to disable notifications when disconnecting
+          from a network.
+        </long>
+      </locale>
+    </schema>
+    <schema>
+      <key>/schemas/apps/nm-applet/suppress-wireless-networks-available</key>
+      <applyto>/apps/nm-applet/suppress-wireless-networks-available</applyto>
+      <owner>nm-applet</owner>
+      <type>bool</type>
+      <default>TRUE</default>
+      <locale name="C">
+        <short>Suppress networks available notifications</short>
+        <long>
+          Set this to TRUE to disable notifications when wireless
+          networks are available.
+        </long>
+      </locale>
+    </schema>
+    <schema>
+      <key>/schemas/apps/nm-applet/stamp</key>
+      <applyto>/apps/nm-applet/stamp</applyto>
+      <owner>nm-applet</owner>
+      <type>int</type>
+      <default>0</default>
+      <locale name="C">
+        <short>Stamp</short>
+        <long>
+          Used to determine whether settings should be migrated to a
+          new version.
+        </long>
+      </locale>
+    </schema>
+
+  </schemalist>
+</gconfschemafile>
+
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 29fbce2..81d9ceb 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,6 +2,7 @@
 # List of source files containing translatable strings.
 # Please keep this file sorted alphabetically.
 nm-applet.desktop.in
+nm-applet.schemas.in
 nm-connection-editor.desktop.in
 src/applet-dbus-manager.c
 src/applet-device-cdma.c



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]