diff -Nru compiz-0.9.2.1+glibmainloop3/debian/changelog compiz-0.9.2.1+glibmainloop3/debian/changelog --- compiz-0.9.2.1+glibmainloop3/debian/changelog 2010-12-14 01:59:35.000000000 +0000 +++ compiz-0.9.2.1+glibmainloop3/debian/changelog 2010-12-14 18:26:43.000000000 +0000 @@ -1,3 +1,14 @@ +compiz (1:0.9.2.1+glibmainloop3-0ubuntu3) natty; urgency=low + + * debian/patches/080_migrate_gconf_from_alpha1.patch, + debian/reset-compiz-gconf, + debian/compiz-gnome.install: + - temporary wrapper from new gconf path not transitionned from alpha1 + (allscreens became screen0). This will reset the current compiz profiles + (LP: #690011) + + -- Didier Roche Tue, 14 Dec 2010 19:25:03 +0100 + compiz (1:0.9.2.1+glibmainloop3-0ubuntu2) natty; urgency=low * debian/patches/000_workaround_gconfbackend_init_hang.patch: diff -Nru compiz-0.9.2.1+glibmainloop3/debian/compiz-gnome.install compiz-0.9.2.1+glibmainloop3/debian/compiz-gnome.install --- compiz-0.9.2.1+glibmainloop3/debian/compiz-gnome.install 2010-12-14 01:59:35.000000000 +0000 +++ compiz-0.9.2.1+glibmainloop3/debian/compiz-gnome.install 2010-12-14 18:26:43.000000000 +0000 @@ -4,3 +4,4 @@ debian/tmp/usr/bin/gtk-window-decorator debian/65compiz_profile-on-session /etc/X11/Xsession.d debian/unity.ini /etc/compizconfig/ +debian/reset-compiz-gconf /usr/lib/compiz/ diff -Nru compiz-0.9.2.1+glibmainloop3/debian/patches/080_migrate_gconf_from_alpha1.patch compiz-0.9.2.1+glibmainloop3/debian/patches/080_migrate_gconf_from_alpha1.patch --- compiz-0.9.2.1+glibmainloop3/debian/patches/080_migrate_gconf_from_alpha1.patch 1970-01-01 00:00:00.000000000 +0000 +++ compiz-0.9.2.1+glibmainloop3/debian/patches/080_migrate_gconf_from_alpha1.patch 2010-12-14 18:26:43.000000000 +0000 @@ -0,0 +1,12 @@ +Index: compiz-0.9.2.1+glibmainloop3/src/main.cpp +=================================================================== +--- compiz-0.9.2.1+glibmainloop3.orig/src/main.cpp 2010-12-14 18:52:25.499450554 +0100 ++++ compiz-0.9.2.1+glibmainloop3/src/main.cpp 2010-12-14 18:56:10.451450553 +0100 +@@ -221,6 +221,7 @@ + delete screen; + return false; + } ++ screen->runCommand ("/usr/lib/compiz/reset-compiz-gconf"); + + modHandler = new ModifierHandler (); + diff -Nru compiz-0.9.2.1+glibmainloop3/debian/patches/series compiz-0.9.2.1+glibmainloop3/debian/patches/series --- compiz-0.9.2.1+glibmainloop3/debian/patches/series 2010-12-14 01:59:35.000000000 +0000 +++ compiz-0.9.2.1+glibmainloop3/debian/patches/series 2010-12-14 18:26:43.000000000 +0000 @@ -13,3 +13,4 @@ 030_no_fade_in_staticswicher.patch 060_move_checks_to_compiz.patch 065_add_bailer_and_detection_plugins.patch +080_migrate_gconf_from_alpha1.patch diff -Nru compiz-0.9.2.1+glibmainloop3/debian/reset-compiz-gconf compiz-0.9.2.1+glibmainloop3/debian/reset-compiz-gconf --- compiz-0.9.2.1+glibmainloop3/debian/reset-compiz-gconf 1970-01-01 00:00:00.000000000 +0000 +++ compiz-0.9.2.1+glibmainloop3/debian/reset-compiz-gconf 2010-12-14 18:26:43.000000000 +0000 @@ -0,0 +1,49 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright (C) 2010 Canonical +# +# Authors: +# Didier Roche +# +# 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 the Free Software +# Foundation; version 3. +# +# This program is distributed in the hope that it will be useful, but WITHOUTa +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +import gconf + +import subprocess +import sys + +try: + migration_not_done = subprocess.Popen(["gconftool-2", "--get", +"/apps/compiz-1/general/allscreens/options/active_plugins"], stdout=subprocess.PIPE).communicate()[0] +except OSError, e: + migration_not_done = False #skip it + +if migration_not_done: + client = gconf.client_get_default() + + # get current compiz profile to know if we need to switch or not + # as compiz is setting that as a default key schema each time you + # change the profile, the key isn't straightforward to get and set + # as compiz set a new schema instead of a value.. + current_profile_schema = client.get_schema("/apps/compizconfig-1/current_profile") + current_profile_gconfvalue = client.get_schema("/apps/compizconfig-1/current_profile").get_default_value() + + if current_profile_gconfvalue.get_string() == 'unity': + current_profile_gconfvalue.set_string('fooo') + current_profile_schema.set_default_value(current_profile_gconfvalue) + client.set_schema("/apps/compizconfig-1/current_profile", current_profile_schema) + subprocess.Popen(["gconftool-2", "--recursive-unset", "/apps/compiz-1"]).communicate() + subprocess.Popen(["gconftool-2", "--recursive-unset", "/apps/compizconfig-1/profiles"]).communicate() + +sys.exit(0)