From 39da5dbf80ab1970df67a4ca9092003e2555d9d3 Mon Sep 17 00:00:00 2001 From: Anish Mangal Date: Wed, 10 Aug 2011 12:21:01 +0000 Subject: bundle-delete-activities;keep-a-copy-translation-missing;accessibility Signed-off-by: Anish Mangal --- diff --git a/po/es.po b/po/es.po index 183a54e..e0f2320 100644 --- a/po/es.po +++ b/po/es.po @@ -54,6 +54,10 @@ msgstr "Nombre esta entrada" msgid "Keep" msgstr "Guardar" +#: ../src/sugar/activity/widgets.py +msgid "Keep a copy" +msgstr "Guardar una copia" + #: ../src/sugar/activity/namingalert.py:283 msgid "Untitled" msgstr "Sin título" diff --git a/src/sugar/bundle/activitybundle.py b/src/sugar/bundle/activitybundle.py index 2a5192d..b2548a4 100644 --- a/src/sugar/bundle/activitybundle.py +++ b/src/sugar/bundle/activitybundle.py @@ -25,6 +25,7 @@ import locale import os import tempfile import logging +import shutil from sugar import env from sugar import util @@ -291,7 +292,7 @@ class ActivityBundle(Bundle): os.unlink(dst) os.symlink(src, dst) - def uninstall(self, install_path, force=False): + def uninstall(self, install_path, force=False, delete_profile=False): if os.path.islink(install_path): # Don't remove the actual activity dir if it's a symbolic link # because we may be removing user data. @@ -320,6 +321,12 @@ class ActivityBundle(Bundle): os.readlink(path).startswith(install_path): os.remove(path) + if delete_profile: + bundle_profile_path = env.get_profile_path(self._bundle_id) + if os.path.exists(bundle_profile_path): + os.chmod(bundle_profile_path, 0775) + shutil.rmtree(bundle_profile_path, ignore_errors=True) + self._uninstall(install_path) def is_user_activity(self): diff --git a/src/sugar/graphics/style.py b/src/sugar/graphics/style.py index 2828b7f..8522ea2 100644 --- a/src/sugar/graphics/style.py +++ b/src/sugar/graphics/style.py @@ -1,4 +1,5 @@ # Copyright (C) 2007, Red Hat, Inc. +# Copyright (C) 2010, Plan Ceibal # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -117,6 +118,7 @@ LARGE_ICON_SIZE = zoom(55 * 2.0) XLARGE_ICON_SIZE = zoom(55 * 2.75) client = gconf.client_get_default() +THEME = client.get_string('/desktop/sugar/interface/gtk_theme') FONT_SIZE = client.get_float('/desktop/sugar/font/default_size') FONT_FACE = client.get_string('/desktop/sugar/font/default_face') @@ -137,11 +139,17 @@ COLOR_TRANSPARENT = Color('#FFFFFF', alpha=0.0) COLOR_PANEL_GREY = Color('#C0C0C0') COLOR_SELECTION_GREY = Color('#A6A6A6') COLOR_TOOLBAR_GREY = Color('#282828') -COLOR_BUTTON_GREY = Color('#808080') COLOR_INACTIVE_FILL = Color('#9D9FA1') COLOR_INACTIVE_STROKE = Color('#757575') COLOR_TEXT_FIELD_GREY = Color('#E5E5E5') COLOR_HIGHLIGHT = Color('#E7E7E7') +COLOR_BUTTON_GREY = Color('#808080') +if (THEME == 'sugar-contrast'): + COLOR_DESKTOP_ICON = Color('#000033') + COLOR_BG_CP = Color('#000033') +else: + COLOR_DESKTOP_ICON = Color('#808080') + COLOR_BG_CP = Color('#FFFFFF') PALETTE_CURSOR_DISTANCE = zoom(10) -- cgit v0.9.1