diff options
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/unity.cmake | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/tools/unity.cmake b/tools/unity.cmake index af7871855..69bf4c1e5 100755 --- a/tools/unity.cmake +++ b/tools/unity.cmake @@ -18,7 +18,6 @@ # this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -import gconf import glib import glob from optparse import OptionParser @@ -64,47 +63,6 @@ def set_unity_env (): print "WARNING: no DISPLAY variable set, setting it to :0" os.environ['DISPLAY'] = ':0' -def reset_unity_compiz_profile (): - '''reset the compiz/unity profile to a vanilla one''' - - client = gconf.client_get_default() - - if not client: - print "WARNING: no gconf client found. No reset will be done" - return - - # 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.. - try: - current_profile_schema = client.get_schema("/apps/compizconfig-1/current_profile") - except (glib.GError, AttributeError), e: - print "WARNING: environment is incorrect: %s\nDid you just try to reset in a tty?" % e - return - - # default value to not force reset if current_profile is unset - if not current_profile_schema: - print "WARNING: no current gconf profile set, assuming unity" - current_profile_str = 'unity' - current_profile_gconfvalue = None - else: - current_profile_gconfvalue = current_profile_schema.get_default_value() - current_profile_str = current_profile_gconfvalue.get_string() - - if current_profile_str == 'unity': - print "WARNING: Unity currently default profile, so switching to metacity while resetting the values" - subprocess.Popen(["metacity", "--replace"]) #TODO: check if compiz is indeed running - # wait for compiz to stop - time.sleep(2) - if current_profile_gconfvalue: - 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) - # the python binding doesn't recursive-unset right - subprocess.Popen(["gconftool-2", "--recursive-unset", "/apps/compiz-1"]).communicate() - subprocess.Popen(["gconftool-2", "--recursive-unset", "/apps/compizconfig-1/profiles/unity"]).communicate() - def reset_launcher_icons (): '''Reset the default launcher icon and restart it.''' subprocess.Popen(["gsettings", "reset" ,"com.canonical.Unity.Launcher" , "favorites"]) @@ -203,8 +161,6 @@ if __name__ == '__main__': help="Store log under filename.") parser.add_option("--replace", action="store_true", help="Run unity /!\ This is for compatibility with other desktop interfaces and acts the same as running unity without --replace") - parser.add_option("--reset", action="store_true", - help="Reset the unity profile in compiz and restart it.") parser.add_option("--reset-icons", action="store_true", help="Reset the default launcher icon.") parser.add_option("-v", "--verbose", action="store_true", @@ -216,9 +172,6 @@ if __name__ == '__main__': if options.distro: sys.exit(reset_to_distro()) - if options.reset: - reset_unity_compiz_profile () - if options.reset_icons: reset_launcher_icons () |
