[debian-edu-commits] debian-edu/ 31/183: Added Kommander-GUI-app for managing installed profiles, mostly done still needs some polish (tooltips, whatsthis, ...) + adapt packaging to include it
Alexander Alemayhu
ccscanf-guest at moszumanska.debian.org
Wed Jun 11 16:48:30 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 cf9124342b74e65740908d131c724eb04970f1d7
Author: Bart Cornelis <cobaco at linux.be>
Date: Tue Dec 7 22:02:28 2004 +0000
Added Kommander-GUI-app for managing installed profiles, mostly done
still needs some polish (tooltips, whatsthis, ...) + adapt packaging to
include it
Fixed a dump typo flaw in listingmodule
---
debian/changelog | 6 +
debian/control | 2 +-
debian/menu | 5 +
debian/rules | 2 +
default.listing | 6 +-
listingmodule | 66 ++-
profile-manager.kmdr | 1492 ++++++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 1547 insertions(+), 32 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 417a486..1bfdf9e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+desktop-profiles (1.2.-1) unreleased; urgency=low
+
+ * Added kommander GUI for managing the /etc/desktop-profiles/*.listing files
+
+ -- Bart Cornelis (cobaco) <cobaco at linux.be> Tue, 7 Dec 2004 22:45:45 +0100
+
desktop-profiles (1.1-2) unstable; urgency=low
* Changed package description to something a bit better.
diff --git a/debian/control b/debian/control
index 495f87f..45d5f95 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@ Package: desktop-profiles
Architecture: all
Build-Depends-Indep: po-debconf
Depends: ${misc:Depends}
-Suggests: menu-xdg, hicolor-icon-theme, shared-mime-info, gconf-editor
+Suggests: kommander, menu-xdg, hicolor-icon-theme, shared-mime-info, gconf-editor
Enhances: kdebase, gconf, gconf2, rox-filer, libxfce4util-1 (>= 4.2)
Description: Framework for setting up desktop profiles
The different Desktop environments in Debian all offer the possibillity of
diff --git a/debian/menu b/debian/menu
new file mode 100644
index 0000000..7b122ce
--- /dev/null
+++ b/debian/menu
@@ -0,0 +1,5 @@
+?package(desktop-profiles,kommander):\
+ needs=X11 \
+ section=Apps/System\
+ title="profile-manager"\
+ command="/usr/bin/kmdr-executor /usr/share/desktop-profiles/kommander-scripts/profile-manager"
diff --git a/debian/rules b/debian/rules
index 4b37913..7a53270 100755
--- a/debian/rules
+++ b/debian/rules
@@ -31,10 +31,12 @@ binary-indep: build install
dh_testroot
dh_installchangelogs
dh_installdocs
+ dh_installmenu
dh_installexamples path
dh_installman desktop-profiles.7 list-desktop-profiles.1
dh_install listingmodule usr/share/desktop-profiles/
dh_install list-desktop-profiles usr/bin/
+ dh_install profile-manager.kmdr usr/share/desktop-profiles/kommander-scripts/
dh_install desktop-profiles etc/default
dh_install 20desktop-profiles_activateDesktopProfiles etc/X11/Xsession.d/
dh_install default.listing etc/desktop-profiles/
diff --git a/default.listing b/default.listing
index cc9ba8d..fe81e3a 100644
--- a/default.listing
+++ b/default.listing
@@ -8,9 +8,9 @@
# for the system settings).
#
# -> We split this in user settings and system-settings with the user settings
-# having an very high precedence (1000) so they should normally always be
-# used (NOTE: if the ROX profile with the highest precedence isn't
-# writeable their could be problems)
+# having an very high precedence so they should normally always be used
+# (NOTE: if the ROX profile with the highest precedence isn't writeable
+# there could be problems)
#
# See the desktop-profiles (7) man page for details about the format of this
# file, and how it will be used
diff --git a/listingmodule b/listingmodule
index de97683..2d1ddff 100644
--- a/listingmodule
+++ b/listingmodule
@@ -79,27 +79,16 @@ test_requirement(){
exit 1;
}
-###############################################################################
-# test_profile_requirements() - test wether the given profile's requirements
-# are met for a given user.
-#
-# Note: won't work for not-current-user when command-requirments depend on
-# the user's environment settings.
-#
-# $1 = the profile line from the listing file
-# $2 = username (defaults to current user if absent)
-#
-# returns succesfully ($?=0) if requirement is met
-# returns 1 otherwise
-###############################################################################
-test_profile_requirements() {
- PROFILE_REQUIREMENTS="`echo $@ | cut --fields 4 --delimiter ";"`";
-
- # no requirements -> met
- if (test "$PROFILE_REQUIREMENTS"x = x); then
- exit;
- fi;
-
+################################################################
+# $1 = list of requirements
+# $2 = '$2 $REQUIREMENT' will be executed for each REQUIREMENT
+# $3- ... = extra arguments to pass to each $2 call
+################################################################
+for_each_requirement(){
+ PROFILE_REQUIREMENTS="$1";shift
+ COMMAND="$1";shift
+ EXTRA_ARGS="$@";
+
# requirements -> check one by one
while (test "$PROFILE_REQUIREMENTS"x != x); do
# attempt to get first (remaining) REQUIREMENT
@@ -122,12 +111,33 @@ test_profile_requirements() {
PROFILE_REQUIREMENTS=`echo $PROFILE_REQUIREMENTS | sed -e "s/^$REQUIREMENT//" -e "s/^ *//"`;
fi;
- # test current requirement
- # -> if unmet there's no need to keep testing, so exit indicating failure
- if !(test_requirement "$REQUIREMENT" $2); then
- exit 1;
- fi
+ "$COMMAND" "$REQUIREMENT" "$EXTRA_ARGS"
done;
+}
+
+###############################################################################
+# test_profile_requirements() - test wether the given profile's requirements
+# are met for a given user.
+#
+# Note: won't work for not-current-user when command-requirments depend on
+# the user's environment settings.
+#
+# $1 = the profile line from the listing file
+# $2 = username (defaults to current user if absent)
+#
+# returns succesfully ($?=0) if requirement is met
+# returns 1 otherwise
+###############################################################################
+test_profile_requirements() {
+ PROFILE_REQUIREMENTS="`echo $@ | cut --fields 4 --delimiter ";"`";
+
+ # no requirements -> met
+ if (test "$PROFILE_REQUIREMENTS"x = x); then
+ exit;
+ fi;
+
+ # requirements -> check one by one
+ for_each_requirement "$PROFILE_REQUIREMENTS" test_requirement $2;
# all requirements are met (or we wouldn't get here)
exit;
@@ -184,7 +194,7 @@ filter_listings () {
OUR_USER=${OUR_USER:-''}
- FORMAT=${FORMAT:-'$NAME\;$DESCRIPTION\;$PRECEDENCE\;$REQUIREMENTS\;$KIND\;$DESCRIPTION'};
+ FORMAT=${FORMAT:-'$NAME\;$LOCATION\;$PRECEDENCE\;$REQUIREMENTS\;$KIND\;$DESCRIPTION'};
# do the filtering
cat $(ls $LISTINGS_DIR/*.listing) $EXTRA_LISTINGS | grep -v -e "^#" -e "^ *$" | sort $SORT_ARGS --key="$SORT_KEY" --field-separator=';' | \
@@ -210,7 +220,7 @@ filter_listings () {
if ( (test "${NAME_FILTER:-''}" != '') && (echo "$NAME" | grep -v "$NAME_FILTER" > /dev/null) ) ||
( (test "${LOCATION_FILTER:-''}" != '') && (echo "$LOCATION" | grep -v "$LOCATION_FILTER" > /dev/null) ) ||
( (test "${PRECEDENCE_FILTER:-''}" != '') && !(test "$NORM_PRECEDENCE" $PRECEDENCE_FILTER) ) ||
- ( (test "${REQUIREMENTS_FILTER:-''}" != '') && (echo "$REQUIREMENTS" | grep -v "$REQUIREMENTS_FILTER" > /dev/null) ) ||
+ ( (test "${REQUIREMENT_FILTER:-''}" != '') && (echo "$REQUIREMENTS" | grep -v "$REQUIREMENT_FILTER" > /dev/null) ) ||
( (test "${KIND_FILTER:-''}" != '') && (echo "$KIND" | grep -v "$KIND_FILTER" > /dev/null) ) ||
( (test "${DESCRIPTION_FILTER:-''}" != '') && (echo "$DESCRIPTION" | grep -v "$DESCRIPTION_FILTER" > /dev/null) ); then
continue;
diff --git a/profile-manager.kmdr b/profile-manager.kmdr
new file mode 100644
index 0000000..d29e72e
--- /dev/null
+++ b/profile-manager.kmdr
@@ -0,0 +1,1492 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>listDesktopProfilesGUI</class>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>listDesktopProfilesGUI</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>791</width>
+ <height>722</height>
+ </rect>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32767</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="baseSize">
+ <size>
+ <width>800</width>
+ <height>600</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string>Desktop-Profile Manager</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string></string>
+ </stringlist>
+ </property>
+ <widget class="ListBox">
+ <property name="name">
+ <cstring>profilesAll</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>630</x>
+ <y>170</y>
+ <width>140</width>
+ <height>64</height>
+ </rect>
+ </property>
+ <property name="focusPolicy">
+ <enum>NoFocus</enum>
+ </property>
+ <property name="populationText">
+ <string>@null</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@profilesAll.selection()</string>
+ </stringlist>
+ </property>
+ </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>kindRegexp</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>170</x>
+ <y>20</y>
+ <width>220</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>
+ <property name="geometry">
+ <rect>
+ <x>170</x>
+ <y>80</y>
+ <width>220</width>
+ <height>22</height>
+ </rect>
+ </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>
+ </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>NoFocus</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="focusPolicy">
+ <enum>NoFocus</enum>
+ </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>NoFocus</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="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>NoFocus</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>NoFocus</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="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="geometry">
+ <rect>
+ <x>110</x>
+ <y>80</y>
+ <width>50</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="currentItem">
+ <number>0</number>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</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>NoFocus</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>NoFocus</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="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>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>name</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>precedence</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>requirements</string>
+ </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>
+ <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>
+ <widget class="Label">
+ <property name="name">
+ <cstring>Label14</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>50</y>
+ <width>40</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>When</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>
+ </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="Label">
+ <property name="name">
+ <cstring>Label13</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>120</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>When the user is</string>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>addGroupReq</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>460</x>
+ <y>20</y>
+ <width>40</width>
+ <height>24</height>
+ </rect>
+ </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>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>addCommandReq</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>460</x>
+ <y>50</y>
+ <width>40</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Add</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>true
+
+ at requirementsCurrent.addUniqueItem($(@command))</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="Label">
+ <property name="name">
+ <cstring>Label12</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>320</x>
+ <y>50</y>
+ <width>131</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>executes succesfully</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>command</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>50</x>
+ <y>50</y>
+ <width>270</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</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>
+ <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>
+ <property name="selectionMode">
+ <enum>Single</enum>
+ </property>
+ <property name="populationText">
+ <string>@execBegin
+. /usr/share/desktop-profiles/listingmodule
+
+REQS=$(echo '@profilesAll' | 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>
+ </widget>
+ </widget>
+ <widget class="Label">
+ <property name="name">
+ <cstring>nameLabel</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>21</y>
+ <width>81</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Name:</string>
+ </property>
+ </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>
+ </widget>
+ <widget class="Label">
+ <property name="name">
+ <cstring>kindLabel</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>250</x>
+ <y>50</y>
+ <width>32</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Kind:</string>
+ </property>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>cancelChangeSelected</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>629</x>
+ <y>217</y>
+ <width>132</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()))
+
+ at nameCurrent.setText(@exec(echo '@profilesAll' | cut --fields 2 --delimiter ';'))
+ at locationCurrent.setText(@exec(echo '@profilesAll' | cut --fields 3 --delimiter ';'))
+ at precedenceCurrent.setText(@exec(echo '@profilesAll' | cut --fields 4 --delimiter ';'))
+ at kindCurrent.setSelection(@exec(echo '@profilesAll' | cut --fields 6 --delimiter ';'))
+ at descriptionCurrent.setText(@exec(echo '@profilesAll' | cut --fields 7 --delimiter ';'))
+
+ at command.clear()
+</string>
+ </stringlist>
+ </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>precedenceCurrent</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>98</x>
+ <y>49</y>
+ <width>150</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>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>
+ </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>
+ </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="geometry">
+ <rect>
+ <x>290</x>
+ <y>50</y>
+ <width>100</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </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>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>commitChanges</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>503</x>
+ <y>217</y>
+ <width>120</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Save Changes</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>true
+
+ at execBegin
+
+
+FILE="$(echo '@profilesAll.item(@profilesAll.currentItem)' | cut --fields 1 --delimiter ';')"
+OLD="$(echo '@profilesAll.item(@profilesAll.currentItem)' | cut --fields 2 --delimiter ';')"
+NEW='@nameCurrent;@locationCurrent;@precedenceCurrent;@requirementsCurrent;@kindCurrent;@descriptionCurrent'
+
+if test -w $FILE; then
+ echo "sed -i \"s|^$OLD|$NEW|\" $FILE" > ~/debug
+ sed -i "s%^$OLD.*%$NEW%" $FILE;
+else
+ kdialog --error "It appears you don't have permission to write $FILE";
+fi;
+
+#echo "$FILE" > ~/debug
+#echo "$OLD" >> ~/debug
+#echo "$NEW" >> ~/debug
+
+ at execEnd
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ </widget>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>refreshList</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>640</x>
+ <y>240</y>
+ <width>130</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="focusPolicy">
+ <enum>NoFocus</enum>
+ </property>
+ <property name="text">
+ <string>Update profile list</string>
+ </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 class="ListBox">
+ <property name="name">
+ <cstring>profiles</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>160</y>
+ <width>770</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="resizePolicy">
+ <enum>AutoOneFit</enum>
+ </property>
+ <property name="selectionMode">
+ <enum>Single</enum>
+ </property>
+ <property name="columnMode">
+ <enum>FixedNumber</enum>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+</widget>
+<connections>
+ <connection>
+ <sender>listDesktopProfilesGUI</sender>
+ <signal>widgetOpened()</signal>
+ <receiver>userList</receiver>
+ <slot>populate()</slot>
+ </connection>
+ <connection>
+ <sender>listDesktopProfilesGUI</sender>
+ <signal>widgetOpened()</signal>
+ <receiver>profiles</receiver>
+ <slot>populate()</slot>
+ </connection>
+ <connection>
+ <sender>profiles</sender>
+ <signal>selected(int)</signal>
+ <receiver>precedenceCurrent</receiver>
+ <slot>populate()</slot>
+ </connection>
+ <connection>
+ <sender>profiles</sender>
+ <signal>selectionChanged()</signal>
+ <receiver>cancelChangeSelected</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>listDesktopProfilesGUI</sender>
+ <signal>widgetOpened()</signal>
+ <receiver>groupList</receiver>
+ <slot>populate()</slot>
+ </connection>
+ <connection>
+ <sender>listDesktopProfilesGUI</sender>
+ <signal>widgetOpened()</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>sortField</sender>
+ <signal>widgetTextChanged(const QString&)</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>userList</sender>
+ <signal>widgetTextChanged(const QString&)</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>test</sender>
+ <signal>widgetTextChanged(const QString&)</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>precedenceRegexp</sender>
+ <signal>returnPressed()</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>precedenceRegexp</sender>
+ <signal>lostFocus()</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>kindRegexp</sender>
+ <signal>returnPressed()</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>kindRegexp</sender>
+ <signal>lostFocus()</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>requirementRegexp</sender>
+ <signal>returnPressed()</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>requirementRegexp</sender>
+ <signal>lostFocus()</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>nameRegexp</sender>
+ <signal>lostFocus()</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>nameRegexp</sender>
+ <signal>returnPressed()</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>descriptionRegexp</sender>
+ <signal>lostFocus()</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>descriptionRegexp</sender>
+ <signal>returnPressed()</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>userFilter</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>locationFilter</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>descriptionFilter</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>nameFilter</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>precedenceFilter</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>kindFilter</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+ <connection>
+ <sender>requirementFilter</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</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>
+ <signal>clicked()</signal>
+ <receiver>refreshList</receiver>
+ <slot>startProcess()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>kindRegexp</tabstop>
+ <tabstop>requirementRegexp</tabstop>
+ <tabstop>test</tabstop>
+ <tabstop>precedenceRegexp</tabstop>
+ <tabstop>nameRegexp</tabstop>
+ <tabstop>descriptionRegexp</tabstop>
+ <tabstop>locationRegexp</tabstop>
+ <tabstop>userList</tabstop>
+ <tabstop>sortField</tabstop>
+ <tabstop>profiles</tabstop>
+ <tabstop>nameCurrent</tabstop>
+ <tabstop>descriptionCurrent</tabstop>
+ <tabstop>precedenceCurrent</tabstop>
+ <tabstop>kindCurrent</tabstop>
+ <tabstop>locationCurrent</tabstop>
+ <tabstop>requirementsCurrent</tabstop>
+ <tabstop>delReq</tabstop>
+ <tabstop>isMember</tabstop>
+ <tabstop>groupList</tabstop>
+ <tabstop>addGroupReq</tabstop>
+ <tabstop>command</tabstop>
+ <tabstop>addCommandReq</tabstop>
+ <tabstop>deactivate</tabstop>
+ <tabstop>commitChanges</tabstop>
+ <tabstop>cancelChangeSelected</tabstop>
+ <tabstop>kindFilter</tabstop>
+ <tabstop>requirementFilter</tabstop>
+ <tabstop>precedenceFilter</tabstop>
+ <tabstop>nameFilter</tabstop>
+ <tabstop>descriptionFilter</tabstop>
+ <tabstop>locationFilter</tabstop>
+ <tabstop>userFilter</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