installer.kmdr: disable clock and language buttons when not available
This commit is contained in:
parent
3e711cfee0
commit
16ebbb5c67
@ -760,28 +760,6 @@ dcop @dcopid KommanderIf setText licenseBrowser "`cat /usr/share/openmamba/insta
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="ScriptObject">
|
||||
<property name="name">
|
||||
<cstring>setTimeLabel</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>520</x>
|
||||
<y>10</y>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="associations" stdset="0">
|
||||
<stringlist>
|
||||
<string>@execBegin
|
||||
currdate=`date +"%x %H:%M %Z"`
|
||||
dcop @dcopid KommanderIf setText timelabel "$currdate"
|
||||
@execEnd
|
||||
</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="Label">
|
||||
<property name="name">
|
||||
<cstring>Label32</cstring>
|
||||
@ -800,7 +778,7 @@ dcop @dcopid KommanderIf setText timelabel "$currdate"
|
||||
</widget>
|
||||
<widget class="ExecButton">
|
||||
<property name="name">
|
||||
<cstring>ExecButton1</cstring>
|
||||
<cstring>timebutton</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
@ -820,6 +798,29 @@ dcop @dcopid KommanderIf setText timelabel "$currdate"
|
||||
<stringlist>
|
||||
<string>@exec("kcmshell4 clock")
|
||||
@setTimeLabel.execute()
|
||||
</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="ScriptObject">
|
||||
<property name="name">
|
||||
<cstring>setTimeLabel</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>520</x>
|
||||
<y>10</y>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="associations" stdset="0">
|
||||
<stringlist>
|
||||
<string>@execBegin
|
||||
currdate=`date +"%x %H:%M %Z"`
|
||||
dcop @dcopid KommanderIf setText timelabel "$currdate"
|
||||
[ -e /opt/kde/lib/kde4/kcm_clock.so ] || dcop @dcopid KommanderIf setEnabled timebutton "false"
|
||||
@execEnd
|
||||
</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
@ -920,6 +921,48 @@ dcop @dcopid KommanderIf setText timelabel "$currdate"
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<widget class="ExecButton">
|
||||
<property name="name">
|
||||
<cstring>langbutton</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>280</x>
|
||||
<y>40</y>
|
||||
<width>261</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Configure &language and country</string>
|
||||
</property>
|
||||
<property name="associations" stdset="0">
|
||||
<stringlist>
|
||||
<string>@exec("kcmshell4 language")
|
||||
@execBegin
|
||||
if [ -r ~/.kde4/share/config/kdeglobals ]; then
|
||||
eval `grep -i Language ~/.kde4/share/config/kdeglobals`
|
||||
Language=${Language/:*}
|
||||
if [ "$Language" ]; then
|
||||
case ${Language} in
|
||||
it|it_IT) LANGUAGE="it_IT" ;;
|
||||
en|en_US) LANGUAGE="en_US" ;;
|
||||
es|es_ES) LANGUAGE="es_ES" ;;
|
||||
fr|fr_FR) LANGUAGE="fr_FR" ;;
|
||||
en_GB) LANGUAGE="en_GB" ;;
|
||||
*) LANGUAGE="${Language}" ;;
|
||||
esac
|
||||
LANGUAGE=${LANGUAGE:0:5}.UTF-8
|
||||
sed -i "s|LANG=.*|LANG=$LANGUAGE|" /etc/sysconfig/i18n
|
||||
sed -i "s|LANG=.*|LANG=$LANGUAGE|" /etc/locale.conf
|
||||
fi
|
||||
fi
|
||||
@execEnd
|
||||
@setLangLabel.execute()
|
||||
</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="ScriptObject">
|
||||
<property name="name">
|
||||
<cstring>setLangLabel</cstring>
|
||||
@ -963,49 +1006,7 @@ case ${LANGUAGE:0:5} in
|
||||
esac
|
||||
dcop @dcopid KommanderIf setText langlabel "$LANGUAGE"
|
||||
dcop @dcopid KommanderIf setText countrylabel $"$COUNTRY"
|
||||
</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="ExecButton">
|
||||
<property name="name">
|
||||
<cstring>ExecButton1_2_2</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>280</x>
|
||||
<y>40</y>
|
||||
<width>261</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Configure &language and country</string>
|
||||
</property>
|
||||
<property name="associations" stdset="0">
|
||||
<stringlist>
|
||||
<string>@exec("kcmshell4 language")
|
||||
@execBegin
|
||||
if [ -r ~/.kde4/share/config/kdeglobals ]; then
|
||||
eval `grep -i Language ~/.kde4/share/config/kdeglobals`
|
||||
Language=${Language/:*}
|
||||
if [ "$Language" ]; then
|
||||
case ${Language} in
|
||||
it|it_IT) LANGUAGE="it_IT" ;;
|
||||
en|en_US) LANGUAGE="en_US" ;;
|
||||
es|es_ES) LANGUAGE="es_ES" ;;
|
||||
fr|fr_FR) LANGUAGE="fr_FR" ;;
|
||||
en_GB) LANGUAGE="en_GB" ;;
|
||||
*) LANGUAGE="${Language}" ;;
|
||||
esac
|
||||
LANGUAGE=${LANGUAGE:0:5}.UTF-8
|
||||
sed -i "s|LANG=.*|LANG=$LANGUAGE|" /etc/sysconfig/i18n
|
||||
sed -i "s|LANG=.*|LANG=$LANGUAGE|" /etc/locale.conf
|
||||
fi
|
||||
fi
|
||||
@execEnd
|
||||
@setLangLabel.execute()
|
||||
</string>
|
||||
[ -e /opt/kde/lib/kde4/kcm_locale.so ] || dcop @dcopid KommanderIf setEnabled langbutton "false"</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
|
Loading…
Reference in New Issue
Block a user