[file-roller] some changes to the gschema file



commit 6632139c64451575a076a51fe05bb1eb43af3899
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Tue Nov 2 12:52:08 2010 +0100

    some changes to the gschema file
    
    Allow to translate the summary and description fields;
    Changed the schema names to follow the standard style;
    Added a .convert file for automatic data convertion from GConf.

 data/Makefile.am                         |   42 ++++--
 data/file-roller.convert                 |   48 +++++++
 data/org.gnome.FileRoller.gschema.xml.in |  224 ++++++++++++++++++++++++++++++
 data/org.gnome.file-roller.gschema.xml   |  208 ---------------------------
 po/POTFILES.in                           |    1 +
 src/fr-window.c                          |    6 +-
 src/preferences.h                        |   20 ++--
 7 files changed, 316 insertions(+), 233 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 26bf6af..2c81954 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -9,9 +9,17 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 matchdir = $(datadir)/file-roller
 match_DATA = packages.match
 
-gsettings_SCHEMAS = org.gnome.file-roller.gschema.xml
+gsettingsschema_in_files = org.gnome.FileRoller.gschema.xml.in
+gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml)
+.PRECIOUS: $(gsettings_SCHEMAS)
+
+ INTLTOOL_XML_NOMERGE_RULE@
+
 @GSETTINGS_RULES@
 
+convertdir = $(datadir)/GConf/gsettings
+convert_DATA = file-roller.convert
+
 gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
 
 install-data-hook: update-cache
@@ -25,16 +33,26 @@ update-cache:
 		echo "***   $(gtk_update_icon_cache)"; \
 	fi
 
-EXTRA_DIST = 			\
-	$(desktop_in_in_files)	\
-	$(desktop_in_files)	\
-	$(desktop_DATA)		\
-	packages.match.in	\
-	packages.match		\
-	$(gsettings_SCHEMAS)
-
-DISTCLEANFILES =                \
-	$(desktop_in_files)	\
-	$(desktop_DATA)	
+EXTRA_DIST = 				\
+	file-roller.convert		\
+	packages.match.in		\
+	packages.match			\
+	$(desktop_in_in_files)		\
+	$(desktop_in_files)		\
+	$(desktop_DATA)			\
+	$(gsettingsschema_in_files)	\
+	$(NULL)
+
+DISTCLEANFILES =			\
+	$(desktop_in_files)		\
+	$(desktop_DATA)			\
+	$(NULL)
+
+CLEANFILES = 				\
+        $(gsettings_SCHEMAS)		\
+        $(NULL)
+
+dist-hook:
+	cd $(distdir); rm -f $(CLEANFILES)
 
 -include $(top_srcdir)/git.mk
