[nautilus-actions] Do not install schemas if --disable-schemas-install option has been specified



commit 1f7b4c505a96b1e5ad929fb68457ec1a60bbeaf6
Author: Pierre Wieser <pwieser trychlos org>
Date:   Mon Aug 3 19:08:45 2009 +0200

    Do not install schemas if --disable-schemas-install option has been specified

 ChangeLog                        |   11 ++
 Makefile.am                      |   27 ++--
 NEWS                             |    5 +
 configure.ac                     |    3 +-
 data/.gitignore                  |    3 +
 data/Makefile.am                 |   50 ++++++
 data/nautilus-actions.schemas.in |  313 ++++++++++++++++++++++++++++++++++++++
 exports/.gitignore               |    2 -
 src/common/na-xml-writer.c       |    2 +-
 9 files changed, 399 insertions(+), 17 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ae61867..b357fff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2009-08-03 Pierre Wieser <pwieser trychlos org>
+
+	* data/nautilus-actions.schemas.in:
+	* data/Makefile.am: New files.
+
+	* configure.ac:
+	* Makefile.am: Updated accordingly.
+
+	* src/common/na-xml-writer.c:
+	Fix schemas generation (long description tag).
+
 2009-08-01 Pierre Wieser <pwieser trychlos org>
 
 	* configure.ac:
diff --git a/Makefile.am b/Makefile.am
index 5917f6e..d5400b6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,11 +29,12 @@
 ACLOCAL_AMFLAGS = -I m4
 
 SUBDIRS = \
-	doc					\
-	m4					\
-	icons					\
-	src					\
-	po					\
+	data						\
+	doc							\
+	m4							\
+	icons						\
+	src							\
+	po							\
 	$(NULL)
 
 # a foo directory so that make distcheck has a vpath which is prefixed
@@ -56,13 +57,13 @@ DISTCLEANFILES = \
 docdir = $(datarootdir)/doc/@PACKAGE -@VERSION@
 
 dist_doc_DATA = \
-        AUTHORS					\
-	ChangeLog				\
+	AUTHORS						\
+	ChangeLog					\
 	ChangeLog-2008				\
-	COPYING					\
-	INSTALL					\
-	MAINTAINERS				\
-	NEWS					\
-	README					\
-	TODO					\
+	COPYING						\
+	INSTALL						\
+	MAINTAINERS					\
+	NEWS						\
+	README						\
+	TODO						\
 	$(NULL)
diff --git a/NEWS b/NEWS
index 6c26d4f..619e015 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,11 @@ Version 1.11.3
     Bugfixes
 
         #...... reported by Pierre Wieser (install doc)
+
+    Various code enhancements
+
+        Do not install schemas if --disable-schemas-install option has
+        been specified.
  
 Version 1.11.2
 ==============
