[debian-edu-commits] debian-edu/ 56/183: Better Layout profile details
Alexander Alemayhu
ccscanf-guest at moszumanska.debian.org
Wed Jun 11 16:48:33 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 5ef4029768e7d2b25e2f667926a5595481331d16
Author: Bart Cornelis <cobaco at linux.be>
Date: Thu May 12 18:38:23 2005 +0000
Better Layout profile details
---
po/nl.po | 4 +-
po/profile-manager.pot | 206 +++++++------
profile-manager.kmdr | 807 +++++++++++++++++++++++++++----------------------
3 files changed, 549 insertions(+), 468 deletions(-)
diff --git a/po/nl.po b/po/nl.po
index 63cfbcb..c297e7b 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -284,11 +284,11 @@ msgstr "Voer om het even wel shell-commando in"
#: _from_rc.cc:72
msgid "executes succesfully"
-msgstr "succesvol be�indigd"
+msgstr "succesvol beeindigd"
#: _from_rc.cc:74
msgid "Make succesfull completion of given shell command a requirement for activation of this profile"
-msgstr "Maakt de succesvolle be�inding van het gegeven shell-commando een vereiste voor activatie van dit profiel."
+msgstr "Maakt de succesvolle beeinding van het gegeven shell-commando een vereiste voor activatie van dit profiel."
#: _from_rc.cc:75
msgid "Deactivate profile completely"
diff --git a/po/profile-manager.pot b/po/profile-manager.pot
index 97f2b4e..b075aae 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-05-12 17:52+0200\n"
+"POT-Creation-Date: 2005-05-12 20:30+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"
@@ -29,7 +29,7 @@ msgid "Only show profiles when:"
msgstr ""
#: _from_rc.cc:4
-msgid "kind matches"
+msgid "&kind matches"
msgstr ""
#: _from_rc.cc:5
@@ -39,7 +39,7 @@ msgid ""
msgstr ""
#: _from_rc.cc:6
-msgid "requirement matches"
+msgid "re&quirement matches"
msgstr ""
#: _from_rc.cc:7
@@ -48,7 +48,7 @@ msgid ""
"regular expression are shown"
msgstr ""
-#: _from_rc.cc:8 _from_rc.cc:36
+#: _from_rc.cc:8 _from_rc.cc:30
msgid "precedence"
msgstr ""
@@ -78,7 +78,7 @@ msgstr ""
msgid "<>"
msgstr ""
-#: _from_rc.cc:15 _from_rc.cc:16 _from_rc.cc:27 _from_rc.cc:28 _from_rc.cc:29
+#: _from_rc.cc:15 _from_rc.cc:16 _from_rc.cc:21 _from_rc.cc:22 _from_rc.cc:23
msgid "Takes a regular expression"
msgstr ""
@@ -87,7 +87,7 @@ msgid "Takes a numerical value (may be negative)"
msgstr ""
#: _from_rc.cc:18
-msgid "requirements are met for"
+msgid "req&uirements are met for"
msgstr ""
#: _from_rc.cc:19
@@ -100,62 +100,62 @@ msgstr ""
msgid "list of user accounts on this system"
msgstr ""
-#: _from_rc.cc:21
-msgid "name matches"
-msgstr ""
-
-#: _from_rc.cc:22
-msgid ""
-"When checked only profiles whose 1st (=name) field matches the given regular "
-"expression are shown"
-msgstr ""
-
-#: _from_rc.cc:23
-msgid "description matches"
-msgstr ""
-
#: _from_rc.cc:24
-msgid ""
-"When checked only profiles whose 6th (=description) field matches the given "
-"regular expression are shown"
+msgid "Sort profile list on"
msgstr ""
-#: _from_rc.cc:25
-msgid "location matches"
+#: _from_rc.cc:25 _from_rc.cc:32
+msgid "Shown profiles are sorted on the contents of the selected field"
msgstr ""
#: _from_rc.cc:26
-msgid ""
-"When checked only profiles whose 3th (=location) field matches the given "
-"regular expression are shown"
+msgid "description"
msgstr ""
-#: _from_rc.cc:30
-msgid "Sort profile list on"
+#: _from_rc.cc:27
+msgid "kind"
msgstr ""
-#: _from_rc.cc:31 _from_rc.cc:38
-msgid "Shown profiles are sorted on the contents of the selected field"
+#: _from_rc.cc:28
+msgid "location"
msgstr ""
-#: _from_rc.cc:32
-msgid "description"
+#: _from_rc.cc:29
+msgid "name"
+msgstr ""
+
+#: _from_rc.cc:31
+msgid "requirements"
msgstr ""
#: _from_rc.cc:33
-msgid "kind"
+msgid "&name matches"
msgstr ""
#: _from_rc.cc:34
-msgid "location"
+msgid ""
+"When checked only profiles whose 1st (=name) field matches the given regular "
+"expression are shown"
msgstr ""
#: _from_rc.cc:35
-msgid "name"
+msgid "&description matches"
+msgstr ""
+
+#: _from_rc.cc:36
+msgid ""
+"When checked only profiles whose 6th (=description) field matches the given "
+"regular expression are shown"
msgstr ""
#: _from_rc.cc:37
-msgid "requirements"
+msgid "location &matches"
+msgstr ""
+
+#: _from_rc.cc:38
+msgid ""
+"When checked only profiles whose 3th (=location) field matches the given "
+"regular expression are shown"
msgstr ""
#: _from_rc.cc:39
@@ -167,207 +167,215 @@ msgid "Profile Details"
msgstr ""
#: _from_rc.cc:41
-msgid "Name:"
+msgid "Listed in"
msgstr ""
#: _from_rc.cc:42
-msgid "1st field (=name) of selected profile"
+msgid "*.listing"
msgstr ""
#: _from_rc.cc:43
-msgid "Description:"
+msgid "Append profile description to"
msgstr ""
#: _from_rc.cc:44
-msgid "6th field (=description) of selected profile"
+msgid ".listing file where the profile is defined"
msgstr ""
#: _from_rc.cc:45
-msgid "Kind:"
+msgid "&Is new"
msgstr ""
#: _from_rc.cc:46
-msgid "XDG_CONFIG"
+msgid "Check if shown details (will) describe a new profile"
msgstr ""
#: _from_rc.cc:47
-msgid "XDG_DATA"
+msgid ""
+"@if(isEmpty())\n"
+"@listFileCurrent.setEnabled()\n"
+"@listFileCurrent.setText(/etc/desktop-profiles/custom.listing)"
msgstr ""
#: _from_rc.cc:48
-msgid "KDE"
+msgid "Delete pr&ofile"
msgstr ""
#: _from_rc.cc:49
-msgid "GCONF"
+msgid "Delete profile whose details are shown"
msgstr ""
#: _from_rc.cc:50
-msgid "GNUSTEP"
+msgid "Add new profile"
msgstr ""
#: _from_rc.cc:51
-msgid "ROX"
+msgid "Add/Update profile whose details are shown"
msgstr ""
#: _from_rc.cc:52
-msgid "UDE"
+msgid "&Cancel Changes"
msgstr ""
#: _from_rc.cc:53
-msgid "2nd field (=kind) of selected profile"
+msgid "Forget changes made to shown profile details"
msgstr ""
#: _from_rc.cc:54
-msgid "Precedence:"
+msgid "Activation requirements:"
msgstr ""
#: _from_rc.cc:55
-msgid "4th field (=precedence value) of selected profile"
+msgid ""
+"list of activation requirements (contained in the 5th field) of selected "
+"profile"
msgstr ""
#: _from_rc.cc:56
-msgid "Location(s):"
+msgid "Remove &selected"
msgstr ""
#: _from_rc.cc:57
-msgid "3th field of selected profile"
+msgid "Removes selected activation requirement from the list"
msgstr ""
#: _from_rc.cc:58
-msgid "Activation requirements:"
+msgid "New activation requirement:"
msgstr ""
#: _from_rc.cc:59
-msgid ""
-"list of activation requirements (contained in the 5th field) of selected "
-"profile"
+msgid "When the user is"
msgstr ""
#: _from_rc.cc:60
-msgid "Remove selected"
+msgid "a member of"
msgstr ""
#: _from_rc.cc:61
-msgid "Removes selected activation requirement from the list"
+msgid "not member of "
msgstr ""
#: _from_rc.cc:62
-msgid "New activation requirement:"
+msgid ""
+"Your choice here determines wether the new requirement concerns membership "
+"or non-membership"
msgstr ""
#: _from_rc.cc:63
-msgid "When the user is"
+msgid ""
+"Choose the group for which (non-)membership is needed to activate this "
+"profile"
msgstr ""
#: _from_rc.cc:64
-msgid "a member of"
+msgid "&Add"
msgstr ""
#: _from_rc.cc:65
-msgid "not member of "
+msgid ""
+"Only activate profile for users that are (not) a member of the selected group"
msgstr ""
#: _from_rc.cc:66
-msgid ""
-"Your choice here determines wether the new requirement concerns membership "
-"or non-membership"
+msgid "When"
msgstr ""
#: _from_rc.cc:67
-msgid ""
-"Choose the group for which (non-)membership is needed to activate this "
-"profile"
+msgid "Enter any shell command"
msgstr ""
-#: _from_rc.cc:68 _from_rc.cc:73
-msgid "Add"
+#: _from_rc.cc:68
+msgid "executes succesfully"
msgstr ""
#: _from_rc.cc:69
-msgid ""
-"Only activate profile for users that are (not) a member of the selected group"
+msgid "Add"
msgstr ""
#: _from_rc.cc:70
-msgid "When"
+msgid ""
+"Make succesfull completion of given shell command a requirement for "
+"activation of this profile"
msgstr ""
#: _from_rc.cc:71
-msgid "Enter any shell command"
+msgid "Deacti&vate profile completely"
msgstr ""
#: _from_rc.cc:72
-msgid "executes succesfully"
+msgid "Adds an unsatisfiable requirement (not in any group)"
+msgstr ""
+
+#: _from_rc.cc:73
+msgid "1st field (=name) of selected profile"
msgstr ""
#: _from_rc.cc:74
-msgid ""
-"Make succesfull completion of given shell command a requirement for "
-"activation of this profile"
+msgid "Name:"
msgstr ""
#: _from_rc.cc:75
-msgid "Deactivate profile completely"
+msgid "Precedence:"
msgstr ""
#: _from_rc.cc:76
-msgid "Adds an unsatisfiable requirement (not in any group)"
+msgid "Kind:"
msgstr ""
#: _from_rc.cc:77
-msgid "Listed in"
+msgid "XDG_CONFIG"
msgstr ""
#: _from_rc.cc:78
-msgid "*.listing"
+msgid "XDG_DATA"
msgstr ""
#: _from_rc.cc:79
-msgid "Append profile description to"
+msgid "KDE"
msgstr ""
#: _from_rc.cc:80
-msgid ".listing file where the profile is defined"
+msgid "GCONF"
msgstr ""
#: _from_rc.cc:81
-msgid "Is new"
+msgid "GNUSTEP"
msgstr ""
#: _from_rc.cc:82
-msgid "Check if shown details (will) describe a new profile"
+msgid "ROX"
msgstr ""
#: _from_rc.cc:83
-msgid ""
-"@if(isEmpty())\n"
-"@listFileCurrent.setEnabled()\n"
-"@listFileCurrent.setText(/etc/desktop-profiles/custom.listing)"
+msgid "UDE"
msgstr ""
#: _from_rc.cc:84
-msgid "Delete profile"
+msgid "2nd field (=kind) of selected profile"
msgstr ""
#: _from_rc.cc:85
-msgid "Delete profile whose details are shown"
+msgid "-1000"
msgstr ""
#: _from_rc.cc:86
-msgid "Add new profile"
+msgid "4th field (=precedence value) of selected profile"
msgstr ""
#: _from_rc.cc:87
-msgid "Add/Update profile whose details are shown"
+msgid "Description:"
msgstr ""
#: _from_rc.cc:88
-msgid "Cancel Changes"
+msgid "6th field (=description) of selected profile"
msgstr ""
#: _from_rc.cc:89
-msgid "Forget changes made to shown profile details"
+msgid "Location(s):"
+msgstr ""
+
+#: _from_rc.cc:90
+msgid "3th field of selected profile"
msgstr ""
msgid "Save Changes"
diff --git a/profile-manager.kmdr b/profile-manager.kmdr
index a896bca..7722d40 100644
--- a/profile-manager.kmdr
+++ b/profile-manager.kmdr
@@ -222,7 +222,7 @@
<enum>TabFocus</enum>
</property>
<property name="text">
- <string>kind matches</string>
+ <string>&kind matches</string>
</property>
<property name="checked">
<bool>false</bool>
@@ -254,7 +254,7 @@ fi
<enum>Horizontal</enum>
</property>
<property name="sizeType">
- <enum>Fixed</enum>
+ <enum>Preferred</enum>
</property>
<property name="sizeHint">
<size>
@@ -281,7 +281,7 @@ fi
<enum>TabFocus</enum>
</property>
<property name="text">
- <string>requirement matches</string>
+ <string>re&quirement matches</string>
</property>
<property name="associations" stdset="0">
<stringlist>
@@ -503,7 +503,7 @@ fi
<enum>TabFocus</enum>
</property>
<property name="text">
- <string>requirements are met for</string>
+ <string>req&uirements are met for</string>
</property>
<property name="associations" stdset="0">
<stringlist>
@@ -779,7 +779,7 @@ fi
<enum>TabFocus</enum>
</property>
<property name="text">
- <string>name matches</string>
+ <string>&name matches</string>
</property>
<property name="associations" stdset="0">
<stringlist>
@@ -832,7 +832,7 @@ fi
</sizepolicy>
</property>
<property name="text">
- <string>description matches</string>
+ <string>&description matches</string>
</property>
<property name="associations" stdset="0">
<stringlist>
@@ -883,7 +883,7 @@ fi
<enum>TabFocus</enum>
</property>
<property name="text">
- <string>location matches</string>
+ <string>location &matches</string>
</property>
<property name="associations" stdset="0">
<stringlist>
@@ -978,7 +978,7 @@ fi
<property name="title">
<string>Profile Details</string>
</property>
- <vbox>
+ <grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
@@ -988,11 +988,11 @@ fi
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
- <cstring>Layout29</cstring>
+ <cstring>Layout35</cstring>
</property>
- <grid>
+ <hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
@@ -1002,9 +1002,9 @@ fi
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="QLayoutWidget">
<property name="name">
- <cstring>Layout23</cstring>
+ <cstring>Layout30</cstring>
</property>
<hbox>
<property name="name">
@@ -1018,50 +1018,45 @@ fi
</property>
<widget class="Label">
<property name="name">
- <cstring>nameLabel</cstring>
+ <cstring>listFileLabel</cstring>
</property>
<property name="text">
- <string>Name:</string>
+ <string>Listed in</string>
</property>
</widget>
- <spacer>
+ <widget class="FileSelector">
<property name="name">
- <cstring>Spacer7</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Fixed</enum>
+ <cstring>listFileCurrent</cstring>
</property>
- <property name="sizeHint">
- <size>
- <width>33</width>
- <height>20</height>
- </size>
+ <property name="enabled">
+ <bool>true</bool>
</property>
- </spacer>
- <widget class="LineEdit">
- <property name="name">
- <cstring>nameCurrent</cstring>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
</property>
<property name="populationText">
- <string></string>
+ <string>/etc/desktop-profiles/custom.listing</string>
</property>
<property name="associations" stdset="0">
<stringlist>
<string>@widgetText</string>
</stringlist>
</property>
+ <property name="selectionFilter">
+ <string>*.listing</string>
+ </property>
+ <property name="selectionCaption">
+ <string>Append profile description to</string>
+ </property>
<property name="toolTip" stdset="0">
- <string>1st field (=name) of selected profile</string>
+ <string>.listing file where the profile is defined</string>
</property>
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="0" column="2" rowspan="1" colspan="2">
+ <widget class="QLayoutWidget">
<property name="name">
- <cstring>Layout26</cstring>
+ <cstring>Layout32</cstring>
</property>
<hbox>
<property name="name">
@@ -1073,40 +1068,84 @@ fi
<property name="spacing">
<number>6</number>
</property>
- <widget class="Label">
+ <widget class="CheckBox">
<property name="name">
- <cstring>descriptionLabel</cstring>
+ <cstring>isNew</cstring>
</property>
<property name="text">
- <string>Description:</string>
+ <string>&Is new</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="populationText">
+ <string>false</string>
</property>
<property name="associations" stdset="0">
<stringlist>
+ <string>false</string>
<string></string>
+ <string>true</string>
</stringlist>
</property>
+ <property name="toolTip" stdset="0">
+ <string>Check if shown details (will) describe a new profile</string>
+ </property>
</widget>
- <widget class="LineEdit">
+ <widget class="ScriptObject">
<property name="name">
- <cstring>descriptionCurrent</cstring>
+ <cstring>isNewScript</cstring>
</property>
- <property name="populationText">
- <string></string>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>@if(isEmpty())
+ at listFileCurrent.setEnabled()
+ at listFileCurrent.setText(/etc/desktop-profiles/custom.listing)</string>
</property>
<property name="associations" stdset="0">
<stringlist>
- <string>@widgetText</string>
+ <string>@# New Profile (being togled -> still false)
+ at if(@String.compare(false, @isNew))
+ @listFileCurrent.setEnabled(true)
+ @deleteProfile.setEnabled(false)
+ @listFileCurrent.setText(/etc/desktop-profiles/custom.listing)
+ @commitChanges.setText(@i18n(Add new profile))
+ at endif
+
+@# Existing Profile(being togled -> still true)
+ at if(@String.compare(true, @isNew))
+ @listFileCurrent.setEnabled(false)
+ @deleteProfile.setEnabled(true)
+ @listFileCurrent.setText(@exec(echo '@profilesAll.selection' | cut --fields 1 --delimiter ';'))
+ @commitChanges.setText(@i18n(Save Changes))
+ at endif</string>
</stringlist>
</property>
- <property name="toolTip" stdset="0">
- <string>6th field (=description) of selected profile</string>
- </property>
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="1" column="1" rowspan="1" colspan="2">
+ <widget class="QLayoutWidget">
<property name="name">
- <cstring>Layout25</cstring>
+ <cstring>Layout34</cstring>
</property>
<hbox>
<property name="name">
@@ -1118,158 +1157,158 @@ fi
<property name="spacing">
<number>6</number>
</property>
- <widget class="Label">
+ <widget class="ExecButton">
<property name="name">
- <cstring>kindLabel</cstring>
+ <cstring>deleteProfile</cstring>
</property>
- <property name="text">
- <string>Kind:</string>
+ <property name="enabled">
+ <bool>false</bool>
</property>
- </widget>
- <widget class="ComboBox">
- <item>
- <property name="text">
- <string>XDG_CONFIG</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>XDG_DATA</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>KDE</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>GCONF</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>GNUSTEP</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>ROX</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>UDE</string>
- </property>
- </item>
- <property name="name">
- <cstring>kindCurrent</cstring>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="populationText">
- <string></string>
+ <property name="maximumSize">
+ <size>
+ <width>95</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Delete pr&ofile</string>
</property>
<property name="associations" stdset="0">
<stringlist>
- <string>@widgetText</string>
+ <string>FILE="@listFileCurrent";
+NAME="@nameCurrent";
+
+TEMP=$(tempfile)
+cat "$FILE" | grep -v "^$NAME;" > $TEMP
+mv $TEMP $FILE</string>
</stringlist>
</property>
<property name="toolTip" stdset="0">
- <string>2nd field (=kind) of selected profile</string>
+ <string>Delete profile whose details are shown</string>
</property>
</widget>
- </hbox>
- </widget>
- <widget class="QLayoutWidget" row="1" column="0">
- <property name="name">
- <cstring>Layout24</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="Label">
+ <widget class="ExecButton">
<property name="name">
- <cstring>precedenceLabel</cstring>
+ <cstring>commitChanges</cstring>
</property>
- <property name="frameShape">
- <enum>NoFrame</enum>
+ <property name="enabled">
+ <bool>true</bool>
</property>
- <property name="frameShadow">
- <enum>Plain</enum>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>110</width>
+ <height>32767</height>
+ </size>
</property>
<property name="text">
- <string>Precedence:</string>
+ <string>Add new profile</string>
</property>
- </widget>
- <widget class="LineEdit">
- <property name="name">
- <cstring>precedenceCurrent</cstring>
+ <property name="default">
+ <bool>true</bool>
</property>
<property name="associations" stdset="0">
<stringlist>
- <string>@widgetText</string>
+ <string>IS_NEW="@isNew";
+
+FILE="@listFileCurrent";
+NAME="@nameCurrent";
+LOCATION="@locationCurrent";
+PRECEDENCE="@precedenceCurrent";
+REQS="@requirementsCurrent";
+KIND="@kindCurrent";
+DESC="@descriptionCurrent";
+
+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;
+ 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>
</stringlist>
</property>
<property name="toolTip" stdset="0">
- <string>4th field (=precedence value) of selected profile</string>
+ <string>Add/Update profile whose details are shown</string>
</property>
</widget>
- </hbox>
- </widget>
- <widget class="QLayoutWidget" row="1" column="3">
- <property name="name">
- <cstring>Layout27</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="Label">
+ <widget class="ExecButton">
<property name="name">
- <cstring>locationLabel</cstring>
+ <cstring>cancelChangeSelected</cstring>
</property>
- <property name="text">
- <string>Location(s):</string>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="associations" stdset="0">
- <stringlist>
- <string></string>
- </stringlist>
+ <property name="maximumSize">
+ <size>
+ <width>110</width>
+ <height>32767</height>
+ </size>
</property>
- </widget>
- <widget class="LineEdit">
- <property name="name">
- <cstring>locationCurrent</cstring>
+ <property name="text">
+ <string>&Cancel Changes</string>
</property>
<property name="populationText">
<string></string>
</property>
<property name="associations" stdset="0">
<stringlist>
- <string>@widgetText</string>
+ <string>true
+ at profilesAll.setCurrentItem(@profiles.findItem(@profiles.selection))
+
+ at nameCurrent.setText(@exec(echo '@profilesAll.selection' | cut --fields 2 --delimiter ';'))
+ at kindCurrent.setSelection(@exec(echo '@profilesAll.selection' | cut --fields 3 --delimiter ';'))
+ at locationCurrent.setText(@exec(echo '@profilesAll.selection' | cut --fields 4 --delimiter ';'))
+ at precedenceCurrent.setText(@exec(echo '@profilesAll.selection' | cut --fields 5 --delimiter ';'))
+ at descriptionCurrent.setText(@exec(echo '@profilesAll.selection' | cut --fields 7 --delimiter ';'))
+
+ at isNew.setChecked(false)
+ at commandReq.clear()
+</string>
</stringlist>
</property>
<property name="toolTip" stdset="0">
- <string>3th field of selected profile</string>
+ <string>Forget changes made to shown profile details</string>
</property>
</widget>
</hbox>
</widget>
- </grid>
+ </hbox>
</widget>
- <widget class="GroupBox">
+ <widget class="GroupBox" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>requirementsBox</cstring>
</property>
@@ -1366,7 +1405,7 @@ for_each_requirement "$REQS" 'echo'
<bool>true</bool>
</property>
<property name="text">
- <string>Remove selected</string>
+ <string>Remove &selected</string>
</property>
<property name="populationText">
<string></string>
@@ -1515,7 +1554,7 @@ fi;
</size>
</property>
<property name="text">
- <string>Add</string>
+ <string>&Add</string>
</property>
<property name="associations" stdset="0">
<stringlist>
@@ -1633,7 +1672,7 @@ fi;
</sizepolicy>
</property>
<property name="text">
- <string>Deactivate profile completely</string>
+ <string>Deacti&vate profile completely</string>
</property>
<property name="associations" stdset="0">
<stringlist>
@@ -1650,11 +1689,11 @@ fi;
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="QLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>Layout35</cstring>
+ <cstring>Layout36</cstring>
</property>
- <hbox>
+ <grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
@@ -1664,11 +1703,35 @@ fi;
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="LineEdit" row="0" column="1" rowspan="1" colspan="2">
<property name="name">
- <cstring>Layout30</cstring>
+ <cstring>nameCurrent</cstring>
</property>
- <hbox>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>1st field (=name) of selected profile</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="0" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>Layout28</cstring>
+ </property>
+ <vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
@@ -1678,47 +1741,211 @@ fi;
<property name="spacing">
<number>6</number>
</property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout27</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="Label">
+ <property name="name">
+ <cstring>nameLabel</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Name:</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer7</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Preferred</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>33</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
<widget class="Label">
<property name="name">
- <cstring>listFileLabel</cstring>
+ <cstring>precedenceLabel</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Plain</enum>
</property>
<property name="text">
- <string>Listed in</string>
+ <string>Precedence:</string>
</property>
</widget>
- <widget class="FileSelector">
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="2">
+ <property name="name">
+ <cstring>Layout25</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="Label">
<property name="name">
- <cstring>listFileCurrent</cstring>
+ <cstring>kindLabel</cstring>
</property>
- <property name="enabled">
- <bool>true</bool>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="focusPolicy">
- <enum>TabFocus</enum>
+ <property name="text">
+ <string>Kind:</string>
+ </property>
+ </widget>
+ <widget class="ComboBox">
+ <item>
+ <property name="text">
+ <string>XDG_CONFIG</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>XDG_DATA</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>KDE</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>GCONF</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>GNUSTEP</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>ROX</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>UDE</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>kindCurrent</cstring>
</property>
<property name="populationText">
- <string>/etc/desktop-profiles/custom.listing</string>
+ <string></string>
</property>
<property name="associations" stdset="0">
<stringlist>
<string>@widgetText</string>
</stringlist>
</property>
- <property name="selectionFilter">
- <string>*.listing</string>
- </property>
- <property name="selectionCaption">
- <string>Append profile description to</string>
- </property>
<property name="toolTip" stdset="0">
- <string>.listing file where the profile is defined</string>
+ <string>2nd field (=kind) of selected profile</string>
</property>
</widget>
</hbox>
</widget>
+ <widget class="LineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>precedenceCurrent</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>45</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>-1000</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>4th field (=precedence value) of selected profile</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="1">
+ <property name="name">
+ <cstring>Layout35</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
<widget class="QLayoutWidget">
<property name="name">
- <cstring>Layout32</cstring>
+ <cstring>Layout26</cstring>
</property>
<hbox>
<property name="name">
@@ -1730,84 +1957,48 @@ fi;
<property name="spacing">
<number>6</number>
</property>
- <widget class="CheckBox">
+ <widget class="Label">
<property name="name">
- <cstring>isNew</cstring>
+ <cstring>descriptionLabel</cstring>
</property>
<property name="text">
- <string>Is new</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- <property name="populationText">
- <string>false</string>
+ <string>Description:</string>
</property>
<property name="associations" stdset="0">
<stringlist>
- <string>false</string>
<string></string>
- <string>true</string>
</stringlist>
</property>
- <property name="toolTip" stdset="0">
- <string>Check if shown details (will) describe a new profile</string>
- </property>
</widget>
- <widget class="ScriptObject">
+ <widget class="LineEdit">
<property name="name">
- <cstring>isNewScript</cstring>
+ <cstring>descriptionCurrent</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>1</vsizetype>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>@if(isEmpty())
- at listFileCurrent.setEnabled()
- at listFileCurrent.setText(/etc/desktop-profiles/custom.listing)</string>
+ <property name="populationText">
+ <string></string>
</property>
<property name="associations" stdset="0">
<stringlist>
- <string>@# New Profile (being togled -> still false)
- at if(@String.compare(false, @isNew))
- @listFileCurrent.setEnabled(true)
- @deleteProfile.setEnabled(false)
- @listFileCurrent.setText(/etc/desktop-profiles/custom.listing)
- @commitChanges.setText(@i18n(Add new profile))
- at endif
-
-@# Existing Profile(being togled -> still true)
- at if(@String.compare(true, @isNew))
- @listFileCurrent.setEnabled(false)
- @deleteProfile.setEnabled(true)
- @listFileCurrent.setText(@exec(echo '@profilesAll.selection' | cut --fields 1 --delimiter ';'))
- @commitChanges.setText(@i18n(Save Changes))
- at endif</string>
+ <string>@widgetText</string>
</stringlist>
</property>
+ <property name="toolTip" stdset="0">
+ <string>6th field (=description) of selected profile</string>
+ </property>
</widget>
</hbox>
</widget>
<widget class="QLayoutWidget">
<property name="name">
- <cstring>Layout34</cstring>
+ <cstring>Layout27</cstring>
</property>
<hbox>
<property name="name">
@@ -1819,158 +2010,40 @@ fi;
<property name="spacing">
<number>6</number>
</property>
- <widget class="ExecButton">
- <property name="name">
- <cstring>deleteProfile</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>95</width>
- <height>32767</height>
- </size>
- </property>
- <property name="text">
- <string>Delete profile</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>FILE="@listFileCurrent";
-NAME="@nameCurrent";
-
-TEMP=$(tempfile)
-cat "$FILE" | grep -v "^$NAME;" > $TEMP
-mv $TEMP $FILE</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>Delete profile whose details are shown</string>
- </property>
- </widget>
- <widget class="ExecButton">
+ <widget class="Label">
<property name="name">
- <cstring>commitChanges</cstring>
- </property>
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>110</width>
- <height>32767</height>
- </size>
+ <cstring>locationLabel</cstring>
</property>
<property name="text">
- <string>Add new profile</string>
- </property>
- <property name="default">
- <bool>true</bool>
+ <string>Location(s):</string>
</property>
<property name="associations" stdset="0">
<stringlist>
- <string>IS_NEW="@isNew";
-
-FILE="@listFileCurrent";
-NAME="@nameCurrent";
-LOCATION="@locationCurrent";
-PRECEDENCE="@precedenceCurrent";
-REQS="@requirementsCurrent";
-KIND="@kindCurrent";
-DESC="@descriptionCurrent";
-
-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;
- 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>
+ <string></string>
</stringlist>
</property>
- <property name="toolTip" stdset="0">
- <string>Add/Update profile whose details are shown</string>
- </property>
</widget>
- <widget class="ExecButton">
+ <widget class="LineEdit">
<property name="name">
- <cstring>cancelChangeSelected</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>110</width>
- <height>32767</height>
- </size>
- </property>
- <property name="text">
- <string>Cancel Changes</string>
+ <cstring>locationCurrent</cstring>
</property>
<property name="populationText">
<string></string>
</property>
<property name="associations" stdset="0">
<stringlist>
- <string>true
- at profilesAll.setCurrentItem(@profiles.findItem(@profiles.selection))
-
- at nameCurrent.setText(@exec(echo '@profilesAll.selection' | cut --fields 2 --delimiter ';'))
- at kindCurrent.setSelection(@exec(echo '@profilesAll.selection' | cut --fields 3 --delimiter ';'))
- at locationCurrent.setText(@exec(echo '@profilesAll.selection' | cut --fields 4 --delimiter ';'))
- at precedenceCurrent.setText(@exec(echo '@profilesAll.selection' | cut --fields 5 --delimiter ';'))
- at descriptionCurrent.setText(@exec(echo '@profilesAll.selection' | cut --fields 7 --delimiter ';'))
-
- at isNew.setChecked(false)
- at commandReq.clear()
-</string>
+ <string>@widgetText</string>
</stringlist>
</property>
<property name="toolTip" stdset="0">
- <string>Forget changes made to shown profile details</string>
+ <string>3th field of selected profile</string>
</property>
</widget>
</hbox>
</widget>
- </hbox>
+ </vbox>
</widget>
- </vbox>
+ </grid>
</widget>
</grid>
</widget>
@@ -2192,12 +2265,6 @@ fi;</string>
<slot>execute()</slot>
</connection>
<connection>
- <sender>sortField</sender>
- <signal>widgetTextChanged(const QString)</signal>
- <receiver>refreshList</receiver>
- <slot>execute()</slot>
- </connection>
- <connection>
<sender>deleteProfile</sender>
<signal>clicked()</signal>
<receiver>refreshList</receiver>
@@ -2215,6 +2282,12 @@ fi;</string>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
+ <connection>
+ <sender>sortField</sender>
+ <signal>widgetTextChanged(const QString&)</signal>
+ <receiver>refreshList</receiver>
+ <slot>execute()</slot>
+ </connection>
</connections>
<tabstops>
<tabstop>kindFilter</tabstop>
--
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