[debian-edu-commits] debian-edu/ 87/183: Updated kommander script to work with kommander 1.2 (version from KDE 3.4)
Alexander Alemayhu
ccscanf-guest at moszumanska.debian.org
Wed Jun 11 16:48:36 UTC 2014
This is an automated email from the git hooks/post-receive script.
ccscanf-guest pushed a commit to branch master
in repository desktop-profiles.
commit b7d8379315035fce5fd26954f42680f98bce1600
Author: Bart Cornelis <cobaco at linux.be>
Date: Fri Sep 30 22:21:08 2005 +0000
Updated kommander script to work with kommander 1.2 (version from KDE 3.4)
---
po/fr.po | 15 ++++++----
po/it.po | 17 +++++++-----
po/nl.po | 15 ++++++----
po/profile-manager.pot | 6 ++--
po/vi.po | 11 +++++---
profile-manager | 12 ++++----
profile-manager.1 | 8 +++---
profile-manager.kmdr | 75 +++++++++++++++++++++++++-------------------------
8 files changed, 85 insertions(+), 74 deletions(-)
diff --git a/po/fr.po b/po/fr.po
index f505353..a55a09f 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -8,9 +8,9 @@ msgid ""
msgstr ""
"Project-Id-Version: profile-desktop-manager\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-08-03 13:36+0200\n"
-"PO-Revision-Date: 2005-06-02 08:15+0200\n"
-"Last-Translator: Jean-Luc Coulon (f5ibh) <jean-luc.coulon at wanadoo.fr>\n"
+"POT-Creation-Date: 2005-09-28 23:07+0200\n"
+"PO-Revision-Date: 2005-09-28 23:06+0100\n"
+"Last-Translator: Bart Cornelis <cobaco at linux.be>\n"
"Language-Team: French <debian-l10n-french at lists.debian.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-15\n"
@@ -53,8 +53,8 @@ msgstr ""
"(=exigences) correspond � l'expression rationnelle sont affich�s"
#: _from_rc.cc:8
-msgid "pre&cedence"
-msgstr "Pri&orit�"
+msgid "&precedence"
+msgstr "&priorit�"
#: _from_rc.cc:9
msgid ""
@@ -207,7 +207,7 @@ msgstr ""
"profil choisi"
#: _from_rc.cc:44
-msgid "Remove &selected"
+msgid "Remo&ve selected"
msgstr "Supprimer &s�lectionn�"
#: _from_rc.cc:45
@@ -409,3 +409,6 @@ msgstr "Sixi
msgid "Save Changes"
msgstr "Enregistrer les modifications"
+
+#~ msgid "pre&cedence"
+#~ msgstr "Pri&orit�"
diff --git a/po/it.po b/po/it.po
index afcf2ed..4833a07 100644
--- a/po/it.po
+++ b/po/it.po
@@ -2,10 +2,10 @@ msgid ""
msgstr ""
"Project-Id-Version: desktop-profiles\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-08-03 13:36+0200\n"
-"PO-Revision-Date: 2005-05-18 00:11+0200\n"
-"Last-Translator: Marco Presi <zufus at debian.org>\n"
-"Language-Team: debian-l10n-italian <debian-l10n-italian at lists.debian.org>\n"
+"POT-Creation-Date: 2005-09-28 23:07+0200\n"
+"PO-Revision-Date: 2005-09-28 23:06+0100\n"
+"Last-Translator: Bart Cornelis <cobaco at linux.be>\n"
+"Language-Team: debian-l10n-italian <debian-l10n-italian at lists.debian.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-15\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -47,8 +47,8 @@ msgstr ""
"(=requisiti) corrisponde all'espessione regolare"
#: _from_rc.cc:8
-msgid "pre&cedence"
-msgstr "precedenza"
+msgid "&precedence"
+msgstr "&precedenza"
#: _from_rc.cc:9
msgid ""
@@ -202,7 +202,7 @@ msgstr ""
"selezionato"
#: _from_rc.cc:44
-msgid "Remove &selected"
+msgid "Remo&ve selected"
msgstr "Rimuove la &selezione"
#: _from_rc.cc:45
@@ -402,3 +402,6 @@ msgstr "Sesto campo (=descrizione) del profilo scelto"
msgid "Save Changes"
msgstr "Salva le modifiche"
+
+#~ msgid "pre&cedence"
+#~ msgstr "precedenza"
diff --git a/po/nl.po b/po/nl.po
index 76b5b2d..0ba535b 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: desktop-profiles\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-08-03 13:36+0200\n"
-"PO-Revision-Date: 2005-05-18 01:30+0100\n"
+"POT-Creation-Date: 2005-09-28 23:07+0200\n"
+"PO-Revision-Date: 2005-09-28 23:06+0100\n"
"Last-Translator: Bart Cornelis <cobaco at linux.be>\n"
"Language-Team: debian-l10n-dutch <debian-l10n-dutch at lists.debian.org>\n"
"MIME-Version: 1.0\n"
@@ -53,8 +53,8 @@ msgstr ""
"voldoen aan de gegeven reguliere expressie weergegeven"
#: _from_rc.cc:8
-msgid "pre&cedence"
-msgstr "prioriteit"
+msgid "&precedence"
+msgstr "&prioriteit"
#: _from_rc.cc:9
msgid ""
@@ -207,8 +207,8 @@ msgstr ""
"geselecteerde profiel"
#: _from_rc.cc:44
-msgid "Remove &selected"
-msgstr "Geselecteerd vereiste verwijderen"
+msgid "Remo&ve selected"
+msgstr "Geselecteerd vereiste &verwijderen"
#: _from_rc.cc:45
msgid "Removes selected activation requirement from the list"
@@ -410,3 +410,6 @@ msgstr "6e veld (=beschrijving) van het geselecteerde profiel"
msgid "Save Changes"
msgstr "&Aanpassingen Opslaan"
+
+#~ msgid "pre&cedence"
+#~ msgstr "prioriteit"
diff --git a/po/profile-manager.pot b/po/profile-manager.pot
index cc8b79c..201ce02 100644
--- a/po/profile-manager.pot
+++ b/po/profile-manager.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-08-03 13:36+0200\n"
+"POT-Creation-Date: 2005-09-28 23:07+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -49,7 +49,7 @@ msgid ""
msgstr ""
#: _from_rc.cc:8
-msgid "pre&cedence"
+msgid "&precedence"
msgstr ""
#: _from_rc.cc:9
@@ -203,7 +203,7 @@ msgid ""
msgstr ""
#: _from_rc.cc:44
-msgid "Remove &selected"
+msgid "Remo&ve selected"
msgstr ""
#: _from_rc.cc:45
diff --git a/po/vi.po b/po/vi.po
index ea73b4e..73485bf 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: profile-manager\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-08-03 13:36+0200\n"
+"POT-Creation-Date: 2005-09-28 23:07+0200\n"
"PO-Revision-Date: 2005-06-16 14:21+0930\n"
"Last-Translator: Clytie Siddall <clytie at riverland.net.au>\n"
"Language-Team: Vietnamese <gnomevi-list at lists.sourceforge.net>\n"
@@ -52,8 +52,8 @@ msgstr ""
"khớp biểu thức chính quy đã cho."
#: _from_rc.cc:8
-msgid "pre&cedence"
-msgstr "&ưu tiên"
+msgid "&precedence"
+msgstr "ưu tiên"
#: _from_rc.cc:9
msgid ""
@@ -208,7 +208,7 @@ msgstr ""
"lược"
#: _from_rc.cc:44
-msgid "Remove &selected"
+msgid "Remo&ve selected"
msgstr "Loại bỏ đã &chọn"
#: _from_rc.cc:45
@@ -406,3 +406,6 @@ msgstr "Trường thứ sáu (=mô tả) của tiểu sử sơ lược được
msgid "Save Changes"
msgstr "Lưu thay đổi"
+
+#~ msgid "pre&cedence"
+#~ msgstr "&ưu tiên"
diff --git a/profile-manager b/profile-manager
index 078a4a8..2a78f54 100755
--- a/profile-manager
+++ b/profile-manager
@@ -23,7 +23,7 @@ else
fi;
-# check if executable
+# check if interpreter is executable
if !(test -x $kmdrBinary); then
display_message "$kmdrBinary is not executable -> exiting":
exit;
@@ -31,16 +31,16 @@ else
kmdrVersion="`$kmdrBinary --version | grep "^Kommander Executor:" | sed "s/^.*: *\(.*\)/\1/"`";
fi;
-# if profile-manager kommander script is readable
+# check if profile-manager kommander script is readable
if !(test -r /usr/share/desktop-profiles/kommander-scripts/profile-manager.kmdr); then
display_message "/usr/share/desktop-profiles/kommander-sripts/profile-manager.kmdr is missing or unreadable! -> exiting";
exit;
fi;
# Check version and run
-if (test $kmdrVersion = 1.0) || (echo $kmdrVersion | grep "^0."); then
+#if (test $kmdrVersion = 1.0) || (echo $kmdrVersion | grep "^0."); then
$kmdrBinary /usr/share/desktop-profiles/kommander-scripts/profile-manager.kmdr;
# kommander with new parser -> known not to work with current script
-else
- display_message "This script does not yet work with the version of kommander you have installed.\nYou want to try kmdr-executor version 1.0 (kommander packager 1:3.3.2)";
-fi;
+#else
+# display_message "This script does not yet work with the version of kommander you have installed.\nYou want to try kmdr-executor version 1.0 (kommander packager 1:3.3.2)";
+#fi;
diff --git a/profile-manager.1 b/profile-manager.1
index fd9db54..7266199 100644
--- a/profile-manager.1
+++ b/profile-manager.1
@@ -1,13 +1,15 @@
.TH PROFILE-MANAGER 1 "May 07, 2005" "desktop-profiles"
.SH NAME
-profile-manager \- script that starts the gui for configuring profile metadata
+profile-manager \- starts the gui for configuring the metadata used by desktop-profiles
.SH SYNOPSIS
profile-manager
.SH DESCRIPTION
-This script is a convenience script that will attempt to start the kommander gui script for configuring the profile metadata. It will check if the kommander application is installed, if kommander is of a version that's not known to break things, and if the profile-manager.kmdr script is still present. If any of the checks fail, it will display a message saying why the gui couldn't be started.
+The desktop profiles package needs metadata about the available profiles in order to decide when to activate which profiles. This metadata is contained in the .listing files placed in the /etc/desktop-profiles directory. This convenience script will start a graphical interface for configuring that metadata.
+.PP
+The gui is a kommander script, so you need to have the kommander package installed for the gui to work (the script will check if the necessary prerequisites are present, and tell you what's missing if necessary).
.SH OPTIONS
.PP
@@ -18,8 +20,6 @@ There are no options
.SH BUGS
The gui currently barks at profile metadata containing a single quote in the description.
-.PP
-The gui is currently known to not work with the kommander version of kde 3.4 (the 3.3. works fine).
.SH AUTHOR
This manual page was written by Bart Cornelis <cobaco at skolelinux.no>.
diff --git a/profile-manager.kmdr b/profile-manager.kmdr
index 2b240be..1daf7cf 100644
--- a/profile-manager.kmdr
+++ b/profile-manager.kmdr
@@ -46,6 +46,9 @@
<string></string>
</stringlist>
</property>
+ <property name="useInternalParser">
+ <bool>false</bool>
+ </property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
@@ -314,7 +317,7 @@
<enum>TabFocus</enum>
</property>
<property name="text">
- <string>pre&cedence</string>
+ <string>&precedence</string>
</property>
<property name="associations" stdset="0">
<stringlist>
@@ -322,7 +325,7 @@
<string></string>
<string>@execBegin
-if(@String.isEmpty(@precedenceRegexp)); then
+if test "" = '@precedenceRegexp'; then
echo "@null";
elif test "@test" = '>'; then
echo "--precedence 'gt @precedenceRegexp'";
@@ -1054,7 +1057,7 @@ fi
FILE="$(echo '@profilesAll.selection' | cut --fields 1 --delimiter ';')"
NAME="$(echo '@profilesAll.selection' | cut --fields 2 --delimiter ';')"
-REQS="$(grep ^$NAME $FILE | cut --fields 5 --delimiter ';')"
+REQS="$(grep "^$NAME;" $FILE | cut --fields 5 --delimiter ';')"
for_each_requirement "$REQS" 'echo'
@execEnd</string>
@@ -1062,7 +1065,7 @@ for_each_requirement "$REQS" 'echo'
<property name="associations" stdset="0">
<stringlist>
<string>@execBegin
-@# escape @widgetText so we don't loose anything
+@# escape @widgetText so we do not loose anything
@setGlobal( tmp, at String.replace( @widgetText, \,\\\\\\\ ) ) @setGlobal( tmp, at String.replace( @global(tmp),$,\\\\\$ ) ) @setGlobal( tmp, at String.replace( @global(tmp), @exec(echo \"),\\\\\" ) )
@setGlobal( tmp, at String.replace( @global(tmp), @exec(echo \`),\\\\\` ) )
@@ -1084,7 +1087,7 @@ for_each_requirement "$REQS" 'echo'
<bool>true</bool>
</property>
<property name="text">
- <string>Remove &selected</string>
+ <string>Remo&ve selected</string>
</property>
<property name="populationText">
<string></string>
@@ -1434,7 +1437,7 @@ fi;
<property name="associations" stdset="0">
<stringlist>
<string>false</string>
- <string></string>
+ <string>false</string>
<string>true</string>
</stringlist>
</property>
@@ -1501,12 +1504,13 @@ fi;
</property>
<property name="associations" stdset="0">
<stringlist>
- <string>FILE="@listFileCurrent";
-NAME="@nameCurrent";
+ <string>@setGlobal(tmp, @exec(tempfile))
-TEMP=$(tempfile)
-cat "$FILE" | grep -v "^$NAME;" > $TEMP
-mv $TEMP $FILE</string>
+ at exec(cat "@listFileCurrent" | grep -v "^@nameCurrent;" > @global(tmp))
+ at exec(mv @global(tmp) @listFileCurrent)
+
+ at exec(rm @global(tmp))
+</string>
</stringlist>
</property>
<property name="toolTip" stdset="0">
@@ -1542,36 +1546,31 @@ mv $TEMP $FILE</string>
</property>
<property name="associations" stdset="0">
<stringlist>
- <string>IS_NEW="@isNew";
+ <string>@setGlobal(newProfile, at nameCurrent;@kindCurrent;@locationCurrent;@precedenceCurrent;@requirementsCurrent;@descriptionCurrent)
+ at setGlobal(oldProfile, at exec(echo '@profilesAll.item(@profilesAll.currentItem)' | cut --fields 2 --delimiter ';'))
-FILE="@listFileCurrent";
-NAME="@nameCurrent";
-LOCATION="@locationCurrent";
-PRECEDENCE="@precedenceCurrent";
-REQS="@requirementsCurrent";
-KIND="@kindCurrent";
-DESC="@descriptionCurrent";
+ at execBegin
+if test @isNew = false; then
+ if test -w "@listFileCurrent" && test "@global(oldProfile)"x != x; then
+ sed -i "s%^@global(oldProfile).*%@global(newProfile)%" "@listFileCurrent";
+ elif test "@nameCurrent"x != x; then
+ kdialog --error "It appears you don't have permission to write @listFileCurrent" || true;
+ fi;
+fi;
+ at execEnd
-NEW="$NAME;$KIND;$LOCATION;$PRECEDENCE;$REQS;$DESC"
-
-# changing existing profile
-if (test "$IS_NEW" = "false"); then
- OLD="$(echo '@profilesAll.item(@profilesAll.currentItem)' | cut --fields 2 --delimiter ';')";
-
- if test -w "$FILE"; then
- sed -i "s%^$OLD.*%$NEW%" "$FILE";
- elif "$NAME"x != x; then
- kdialog --error "It appears you don't have permission to write $FILE" || true;
+ at execBegin
+if test @isNew = true; then
+ if test -w "@listFileCurrent"; then
+ echo "@global(newProfile)" >> "@listFileCurrent";
+ elif !(test -e "@listFileCurrent") && test -w "$(dirname @listFileCurrent)"; then
+ echo "@global(newProfile)" >> "@listFileCurrent";
+ elif test "@nameCurrent"x != x; then
+ kdialog --error "It appears you don't have permission to write @listFileCurrent" || true;
fi;
-# adding new profile
-else
- if (test -w "$FILE") || \
- ( (! test -e "$FILE") (test -w "$(dirname $FILE)") ); then
- echo "$NEW" >> "$FILE";
- elif "$NAME"x != x; then
- kdialog --error "It appears you don't have permission to write $FILE" || true;
- fi;
-fi;</string>
+fi;
+ at execEnd
+</string>
</stringlist>
</property>
<property name="toolTip" stdset="0">
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/desktop-profiles.git
More information about the debian-edu-commits
mailing list