diff --git a/configure.ac b/configure.ac
index 3e705f4..86d4ed9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,6 +39,7 @@ AC_CONFIG_HEADERS([src/config.h])
 
 AC_CONFIG_FILES([
 	Makefile
+	data/Makefile
 	doc/Makefile
 	m4/Makefile
 	icons/Makefile
@@ -98,7 +99,7 @@ AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["${GETTEXT_PACKAGE}"],[gettext package])
 AM_GLIB_GNU_GETTEXT
 
 # GConf support
-AC_PATH_PROG([GCONFTOOL],[gconftool-2])
+AC_PATH_PROG([GCONFTOOL],[gconftool-2],[no])
 AM_GCONF_SOURCE_2
 
 # note that requiring through pkg-config the version number of the
diff --git a/data/.gitignore b/data/.gitignore
new file mode 100644
index 0000000..74f91bd
--- /dev/null
+++ b/data/.gitignore
@@ -0,0 +1,3 @@
+Makefile
+Makefile.in
+nautilus-actions.schemas
diff --git a/data/Makefile.am b/data/Makefile.am
new file mode 100644
index 0000000..e7a945e
--- /dev/null
+++ b/data/Makefile.am
@@ -0,0 +1,50 @@
+# Nautilus Actions
+# A Nautilus extension which offers configurable context menu actions.
+#
+# Copyright (C) 2005 The GNOME Foundation
+# Copyright (C) 2006, 2007, 2008 Frederic Ruaudel and others (see AUTHORS)
+# Copyright (C) 2009 Pierre Wieser and others (see AUTHORS)
+#
+# This Program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This Program 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this Library; see the file COPYING.  If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA 02111-1307, USA.
+#
+# Authors:
+#   Frederic Ruaudel <grumz grumz net>
+#   Rodrigo Moya <rodrigo gnome-db org>
+#   Pierre Wieser <pwieser trychlos org>
+#   ... and many others (see AUTHORS)
+
+schema_in_files = nautilus-actions.schemas.in
+
+noinst_schemadir = $(GCONF_SCHEMA_FILE_DIR)
+
+#schema_DATA = $(schema_in_files:.schemas.in=.schemas)
+
+noinst_schema_DATA = $(schema_in_files:.schemas.in=.schemas)
+
+ INTLTOOL_SCHEMAS_RULE@
+
+if GCONF_SCHEMAS_INSTALL
+NA_INSTALL_SCHEMAS  = yes
+else
+NA_INSTALL_SCHEMAS = no
+endif
+
+install-data-am:
+	@if test "$(NA_INSTALL_SCHEMAS)" = "yes"; then \
+		for p in $(noinst_schema_DATA); do \
+			GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p; \
+		done \
+	fi
diff --git a/data/nautilus-actions.schemas.in b/data/nautilus-actions.schemas.in
new file mode 100644
index 0000000..260ed15
--- /dev/null
+++ b/data/nautilus-actions.schemas.in
@@ -0,0 +1,313 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gconfschemafile>
+  <schemalist>
+
+    <!-- schemas for action entries -->
+    <!-- actions should have a 'schemakey' tag to point to these schemas -->
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/configurations/version</key>
+      <owner>nautilus-actions</owner>
+      <type>string</type>
+      <locale name="C">
+        <short>The version of the configuration format</short>
+        <long>The version of the configuration format that will be used to manage backward compatibility</long>
+      </locale>
+      <default>2.0</default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/configurations/label</key>
+      <owner>nautilus-actions</owner>
+      <type>string</type>
+      <locale name="C">
+        <default></default>
+        <short>The label of the menu item</short>
+        <long>The label of the menu item that will appear in the Nautilus popup menu when the selection matches the appearance condition settings</long>
+      </locale>
+      <default></default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/configurations/tooltip</key>
+      <owner>nautilus-actions</owner>
+      <type>string</type>
+      <locale name="C">
+        <default></default>
+        <short>The tooltip of the menu item</short>
+        <long>The tooltip of the menu item that will appear in the Nautilus statusbar when the user points to the Nautilus popup menu item with his/her mouse</long>
+      </locale>
+      <default></default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/configurations/icon</key>
+      <owner>nautilus-actions</owner>
+      <type>string</type>
+      <locale name="C">
+        <short>The icon of the menu item</short>
+        <long>The icon of the menu item that will appear next to the label in the Nautilus popup menu when the selection matches the appearance conditions settings</long>
+      </locale>
+      <default></default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/configurations/desc-name</key>
+      <owner>nautilus-actions</owner>
+      <type>string</type>
+      <locale name="C">
+        <default>Default profile</default>
+        <short>A description name of the profile</short>
+        <long>The field is here to give the user a human readable name for a profile in the Nact interface. If not set there will be a default auto generated string set by default</long>
+      </locale>
+      <default>Default profile</default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/configurations/path</key>
+      <owner>nautilus-actions</owner>
+      <type>string</type>
+      <locale name="C">
+        <short>The path of the command</short>
+        <long>The path of the command to start when the user select the menu item in the Nautilus popup menu</long>
+      </locale>
+      <default></default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/configurations/parameters</key>
+      <owner>nautilus-actions</owner>
+      <type>string</type>
+      <locale name="C">
+        <short>The parameters of the command</short>
+        <long>The parameters of the command to start when the user selects the menu item in the Nautilus popup menu.
+
+The parameters can contain some special tokens which are replaced by Nautilus information before starting the command:
+
+%d: base folder of the selected file(s)
+%f: the name of the selected file or the first one if many are selected
+%h: hostname of the URI
+%m: space-separated list of the basenames of the selected file(s)/folder(s)
+%M: space-separated list of the selected file(s)/folder(s), with their full paths
+%p: port number of the first URI
+%R: space-separated list of selected URIs
+%s: scheme of the URI
+%u: URI
+%U: username of the URI
+%%: a percent sign</long>
+      </locale>
+      <default></default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/configurations/basenames</key>
+      <owner>nautilus-actions</owner>
+      <type>list</type>
+      <list_type>string</list_type>
+      <locale name="C">
+        <short>The list of pattern to match the selected file(s)/folder(s)</short>
+        <long>A list of strings with joker '*' or '?' to match the name of the selected file(s)/folder(s). Each selected items must match at least one of the filename patterns for the action to appear</long>
+      </locale>
+      <default>[*]</default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/configurations/matchcase</key>
+      <owner>nautilus-actions</owner>
+      <type>bool</type>
+      <locale name="C">
+        <short>'true' if the filename patterns have to be case sensitive, 'false' otherwise</short>
+        <long>If you need to match a filename in a case-sensitive manner, set this key to 'true'. If you also want, for example '*.jpg' to match 'photo.JPG', set 'false'</long>
+      </locale>
+      <default>true</default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/configurations/mimetypes</key>
+      <owner>nautilus-actions</owner>
+      <type>list</type>
+      <list_type>string</list_type>
+      <locale name="C">
+        <short>The list of patterns to match the mimetypes of the selected file(s)</short>
+        <long>A list of strings with joker '*' or '?' to match the mimetypes of the selected file(s). Each selected items must match at least one of the mimetype patterns for the action to appear</long>
+      </locale>
+      <default>[*/*]</default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/configurations/isfile</key>
+      <owner>nautilus-actions</owner>
+      <type>bool</type>
+      <locale name="C">
+        <short>'true' if the selection can have files, 'false' otherwise</short>
+        <long>This setting is tied in with the 'isdir' setting. The valid combinations are:
+
+isfile=TRUE and isdir=FALSE: the selection may hold only files
+isfile=FALSE and isdir=TRUE: the selection may hold only folders
+isfile=TRUE and isdir=TRUE: the selection may hold both files and folders
+isfile=FALSE and isdir=FALSE: this is an invalid combination (your configuration will never appear)</long>
+      </locale>
+      <default>true</default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/configurations/isdir</key>
+      <owner>nautilus-actions</owner>
+      <type>bool</type>
+      <locale name="C">
+        <short>'true' if the selection can have folders, 'false' otherwise</short>
+        <long>This setting is tied in with the 'isfile' setting. The valid combinations are:
+
+isfile=TRUE and isdir=FALSE: the selection may hold only files
+isfile=FALSE and isdir=TRUE: the selection may hold only folders
+isfile=TRUE and isdir=TRUE: the selection may hold both files and folders
+isfile=FALSE and isdir=FALSE: this is an invalid combination (your configuration will never appear)</long>
+      </locale>
+      <default>false</default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/configurations/accept-multiple-files</key>
+      <owner>nautilus-actions</owner>
+      <type>bool</type>
+      <locale name="C">
+        <short>'true' if the selection can have several items, 'false' otherwise</short>
+        <long>If you need one or more files or folders to be selected, set this key to 'true'. If you want just one file or folder, set 'false'</long>
+      </locale>
+      <default>false</default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/configurations/schemes</key>
+      <owner>nautilus-actions</owner>
+      <type>list</type>
+      <list_type>string</list_type>
+      <locale name="C">
+        <short>The list of schemes where the selected files should be located</short>
+        <long>Defines the list of valid schemes to be matched against the selected items. The scheme is the protocol used to access the files. The keyword to use is the one used in the URI.
+
+Examples of valid URI include:
+file:///tmp/foo.txt
+sftp:///root test example net/tmp/foo.txt
+
+The most common schemes are:
+
+'file': local files
+'sftp': files accessed via SSH
+'ftp': files accessed via FTP
+'smb': files accessed via Samba (Windows share)
+'dav': files accessed via WebDAV
+
+All schemes used by Nautilus can be used here.</long>
+      </locale>
+      <default>[file]</default>
+    </schema>
+
+    <!-- schemas for preferences -->
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/preferences/export-assistant</key>
+      <owner>nautilus-actions</owner>
+      <type>list</type>
+      <list_type>int</list_type>
+      <locale name="C">
+        <short>Position and size of the export assistant window</short>
+        <long>Position and size of the export assistant window ; default is set by the window manager</long>
+      </locale>
+      <default>[]</default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/preferences/export-folder-uri</key>
+      <owner>nautilus-actions</owner>
+      <type>string</type>
+      <locale name="C">
+        <short>Last selected folder</short>
+        <long>Last folder selected when choosing a folder where to export the actions</long>
+      </locale>
+      <default>/tmp</default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/preferences/iconditions-command-chooser</key>
+      <owner>nautilus-actions</owner>
+      <type>list</type>
+      <list_type>int</list_type>
+      <locale name="C">
+        <short>Position and size of the command chooser window</short>
+        <long>Position and size of the command chooser window in the Conditions tab ; default is set by the window manager</long>
+      </locale>
+      <default>[]</default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/preferences/iconditions-folder-uri</key>
+      <owner>nautilus-actions</owner>
+      <type>string</type>
+      <locale name="C">
+        <short>Last selected folder</short>
+        <long>Last folder selected when browsing for a command in the Conditions tab</long>
+      </locale>
+      <default>/bin</default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/preferences/iconditions-legend-dialog</key>
+      <owner>nautilus-actions</owner>
+      <type>list</type>
+      <list_type>int</list_type>
+      <locale name="C">
+        <short>Position and size of the Legend dialog</short>
+        <long>Position and size of the Legend dialog ; default is set by the UI manager</long>
+      </locale>
+      <default>[]</default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/preferences/import-assistant</key>
+      <owner>nautilus-actions</owner>
+      <type>list</type>
+      <list_type>int</list_type>
+      <locale name="C">
+        <short>Position and size of the import assistant window</short>
+        <long>Position and size of the import assistant window ; default is set by the window manager</long>
+      </locale>
+      <default>[]</default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/preferences/import-folder-uri</key>
+      <owner>nautilus-actions</owner>
+      <type>string</type>
+      <locale name="C">
+        <short>Last selected folder</short>
+        <long>Last folder selected when choosing a folder from where import new actions</long>
+      </locale>
+      <default>/tmp</default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/preferences/main-paned</key>
+      <owner>nautilus-actions</owner>
+      <type>int</type>
+      <locale name="C">
+        <short>Main pane position</short>
+        <long>Width of the main window pane ; default is set by the UI manager</long>
+      </locale>
+      <default>100</default>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/nautilus-actions/preferences/main-window</key>
+      <owner>nautilus-actions</owner>
+      <type>list</type>
+      <list_type>int</list_type>
+      <locale name="C">
+        <short>Position and size of the main window</short>
+        <long>Position and size of the main window ; default is set by the window manager</long>
+      </locale>
+      <default>[]</default>
+    </schema>
+
+  </schemalist>
+</gconfschemafile>
diff --git a/src/common/na-xml-writer.c b/src/common/na-xml-writer.c
index 6455bca..3610347 100644
--- a/src/common/na-xml-writer.c
+++ b/src/common/na-xml-writer.c
@@ -689,5 +689,5 @@ create_gconf_schema_entry( NAXMLWriter *writer,
 
 	xmlNewChild( locale_node, NULL, BAD_CAST( NACT_GCONF_SCHEMA_SHORT ), BAD_CAST( short_desc ));
 
-	xmlNewChild( locale_node, NULL, BAD_CAST( NACT_GCONF_SCHEMA_SHORT ), BAD_CAST( long_desc ));
+	xmlNewChild( locale_node, NULL, BAD_CAST( NACT_GCONF_SCHEMA_LONG ), BAD_CAST( long_desc ));
 }



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