[latexila] Migrate dconf data script: convert int -> uint32
- From: SÃbastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] Migrate dconf data script: convert int -> uint32
- Date: Fri, 12 Aug 2011 15:11:03 +0000 (UTC)
commit eaf36a15617b8a71315155682b954b35b17d1a34
Author: SÃbastien Wilmet <swilmet src gnome org>
Date: Fri Aug 12 17:03:52 2011 +0200
Migrate dconf data script: convert int -> uint32
data/migrate-dconf-data.sh | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/data/migrate-dconf-data.sh b/data/migrate-dconf-data.sh
index 4472673..9e30a03 100755
--- a/data/migrate-dconf-data.sh
+++ b/data/migrate-dconf-data.sh
@@ -3,6 +3,19 @@
# This script migrates the GSettings data that are stored with dconf.
# Migration: LaTeXila 2.0.x -> 2.2.x
+function convert_int_to_uint ()
+{
+ local list="
+ /apps/latexila/preferences/editor/nb-most-used-symbols
+ /apps/latexila/preferences/latex/interactive-completion-num"
+
+ for item in $list; do
+ [ "$1" = "$item" ] && return 0
+ done
+
+ return 1
+}
+
no_path=false
if [ "$1" = "" ] || [ "$1" = "--force" ]; then
no_path=true
@@ -42,6 +55,11 @@ if [ "${path%/}" = "$path" ]; then
new_path="/org/gnome${path#/apps}"
val=`dconf read $path`
+
+ if convert_int_to_uint $path; then
+ val="uint32 $val"
+ fi
+
if [ "$val" != "" ]; then
dconf write $new_path "$val"
fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]