diff --git a/data/file-roller.convert b/data/file-roller.convert
new file mode 100644
index 0000000..bec5da6
--- /dev/null
+++ b/data/file-roller.convert
@@ -0,0 +1,48 @@
+[org.gnome.FileRoller.Listing]
+sort-method = /apps/file-roller/listing/sort_method
+sort-type = /apps/file-roller/listing/sort_type
+list-mode = /apps/file-roller/listing/list_mode
+show-type = /apps/file-roller/listing/show_type
+show-size = /apps/file-roller/listing/show_size
+show-time = /apps/file-roller/listing/show_time
+show-path = /apps/file-roller/listing/show_path
+use-mime-icons = /apps/file-roller/listing/use_mime_icons
+name-column-width = /apps/file-roller/listing/name_column_width
+
+[org.gnome.FileRoller.UI]
+history-len = /apps/file-roller/ui/history_len
+window-width = /apps/file-roller/ui/window_width
+window-height = /apps/file-roller/ui/window_height
+sidebar-width = /apps/file-roller/ui/sidebar_width
+view-toolbar = /apps/file-roller/ui/view_toolbar
+view-statusbar = /apps/file-roller/ui/view_statusbar
+view-folders = /apps/file-roller/ui/view_folders
+
+[org.gnome.FileRoller.General]
+editors = /apps/file-roller/general/editors
+compression-level = /apps/file-roller/general/compression_level
+encrypt-header = /apps/file-roller/general/encrypt_header
+
+[org.gnome.FileRoller.Dialogs.Extract]
+overwrite = /apps/file-roller/dialogs/extract/overwrite
+skip-newer = /apps/file-roller/dialogs/extract/skip_newer
+recreate-folders = /apps/file-roller/dialogs/extract/recreate_folders
+
+[org.gnome.FileRoller.Dialogs.Add]
+current-folder = /apps/file-roller/dialogs/add/current_folder
+filename = /apps/file-roller/dialogs/add/filename
+include-files = /apps/file-roller/dialogs/add/include_files
+exclude-files = /apps/file-roller/dialogs/add/exclude_files
+exclude-folders = /apps/file-roller/dialogs/add/exclude_folders
+update = /apps/file-roller/dialogs/add/update
+recursive = /apps/file-roller/dialogs/add/recursive
+no-symlinks = /apps/file-roller/dialogs/add/no_symlinks
+
+[org.gnome.FileRoller.Dialogs.BatchAdd]
+default-extension = /apps/file-roller/dialogs/batch-add/default_extension
+other-options = /apps/file-roller/dialogs/batch-add/other_options
+volume-size = /apps/file-roller/dialogs/batch-add/volume_size
+
+[org.gnome.FileRoller.Dialogs.LastOutput]
+width = /apps/file-roller/dialogs/last_output/width
+height = /apps/file-roller/dialogs/last_output/height
diff --git a/data/org.gnome.FileRoller.gschema.xml.in b/data/org.gnome.FileRoller.gschema.xml.in
new file mode 100644
index 0000000..c7caf93
--- /dev/null
+++ b/data/org.gnome.FileRoller.gschema.xml.in
@@ -0,0 +1,224 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  File-Roller
+ 
+  Copyright © 2010 Free Software Foundation, Inc.
+ 
+  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 program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+<schemalist>
+
+  <enum id="org.gnome.FileRoller.SortMethod">
+    <value nick="name" value="0"/>
+    <value nick="size" value="1"/>
+    <value nick="type" value="2"/>
+    <value nick="time" value="3"/>
+    <value nick="path" value="4"/>
+  </enum>
+  
+  <enum id="org.gnome.FileRoller.SortType">
+    <value nick="ascending" value="0"/>
+    <value nick="descending" value="1"/>
+  </enum>
+  
+  <enum id="org.gnome.FileRoller.ListMode">
+    <value nick="all-files" value="0"/>
+    <value nick="as-folder" value="1"/>
+  </enum>
+  
+  <enum id="org.gnome.FileRoller.CompressionLevel">
+    <value nick="very-fast" value="0"/>
+    <value nick="fast" value="1"/>
+    <value nick="normal" value="2"/>
+    <value nick="maximum" value="3"/>
+  </enum>
+  
+  <schema id="org.gnome.FileRoller" path="/org/gnome/file-roller/">
+    <child name="listing" schema="org.gnome.FileRoller.Listing"/>
+    <child name="ui" schema="org.gnome.FileRoller.UI"/>
+    <child name="general" schema="org.gnome.FileRoller.General"/>
+    <child name="dialogs" schema="org.gnome.FileRoller.Dialogs"/>
+  </schema>
+  
+  <schema id="org.gnome.FileRoller.Listing" path="/org/gnome/file-roller/listing/" gettext-domain="file-roller">
+    <key name="sort-method" enum="org.gnome.FileRoller.SortMethod">
+      <default>'name'</default>
+      <_summary>How to sort files</_summary>
+      <_description>What criteria must be used to arrange files. Possible values: name, size, type, time, path.</_description>
+    </key>
+    <key name="sort-type" enum="org.gnome.FileRoller.SortType">
+      <default>'ascending'</default>
+      <_summary>Sort type</_summary>
+      <_description>Whether to sort in ascending or descending direction. Possible values: ascending, descending.</_description>
+    </key>
+    <key name="list-mode" enum="org.gnome.FileRoller.ListMode">
+      <default>'as-folder'</default>
+      <_summary>List Mode</_summary>
+      <_description>Use 'all-files' to view all the files in the archive in a single list, use 'as-folder' to navigate the archive as a folder.</_description>
+    </key>
+    <key name="show-type" type="b">
+      <default>true</default>
+      <_summary>Display type</_summary>
+      <_description>Display the type column in the main window.</_description>
+    </key>
+    <key name="show-size" type="b">
+      <default>true</default>
+      <_summary>Display size</_summary>
+      <_description>Display the size column in the main window.</_description>
+    </key>
+    <key name="show-time" type="b">
+      <default>true</default>
+      <_summary>Display time</_summary>
+      <_description>Display the time column in the main window.</_description>
+    </key>
+    <key name="show-path" type="b">
+      <default>true</default>
+      <_summary>Display path</_summary>
+      <_description>Display the path column in the main window.</_description>
+    </key>
+    <key name="use-mime-icons" type="b">
+      <default>true</default>
+      <_summary>Use mime icons</_summary>
+      <_description>If true will display icons depending on the file type (slower), otherwise will use always the same icon for all files (faster).</_description>
+    </key>
+    <key name="name-column-width" type="i">
+      <default>250</default>
+      <_summary>Name column width</_summary>
+      <_description>The default width of the name column the file list.</_description>
+    </key>
+  </schema>
+  
+  <schema id="org.gnome.FileRoller.UI" path="/org/gnome/file-roller/ui/" gettext-domain="file-roller">
+    <key name="history-len" type="i">
+      <default>5</default>
+      <_summary>Max history length</_summary>
+      <_description>Max number of items in the 'Open Recents' submenu.</_description>
+    </key>
+    <key name="window-width" type="i">
+      <default>600</default>
+    </key>
+    <key name="window-height" type="i">
+      <default>480</default>
+    </key>
+    <key name="sidebar-width" type="i">
+      <default>200</default>
+    </key>
+    <key name="view-toolbar" type="b">
+      <default>true</default>
+      <_summary>View toolbar</_summary>
+      <_description>Whether to display the toolbar.</_description>
+    </key>
+    <key name="view-statusbar" type="b">
+      <default>true</default>
+      <_summary>View statusbar</_summary>
+      <_description>Whether to display the statusbar.</_description>
+    </key>
+    <key name="view-folders" type="b">
+      <default>false</default>
+      <_summary>View the folders pane</_summary>
+      <_description>Whether to display the folders pane.</_description>
+    </key>
+  </schema>
+  
+  <schema id="org.gnome.FileRoller.General" path="/org/gnome/file-roller/general/" gettext-domain="file-roller">
+    <key name="editors" type="as">
+      <default>[]</default>
+      <_summary>Editors</_summary>
+      <_description>List of applications entered in the 'Open File' dialog and not associated with the file type.</_description>
+    </key>
+    <key name="compression-level" enum="org.gnome.FileRoller.CompressionLevel">
+      <default>'normal'</default>
+      <_summary>Compression level</_summary>
+      <_description>Compression level used when adding files to an archive. Possible values: very-fast, fast, normal, maximum.</_description>
+    </key>
+    <key name="encrypt-header" type="b">
+      <default>false</default>
+      <_summary>Encrypt the archive header</_summary>
+      <_description>Whether to encrypt the archive header.  If the header is encrypted the password will be required to list the archive content as well.</_description>
+    </key>
+  </schema>
+  
+  <schema id="org.gnome.FileRoller.Dialogs" path="/org/gnome/file-roller/dialogs/">
+    <child name="extract" schema="org.gnome.FileRoller.Dialogs.Extract"/>
+    <child name="add" schema="org.gnome.FileRoller.Dialogs.Add"/>
+    <child name="batch-add" schema="org.gnome.FileRoller.Dialogs.BatchAdd"/>
+    <child name="last-output" schema="org.gnome.FileRoller.Dialogs.LastOutput"/>
+  </schema>
+  
+  <schema id="org.gnome.FileRoller.Dialogs.Extract" path="/org/gnome/file-roller/dialogs/extract/" gettext-domain="file-roller">
+    <key name="overwrite" type="b">
+      <default>true</default>
+      <_summary>Overwrite existing files</_summary>
+    </key>
+    <key name="skip-newer" type="b">
+      <default>false</default>
+      <_summary>Do not overwrite newer files</_summary>
+    </key>
+    <key name="recreate-folders" type="b">
+      <default>true</default>
+      <_summary>Recreate the folders stored in the archive</_summary>
+    </key>
+  </schema>
+  
+  <schema id="org.gnome.FileRoller.Dialogs.Add" path="/org/gnome/file-roller/dialogs/add/" gettext-domain="file-roller">
+    <key name="current-folder" type="s">
+      <default>''</default>
+    </key>
+    <key name="filename" type="s">
+      <default>''</default>
+    </key>
+    <key name="include-files" type="s">
+      <default>''</default>
+    </key>
+    <key name="exclude-files" type="s">
+      <default>''</default>
+    </key>
+    <key name="exclude-folders" type="s">
+      <default>''</default>
+    </key>
+    <key name="update" type="b">
+      <default>false</default>
+    </key>
+    <key name="recursive" type="b">
+      <default>true</default>
+    </key>
+    <key name="no-symlinks" type="b">
+      <default>false</default>
+    </key>
+  </schema>
+  
+  <schema id="org.gnome.FileRoller.Dialogs.BatchAdd" path="/org/gnome/file-roller/dialogs/batch-add/" gettext-domain="file-roller">
+    <key name="default-extension" type="s">
+      <default>'.tar.gz'</default>
+    </key>
+    <key name="other-options" type="b">
+      <default>false</default>
+    </key>
+    <key name="volume-size" type="i">
+      <default>0</default>
+      <_summary>Default volume size</_summary>
+      <_description>The default size for volumes.</_description>
+    </key>
+  </schema>
+  
+  <schema id="org.gnome.FileRoller.Dialogs.LastOutput" path="/org/gnome/file-roller/dialogs/last-output/" gettext-domain="file-roller">
+    <key name="width" type="i">
+      <default>-1</default>
+    </key>
+    <key name="height" type="i">
+      <default>-1</default>
+    </key>
+  </schema>
+  
+</schemalist>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 714bb51..4a64f60 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -8,6 +8,7 @@ copy-n-paste/eggsmclient.h
 copy-n-paste/eggsmclient-private.h
 copy-n-paste/eggsmclient-xsmp.c
 data/file-roller.desktop.in.in
