[debian-edu-commits] debian-edu/ 33/183: Added possibility to delete profiles Added a number of tooltips (still some to do) Added note in README about using desktop-profiles with current incarnation of debian-edu-config
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 6b74d08417650e88bbe4e82aeb53cc124a5d41cb
Author: Bart Cornelis <cobaco at linux.be>
Date: Mon Dec 13 19:04:11 2004 +0000
Added possibility to delete profiles
Added a number of tooltips (still some to do)
Added note in README about using desktop-profiles with current incarnation
of debian-edu-config
---
README | 13 +
profile-manager.kmdr | 2098 +++++++++++++++++++++++++++-----------------------
2 files changed, 1129 insertions(+), 982 deletions(-)
diff --git a/README b/README
index 04ab159..d3e5880 100644
--- a/README
+++ b/README
@@ -1,8 +1,21 @@
+GENERAL DESCRIPTION
+=-=-=-=-=-=-=-=-=-=
See the desktop-profiles(7) man page for a description of how this package
works, and what it does.
+NOTE FOR DEBIAN-EDU USERS
+=-=-=-=-=-=-=-=-=-=-=-=-=
+Debian-edu users should make sure they define a profile for the common
+debian-edu setup, you can do so by adding
+ kde3-specific;/usr/share/debian-edu/common;0;;KDE;Common Debian-edu KDE setup
+on a line by itself in a .listing file (file should be in
+/etc/desktop-profiles)
+
+BUILDING KDE-PROFILES
+=-=-=-=-=-=-=-=-=-=-=
There is a graphical tool called kiosk-tool available to aid in the creation
and maintenance of KDE profiles (regardless of wether they use kiosk
features). It's not currently available from the Debian mirrors, but a
version in .deb format is available from the kalyxo project's archives:
see http://www.kalyxo.org/twiki/bin/view/Main/StagingArchive for more info.
+
diff --git a/profile-manager.kmdr b/profile-manager.kmdr
index 512e069..053e07d 100644
--- a/profile-manager.kmdr
+++ b/profile-manager.kmdr
@@ -34,748 +34,83 @@
<string></string>
</stringlist>
</property>
- <widget class="ButtonGroup">
+ <widget class="GroupBox">
<property name="name">
- <cstring>filters</cstring>
+ <cstring>detailsSelection</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
- <y>10</y>
- <width>770</width>
- <height>140</height>
+ <y>460</y>
+ <width>772</width>
+ <height>252</height>
</rect>
</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>
+ <string>Profile Details</string>
</property>
- <widget class="LineEdit">
+ <widget class="Label">
<property name="name">
- <cstring>kindRegexp</cstring>
+ <cstring>precedenceLabel</cstring>
</property>
<property name="geometry">
<rect>
- <x>170</x>
- <y>20</y>
- <width>220</width>
+ <x>11</x>
+ <y>49</y>
+ <width>81</width>
<height>22</height>
</rect>
</property>
- <property name="text">
- <string></string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
- </property>
- </widget>
- <widget class="LineEdit">
- <property name="name">
- <cstring>requirementRegexp</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>170</x>
- <y>50</y>
- <width>220</width>
- <height>21</height>
- </rect>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
- </property>
- </widget>
- <widget class="LineEdit">
- <property name="name">
- <cstring>precedenceRegexp</cstring>
+ <property name="frameShape">
+ <enum>NoFrame</enum>
</property>
- <property name="geometry">
- <rect>
- <x>170</x>
- <y>80</y>
- <width>220</width>
- <height>22</height>
- </rect>
+ <property name="frameShadow">
+ <enum>Plain</enum>
</property>
<property name="text">
- <string></string>
- </property>
- <property name="inputMask">
- <string></string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
- </property>
- </widget>
- <widget class="ComboBox">
- <property name="name">
- <cstring>userList</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>190</x>
- <y>110</y>
- <width>200</width>
- <height>22</height>
- </rect>
- </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>
+ <string>Precedence:</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>
+ <widget class="GroupBox">
<property name="name">
- <cstring>test</cstring>
+ <cstring>requirementsBox</cstring>
</property>
<property name="geometry">
<rect>
- <x>110</x>
- <y>80</y>
- <width>50</width>
- <height>22</height>
+ <x>11</x>
+ <y>77</y>
+ <width>750</width>
+ <height>134</height>
</rect>
</property>
- <property name="currentItem">
- <number>0</number>
+ <property name="title">
+ <string>Activation requirements:</string>
</property>
<property name="associations" stdset="0">
<stringlist>
- <string>@widgetText</string>
+ <string></string>
</stringlist>
</property>
- </widget>
- <widget class="ComboBox">
- <item>
- <property name="text">
- <string>description</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>kind</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>location</string>
+ <widget class="GroupBox">
+ <property name="name">
+ <cstring>GroupBox5</cstring>
</property>
- </item>
- <item>
- <property name="text">
- <string>name</string>
+ <property name="geometry">
+ <rect>
+ <x>230</x>
+ <y>10</y>
+ <width>510</width>
+ <height>110</height>
+ </rect>
</property>
- </item>
- <item>
- <property name="text">
- <string>precedence</string>
+ <property name="title">
+ <string>New activation requirement:</string>
</property>
- </item>
- <item>
- <property name="text">
- <string>requirements</string>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
</property>
- </item>
- <property name="name">
- <cstring>sortField</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>550</x>
- <y>110</y>
- <width>210</width>
- <height>22</height>
- </rect>
- </property>
- <property name="currentItem">
- <number>4</number>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
- </property>
- </widget>
- <widget class="LineEdit">
- <property name="name">
- <cstring>locationRegexp</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>550</x>
- <y>80</y>
- <width>210</width>
- <height>22</height>
- </rect>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
- </property>
- </widget>
- <widget class="LineEdit">
- <property name="name">
- <cstring>descriptionRegexp</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>550</x>
- <y>50</y>
- <width>210</width>
- <height>22</height>
- </rect>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
- </property>
- </widget>
- <widget class="LineEdit">
- <property name="name">
- <cstring>nameRegexp</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>550</x>
- <y>20</y>
- <width>210</width>
- <height>22</height>
- </rect>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@widgetText</string>
- </stringlist>
- </property>
- </widget>
- <widget class="Label">
- <property name="name">
- <cstring>sortFilter</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>400</x>
- <y>110</y>
- <width>150</width>
- <height>20</height>
- </rect>
- </property>
- <property name="focusPolicy">
- <enum>NoFocus</enum>
- </property>
- <property name="text">
- <string>Sort profile list on</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>--sort-key @sortField</string>
- </stringlist>
- </property>
- </widget>
- <widget class="CheckBox">
- <property name="name">
- <cstring>kindFilter</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>20</y>
- <width>160</width>
- <height>20</height>
- </rect>
- </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";
-else
- echo "--kind '@kindRegexp'";
-fi
-
- at execEnd</string>
- </stringlist>
- </property>
- </widget>
- <widget class="CheckBox">
- <property name="name">
- <cstring>requirementFilter</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>50</y>
- <width>160</width>
- <height>20</height>
- </rect>
- </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";
-else
- echo "--requirement '@requirementRegexp'";
-fi
-
- at execEnd</string>
- </stringlist>
- </property>
- </widget>
- <widget class="CheckBox">
- <property name="name">
- <cstring>precedenceFilter</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>80</y>
- <width>100</width>
- <height>20</height>
- </rect>
- </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";
-elif test "@test" = '>'; then
- echo "--precedence 'gt @precedenceRegexp'";
-elif test "@test" = '>='; then
- echo "--precedence 'ge @precedenceRegexp'";
-elif test "@test" = '<'; then
- echo "--precedence 'lt @precedenceRegexp'";
-elif test "@test" = '<='; then
- echo "--precedence 'le @precedenceRegexp'";
-elif test "@test" = '='; then
- echo "--precedence 'eq @precedenceRegexp'";
-elif test "@test" = '<>'; then
- echo "--precedence 'ne @precedenceRegexp'";
-fi
-
- at execEnd</string>
- </stringlist>
- </property>
- </widget>
- <widget class="CheckBox">
- <property name="name">
- <cstring>userFilter</cstring>
- </property>
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>110</y>
- <width>180</width>
- <height>20</height>
- </rect>
- </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>
- </widget>
- <widget class="CheckBox">
- <property name="name">
- <cstring>nameFilter</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>400</x>
- <y>20</y>
- <width>150</width>
- <height>20</height>
- </rect>
- </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>
- </widget>
- <widget class="CheckBox">
- <property name="name">
- <cstring>descriptionFilter</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>400</x>
- <y>50</y>
- <width>150</width>
- <height>20</height>
- </rect>
- </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>
- </widget>
- <widget class="CheckBox">
- <property name="name">
- <cstring>locationFilter</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>400</x>
- <y>80</y>
- <width>150</width>
- <height>20</height>
- </rect>
- </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
-
- at execEnd</string>
- </stringlist>
- </property>
- </widget>
- <widget class="ScriptObject">
- <property name="name">
- <cstring>refreshList</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>530</x>
- <y>110</y>
- <width>16</width>
- <height>16</height>
- </rect>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@setGlobal(tmp, at exec(tempfile))
- at exec(list-desktop-profiles --entry-format '$FILE\;$NAME\;$LOCATION\;$PRECEDENCE\;$REQUIREMENTS\;$KIND\;$DESCRIPTION' @filters > @global(tmp))
-
- at profilesAll.setText(@exec(cat @global(tmp)))
- at profiles.setText(@exec("cat @global(tmp) | cut --fields 2,7 --delimiter ';' | sed 's/;/ - /' "));
-
- at exec(rm @global(tmp))</string>
- </stringlist>
- </property>
- </widget>
- </widget>
- <widget class="GroupBox">
- <property name="name">
- <cstring>detailsSelection</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>460</y>
- <width>772</width>
- <height>252</height>
- </rect>
- </property>
- <property name="title">
- <string>Profile Details</string>
- </property>
- <widget class="Label">
- <property name="name">
- <cstring>precedenceLabel</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>11</x>
- <y>49</y>
- <width>81</width>
- <height>22</height>
- </rect>
- </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="GroupBox">
- <property name="name">
- <cstring>requirementsBox</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>11</x>
- <y>77</y>
- <width>750</width>
- <height>134</height>
- </rect>
- </property>
- <property name="title">
- <string>Activation requirements:</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string></string>
- </stringlist>
- </property>
- <widget class="ExecButton">
- <property name="name">
- <cstring>delReq</cstring>
- </property>
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>100</y>
- <width>210</width>
- <height>24</height>
- </rect>
- </property>
- <property name="text">
- <string>Remove selected</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>true
-
- at requirementsCurrent.removeItem(@requirementsCurrent.findItem(@requirementsCurrent.selection()))</string>
- </stringlist>
- </property>
- </widget>
- <widget class="GroupBox">
- <property name="name">
- <cstring>GroupBox5</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>230</x>
- <y>10</y>
- <width>510</width>
- <height>110</height>
- </rect>
- </property>
- <property name="title">
- <string>New activation requirement:</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string></string>
- </stringlist>
- </property>
- <widget class="ComboBox">
- <property name="name">
- <cstring>groupList</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>260</x>
- <y>20</y>
- <width>190</width>
- <height>22</height>
- </rect>
- </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>
- </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="geometry">
- <rect>
- <x>130</x>
- <y>20</y>
- <width>120</width>
- <height>22</height>
- </rect>
- </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>
- </widget>
- <widget class="ExecButton">
- <property name="name">
- <cstring>deactivate</cstring>
- </property>
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>80</y>
- <width>200</width>
- <height>24</height>
- </rect>
- </property>
- <property name="text">
- <string>Deactivate profile completely</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>true
-
- at requirementsCurrent.addUniqueItem(!)</string>
- </stringlist>
- </property>
- </widget>
<widget class="Label">
<property name="name">
<cstring>addCommandReqLabel1</cstring>
@@ -839,6 +174,35 @@ fi;
</stringlist>
</property>
</widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>deactivate</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>80</y>
+ <width>200</width>
+ <height>24</height>
+ </rect>
+ </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>
<widget class="LineEdit">
<property name="name">
<cstring>commandReq</cstring>
@@ -856,15 +220,18 @@ fi;
<string>@widgetText</string>
</stringlist>
</property>
+ <property name="toolTip" stdset="0">
+ <string>Enter any shell command</string>
+ </property>
</widget>
<widget class="ExecButton">
<property name="name">
- <cstring>addGroupReq</cstring>
+ <cstring>addCommandReq</cstring>
</property>
<property name="geometry">
<rect>
<x>460</x>
- <y>20</y>
+ <y>50</y>
<width>40</width>
<height>24</height>
</rect>
@@ -876,18 +243,45 @@ fi;
<stringlist>
<string>true
- at requirementsCurrent.addUniqueItem(@isMember at groupList)</string>
+ 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>
+ <widget class="ComboBox">
+ <property name="name">
+ <cstring>groupList</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>260</x>
+ <y>20</y>
+ <width>190</width>
+ <height>22</height>
+ </rect>
+ </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>addCommandReq</cstring>
+ <cstring>addGroupReq</cstring>
</property>
<property name="geometry">
<rect>
<x>460</x>
- <y>50</y>
+ <y>20</y>
<width>40</width>
<height>24</height>
</rect>
@@ -899,117 +293,638 @@ fi;
<stringlist>
<string>true
- at requirementsCurrent.addUniqueItem($(@commandReq))</string>
+ 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>
+ <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="geometry">
+ <rect>
+ <x>130</x>
+ <y>20</y>
+ <width>120</width>
+ <height>22</height>
+ </rect>
+ </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>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>delReq</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>100</y>
+ <width>210</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Remove selected</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>
<widget class="ListBox">
<property name="name">
<cstring>requirementsCurrent</cstring>
</property>
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>20</y>
- <width>210</width>
- <height>70</height>
- </rect>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>210</width>
+ <height>70</height>
+ </rect>
+ </property>
+ <property name="selectionMode">
+ <enum>Single</enum>
+ </property>
+ <property name="populationText">
+ <string>@execBegin
+. /usr/share/desktop-profiles/listingmodule
+
+REQS="$(echo '@profilesAll.selection()' | cut --fields 5 --delimiter ';')"
+for_each_requirement "$REQS" 'echo'
+
+ at execEnd
+</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@execBegin
+
+echo '@widgetText' | 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>
+ <widget class="Label">
+ <property name="name">
+ <cstring>descriptionLabel</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>290</x>
+ <y>20</y>
+ <width>80</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Description:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="Label">
+ <property name="name">
+ <cstring>listFileLabel</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>220</y>
+ <width>61</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Listed in</string>
+ </property>
+ </widget>
+ <widget class="Label">
+ <property name="name">
+ <cstring>kindLabel</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>240</x>
+ <y>50</y>
+ <width>32</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Kind:</string>
+ </property>
+ </widget>
+ <widget class="Label">
+ <property name="name">
+ <cstring>locationLabel</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>400</x>
+ <y>50</y>
+ <width>77</width>
+ <height>22</height>
+ </rect>
+ </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>descriptionCurrent</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>371</x>
+ <y>21</y>
+ <width>390</width>
+ <height>22</height>
+ </rect>
+ </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>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>nameCurrent</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>98</x>
+ <y>21</y>
+ <width>190</width>
+ <height>22</height>
+ </rect>
+ </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="ComboBox">
+ <item>
+ <property name="text">
+ <string>KDE</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>GCONF</string>
</property>
- <property name="selectionMode">
- <enum>Single</enum>
+ </item>
+ <item>
+ <property name="text">
+ <string>XDG_CONFIG</string>
</property>
- <property name="populationText">
- <string>@execBegin
-. /usr/share/desktop-profiles/listingmodule
+ </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="geometry">
+ <rect>
+ <x>280</x>
+ <y>50</y>
+ <width>110</width>
+ <height>22</height>
+ </rect>
+ </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>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>locationCurrent</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>481</x>
+ <y>49</y>
+ <width>280</width>
+ <height>22</height>
+ </rect>
+ </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>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>precedenceCurrent</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>98</x>
+ <y>49</y>
+ <width>140</width>
+ <height>22</height>
+ </rect>
+ </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>
+ <widget class="FileSelector">
+ <property name="name">
+ <cstring>listFileCurrent</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>70</x>
+ <y>220</y>
+ <width>280</width>
+ <height>24</height>
+ </rect>
+ </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="toolTip" stdset="0">
+ <string>.listing file where the profile is defined</string>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>cancelChangeSelected</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>650</x>
+ <y>220</y>
+ <width>110</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Cancel Changes</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>true
+ at profilesAll.setCurrentItem(@profiles.findItem(@profiles.selection))
-REQS="$(echo '@profilesAll.selection()' | cut --fields 5 --delimiter ';')"
-for_each_requirement "$REQS" 'echo'
+ 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>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>isNew</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>360</x>
+ <y>220</y>
+ <width>70</width>
+ <height>20</height>
+ </rect>
+ </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="geometry">
+ <rect>
+ <x>380</x>
+ <y>230</y>
+ <width>16</width>
+ <height>16</height>
+ </rect>
+ </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>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>commitChanges</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>530</x>
+ <y>220</y>
+ <width>110</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Add new profile</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>IS_NEW="@isNew";
- at execEnd
-</string>
- </property>
- <property name="associations" stdset="0">
- <stringlist>
- <string>@execBegin
+FILE="@listFileCurrent";
+NAME="@nameCurrent";
+LOCATION="@locationCurrent";
+PRECEDENCE="@precedenceCurrent";
+REQS="@requirementsCurrent";
+KIND="@kindCurrent";
+DESC="@descriptionCurrent";
-echo '@widgetText' | while read REQ ; do
- echo -n "$REQ ";
-done
+NEW="$NAME;$LOCATION;$PRECEDENCE;$REQS;$KIND;$DESC"
- at execEnd</string>
- </stringlist>
- </property>
- </widget>
+# 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="Label">
+ <widget class="ExecButton">
<property name="name">
- <cstring>descriptionLabel</cstring>
+ <cstring>deleteProfile</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
</property>
<property name="geometry">
<rect>
- <x>290</x>
- <y>20</y>
- <width>80</width>
- <height>22</height>
+ <x>430</x>
+ <y>220</y>
+ <width>90</width>
+ <height>24</height>
</rect>
</property>
<property name="text">
- <string>Description:</string>
+ <string>Delete profile</string>
</property>
<property name="associations" stdset="0">
<stringlist>
- <string></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>Delete profile whose details are shown</string>
+ </property>
</widget>
<widget class="Label">
<property name="name">
- <cstring>kindLabel</cstring>
+ <cstring>nameLabel</cstring>
</property>
<property name="geometry">
<rect>
- <x>250</x>
- <y>50</y>
- <width>32</width>
+ <x>11</x>
+ <y>21</y>
+ <width>81</width>
<height>22</height>
</rect>
</property>
<property name="text">
- <string>Kind:</string>
+ <string>Name:</string>
</property>
</widget>
- <widget class="Label">
+ </widget>
+ <widget class="ButtonGroup">
+ <property name="name">
+ <cstring>filters</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>10</y>
+ <width>770</width>
+ <height>140</height>
+ </rect>
+ </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>
+ <widget class="LineEdit">
<property name="name">
- <cstring>locationLabel</cstring>
+ <cstring>kindRegexp</cstring>
</property>
<property name="geometry">
<rect>
- <x>400</x>
- <y>50</y>
- <width>77</width>
+ <x>170</x>
+ <y>20</y>
+ <width>220</width>
<height>22</height>
</rect>
</property>
<property name="text">
- <string>Location(s):</string>
+ <string></string>
</property>
<property name="associations" stdset="0">
<stringlist>
- <string></string>
+ <string>@widgetText</string>
</stringlist>
</property>
</widget>
<widget class="LineEdit">
<property name="name">
- <cstring>precedenceCurrent</cstring>
+ <cstring>requirementRegexp</cstring>
</property>
<property name="geometry">
<rect>
- <x>98</x>
- <y>49</y>
- <width>150</width>
- <height>22</height>
+ <x>170</x>
+ <y>50</y>
+ <width>220</width>
+ <height>21</height>
</rect>
</property>
<property name="associations" stdset="0">
@@ -1020,17 +935,20 @@ done
</widget>
<widget class="LineEdit">
<property name="name">
- <cstring>descriptionCurrent</cstring>
+ <cstring>precedenceRegexp</cstring>
</property>
<property name="geometry">
<rect>
- <x>371</x>
- <y>21</y>
- <width>390</width>
+ <x>170</x>
+ <y>80</y>
+ <width>220</width>
<height>22</height>
</rect>
</property>
- <property name="populationText">
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="inputMask">
<string></string>
</property>
<property name="associations" stdset="0">
@@ -1039,20 +957,20 @@ done
</stringlist>
</property>
</widget>
- <widget class="LineEdit">
+ <widget class="ComboBox">
<property name="name">
- <cstring>locationCurrent</cstring>
+ <cstring>userList</cstring>
</property>
<property name="geometry">
<rect>
- <x>481</x>
- <y>49</y>
- <width>280</width>
+ <x>190</x>
+ <y>110</y>
+ <width>200</width>
<height>22</height>
</rect>
</property>
<property name="populationText">
- <string></string>
+ <string>@exec(cat /etc/passwd | cut --fields 1 --delimiter ':' | sort)</string>
</property>
<property name="associations" stdset="0">
<stringlist>
@@ -1063,47 +981,47 @@ done
<widget class="ComboBox">
<item>
<property name="text">
- <string>KDE</string>
+ <string>description</string>
</property>
</item>
<item>
<property name="text">
- <string>GCONF</string>
+ <string>kind</string>
</property>
</item>
<item>
<property name="text">
- <string>XDG_CONFIG</string>
+ <string>location</string>
</property>
</item>
<item>
<property name="text">
- <string>XDG_DATA</string>
+ <string>name</string>
</property>
</item>
<item>
<property name="text">
- <string>ROX</string>
+ <string>precedence</string>
</property>
</item>
<item>
<property name="text">
- <string>UDE</string>
+ <string>requirements</string>
</property>
</item>
<property name="name">
- <cstring>kindCurrent</cstring>
+ <cstring>sortField</cstring>
</property>
<property name="geometry">
<rect>
- <x>290</x>
- <y>50</y>
- <width>100</width>
+ <x>550</x>
+ <y>110</y>
+ <width>210</width>
<height>22</height>
</rect>
</property>
- <property name="populationText">
- <string></string>
+ <property name="currentItem">
+ <number>4</number>
</property>
<property name="associations" stdset="0">
<stringlist>
@@ -1111,235 +1029,378 @@ done
</stringlist>
</property>
</widget>
- <widget class="Label">
+ <widget class="LineEdit">
<property name="name">
- <cstring>nameLabel</cstring>
+ <cstring>locationRegexp</cstring>
</property>
<property name="geometry">
<rect>
- <x>11</x>
- <y>21</y>
- <width>81</width>
+ <x>550</x>
+ <y>80</y>
+ <width>210</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>descriptionRegexp</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>550</x>
+ <y>50</y>
+ <width>210</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>nameRegexp</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>550</x>
+ <y>20</y>
+ <width>210</width>
<height>22</height>
</rect>
</property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>kindFilter</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>160</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
<property name="text">
- <string>Name:</string>
+ <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";
+else
+ echo "--kind '@kindRegexp'";
+fi
+
+ at execEnd</string>
+ </stringlist>
</property>
</widget>
- <widget class="Label">
+ <widget class="CheckBox">
<property name="name">
- <cstring>listFileLabel</cstring>
+ <cstring>requirementFilter</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
- <y>220</y>
- <width>61</width>
+ <y>50</y>
+ <width>160</width>
<height>20</height>
</rect>
</property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
<property name="text">
- <string>Listed in</string>
+ <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";
+else
+ echo "--requirement '@requirementRegexp'";
+fi
+
+ at execEnd</string>
+ </stringlist>
</property>
</widget>
- <widget class="LineEdit">
+ <widget class="CheckBox">
<property name="name">
- <cstring>nameCurrent</cstring>
+ <cstring>precedenceFilter</cstring>
</property>
<property name="geometry">
<rect>
- <x>98</x>
- <y>21</y>
- <width>190</width>
- <height>22</height>
+ <x>10</x>
+ <y>80</y>
+ <width>100</width>
+ <height>20</height>
</rect>
</property>
- <property name="populationText">
- <string></string>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="text">
+ <string>precedence</string>
</property>
<property name="associations" stdset="0">
<stringlist>
- <string>@widgetText</string>
+ <string>@null</string>
+ <string></string>
+ <string>@execBegin
+
+if(@String.isEmpty(@precedenceRegexp)); then
+ echo "@null";
+elif test "@test" = '>'; then
+ echo "--precedence 'gt @precedenceRegexp'";
+elif test "@test" = '>='; then
+ echo "--precedence 'ge @precedenceRegexp'";
+elif test "@test" = '<'; then
+ echo "--precedence 'lt @precedenceRegexp'";
+elif test "@test" = '<='; then
+ echo "--precedence 'le @precedenceRegexp'";
+elif test "@test" = '='; then
+ echo "--precedence 'eq @precedenceRegexp'";
+elif test "@test" = '<>'; then
+ echo "--precedence 'ne @precedenceRegexp'";
+fi
+
+ at execEnd</string>
</stringlist>
</property>
</widget>
- <widget class="ScriptObject">
+ <widget class="CheckBox">
<property name="name">
- <cstring>isNewScript</cstring>
+ <cstring>userFilter</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
</property>
<property name="geometry">
<rect>
- <x>380</x>
- <y>230</y>
- <width>16</width>
- <height>16</height>
+ <x>10</x>
+ <y>110</y>
+ <width>180</width>
+ <height>20</height>
</rect>
</property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
<property name="text">
- <string>@if(isEmpty())
- at listFileCurrent.setEnabled()
- at listFileCurrent.setText(/etc/desktop-profiles/custom.listing)</string>
+ <string>requirements are met for</string>
</property>
<property name="associations" stdset="0">
<stringlist>
- <string>@#being togled -> still false
- at if(@String.compare(false, @isNew))
- @listFileCurrent.setEnabled(true)
- @listFileCurrent.setText(/etc/desktop-profiles/custom.listing)
- @commitChanges.setText(Add new profile)
- at endif
+ <string>@null</string>
+ <string></string>
+ <string>@execBegin
-@#being togled -> still true
- at if(@String.compare(true, @isNew))
- @listFileCurrent.setEnabled(false)
- @listFileCurrent.setText(@exec(echo '@profilesAll.item(@profilesAll.currentItem)' | cut --fields 1 --delimiter ';'))
- @commitChanges.setText(Save Changes)
- at endif</string>
+if(@String.isEmpty(@userList)); then
+ echo "@null";
+else
+ echo "--user '@userList'";
+fi
+
+ at execEnd</string>
</stringlist>
</property>
</widget>
- <widget class="FileSelector">
+ <widget class="CheckBox">
<property name="name">
- <cstring>listFileCurrent</cstring>
- </property>
- <property name="enabled">
- <bool>true</bool>
+ <cstring>nameFilter</cstring>
</property>
<property name="geometry">
<rect>
- <x>70</x>
- <y>220</y>
- <width>300</width>
- <height>24</height>
+ <x>400</x>
+ <y>20</y>
+ <width>150</width>
+ <height>20</height>
</rect>
</property>
<property name="focusPolicy">
<enum>TabFocus</enum>
</property>
- <property name="populationText">
- <string>/etc/desktop-profiles/custom.listing</string>
+ <property name="text">
+ <string>name matches</string>
</property>
<property name="associations" stdset="0">
<stringlist>
- <string>@widgetText</string>
+ <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="selectionFilter">
- <string>*.listing</string>
- </property>
</widget>
<widget class="CheckBox">
<property name="name">
- <cstring>isNew</cstring>
+ <cstring>descriptionFilter</cstring>
</property>
<property name="geometry">
<rect>
- <x>380</x>
- <y>220</y>
- <width>90</width>
+ <x>400</x>
+ <y>50</y>
+ <width>150</width>
<height>20</height>
</rect>
</property>
<property name="text">
- <string>Is new</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- <property name="populationText">
- <string>false</string>
+ <string>description matches</string>
</property>
<property name="associations" stdset="0">
<stringlist>
- <string>false</string>
+ <string>@null</string>
<string></string>
- <string>true</string>
+ <string>@execBegin
+
+if(@String.isEmpty(@descriptionRegexp)); then
+ echo @null;
+else
+ echo "--description '@descriptionRegexp'";
+fi
+
+ at execEnd</string>
</stringlist>
</property>
</widget>
- <widget class="ExecButton">
+ <widget class="CheckBox">
<property name="name">
- <cstring>commitChanges</cstring>
- </property>
- <property name="enabled">
- <bool>true</bool>
+ <cstring>locationFilter</cstring>
</property>
<property name="geometry">
<rect>
- <x>503</x>
- <y>217</y>
- <width>120</width>
- <height>24</height>
+ <x>400</x>
+ <y>80</y>
+ <width>150</width>
+ <height>20</height>
</rect>
</property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
<property name="text">
- <string>Add new profile</string>
+ <string>location matches</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;$LOCATION;$PRECEDENCE;$REQS;$KIND;$DESC"
+ <string>@null</string>
+ <string></string>
+ <string>@execBegin
-# 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
+if(@String.isEmpty(@locationRegexp)); then
+ echo "@null";
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>
+ echo "--location '@locationRegexp'";
+fi
+
+ at execEnd</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="Label">
+ <property name="name">
+ <cstring>sortFilter</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>400</x>
+ <y>110</y>
+ <width>150</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="focusPolicy">
+ <enum>NoFocus</enum>
+ </property>
+ <property name="text">
+ <string>Sort profile list on</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>--sort-key @sortField</string>
</stringlist>
</property>
</widget>
- <widget class="ExecButton">
+ <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>cancelChangeSelected</cstring>
+ <cstring>test</cstring>
</property>
<property name="geometry">
<rect>
- <x>629</x>
- <y>217</y>
- <width>132</width>
- <height>24</height>
+ <x>110</x>
+ <y>80</y>
+ <width>50</width>
+ <height>22</height>
</rect>
</property>
- <property name="text">
- <string>Cancel Changes</string>
+ <property name="currentItem">
+ <number>0</number>
</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>
+ <string>@widgetText</string>
</stringlist>
</property>
</widget>
@@ -1368,6 +1429,35 @@ fi;</string>
</stringlist>
</property>
</widget>
+ <widget class="ScriptObject">
+ <property name="name">
+ <cstring>refreshList</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>540</x>
+ <y>120</y>
+ <width>16</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>true
+
+ at setGlobal(tmp, at exec(tempfile))
+ at exec(list-desktop-profiles --entry-format '$FILE\;$NAME\;$LOCATION\;$PRECEDENCE\;$REQUIREMENTS\;$KIND\;$DESCRIPTION' @filters > @global(tmp))
+
+ at profilesAll.setText(@exec(cat @global(tmp)))
+ at profiles.setText(@exec("cat @global(tmp) | cut --fields 2,7 --delimiter ';' | sed 's/;/ - /' "));
+
+ at exec(rm @global(tmp))</string>
+ </stringlist>
+ </property>
+ </widget>
<widget class="ListBox">
<property name="name">
<cstring>profiles</cstring>
@@ -1405,6 +1495,9 @@ fi;</string>
<string></string>
</stringlist>
</property>
+ <property name="toolTip" stdset="0">
+ <string>List of profiles found in processed .listing files</string>
+ </property>
</widget>
</widget>
<connections>
@@ -1433,32 +1526,110 @@ fi;</string>
<slot>populate()</slot>
</connection>
<connection>
- <sender>sortField</sender>
- <signal>widgetTextChanged(const QString&)</signal>
+ <sender>cancelChangeSelected</sender>
+ <signal>clicked()</signal>
+ <receiver>requirementsCurrent</receiver>
+ <slot>populate()</slot>
+ </connection>
+ <connection>
+ <sender>profiles</sender>
+ <signal>selectionChanged()</signal>
+ <receiver>requirementsCurrent</receiver>
+ <slot>populate()</slot>
+ </connection>
+ <connection>
+ <sender>profiles</sender>
+ <signal>selected(int)</signal>
+ <receiver>requirementsCurrent</receiver>
+ <slot>populate()</slot>
+ </connection>
+ <connection>
+ <sender>isNew</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>isNewScript</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>listDesktopProfilesGUI</sender>
+ <signal>widgetOpened()</signal>
+ <receiver>listFileCurrent</receiver>
+ <slot>populate()</slot>
+ </connection>
+ <connection>
+ <sender>cancelChangeSelected</sender>
+ <signal>clicked()</signal>
+ <receiver>isNewScript</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>profiles</sender>
+ <signal>selectionChanged()</signal>
+ <receiver>isNewScript</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>deleteProfile</sender>
+ <signal>clicked()</signal>
+ <receiver>isNewScript</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>deleteProfile</sender>
+ <signal>clicked()</signal>
+ <receiver>requirementsCurrent</receiver>
+ <slot>populate()</slot>
+ </connection>
+ <connection>
+ <sender>deleteProfile</sender>
+ <signal>clicked()</signal>
+ <receiver>cancelChangeSelected</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>listDesktopProfilesGUI</sender>
+ <signal>widgetOpened()</signal>
+ <receiver>profiles</receiver>
+ <slot>setFocus()</slot>
+ </connection>
+ <connection>
+ <sender>kindFilter</sender>
+ <signal>toggled(bool)</signal>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
<connection>
- <sender>userList</sender>
- <signal>widgetTextChanged(const QString&)</signal>
+ <sender>requirementFilter</sender>
+ <signal>toggled(bool)</signal>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
<connection>
- <sender>test</sender>
- <signal>widgetTextChanged(const QString&)</signal>
+ <sender>precedenceFilter</sender>
+ <signal>toggled(bool)</signal>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
<connection>
- <sender>precedenceRegexp</sender>
- <signal>returnPressed()</signal>
+ <sender>userFilter</sender>
+ <signal>toggled(bool)</signal>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
<connection>
- <sender>precedenceRegexp</sender>
- <signal>lostFocus()</signal>
+ <sender>nameFilter</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>refreshList</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>descriptionFilter</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>refreshList</receiver>
+ <slot>execute()</slot>
+ </connection>
+ <connection>
+ <sender>locationFilter</sender>
+ <signal>toggled(bool)</signal>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
@@ -1487,125 +1658,89 @@ fi;</string>
<slot>execute()</slot>
</connection>
<connection>
- <sender>nameRegexp</sender>
+ <sender>precedenceRegexp</sender>
<signal>lostFocus()</signal>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
<connection>
- <sender>nameRegexp</sender>
+ <sender>precedenceRegexp</sender>
<signal>returnPressed()</signal>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
<connection>
- <sender>descriptionRegexp</sender>
+ <sender>nameRegexp</sender>
<signal>lostFocus()</signal>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
<connection>
- <sender>descriptionRegexp</sender>
+ <sender>nameRegexp</sender>
<signal>returnPressed()</signal>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
<connection>
- <sender>userFilter</sender>
- <signal>toggled(bool)</signal>
+ <sender>descriptionRegexp</sender>
+ <signal>lostFocus()</signal>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
<connection>
- <sender>locationFilter</sender>
- <signal>toggled(bool)</signal>
+ <sender>descriptionRegexp</sender>
+ <signal>returnPressed()</signal>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
<connection>
- <sender>descriptionFilter</sender>
- <signal>toggled(bool)</signal>
+ <sender>locationRegexp</sender>
+ <signal>returnPressed()</signal>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
<connection>
- <sender>nameFilter</sender>
- <signal>toggled(bool)</signal>
+ <sender>locationRegexp</sender>
+ <signal>lostFocus()</signal>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
<connection>
- <sender>precedenceFilter</sender>
- <signal>toggled(bool)</signal>
+ <sender>test</sender>
+ <signal>widgetTextChanged(const QString&)</signal>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
<connection>
- <sender>kindFilter</sender>
- <signal>toggled(bool)</signal>
+ <sender>userList</sender>
+ <signal>widgetTextChanged(const QString&)</signal>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
<connection>
- <sender>requirementFilter</sender>
- <signal>toggled(bool)</signal>
+ <sender>sortField</sender>
+ <signal>widgetTextChanged(const QString&)</signal>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
<connection>
- <sender>cancelChangeSelected</sender>
- <signal>clicked()</signal>
- <receiver>requirementsCurrent</receiver>
- <slot>populate()</slot>
- </connection>
- <connection>
- <sender>profiles</sender>
- <signal>selectionChanged()</signal>
- <receiver>requirementsCurrent</receiver>
- <slot>populate()</slot>
- </connection>
- <connection>
- <sender>profiles</sender>
- <signal>selected(int)</signal>
- <receiver>requirementsCurrent</receiver>
- <slot>populate()</slot>
- </connection>
- <connection>
- <sender>commitChanges</sender>
+ <sender>deleteProfile</sender>
<signal>clicked()</signal>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
<connection>
- <sender>isNew</sender>
- <signal>toggled(bool)</signal>
- <receiver>isNewScript</receiver>
- <slot>execute()</slot>
- </connection>
- <connection>
- <sender>listDesktopProfilesGUI</sender>
- <signal>widgetOpened()</signal>
- <receiver>listFileCurrent</receiver>
- <slot>populate()</slot>
- </connection>
- <connection>
<sender>listDesktopProfilesGUI</sender>
<signal>widgetOpened()</signal>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
<connection>
- <sender>listDesktopProfilesGUI</sender>
- <signal>widgetOpened()</signal>
+ <sender>commitChanges</sender>
+ <signal>clicked()</signal>
<receiver>refreshList</receiver>
<slot>execute()</slot>
</connection>
- <connection>
- <sender>listDesktopProfilesGUI</sender>
- <signal>widgetOpened()</signal>
- <receiver>profiles</receiver>
- <slot>setFocus()</slot>
- </connection>
</connections>
<tabstops>
<tabstop>kindFilter</tabstop>
@@ -1643,7 +1778,6 @@ fi;</string>
<tabstop>commitChanges</tabstop>
<tabstop>cancelChangeSelected</tabstop>
<tabstop>profilesAll</tabstop>
- <tabstop>refreshList</tabstop>
</tabstops>
<layoutdefaults spacing="6" margin="11"/>
</UI>
--
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