From 55509ab93036213a03ccf8e1823042b9e3f0c11c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rodr=C3=ADguez?= <ruben@trisquel.info> Date: Wed, 29 Oct 2014 02:18:14 +0100 Subject: [PATCH] Added profile migration script to gnome-panel --- helpers/make-gnome-panel | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/helpers/make-gnome-panel b/helpers/make-gnome-panel index 0aa383c4..56c808eb 100644 --- a/helpers/make-gnome-panel +++ b/helpers/make-gnome-panel @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2008-2012 Rubén RodrÃguez <ruben@trisquel.info> +# Copyright (C) 2008-2014 Rubén RodrÃguez <ruben@trisquel.info> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -VERSION=10 +VERSION=11 . ./config @@ -30,6 +30,30 @@ for patch in 41_classic_layout.patch 01_gnome-wm.patch 50_ubuntu_sessions.patch sed /$patch/d -i debian/patches/series done +# Profile handling +cat << EOF > data/trisquel-panel-profile.desktop +[Desktop Entry] +Type=Application +Name=Trisquel panel profile updater +Exec=trisquel-panel-profile +NoDisplay=true +X-GNOME-AutoRestart=false +X-GNOME-Autostart-Phase=Initialization +OnlyShowIn=GNOME; +EOF + +cat << EOF > data/trisquel-panel-profile +#!/bin/sh +VERSION=\$(lsb_release -rs) +if ! grep "^\$VERSION$" \$HOME/.config/profilemigrated -q 2>/dev/null; then + GS=\$(gsettings get org.gnome.gnome-panel.layout object-id-list | sed "s/, 'clock'//") + gsettings set org.gnome.gnome-panel.layout object-id-list "\$GS" + echo \$VERSION > \$HOME/.config/profilemigrated +fi +EOF + +chmod 755 data/trisquel-panel-profile + # Custom xsession cat << EOF > data/trisquel-session.desktop [Desktop Entry] @@ -54,6 +78,8 @@ debian/gnome-wm.desktop /usr/share/applications debian/gnome-flashback-services.desktop /usr/share/applications debian/scripts/gnome-wm /usr/bin usr/share/gnome-session/sessions +data/trisquel-panel-profile.desktop /etc/xdg/autostart +data/trisquel-panel-profile /usr/sbin EOF # Custom package -- GitLab