+data/org.gnome.FileRoller.gschema.xml.in
 [type: gettext/glade]data/ui/add-options.ui
 [type: gettext/glade]data/ui/batch-add-files.ui
 [type: gettext/glade]data/ui/batch-password.ui
diff --git a/src/fr-window.c b/src/fr-window.c
index 56040ea..f4b7262 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -54,7 +54,7 @@
 #include "ui.h"
 
 #undef NAUTILUS_PORTED_TO_GSETTINGS
-#define LAST_OUTPUT_DIALOG_NAME "last-output"
+#define LAST_OUTPUT_SCHEMA_NAME "LastOutput"
 #define MAX_HISTORY_LEN 5
 #define ACTIVITY_DELAY 100
 #define ACTIVITY_PULSE_STEP (0.033)
@@ -7037,7 +7037,7 @@ static gboolean
 last_output_window__unrealize_cb (GtkWidget  *widget,
 				  gpointer    data)
 {
-	pref_util_save_window_geometry (GTK_WINDOW (widget), LAST_OUTPUT_DIALOG_NAME);
+	pref_util_save_window_geometry (GTK_WINDOW (widget), LAST_OUTPUT_SCHEMA_NAME);
 	return FALSE;
 }
 
@@ -7136,7 +7136,7 @@ fr_window_view_last_output (FrWindow   *window,
 
 	/**/
 
-	pref_util_restore_window_geometry (GTK_WINDOW (dialog), LAST_OUTPUT_DIALOG_NAME);
+	pref_util_restore_window_geometry (GTK_WINDOW (dialog), LAST_OUTPUT_SCHEMA_NAME);
 }
 
 
