[debian-edu-commits] debian-edu/ 39/183: Add splitter to kommander-gui so you can hide the filter settings (or the profile details, or the profile list, though I don't really see a point in hiding those)
Alexander Alemayhu
ccscanf-guest at moszumanska.debian.org
Wed Jun 11 16:48:31 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 b5365a3708ffe4c6099778f138013e93c6fd55e9
Author: Bart Cornelis <cobaco at linux.be>
Date: Wed Jan 5 22:43:10 2005 +0000
Add splitter to kommander-gui so you can hide the filter settings
(or the profile details, or the profile list, though I don't really see
a point in hiding those)
---
profile-manager.kmdr | 3390 +++++++++++++++++++++++++-------------------------
1 file changed, 1699 insertions(+), 1691 deletions(-)
diff --git a/profile-manager.kmdr b/profile-manager.kmdr
index 5ef2c18..e960f19 100644
--- a/profile-manager.kmdr
+++ b/profile-manager.kmdr
@@ -97,1148 +97,126 @@
</stringlist>
</property>
</widget>
- <widget class="GroupBox" row="2" column="0">
+ <widget class="QSplitter" row="0" column="0">
<property name="name">
- <cstring>detailsSelection</cstring>
+ <cstring>Splitter1</cstring>
</property>
- <property name="title">
- <string>Profile Details</string>
+ <property name="orientation">
+ <enum>Vertical</enum>
</property>
- <vbox>
+ <widget class="ButtonGroup">
<property name="name">
- <cstring>unnamed</cstring>
+ <cstring>filters</cstring>
</property>
- <property name="margin">
- <number>11</number>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="spacing">
- <number>6</number>
+ <property name="title">
+ <string>Only show profiles when:</string>
</property>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout29</cstring>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="2">
- <property name="name">
- <cstring>Layout23</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="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>Fixed</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>33</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="LineEdit">
- <property name="name">
- <cstring>nameCurrent</cstring>
- </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>
- </hbox>
- </widget>
- <widget class="QLayoutWidget" row="0" column="2" rowspan="1" colspan="2">
- <property name="name">
- <cstring>Layout26</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>descriptionLabel</cstring>
- </property>
- <property name="text">
- <string>Description:</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string></string>
- </stringlist>
- </property>
- </widget>
- <widget class="LineEdit">
- <property name="name">
- <cstring>descriptionCurrent</cstring>
- </property>
- <property name="populationText">
- <string></string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <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" row="1" column="1" rowspan="1" colspan="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>kindLabel</cstring>
- </property>
- <property name="text">
- <string>Kind:</string>
- </property>
- </widget>
- <widget class="ComboBox">
- <item>
- <property name="text">
- <string>KDE</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>GCONF</string>
- </property>
- </item>
- <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>ROX</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>UDE</string>
- </property>
- </item>
- <property name="name">
- <cstring>kindCurrent</cstring>
- </property>
- <property name="populationText">
- <string></string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>5th field (=kind) of selected profile</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">
- <property name="name">
- <cstring>precedenceLabel</cstring>
- </property>
- <property name="frameShape">
- <enum>NoFrame</enum>
- </property>
- <property name="frameShadow">
- <enum>Plain</enum>
- </property>
- <property name="text">
- <string>Precedence:</string>
- </property>
- </widget>
- <widget class="LineEdit">
- <property name="name">
- <cstring>precedenceCurrent</cstring>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>3th field (=precedence value) of selected profile</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">
- <property name="name">
- <cstring>locationLabel</cstring>
- </property>
- <property name="text">
- <string>Location(s):</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string></string>
- </stringlist>
- </property>
- </widget>
- <widget class="LineEdit">
- <property name="name">
- <cstring>locationCurrent</cstring>
- </property>
- <property name="populationText">
- <string></string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>2nd field of selected profile</string>
- </property>
- </widget>
- </hbox>
- </widget>
- </grid>
- </widget>
- <widget class="GroupBox">
- <property name="name">
- <cstring>requirementsBox</cstring>
- </property>
- <property name="title">
- <string>Activation requirements:</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string></string>
- </stringlist>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLayoutWidget" row="0" column="0">
- <property name="name">
- <cstring>Layout36</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="ListBox">
- <property name="name">
- <cstring>requirementsCurrent</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>7</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="selectionMode">
- <enum>Single</enum>
- </property>
- <property name="columnMode">
- <enum>FixedNumber</enum>
- </property>
- <property name="rowMode">
- <enum>Variable</enum>
- </property>
- <property name="variableHeight">
- <bool>true</bool>
- </property>
- <property name="populationText">
- <string>@execBegin
-. /usr/share/desktop-profiles/listingmodule
-
-FILE="$(echo '@profilesAll.selection' | cut --fields 1 --delimiter ';')"
-NAME="$(echo '@profilesAll.selection' | cut --fields 2 --delimiter ';')"
-
-REQS="$(grep ^$NAME $FILE | cut --fields 4 --delimiter ';')"
-for_each_requirement "$REQS" 'echo'
-
- at execEnd</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@execBegin
-@# escape @widgetText so we don't loose anything
- at setGlobal( tmp, at String.replace( @widgetText, \,\\\\\\\ ) ) @setGlobal( tmp, at String.replace( @global(tmp),$,\\\\\$ ) ) @setGlobal( tmp, at String.replace( @global(tmp), @exec(echo \"),\\\\\" ) )
- at setGlobal( tmp, at String.replace( @global(tmp), @exec(echo \`),\\\\\` ) )
-
- echo "@global(tmp)" |while read REQ; do
- echo -n "$REQ ";
- done;
- at execEnd </string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>list of activation requirements (contained in the 4th field) of selected profile</string>
- </property>
- </widget>
- <widget class="ExecButton">
- <property name="name">
- <cstring>delReq</cstring>
- </property>
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="text">
- <string>Remove selected</string>
- </property>
- <property name="populationText">
- <string></string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>true
-
- at requirementsCurrent.removeItem(@requirementsCurrent.findItem(@requirementsCurrent.selection()))</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>Removes selected activation requirement from the list</string>
- </property>
- </widget>
- </vbox>
- </widget>
- <widget class="GroupBox" row="0" column="1">
- <property name="name">
- <cstring>GroupBox5</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title">
- <string>New activation requirement:</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string></string>
- </stringlist>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLayoutWidget" row="0" column="0">
- <property name="name">
- <cstring>Layout37</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>addGroupReqLabel1</cstring>
- </property>
- <property name="text">
- <string>When the user is</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string></string>
- </stringlist>
- </property>
- </widget>
- <widget class="ComboBox">
- <item>
- <property name="text">
- <string>a member of</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>not member of </string>
- </property>
- </item>
- <property name="name">
- <cstring>isMember</cstring>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@execBegin
-
-if test '@widgetText' = 'a member of'; then
- echo '';
-else
- echo '!';
-fi;
-
- at execEnd</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>Your choice here determines wether the new requirement concerns membership or non-membership</string>
- </property>
- </widget>
- <widget class="ComboBox">
- <property name="name">
- <cstring>groupList</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="populationText">
- <string>@exec(cat /etc/group | cut --fields 1 --delimiter ':' | sort)</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>Choose the group for which (non-)membership is needed to activate this profile</string>
- </property>
- </widget>
- <widget class="ExecButton">
- <property name="name">
- <cstring>addGroupReq</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>1</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>40</width>
- <height>32767</height>
- </size>
- </property>
- <property name="text">
- <string>Add</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>true
-
- at requirementsCurrent.addUniqueItem(@isMember at groupList)</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>Only activate profile for users that are (not) a member of the selected group</string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QLayoutWidget" row="1" column="0">
- <property name="name">
- <cstring>Layout38</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>addCommandReqLabel1</cstring>
- </property>
- <property name="text">
- <string>When</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string></string>
- </stringlist>
- </property>
- </widget>
- <widget class="LineEdit">
- <property name="name">
- <cstring>commandReq</cstring>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>Enter any shell command</string>
- </property>
- </widget>
- <widget class="Label">
- <property name="name">
- <cstring>addCommandReqLabel2</cstring>
- </property>
- <property name="text">
- <string>executes succesfully</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string></string>
- </stringlist>
- </property>
- </widget>
- <widget class="ExecButton">
- <property name="name">
- <cstring>addCommandReq</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>1</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>40</width>
- <height>32767</height>
- </size>
- </property>
- <property name="text">
- <string>Add</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>true
-
- at requirementsCurrent.addUniqueItem($(@commandReq))</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>Make succesfull completion of given shell command a requirement for activation of this profile</string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="ExecButton" row="2" column="0">
- <property name="name">
- <cstring>deactivate</cstring>
- </property>
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>1</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Deactivate profile completely</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>true
-
- at requirementsCurrent.addUniqueItem(!)</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>Adds an unsatisfiable requirement (not in any group)</string>
- </property>
- </widget>
- </grid>
- </widget>
- </grid>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout35</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="QLayoutWidget">
- <property name="name">
- <cstring>Layout30</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>listFileLabel</cstring>
- </property>
- <property name="text">
- <string>Listed in</string>
- </property>
- </widget>
- <widget class="FileSelector">
- <property name="name">
- <cstring>listFileCurrent</cstring>
- </property>
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="focusPolicy">
- <enum>TabFocus</enum>
- </property>
- <property name="populationText">
- <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>.listing file where the profile is defined</string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout32</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="CheckBox">
- <property name="name">
- <cstring>isNew</cstring>
- </property>
- <property name="text">
- <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="ScriptObject">
- <property name="name">
- <cstring>isNewScript</cstring>
- </property>
- <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>@# 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(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(Save Changes)
- at endif</string>
- </stringlist>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout34</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="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">
- <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>
- </property>
- <property name="text">
- <string>Add new profile</string>
- </property>
- <property name="default">
- <bool>true</bool>
- </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;$LOCATION;$PRECEDENCE;$REQS;$KIND;$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";
- else
- kdialog --error "It appears you don't have permission to write $FILE";
- fi;
-# adding new profile
-else
- if (test -w "$FILE") || \
- ( (! test -e "$FILE") && (test -w "$(dirname $FILE)") ); then
- echo "$NEW" >> "$FILE";
- else
- kdialog --error "It appears you don't have permission to write $FILE";
- fi;
-fi;</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>Add/Update profile whose details are shown</string>
- </property>
- </widget>
- <widget class="ExecButton">
- <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>
- </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 locationCurrent.setText(@exec(echo '@profilesAll.selection' | cut --fields 3 --delimiter ';'))
- at precedenceCurrent.setText(@exec(echo '@profilesAll.selection' | cut --fields 4 --delimiter ';'))
- at kindCurrent.setSelection(@exec(echo '@profilesAll.selection' | cut --fields 6 --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>Forget changes made to shown profile details</string>
- </property>
- </widget>
- </hbox>
- </widget>
- </hbox>
- </widget>
- </vbox>
- </widget>
- <widget class="ListBox" row="1" column="0">
- <property name="name">
- <cstring>profiles</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>7</vsizetype>
- <horstretch>1</horstretch>
- <verstretch>1</verstretch>
- </sizepolicy>
- </property>
- <property name="resizePolicy">
- <enum>AutoOneFit</enum>
- </property>
- <property name="selectionMode">
- <enum>Single</enum>
- </property>
- <property name="columnMode">
- <enum>FitToWidth</enum>
- </property>
- <property name="populationText">
- <string></string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string></string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>List of profiles found in processed .listing files</string>
- </property>
- </widget>
- <widget class="ButtonGroup" row="0" column="0">
- <property name="name">
- <cstring>filters</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title">
- <string>Only show profiles when:</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@kindFilter @requirementFilter @precedenceFilter @nameFilter @descriptionFilter @locationFilter @userFilter @sortFilter</string>
- <string>@null</string>
- </stringlist>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@kindFilter @requirementFilter @precedenceFilter @nameFilter @descriptionFilter @locationFilter @userFilter @sortFilter</string>
+ <string>@null</string>
+ </stringlist>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <grid>
<property name="name">
- <cstring>Layout55</cstring>
+ <cstring>unnamed</cstring>
</property>
- <vbox>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
+ <cstring>Layout55</cstring>
</property>
- <widget class="QLayoutWidget">
+ <vbox>
<property name="name">
- <cstring>Layout54</cstring>
+ <cstring>unnamed</cstring>
</property>
- <hbox>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
<property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
+ <cstring>Layout54</cstring>
</property>
- <widget class="QLayoutWidget">
+ <hbox>
<property name="name">
- <cstring>Layout53</cstring>
+ <cstring>unnamed</cstring>
</property>
- <vbox>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
<property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
+ <cstring>Layout53</cstring>
</property>
- <widget class="QLayoutWidget">
+ <vbox>
<property name="name">
- <cstring>Layout42</cstring>
+ <cstring>unnamed</cstring>
</property>
- <hbox>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
<property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
+ <cstring>Layout42</cstring>
</property>
- <widget class="CheckBox">
+ <hbox>
<property name="name">
- <cstring>kindFilter</cstring>
+ <cstring>unnamed</cstring>
</property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>TabFocus</enum>
- </property>
- <property name="text">
- <string>kind matches</string>
+ <property name="margin">
+ <number>0</number>
</property>
- <property name="checked">
- <bool>false</bool>
+ <property name="spacing">
+ <number>6</number>
</property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@null</string>
- <string></string>
- <string>@execBegin
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>kindFilter</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="text">
+ <string>kind matches</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>@execBegin
if(@String.isEmpty(@kindRegexp)); then
echo "@null";
@@ -1247,54 +225,54 @@ else
fi
@execEnd</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>When checked only profiles whose 5th (=kind) field matches the given regular expression are shown</string>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>Spacer2</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Fixed</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>45</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </hbox>
- </widget>
- <widget class="CheckBox">
- <property name="name">
- <cstring>requirementFilter</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>TabFocus</enum>
- </property>
- <property name="text">
- <string>requirement matches</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@null</string>
- <string></string>
- <string>@execBegin
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>When checked only profiles whose 5th (=kind) field matches the given regular expression are shown</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>45</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>requirementFilter</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="text">
+ <string>requirement matches</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>@execBegin
if(@String.isEmpty(@requirementRegexp)); then
echo "@null";
@@ -1303,49 +281,49 @@ else
fi
@execEnd</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>When checked only profiles whose 4th (=requirements) field matches the given regular expression are shown</string>
- </property>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout39</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
+ </stringlist>
</property>
- <property name="margin">
- <number>0</number>
+ <property name="toolTip" stdset="0">
+ <string>When checked only profiles whose 4th (=requirements) field matches the given regular expression are shown</string>
</property>
- <property name="spacing">
- <number>6</number>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout39</cstring>
</property>
- <widget class="CheckBox">
+ <hbox>
<property name="name">
- <cstring>precedenceFilter</cstring>
+ <cstring>unnamed</cstring>
</property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>TabFocus</enum>
+ <property name="margin">
+ <number>0</number>
</property>
- <property name="text">
- <string>precedence</string>
+ <property name="spacing">
+ <number>6</number>
</property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@null</string>
- <string></string>
- <string>@execBegin
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>precedenceFilter</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="text">
+ <string>precedence</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>@execBegin
if(@String.isEmpty(@precedenceRegexp)); then
echo "@null";
@@ -1364,605 +342,1635 @@ elif test "@test" = '<>'; then
fi
@execEnd</string>
- </stringlist>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>When checked only profiles whose precedence value satifies the given comparison are shown</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="ComboBox">
+ <item>
+ <property name="text">
+ <string>></string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>>=</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string><</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string><=</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string><></string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>test</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="currentItem">
+ <number>0</number>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout52</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="LineEdit">
+ <property name="name">
+ <cstring>kindRegexp</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Takes a regular expression</string>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>requirementRegexp</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Takes a regular expression</string>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>precedenceRegexp</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="inputMask">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Takes a numerical value (may be negative)</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout10</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="CheckBox">
+ <property name="name">
+ <cstring>userFilter</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="text">
+ <string>requirements are met for</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>@execBegin
+
+if(@String.isEmpty(@userList)); then
+ echo "@null";
+else
+ echo "--user '@userList'";
+fi
+
+ at execEnd</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>When checked only profiles whose requirements are met for the selected user are shown</string>
+ </property>
+ </widget>
+ <widget class="ComboBox">
+ <property name="name">
+ <cstring>userList</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="populationText">
+ <string>@exec(cat /etc/passwd | cut --fields 1 --delimiter ':' | sort)</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>list of user accounts on this system</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="1">
+ <property name="name">
+ <cstring>Layout56</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>Layout51</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="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout50</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>Layout45</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="CheckBox">
+ <property name="name">
+ <cstring>nameFilter</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="text">
+ <string>name matches</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>@execBegin
+
+if(@String.isEmpty(@nameRegexp)); then
+ echo "@null";
+else
+ echo "--name '@nameRegexp'";
+fi
+
+ at execEnd</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>When checked only profiles whose 1st (=name) field matches the given regular expression are shown</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>25</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>descriptionFilter</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>description matches</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>@execBegin
+
+if(@String.isEmpty(@descriptionRegexp)); then
+ echo @null;
+else
+ echo "--description '@descriptionRegexp'";
+fi
+
+ at execEnd</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>When checked only profiles whose 6th (=description) field matches the given regular expression are shown</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout47</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
</property>
- <property name="toolTip" stdset="0">
- <string>When checked only profiles whose precedence value satifies the given comparison are shown</string>
+ <property name="margin">
+ <number>0</number>
</property>
- <property name="whatsThis" stdset="0">
- <string></string>
+ <property name="spacing">
+ <number>6</number>
</property>
- </widget>
- <widget class="ComboBox">
- <item>
- <property name="text">
- <string>></string>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>locationFilter</cstring>
</property>
- </item>
- <item>
- <property name="text">
- <string>>=</string>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- </item>
- <item>
- <property name="text">
- <string><</string>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
</property>
- </item>
- <item>
<property name="text">
- <string><=</string>
+ <string>location matches</string>
</property>
- </item>
- <item>
- <property name="text">
- <string><></string>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>@execBegin
+
+if(@String.isEmpty(@locationRegexp)); then
+ echo "@null";
+else
+ echo "--location '@locationRegexp'";
+fi
+
+ at execEnd</string>
+ </stringlist>
</property>
- </item>
- <property name="name">
- <cstring>test</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="currentItem">
- <number>0</number>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
- </property>
- </widget>
- </hbox>
- </widget>
- </vbox>
- </widget>
- <widget class="QLayoutWidget">
+ <property name="toolTip" stdset="0">
+ <string>When checked only profiles whose 2nd (=location) field matches the given regular expression are shown</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>15</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout49</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="LineEdit">
+ <property name="name">
+ <cstring>nameRegexp</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Takes a regular expression</string>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>descriptionRegexp</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Takes a regular expression</string>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>locationRegexp</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Takes a regular expression</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout22</cstring>
+ </property>
+ <hbox>
<property name="name">
- <cstring>Layout52</cstring>
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
</property>
- <vbox>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="Label">
<property name="name">
- <cstring>unnamed</cstring>
+ <cstring>sortFilter</cstring>
</property>
- <property name="margin">
- <number>0</number>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="spacing">
- <number>6</number>
+ <property name="focusPolicy">
+ <enum>NoFocus</enum>
</property>
- <widget class="LineEdit">
- <property name="name">
- <cstring>kindRegexp</cstring>
- </property>
+ <property name="text">
+ <string>Sort profile list on</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>--sort-key @sortField</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Shown profiles are sorted on the contents of the selected field</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer6</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>35</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="ComboBox">
+ <item>
<property name="text">
- <string></string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>Takes a regular expression</string>
- </property>
- </widget>
- <widget class="LineEdit">
- <property name="name">
- <cstring>requirementRegexp</cstring>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
+ <string>description</string>
</property>
- <property name="toolTip" stdset="0">
- <string>Takes a regular expression</string>
- </property>
- </widget>
- <widget class="LineEdit">
- <property name="name">
- <cstring>precedenceRegexp</cstring>
+ </item>
+ <item>
+ <property name="text">
+ <string>kind</string>
</property>
+ </item>
+ <item>
<property name="text">
- <string></string>
+ <string>location</string>
</property>
- <property name="inputMask">
- <string></string>
+ </item>
+ <item>
+ <property name="text">
+ <string>name</string>
</property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
+ </item>
+ <item>
+ <property name="text">
+ <string>precedence</string>
</property>
- <property name="toolTip" stdset="0">
- <string>Takes a numerical value (may be negative)</string>
+ </item>
+ <item>
+ <property name="text">
+ <string>requirements</string>
</property>
- </widget>
- </vbox>
- </widget>
- </hbox>
- </widget>
- <widget class="QLayoutWidget">
+ </item>
+ <property name="name">
+ <cstring>sortField</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="currentItem">
+ <number>4</number>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Shown profiles are sorted on the contents of the selected field</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="ListBox">
+ <property name="name">
+ <cstring>profiles</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>1</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="resizePolicy">
+ <enum>AutoOneFit</enum>
+ </property>
+ <property name="selectionMode">
+ <enum>Single</enum>
+ </property>
+ <property name="columnMode">
+ <enum>FitToWidth</enum>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>List of profiles found in processed .listing files</string>
+ </property>
+ </widget>
+ <widget class="GroupBox">
+ <property name="name">
+ <cstring>detailsSelection</cstring>
+ </property>
+ <property name="title">
+ <string>Profile Details</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout29</cstring>
+ </property>
+ <grid>
<property name="name">
- <cstring>Layout10</cstring>
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
</property>
- <hbox>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
+ <cstring>Layout23</cstring>
</property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="CheckBox">
+ <hbox>
<property name="name">
- <cstring>userFilter</cstring>
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
</property>
- <property name="enabled">
- <bool>true</bool>
+ <property name="spacing">
+ <number>6</number>
</property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <widget class="Label">
+ <property name="name">
+ <cstring>nameLabel</cstring>
+ </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>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>33</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>nameCurrent</cstring>
+ </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>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="2" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>Layout26</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
</property>
- <property name="focusPolicy">
- <enum>TabFocus</enum>
+ <property name="margin">
+ <number>0</number>
</property>
- <property name="text">
- <string>requirements are met for</string>
+ <property name="spacing">
+ <number>6</number>
</property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@null</string>
+ <widget class="Label">
+ <property name="name">
+ <cstring>descriptionLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Description:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>descriptionCurrent</cstring>
+ </property>
+ <property name="populationText">
<string></string>
- <string>@execBegin
-
-if(@String.isEmpty(@userList)); then
- echo "@null";
-else
- echo "--user '@userList'";
-fi
-
- at execEnd</string>
- </stringlist>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <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" row="1" column="1" rowspan="1" colspan="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="toolTip" stdset="0">
- <string>When checked only profiles whose requirements are met for the selected user are shown</string>
+ <property name="spacing">
+ <number>6</number>
</property>
- </widget>
- <widget class="ComboBox">
+ <widget class="Label">
+ <property name="name">
+ <cstring>kindLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Kind:</string>
+ </property>
+ </widget>
+ <widget class="ComboBox">
+ <item>
+ <property name="text">
+ <string>KDE</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>GCONF</string>
+ </property>
+ </item>
+ <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>ROX</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>UDE</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>kindCurrent</cstring>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>5th field (=kind) of selected profile</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>Layout24</cstring>
+ </property>
+ <hbox>
<property name="name">
- <cstring>userList</cstring>
+ <cstring>unnamed</cstring>
</property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <property name="margin">
+ <number>0</number>
</property>
- <property name="populationText">
- <string>@exec(cat /etc/passwd | cut --fields 1 --delimiter ':' | sort)</string>
+ <property name="spacing">
+ <number>6</number>
</property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
+ <widget class="Label">
+ <property name="name">
+ <cstring>precedenceLabel</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Plain</enum>
+ </property>
+ <property name="text">
+ <string>Precedence:</string>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>precedenceCurrent</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>3th field (=precedence value) of selected profile</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="toolTip" stdset="0">
- <string>list of user accounts on this system</string>
+ <property name="margin">
+ <number>0</number>
</property>
- </widget>
- </hbox>
- </widget>
- </vbox>
- </widget>
- <widget class="QLayoutWidget" row="0" column="1">
- <property name="name">
- <cstring>Layout56</cstring>
- </property>
- <vbox>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="Label">
+ <property name="name">
+ <cstring>locationLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Location(s):</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>locationCurrent</cstring>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>2nd field of selected profile</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="GroupBox">
<property name="name">
- <cstring>unnamed</cstring>
+ <cstring>requirementsBox</cstring>
</property>
- <property name="margin">
- <number>0</number>
+ <property name="title">
+ <string>Activation requirements:</string>
</property>
- <property name="spacing">
- <number>6</number>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
</property>
- <widget class="QLayoutWidget">
+ <grid>
<property name="name">
- <cstring>Layout51</cstring>
+ <cstring>unnamed</cstring>
</property>
- <hbox>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
+ <cstring>Layout36</cstring>
</property>
- <widget class="QLayoutWidget">
+ <vbox>
<property name="name">
- <cstring>Layout50</cstring>
+ <cstring>unnamed</cstring>
</property>
- <vbox>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="ListBox">
+ <property name="name">
+ <cstring>requirementsCurrent</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="selectionMode">
+ <enum>Single</enum>
+ </property>
+ <property name="columnMode">
+ <enum>FixedNumber</enum>
+ </property>
+ <property name="rowMode">
+ <enum>Variable</enum>
+ </property>
+ <property name="variableHeight">
+ <bool>true</bool>
+ </property>
+ <property name="populationText">
+ <string>@execBegin
+. /usr/share/desktop-profiles/listingmodule
+
+FILE="$(echo '@profilesAll.selection' | cut --fields 1 --delimiter ';')"
+NAME="$(echo '@profilesAll.selection' | cut --fields 2 --delimiter ';')"
+
+REQS="$(grep ^$NAME $FILE | cut --fields 4 --delimiter ';')"
+for_each_requirement "$REQS" 'echo'
+
+ at execEnd</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@execBegin
+@# escape @widgetText so we don't loose anything
+ at setGlobal( tmp, at String.replace( @widgetText, \,\\\\\\\ ) ) @setGlobal( tmp, at String.replace( @global(tmp),$,\\\\\$ ) ) @setGlobal( tmp, at String.replace( @global(tmp), @exec(echo \"),\\\\\" ) )
+ at setGlobal( tmp, at String.replace( @global(tmp), @exec(echo \`),\\\\\` ) )
+
+ echo "@global(tmp)" |while read REQ; do
+ echo -n "$REQ ";
+ done;
+ at execEnd </string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>list of activation requirements (contained in the 4th field) of selected profile</string>
+ </property>
+ </widget>
+ <widget class="ExecButton">
<property name="name">
- <cstring>unnamed</cstring>
+ <cstring>delReq</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Remove selected</string>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>true
+
+ at requirementsCurrent.removeItem(@requirementsCurrent.findItem(@requirementsCurrent.selection()))</string>
+ </stringlist>
</property>
- <property name="margin">
- <number>0</number>
+ <property name="toolTip" stdset="0">
+ <string>Removes selected activation requirement from the list</string>
</property>
- <property name="spacing">
- <number>6</number>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="GroupBox" row="0" column="1">
+ <property name="name">
+ <cstring>GroupBox5</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>New activation requirement:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout37</cstring>
</property>
- <widget class="QLayoutWidget">
+ <hbox>
<property name="name">
- <cstring>Layout45</cstring>
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
</property>
- <hbox>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="Label">
<property name="name">
- <cstring>unnamed</cstring>
+ <cstring>addGroupReqLabel1</cstring>
</property>
- <property name="margin">
- <number>0</number>
+ <property name="text">
+ <string>When the user is</string>
</property>
- <property name="spacing">
- <number>6</number>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
</property>
- <widget class="CheckBox">
- <property name="name">
- <cstring>nameFilter</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>TabFocus</enum>
+ </widget>
+ <widget class="ComboBox">
+ <item>
+ <property name="text">
+ <string>a member of</string>
</property>
+ </item>
+ <item>
<property name="text">
- <string>name matches</string>
+ <string>not member of </string>
</property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@null</string>
- <string></string>
- <string>@execBegin
+ </item>
+ <property name="name">
+ <cstring>isMember</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@execBegin
-if(@String.isEmpty(@nameRegexp)); then
- echo "@null";
+if test '@widgetText' = 'a member of'; then
+ echo '';
else
- echo "--name '@nameRegexp'";
-fi
+ echo '!';
+fi;
@execEnd</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>When checked only profiles whose 1st (=name) field matches the given regular expression are shown</string>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>Spacer4</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Fixed</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>25</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </hbox>
- </widget>
- <widget class="CheckBox">
- <property name="name">
- <cstring>descriptionFilter</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>description matches</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@null</string>
- <string></string>
- <string>@execBegin
-
-if(@String.isEmpty(@descriptionRegexp)); then
- echo @null;
-else
- echo "--description '@descriptionRegexp'";
-fi
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Your choice here determines wether the new requirement concerns membership or non-membership</string>
+ </property>
+ </widget>
+ <widget class="ComboBox">
+ <property name="name">
+ <cstring>groupList</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="populationText">
+ <string>@exec(cat /etc/group | cut --fields 1 --delimiter ':' | sort)</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Choose the group for which (non-)membership is needed to activate this profile</string>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>addGroupReq</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>40</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Add</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>true
- at execEnd</string>
- </stringlist>
+ at requirementsCurrent.addUniqueItem(@isMember at groupList)</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Only activate profile for users that are (not) a member of the selected group</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>Layout38</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
</property>
- <property name="toolTip" stdset="0">
- <string>When checked only profiles whose 6th (=description) field matches the given regular expression are shown</string>
+ <property name="margin">
+ <number>0</number>
</property>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout47</cstring>
+ <property name="spacing">
+ <number>6</number>
</property>
- <hbox>
+ <widget class="Label">
<property name="name">
- <cstring>unnamed</cstring>
+ <cstring>addCommandReqLabel1</cstring>
</property>
- <property name="margin">
- <number>0</number>
+ <property name="text">
+ <string>When</string>
</property>
- <property name="spacing">
- <number>6</number>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
</property>
- <widget class="CheckBox">
- <property name="name">
- <cstring>locationFilter</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>TabFocus</enum>
- </property>
- <property name="text">
- <string>location matches</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@null</string>
- <string></string>
- <string>@execBegin
-
-if(@String.isEmpty(@locationRegexp)); then
- echo "@null";
-else
- echo "--location '@locationRegexp'";
-fi
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>commandReq</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Enter any shell command</string>
+ </property>
+ </widget>
+ <widget class="Label">
+ <property name="name">
+ <cstring>addCommandReqLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>executes succesfully</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>addCommandReq</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>40</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Add</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>true
- at execEnd</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>When checked only profiles whose 2nd (=location) field matches the given regular expression are shown</string>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>Spacer5</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Fixed</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>15</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </hbox>
- </widget>
- </vbox>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout49</cstring>
- </property>
- <vbox>
+ at requirementsCurrent.addUniqueItem($(@commandReq))</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Make succesfull completion of given shell command a requirement for activation of this profile</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="ExecButton" row="2" column="0">
<property name="name">
- <cstring>unnamed</cstring>
+ <cstring>deactivate</cstring>
</property>
- <property name="margin">
- <number>0</number>
+ <property name="enabled">
+ <bool>true</bool>
</property>
- <property name="spacing">
- <number>6</number>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <widget class="LineEdit">
- <property name="name">
- <cstring>nameRegexp</cstring>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>Takes a regular expression</string>
- </property>
- </widget>
- <widget class="LineEdit">
- <property name="name">
- <cstring>descriptionRegexp</cstring>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>Takes a regular expression</string>
- </property>
- </widget>
- <widget class="LineEdit">
- <property name="name">
- <cstring>locationRegexp</cstring>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>Takes a regular expression</string>
- </property>
- </widget>
- </vbox>
- </widget>
- </hbox>
- </widget>
- <widget class="QLayoutWidget">
+ <property name="text">
+ <string>Deactivate profile completely</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>true
+
+ at requirementsCurrent.addUniqueItem(!)</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Adds an unsatisfiable requirement (not in any group)</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout35</cstring>
+ </property>
+ <hbox>
<property name="name">
- <cstring>Layout22</cstring>
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
</property>
- <hbox>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
<property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
+ <cstring>Layout30</cstring>
</property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="Label">
+ <hbox>
<property name="name">
- <cstring>sortFilter</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>NoFocus</enum>
- </property>
- <property name="text">
- <string>Sort profile list on</string>
+ <cstring>unnamed</cstring>
</property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>--sort-key @sortField</string>
- </stringlist>
+ <property name="margin">
+ <number>0</number>
</property>
- <property name="toolTip" stdset="0">
- <string>Shown profiles are sorted on the contents of the selected field</string>
+ <property name="spacing">
+ <number>6</number>
</property>
- </widget>
- <spacer>
+ <widget class="Label">
+ <property name="name">
+ <cstring>listFileLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Listed in</string>
+ </property>
+ </widget>
+ <widget class="FileSelector">
+ <property name="name">
+ <cstring>listFileCurrent</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="populationText">
+ <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>.listing file where the profile is defined</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout32</cstring>
+ </property>
+ <hbox>
<property name="name">
- <cstring>Spacer6</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
+ <cstring>unnamed</cstring>
</property>
- <property name="sizeType">
- <enum>Fixed</enum>
+ <property name="margin">
+ <number>0</number>
</property>
- <property name="sizeHint">
- <size>
- <width>35</width>
- <height>20</height>
- </size>
+ <property name="spacing">
+ <number>6</number>
</property>
- </spacer>
- <widget class="ComboBox">
- <item>
- <property name="text">
- <string>description</string>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>isNew</cstring>
</property>
- </item>
- <item>
<property name="text">
- <string>kind</string>
+ <string>Is new</string>
</property>
- </item>
- <item>
- <property name="text">
- <string>location</string>
+ <property name="checked">
+ <bool>true</bool>
</property>
- </item>
- <item>
- <property name="text">
- <string>name</string>
+ <property name="populationText">
+ <string>false</string>
</property>
- </item>
- <item>
- <property name="text">
- <string>precedence</string>
+ <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">
+ <property name="name">
+ <cstring>isNewScript</cstring>
+ </property>
+ <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>
- </item>
- <item>
<property name="text">
- <string>requirements</string>
+ <string>@if(isEmpty())
+ at listFileCurrent.setEnabled()
+ at listFileCurrent.setText(/etc/desktop-profiles/custom.listing)</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(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(Save Changes)
+ at endif</string>
+ </stringlist>
</property>
- </item>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout34</cstring>
+ </property>
+ <hbox>
<property name="name">
- <cstring>sortField</cstring>
+ <cstring>unnamed</cstring>
</property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <property name="margin">
+ <number>0</number>
</property>
- <property name="currentItem">
- <number>4</number>
+ <property name="spacing">
+ <number>6</number>
</property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
- </property>
- <property name="toolTip" stdset="0">
- <string>Shown profiles are sorted on the contents of the selected field</string>
- </property>
- </widget>
- </hbox>
- </widget>
- </vbox>
- </widget>
- </grid>
+ <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">
+ <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>
+ </property>
+ <property name="text">
+ <string>Add new profile</string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </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;$LOCATION;$PRECEDENCE;$REQS;$KIND;$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";
+ else
+ kdialog --error "It appears you don't have permission to write $FILE";
+ fi;
+# adding new profile
+else
+ if (test -w "$FILE") || \
+ ( (! test -e "$FILE") && (test -w "$(dirname $FILE)") ); then
+ echo "$NEW" >> "$FILE";
+ else
+ kdialog --error "It appears you don't have permission to write $FILE";
+ fi;
+fi;</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Add/Update profile whose details are shown</string>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <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>
+ </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 locationCurrent.setText(@exec(echo '@profilesAll.selection' | cut --fields 3 --delimiter ';'))
+ at precedenceCurrent.setText(@exec(echo '@profilesAll.selection' | cut --fields 4 --delimiter ';'))
+ at kindCurrent.setSelection(@exec(echo '@profilesAll.selection' | cut --fields 6 --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>Forget changes made to shown profile details</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
</widget>
</grid>
</widget>
--
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