From bf04e5148b0af131a20069ed86a4769f87688608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Pawe=C5=82=20Gajc?= Date: Mon, 22 Sep 2008 13:49:17 +0000 Subject: - add xfce4-update-config tool o add missing icons on Xfce desktop --- Makefile | 1 + common/autostart/xfce4-update-config.desktop | 11 +++++++ tools/xfce4-update-config | 46 ++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 common/autostart/xfce4-update-config.desktop create mode 100644 tools/xfce4-update-config diff --git a/Makefile b/Makefile index 0c5ca9c..53da9a5 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,7 @@ install: install -m 644 common/xfce4/volstatus/* $(DESTDIR)$(xfceconfdir)/xfce4/volstatus/ install -m 644 common/xfce4/*.rc $(DESTDIR)$(xfceconfdir)/xfce4 install -m 644 common/xfce4/*.xrdb $(DESTDIR)$(xfceconfdir)/xfce4 + install -m 755 tools/xfce4-update-tool $(DESTDIR)$(prefix)/bin -install -d $(DESTDIR)$(xfceprofdir) -install -d $(DESTDIR)$(xfceprofdir)/Flash/xfce4/mcs_settings diff --git a/common/autostart/xfce4-update-config.desktop b/common/autostart/xfce4-update-config.desktop new file mode 100644 index 0000000..351c2ec --- /dev/null +++ b/common/autostart/xfce4-update-config.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Mandriva xfce4 update tool +Comment=Update config and icons for Xfce +Icon=mandriva +Exec=xfce4-update-config +StartupNotify=false +Terminal=false +Hidden=false +OnlyShowIn=XFCE; diff --git a/tools/xfce4-update-config b/tools/xfce4-update-config new file mode 100644 index 0000000..939ee0b --- /dev/null +++ b/tools/xfce4-update-config @@ -0,0 +1,46 @@ +#!/bin/bash + +MDV_FLAVOUR=`echo $META_CLASS` +USER_DESKTOP=`xdg-user-dir DESKTOP` +DESKTOP_FILE=$HOME/.config/autostart/xfce4-update-config.desktop + +if [ `whoami` = "root" ]; then + echo "Not supported for root user" + exit || 0 +else + if [ ! -e $DESKTOP_FILE ]; then + echo "Localised desktop folder exists." + if [ ! -d $HOME/.config/autostart ]; then + mkdir -p $HOME/.config/autostart + fi + +cat > $HOME/.config/autostart/xfce4-update-config.desktop << EOF +[Desktop Entry] +Hidden=true +EOF +# + + if [ $MDV_FLAVOUR = "download" -o $MDV_FLAVOUR = "desktop" ]; then + if [ ! -e $USER_DESKTOP/register.desktop ]; then + cp -f /usr/share/mdk/desktop/free/register.desktop $USER_DESKTOP + fi + + if [ ! -e $USER_DESKTOP/upgrade.desktop ]; then + cp -f /usr/share/mdk/desktop/one/upgrade.desktop $USER_DESKTOP + fi + + xfdesktop --reload + exit || 0 + + else + if [ ! -e $USER_DESKTOP/register.desktop ]; then + cp -f /usr/share/mdk/desktop/powerpack/register.desktop $USER_DESKTOP + fi + + xfdesktop --reload + exit || 0 + fi + fi +fi + +#EOF -- cgit v1.2.1