diff --git a/src/preferences.h b/src/preferences.h
index 5f03074..60cba9d 100644
--- a/src/preferences.h
+++ b/src/preferences.h
@@ -27,15 +27,15 @@
 #include "typedefs.h"
 #include "fr-window.h"
 
-#define FILE_ROLLER_SCHEMA                "org.gnome.file-roller"
-#define FILE_ROLLER_SCHEMA_LISTING        FILE_ROLLER_SCHEMA ".listing"
-#define FILE_ROLLER_SCHEMA_UI             FILE_ROLLER_SCHEMA ".ui"
-#define FILE_ROLLER_SCHEMA_GENERAL        FILE_ROLLER_SCHEMA ".general"
-#define FILE_ROLLER_SCHEMA_DIALOGS        FILE_ROLLER_SCHEMA ".dialogs"
-#define FILE_ROLLER_SCHEMA_ADD            FILE_ROLLER_SCHEMA_DIALOGS ".add"
-#define FILE_ROLLER_SCHEMA_BATCH_ADD      FILE_ROLLER_SCHEMA_DIALOGS ".batch-add"
-#define FILE_ROLLER_SCHEMA_EXTRACT        FILE_ROLLER_SCHEMA_DIALOGS ".extract"
-#define FILE_ROLLER_SCHEMA_LAST_OUTPUT    FILE_ROLLER_SCHEMA_DIALOGS ".last-output"
+#define FILE_ROLLER_SCHEMA                "org.gnome.FileRoller"
+#define FILE_ROLLER_SCHEMA_LISTING        FILE_ROLLER_SCHEMA ".Listing"
+#define FILE_ROLLER_SCHEMA_UI             FILE_ROLLER_SCHEMA ".UI"
+#define FILE_ROLLER_SCHEMA_GENERAL        FILE_ROLLER_SCHEMA ".General"
+#define FILE_ROLLER_SCHEMA_DIALOGS        FILE_ROLLER_SCHEMA ".Dialogs"
+#define FILE_ROLLER_SCHEMA_ADD            FILE_ROLLER_SCHEMA_DIALOGS ".Add"
+#define FILE_ROLLER_SCHEMA_BATCH_ADD      FILE_ROLLER_SCHEMA_DIALOGS ".BatchAdd"
+#define FILE_ROLLER_SCHEMA_EXTRACT        FILE_ROLLER_SCHEMA_DIALOGS ".Extract"
+#define FILE_ROLLER_SCHEMA_LAST_OUTPUT    FILE_ROLLER_SCHEMA_DIALOGS ".LastOutput"
 
 #define PREF_LISTING_SORT_METHOD          "sort-method"
 #define PREF_LISTING_SORT_TYPE            "sort-type"
@@ -76,7 +76,7 @@
 #define PREF_BATCH_ADD_OTHER_OPTIONS      "other-options"
 #define PREF_BATCH_ADD_VOLUME_SIZE        "volume-size"
 
-#define NAUTILUS_SCHEMA                   "org.gnome.nautilus.general"
+#define NAUTILUS_SCHEMA                   "org.gnome.nautilus.preferences"
 #define NAUTILUS_CLICK_POLICY             "click-policy"
 
 void  pref_util_save_window_geometry    (GtkWindow  *window,



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