Ticket #4758: sugar-toolkit-gtk3.diff

File sugar-toolkit-gtk3.diff, 130.0 KB (added by godiard, 10 years ago)
  • .olpcau.x86_64/usr/bin/sugar-activity-web

    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/bin/sugar-activity-web 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/bin/sugar-activity-web
    old new  
    1717# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    1818# Boston, MA 02111-1307, USA.
    1919
    20 exec sugar-activity sugar3.activity.webactivity.WebActivity $@
     20if [ "$SUGAR_USE_WEBKIT1" == "yes" ]; then
     21    exec sugar-activity sugar3.activity.webkit1.WebActivity $@
     22else
     23    exec sugar-activity sugar3.activity.webactivity.WebActivity $@
     24fi
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activityfactory.py

    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activityfactory.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activityfactory.py
    old new  
    124124        if os.path.exists(absolute_path):
    125125            command[0] = absolute_path
    126126
    127     logging.debug('launching: %r', command)
     127    logging.debug('launching: %r' % command)
    128128
    129129    return command
    130130
     
    265265        pass
    266266
    267267    def _notify_launch_failure_error_handler(self, err):
    268         logging.error('Notify launch failure failed %s', err)
     268        logging.error('Notify launch failure failed %s' % err)
    269269
    270270    def _notify_launch_error_handler(self, err):
    271         logging.debug('Notify launch failed %s', err)
     271        logging.debug('Notify launch failed %s' % err)
    272272
    273273    def _activate_reply_handler(self, activated):
    274274        if not activated:
    275275            self._create_activity()
    276276
    277277    def _activate_error_handler(self, err):
    278         logging.error('Activity activation request failed %s', err)
     278        logging.error('Activity activation request failed %s' % err)
    279279
    280280    def _create_reply_handler(self):
    281         logging.debug('Activity created %s (%s).',
    282                       self._handle.activity_id, self._service_name)
     281        logging.debug('Activity created %s (%s).' %
     282                      (self._handle.activity_id, self._service_name))
    283283
    284284    def _create_error_handler(self, err):
    285         logging.error("Couldn't create activity %s (%s): %s",
    286                       self._handle.activity_id, self._service_name, err)
     285        logging.error("Couldn't create activity %s (%s): %s" %
     286                      (self._handle.activity_id, self._service_name, err))
    287287        self._shell.NotifyLaunchFailure(
    288288            self._handle.activity_id, reply_handler=self._no_reply_handler,
    289289            error_handler=self._notify_launch_failure_error_handler)
     
    296296        self._launch_activity()
    297297
    298298    def _find_object_error_handler(self, err):
    299         logging.error('Datastore find failed %s', err)
     299        logging.error('Datastore find failed %s' % err)
    300300        self._launch_activity()
    301301
    302302
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activity.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activityfactory.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activityfactory.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activityfactory.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activityfactory.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activityhandle.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activityhandle.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activityhandle.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activityhandle.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activity.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activity.py
    old new  
    5858import cairo
    5959import json
    6060
    61 from gi.repository import GConf
    6261from gi.repository import Gtk
    6362from gi.repository import Gdk
    6463from gi.repository import GObject
     64from gi.repository import Gio
    6565import dbus
    6666import dbus.service
    6767from dbus import PROPERTIES_IFACE
     
    7474from telepathy.constants import CONNECTION_HANDLE_TYPE_ROOM
    7575
    7676from sugar3 import util
     77from sugar3 import power
    7778from sugar3.presence import presenceservice
    7879from sugar3.activity.activityservice import ActivityService
    7980from sugar3.graphics import style
     
    8182from sugar3.graphics.alert import Alert
    8283from sugar3.graphics.icon import Icon
    8384from sugar3.datastore import datastore
     85from sugar3.bundle.activitybundle import ActivityBundle
    8486from gi.repository import SugarExt
    8587
    8688_ = lambda msg: gettext.dgettext('sugar-toolkit-gtk3', msg)
     
    9395J_DBUS_PATH = '/org/laptop/Journal'
    9496J_DBUS_INTERFACE = 'org.laptop.Journal'
    9597
    96 POWERD_INHIBIT_DIR = '/var/run/powerd-inhibit-suspend'
     98N_BUS_NAME = 'org.freedesktop.Notifications'
     99N_OBJ_PATH = '/org/freedesktop/Notifications'
     100N_IFACE_NAME = 'org.freedesktop.Notifications'
    97101
    98102CONN_INTERFACE_ACTIVITY_PROPERTIES = 'org.laptop.Telepathy.ActivityProperties'
    99103
     
    161165
    162166        1. implement an __init__() method for your Activity class.
    163167
    164            Use your init method to create your own ActivityToolbar which will
    165            contain some standard buttons:
    166                 toolbox = activity.ActivityToolbox(self)
     168           Use your init method to create your own ToolbarBox.
     169           This is the code to make a basic toolbar with the activity
     170           toolbar and a stop button.
     171                from sugar3.graphics.toolbarbox import ToolbarBox
     172                from sugar3.activity.widgets import ActivityToolbarButton
     173                from sugar3.activity.widgets import StopButton
     174
     175                ...
     176
     177                toolbar_box = ToolbarBox()
     178                activity_button = ActivityToolbarButton(self)
     179                toolbar_box.toolbar.insert(activity_button, 0)
     180                activity_button.show()
     181
     182                ... Your toolbars ...
     183
     184                separator = Gtk.SeparatorToolItem(draw=False)
     185                separator.set_expand(True)
     186                toolbar_box.toolbar.insert(separator, -1)
     187                separator.show()
     188
     189                stop_button = StopButton(self)
     190                toolbar_box.toolbar.insert(stop_button, -1)
     191                stop_button.show()
     192
     193                self.set_toolbar_box(toolbar_box)
     194                toolbar_box.show()
    167195
    168196           Add extra Toolbars to your toolbox.
    169197
     
    197225           Usually, you will also need the standard EditToolbar. This is the
    198226           one which has the standard copy and paste buttons. You need to
    199227           derive your own EditToolbar class from sugar3.EditToolbar:
    200                 class EditToolbar(activity.EditToolbar):
     228                from sugar3.activity.widgets import EditToolbar
     229
     230                class MyEditToolbar(EditToolbar):
    201231                    ...
    202232
    203233           See EditToolbar for the methods you should implement in your class.
     
    377407
    378408    def _initialize_journal_object(self):
    379409        title = _('%s Activity') % get_bundle_name()
    380         client = GConf.Client.get_default()
    381         icon_color = client.get_string('/desktop/sugar/user/color')
     410        settings = Gio.Settings('org.sugarlabs.user')
     411        icon_color = settings.get_string('color')
    382412
    383413        jobject = datastore.create()
    384414        jobject.metadata['title'] = title
     
    406436
    407437    def _set_up_sharing(self, mesh_instance, share_scope):
    408438        # handle activity share/join
    409         logging.debug('*** Act %s, mesh instance %r, scope %s',
    410                       self._activity_id, mesh_instance, share_scope)
     439        logging.debug('*** Act %s, mesh instance %r, scope %s' %
     440                      (self._activity_id, mesh_instance, share_scope))
    411441        if mesh_instance is not None:
    412442            # There's already an instance on the mesh, join it
    413             logging.debug('*** Act %s joining existing mesh instance %r',
    414                           self._activity_id, mesh_instance)
     443            logging.debug('*** Act %s joining existing mesh instance %r' %
     444                          (self._activity_id, mesh_instance))
    415445            self.shared_activity = mesh_instance
    416446            self.shared_activity.connect('notify::private',
    417447                                         self.__privacy_changed_cb)
     
    423453                self.__joined_cb(self.shared_activity, True, None)
    424454        elif share_scope != SCOPE_PRIVATE:
    425455            logging.debug('*** Act %s no existing mesh instance, but used to '
    426                           'be shared, will share', self._activity_id)
     456                          'be shared, will share' % self._activity_id)
    427457            # no existing mesh instance, but activity used to be shared, so
    428458            # restart the share
    429459            if share_scope == SCOPE_INVITE_ONLY:
     
    431461            elif share_scope == SCOPE_NEIGHBORHOOD:
    432462                self.share(private=False)
    433463            else:
    434                 logging.debug('Unknown share scope %r', share_scope)
     464                logging.debug('Unknown share scope %r' % share_scope)
    435465
    436466    def __got_channel_cb(self, wait_loop, connection_path, channel_path,
    437467                         handle_type):
     
    546576        pass
    547577
    548578    def __jobject_error_cb(self, err):
    549         logging.debug('Error creating activity datastore object: %s', err)
     579        logging.debug('Error creating activity datastore object: %s' % err)
    550580
    551581    def get_activity_root(self):
    552582        """ FIXME: Deprecated. This part of the API has been moved
     
    608638        """
    609639        raise NotImplementedError
    610640
     641    def notify_user(self, summary, body):
     642        """
     643        Display a notification with the given summary and body.
     644        The notification will go under the activities icon in the frame.
     645        """
     646        bundle = ActivityBundle(get_bundle_path())
     647        icon = bundle.get_icon()
     648
     649        bus = dbus.SessionBus()
     650        notify_obj = bus.get_object(N_BUS_NAME, N_OBJ_PATH)
     651        notifications = dbus.Interface(notify_obj, N_IFACE_NAME)
     652
     653        notifications.Notify(self.get_id(), 0, '', summary, body, [],
     654                             {'x-sugar-icon-file-name': icon}, -1)
     655
    611656    def __save_cb(self):
    612657        logging.debug('Activity.__save_cb')
    613658        self._updating_jobject = False
     
    624669        if self._closing:
    625670            self._show_keep_failed_dialog()
    626671            self._closing = False
    627         raise RuntimeError('Error saving activity object to datastore: %s',
     672        raise RuntimeError('Error saving activity object to datastore: %s' %
    628673                           err)
    629674
    630675    def _cleanup_jobject(self):
    631676        if self._jobject:
    632677            if self._owns_file and os.path.isfile(self._jobject.file_path):
    633                 logging.debug('_cleanup_jobject: removing %r',
     678                logging.debug('_cleanup_jobject: removing %r' %
    634679                              self._jobject.file_path)
    635680                os.remove(self._jobject.file_path)
    636681            self._owns_file = False
     
    717762            logging.debug('Cannot save, no journal object.')
    718763            return
    719764
    720         logging.debug('Activity.save: %r', self._jobject.object_id)
     765        logging.debug('Activity.save: %r' % self._jobject.object_id)
    721766
    722767        if self._updating_jobject:
    723768            logging.info('Activity.save: still processing a previous request.')
     
    764809        Activities should not override this method. Instead, like save() do any
    765810        copy work that needs to be done in write_file()
    766811        """
    767         logging.debug('Activity.copy: %r', self._jobject.object_id)
     812        logging.debug('Activity.copy: %r' % self._jobject.object_id)
    768813        self.save()
    769814        self._jobject.object_id = None
    770815
    771816    def __privacy_changed_cb(self, shared_activity, param_spec):
    772         logging.debug('__privacy_changed_cb %r', shared_activity.props.private)
     817        logging.debug('__privacy_changed_cb %r' %
     818                      shared_activity.props.private)
    773819        if shared_activity.props.private:
    774820            self._jobject.metadata['share-scope'] = SCOPE_INVITE_ONLY
    775821        else:
    776822            self._jobject.metadata['share-scope'] = SCOPE_NEIGHBORHOOD
    777823
    778     def _inhibit_suspend(self):
    779         if not os.path.exists(POWERD_INHIBIT_DIR):
    780             return
    781 
    782         path = os.path.join(POWERD_INHIBIT_DIR, str(os.getpid()))
    783         try:
    784             fd = open(path, 'w')
    785         except IOError:
    786             logging.error("Inhibit Suspend: Could not create file %s", path)
    787         else:
    788             fd.close()
    789 
    790824    def __joined_cb(self, activity, success, err):
    791825        """Callback when join has finished"""
    792         logging.debug('Activity.__joined_cb %r', success)
     826        logging.debug('Activity.__joined_cb %r' % success)
    793827        self.shared_activity.disconnect(self._join_id)
    794828        self._join_id = None
    795829        if not success:
    796             logging.debug('Failed to join activity: %s', err)
     830            logging.debug('Failed to join activity: %s' % err)
    797831            return
    798832
    799         self._inhibit_suspend()
     833        power_manager = power.get_power_manager()
     834        if power_manager.suspend_breaks_collaboration():
     835            power_manager.inhibit_suspend()
    800836
    801837        self.reveal()
    802838        self.emit('joined')
     
    817853
    818854    def __share_cb(self, ps, success, activity, err):
    819855        if not success:
    820             logging.debug('Share of activity %s failed: %s.',
    821                           self._activity_id, err)
     856            logging.debug('Share of activity %s failed: %s.' %
     857                          (self._activity_id, err))
    822858            return
    823859
    824         logging.debug('Share of activity %s successful, PS activity is %r.',
    825                       self._activity_id, activity)
     860        logging.debug('Share of activity %s successful, PS activity is %r.' %
     861                      (self._activity_id, activity))
    826862
    827863        activity.props.name = self._jobject.metadata['title']
    828864
    829         self._inhibit_suspend()
     865        power_manager = power.get_power_manager()
     866        if power_manager.suspend_breaks_collaboration():
     867            power_manager.inhibit_suspend()
    830868
    831869        self.shared_activity = activity
    832870        self.shared_activity.connect('notify::private',
     
    880918            raise RuntimeError('Activity %s already shared.' %
    881919                               self._activity_id)
    882920        verb = private and 'private' or 'public'
    883         logging.debug('Requesting %s share of activity %s.', verb,
    884                       self._activity_id)
     921        logging.debug('Requesting %s share of activity %s.' % (verb,
     922                      self._activity_id))
    885923        pservice = presenceservice.get_instance()
    886924        pservice.connect('activity-shared', self.__share_cb)
    887925        pservice.share_activity(self, private=private)
     
    943981        # Make the exported object inaccessible
    944982        dbus.service.Object.remove_from_connection(self._bus)
    945983
    946         if os.path.exists(POWERD_INHIBIT_DIR):
    947             path = os.path.join(POWERD_INHIBIT_DIR, str(os.getpid()))
    948             if os.path.exists(path):
    949                 os.unlink(path)
    950 
    951984        self._session.unregister(self)
     985        power.get_power_manager().shutdown()
    952986
    953987    def close(self, skip_save=False):
    954988        """Request that the activity be stopped and saved to the Journal
     
    10321066            CHANNEL + '.TargetHandleType': CONNECTION_HANDLE_TYPE_CONTACT,
    10331067        }
    10341068        filter_dict = dbus.Dictionary(filters, signature='sv')
    1035         logging.debug('__get_filters_cb %r', dbus.Array([filter_dict],
    1036                                                         signature='a{sv}'))
     1069        logging.debug('__get_filters_cb %r' % dbus.Array([filter_dict],
     1070                      signature='a{sv}'))
    10371071        return dbus.Array([filter_dict], signature='a{sv}')
    10381072
    10391073    @dbus.service.method(dbus_interface=CLIENT_HANDLER,
    10401074                         in_signature='ooa(oa{sv})aota{sv}', out_signature='')
    10411075    def HandleChannels(self, account, connection, channels, requests_satisfied,
    10421076                       user_action_time, handler_info):
    1043         logging.debug('HandleChannels\n\t%r\n\t%r\n\t%r\n\t%r\n\t%r\n\t%r',
    1044                       account, connection, channels, requests_satisfied,
    1045                       user_action_time, handler_info)
     1077        logging.debug('HandleChannels\n\t%r\n\t%r\n\t%r\n\t%r\n\t%r\n\t%r' %
     1078                      (account, connection, channels, requests_satisfied,
     1079                          user_action_time, handler_info))
    10461080        try:
    10471081            for object_path, properties in channels:
    10481082                channel_type = properties[CHANNEL + '.ChannelType']
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/bundlebuilder.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activity.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activity.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activity.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activity.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activityservice.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activityservice.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activityservice.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/activityservice.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/bundlebuilder.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/bundlebuilder.py
    old new  
    1919STABLE.
    2020"""
    2121
     22import argparse
    2223import operator
    2324import os
    2425import sys
    2526import zipfile
    2627import tarfile
     28import unittest
    2729import shutil
    2830import subprocess
    2931import re
    3032import gettext
    31 from optparse import OptionParser
    3233import logging
    3334from fnmatch import fnmatch
    3435
     
    6465
    6566class Config(object):
    6667
    67     def __init__(self, source_dir):
     68    def __init__(self, source_dir, dist_dir=None, dist_name=None):
    6869        self.source_dir = source_dir
    6970        self.build_dir = os.getcwd()
    70         self.dist_dir = os.path.join(self.build_dir, 'dist')
     71        self.dist_dir = dist_dir or os.path.join(self.build_dir, 'dist')
     72        self.dist_name = dist_name
    7173        self.bundle = None
    7274        self.version = None
    7375        self.activity_name = None
     
    9193        self.bundle_name = reduce(operator.add, self.activity_name.split())
    9294        self.bundle_root_dir = self.bundle_name + '.activity'
    9395        self.tar_root_dir = '%s-%s' % (self.bundle_name, self.version)
    94         self.xo_name = '%s-%s.xo' % (self.bundle_name, self.version)
    95         self.tar_name = '%s-%s.tar.bz2' % (self.bundle_name, self.version)
     96        if self.dist_name:
     97            self.xo_name = '%s.xo' % self.dist_name
     98            self.tar_name = '%s.tar.bz2' % self.dist_name
     99        else:
     100            self.xo_name = '%s-%s.xo' % (self.bundle_name, self.version)
     101            self.tar_name = '%s-%s.tar.bz2' % (self.bundle_name, self.version)
    96102
    97103
    98104class Builder(object):
     
    258264        self.config.bundle.install_mime_type(self.config.source_dir)
    259265
    260266
    261 def cmd_dev(config, args):
    262     """Setup for development"""
     267def cmd_check(config, options):
     268    """Run tests for the activity"""
     269
     270    run_unit_test = True
     271    run_integration_test = True
    263272
    264     if args:
    265         print 'Usage: %prog dev'
    266         return
     273    if options.choice == 'unit':
     274        run_integration_test = False
     275    if options.choice == 'integration':
     276        run_unit_test = False
     277
     278    print "Running Tests"
     279
     280    test_path = os.path.join(config.source_dir, "tests")
     281
     282    if os.path.isdir(test_path):
     283        unit_test_path = os.path.join(test_path, "unit")
     284        integration_test_path = os.path.join(test_path, "integration")
     285        sys.path.append(config.source_dir)
     286
     287        # Run Tests
     288        if os.path.isdir(unit_test_path) and run_unit_test:
     289            all_tests = unittest.defaultTestLoader.discover(unit_test_path)
     290            unittest.TextTestRunner(verbosity=options.verbose).run(all_tests)
     291        elif not run_unit_test:
     292            print "Not running unit tests"
     293        else:
     294            print 'No "unit" directory found.'
     295
     296        if os.path.isdir(integration_test_path) and run_integration_test:
     297            all_tests = unittest.defaultTestLoader.discover(
     298                integration_test_path)
     299            unittest.TextTestRunner(verbosity=options.verbose).run(all_tests)
     300        elif not run_integration_test:
     301            print "Not running integration tests"
     302        else:
     303            print 'No "integration" directory found.'
     304
     305        print "Finished testing"
     306    else:
     307        print "Error: No tests/ directory"
     308
     309
     310def cmd_dev(config, options):
     311    """Setup for development"""
    267312
    268313    bundle_path = env.get_user_activities_path()
    269314    if not os.path.isdir(bundle_path):
     
    278323            print 'ERROR - A bundle with the same name is already installed.'
    279324
    280325
    281 def cmd_dist_xo(config, args):
     326def cmd_dist_xo(config, options):
    282327    """Create a xo bundle package"""
    283328
    284     if args:
    285         print 'Usage: %prog dist_xo'
    286         return
    287 
    288329    packager = XOPackager(Builder(config))
    289330    packager.package()
    290331
    291332
    292 def cmd_fix_manifest(config, args):
     333def cmd_fix_manifest(config, options):
    293334    '''Add missing files to the manifest (OBSOLETE)'''
    294335
    295336    print 'WARNING: The fix_manifest command is obsolete.'
     
    297338    print '         please remove it.'
    298339
    299340
    300 def cmd_dist_source(config, args):
     341def cmd_dist_source(config, options):
    301342    """Create a tar source package"""
    302343
    303     if args:
    304         print 'Usage: %prog dist_source'
    305         return
    306 
    307344    packager = SourcePackager(config)
    308345    packager.package()
    309346
    310347
    311 def cmd_install(config, args):
     348def cmd_install(config, options):
    312349    """Install the activity in the system"""
    313350
    314     parser = OptionParser(usage='usage: %prog install [options]')
    315     parser.add_option('--prefix', dest='prefix', default=sys.prefix,
    316                       help='Prefix to install files to')
    317     (suboptions, subargs) = parser.parse_args(args)
    318     if subargs:
    319         parser.print_help()
    320         return
    321 
    322351    installer = Installer(Builder(config))
    323     installer.install(suboptions.prefix)
     352    installer.install(options.prefix)
    324353
    325354
    326 def cmd_genpot(config, args):
     355def cmd_genpot(config, options):
    327356    """Generate the gettext pot file"""
    328357
    329     if args:
    330         print 'Usage: %prog genpot'
    331         return
    332 
    333358    os.chdir(config.source_dir)
    334359
    335360    po_path = os.path.join(config.source_dir, 'po')
     
    371396        print 'ERROR - xgettext failed with return code %i.' % retcode
    372397
    373398
    374 def cmd_build(config, args):
     399def cmd_build(config, options):
    375400    """Build generated files"""
    376401
    377     if args:
    378         print 'Usage: %prog build'
    379         return
    380 
    381402    builder = Builder(config)
    382403    builder.build()
    383404
    384405
    385 def print_commands():
    386     print 'Available commands:\n'
    387 
    388     for name, func in globals().items():
    389         if name.startswith('cmd_'):
    390             print '%-20s %s' % (name.replace('cmd_', ''), func.__doc__)
    391 
    392     print '\n(Type "./setup.py <command> --help" for help about a ' \
    393           'particular command\'s options.'
    394 
    395 
    396406def start():
    397     parser = OptionParser(usage='[action] [options]')
    398     parser.disable_interspersed_args()
    399     (options_, args) = parser.parse_args()
     407    parser = argparse.ArgumentParser(prog='./setup.py')
     408    subparsers = parser.add_subparsers(
     409        dest="command", help="Options for %(prog)s")
     410
     411    install_parser = subparsers.add_parser(
     412        "install", help="Install the activity in the system")
     413    install_parser.add_argument(
     414        "--prefix", dest="prefix", default=sys.prefix,
     415        help="Path for installing")
     416
     417    check_parser = subparsers.add_parser(
     418        "check", help="Run tests for the activity")
     419    check_parser.add_argument("choice", nargs='?',
     420                              choices=['unit', 'integration'],
     421                              help="run unit/integration test")
     422    check_parser.add_argument("--verbosity", "-v", dest="verbose",
     423                              type=int, choices=range(0, 3),
     424                              default=1, nargs='?',
     425                              help="verbosity for the unit tests")
     426
     427    subparsers.add_parser("dist_xo", help="Create a xo bundle package")
     428    subparsers.add_parser("dist_source", help="Create a tar source package")
     429    subparsers.add_parser("build", help="Build generated files")
     430    subparsers.add_parser(
     431        "fix_manifest", help="Add missing files to the manifest (OBSOLETE)")
     432    subparsers.add_parser("genpot", help="Generate the gettext pot file")
     433    subparsers.add_parser("dev", help="Setup for development")
     434
     435    options = parser.parse_args()
    400436
    401437    source_dir = os.path.abspath(os.path.dirname(sys.argv[0]))
    402438    config = Config(source_dir)
    403439
    404440    try:
    405         globals()['cmd_' + args[0]](config, args[1:])
     441        globals()['cmd_' + options.command](config, options)
    406442    except (KeyError, IndexError):
    407         print_commands()
     443        parser.print_help()
    408444
    409445
    410446if __name__ == '__main__':
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/webactivity.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/bundlebuilder.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/bundlebuilder.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/bundlebuilder.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/bundlebuilder.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/i18n.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/i18n.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/i18n.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/i18n.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/__init__.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/__init__.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/__init__.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/__init__.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/webactivity.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/webactivity.py
    old new  
    1919import os
    2020import logging
    2121
    22 from gi.repository import GObject
    23 GObject.threads_init()
    24 
    2522from gi.repository import Gdk
    2623from gi.repository import Gio
    27 from gi.repository import WebKit
     24from gi.repository import WebKit2
    2825from gi.repository import Gtk
    2926from gi.repository import GdkX11
    3027assert GdkX11
    3128
    32 import socket
    33 from threading import Thread
    34 
    35 from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
    36 import SocketServer
    37 import select
    38 import errno
    39 import mimetypes
    40 
     29from sugar3.graphics.objectchooser import ObjectChooser
    4130from gi.repository import SugarExt
    4231from sugar3.activity import activity
    4332
    4433
    45 class LocalRequestHandler(BaseHTTPRequestHandler):
     34class FilePicker(ObjectChooser):
     35    def __init__(self, parent):
     36        ObjectChooser.__init__(self, parent)
     37
     38    def run(self):
     39        jobject = None
     40        _file = None
     41        try:
     42            result = ObjectChooser.run(self)
     43            if result == Gtk.ResponseType.ACCEPT:
     44                jobject = self.get_selected_object()
     45                logging.debug('FilePicker.run: %r', jobject)
     46
     47                if jobject and jobject.file_path:
     48                    _file = jobject.file_path
     49                    logging.debug('FilePicker.run: file=%r', _file)
     50        finally:
     51            if jobject is not None:
     52                jobject.destroy()
    4653
    47     #Handler for the GET requests
    48     def do_GET(self):
    49         new_path = self.server.path + '/' + self.path
    50         f = open(new_path)
    51         content = f.read()
    52         f.close()
    53         self.send_response(200)
    54         mime, _encding = mimetypes.guess_type(self.path)
    55         self.send_header("Content-type", mime)
    56         self.end_headers()
    57         self.wfile.write(content)
    58         return False
    59 
    60 
    61 class LocalHTTPServer(HTTPServer):
    62 
    63     def __init__(self, server_address, request_handler, path):
    64         self.path = path
    65         HTTPServer.__init__(self, server_address, request_handler)
    66 
    67     def serve_forever(self, poll_interval=0.5):
    68         """Overridden version of BaseServer.serve_forever that does not fail
    69         to work when EINTR is received.
    70         """
    71         self._BaseServer__serving = True
    72         self._BaseServer__is_shut_down.clear()
    73         while self._BaseServer__serving:
    74 
    75             # XXX: Consider using another file descriptor or
    76             # connecting to the socket to wake this up instead of
    77             # polling. Polling reduces our responsiveness to a
    78             # shutdown request and wastes cpu at all other times.
    79             try:
    80                 r, w, e = select.select([self], [], [], poll_interval)
    81             except select.error, e:
    82                 if e[0] == errno.EINTR:
    83                     logging.debug("got eintr")
    84                     continue
    85                 raise
    86             if r:
    87                 self._handle_request_noblock()
    88         self._BaseServer__is_shut_down.set()
    89 
    90     def server_bind(self):
    91         """Override server_bind in HTTPServer to not use
    92         getfqdn to get the server name because is very slow."""
    93         SocketServer.TCPServer.server_bind(self)
    94         host, port = self.socket.getsockname()[:2]
    95         self.server_name = 'localhost'
    96         self.server_port = port
     54        return _file
    9755
    9856
    9957class WebActivity(Gtk.Window):
     
    10967        self.set_decorated(False)
    11068        self.maximize()
    11169
    112         #self.connect("key-press-event", self._key_press_event_cb)
     70        self.connect("key-press-event", self._key_press_event_cb)
    11371        self.connect('realize', self._realize_cb)
    11472        self.connect('destroy', self._destroy_cb)
    11573
    116         # Get a free socket
    117         sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
    118         sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    119         sock.bind(('', 0))
    120         sock.listen(socket.SOMAXCONN)
    121         _ipaddr, self.port = sock.getsockname()
    122         sock.shutdown(socket.SHUT_RDWR)
    123         logging.error('Using port %d', self.port)
    124 
    125         httpd = LocalHTTPServer(('', self.port),
    126                                 lambda *args: LocalRequestHandler(*args),
    127                                 activity.get_bundle_path())
    128         self._server = Thread(target=httpd.serve_forever)
    129         self._server.setDaemon(True)
    130         self._server.start()
    131 
    132         self._web_view = WebKit.WebView()
    133         self._web_view.connect("notify::load-status", self._loading_changed_cb)
    134         self._web_view.connect("resource-request-starting",
    135                                self._resource_request_starting_cb)
     74        context = WebKit2.WebContext.get_default()
     75        context.register_uri_scheme("activity", self._app_scheme_cb, None)
     76
     77        self._web_view = WebKit2.WebView()
     78        self._web_view.connect("load-changed", self._loading_changed_cb)
     79        self._web_view.connect('run-file-chooser', self.__run_file_chooser)
    13680
    13781        self.add(self._web_view)
    13882        self._web_view.show()
    13983
    140         #settings = self._web_view.get_settings()
    141         #settings.set_property("enable-developer-extras", True)
     84        settings = self._web_view.get_settings()
     85        settings.set_property("enable-developer-extras", True)
    14286
    14387        self._web_view.load_uri("activity://%s/index.html" % self._bundle_id)
    14488
     
    156100        self.destroy()
    157101        Gtk.main_quit()
    158102
    159     def _resource_request_starting_cb(self, webview, web_frame, web_resource,
    160                                       request, response):
    161         uri = web_resource.get_uri()
    162         if uri.startswith('activity://'):
    163             prefix = "activity://%s" % self._bundle_id
    164             new_prefix = "http://0.0.0.0:%d" % self.port
    165             new_uri = new_prefix + uri[len(prefix):]
    166 
    167             request.set_uri(new_uri)
    168 
    169     def _loading_changed_cb(self, web_view, load_status):
    170         status = web_view.get_load_status()
    171 
    172         if status == WebKit.LoadStatus.FINISHED:
    173 
     103    def _loading_changed_cb(self, web_view, load_event):
     104        if load_event == WebKit2.LoadEvent.FINISHED:
    174105            key = os.environ["SUGAR_APISOCKET_KEY"]
    175106            port = os.environ["SUGAR_APISOCKET_PORT"]
    176107
     
    194125                         window.sugar.onEnvironmentSet();
    195126                    """ % env_json
    196127
    197             self._web_view.execute_script(script)
     128            self._web_view.run_javascript(script, None, None, None)
     129
     130    def __run_file_chooser(self, browser, request):
     131        picker = FilePicker(self)
     132        chosen = picker.run()
     133        picker.destroy()
     134
     135        if chosen:
     136            request.select_files([chosen])
     137        else:
     138            request.cancel()
     139        return True
    198140
    199141    def _key_press_event_cb(self, window, event):
    200142        key_name = Gdk.keyval_name(event.keyval)
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/widgets.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/webactivity.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/webactivity.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/webactivity.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/webactivity.pyo son distintos
    Sólo en 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity: webkit1.py
    Sólo en 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity: webkit1.pyc
    Sólo en 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity: webkit1.pyo
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/widgets.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/widgets.py
    old new  
    2020from gi.repository import Gdk
    2121from gi.repository import Gtk
    2222import gettext
    23 from gi.repository import GConf
    2423
    2524from sugar3.graphics.toolbutton import ToolButton
    2625from sugar3.graphics.toolbarbox import ToolbarButton
     
    3130from sugar3.bundle.activitybundle import ActivityBundle
    3231from sugar3.graphics import style
    3332from sugar3.graphics.palettemenu import PaletteMenuBox
     33from sugar3 import profile
    3434
    3535
    3636_ = lambda msg: gettext.dgettext('sugar-toolkit-gtk3', msg)
     
    4040    if metadata is not None and metadata.get('icon-color'):
    4141        color = XoColor(metadata['icon-color'])
    4242    else:
    43         client = GConf.Client.get_default()
    44         color = XoColor(client.get_string('/desktop/sugar/user/color'))
     43        color = profile.get_color()
    4544
    4645    from sugar3.activity.activity import get_bundle_path
    4746    bundle = ActivityBundle(get_bundle_path())
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/activitybundle.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/widgets.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/widgets.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/widgets.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/activity/widgets.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/activitybundle.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/activitybundle.py
    old new  
    108108        self._tags = None
    109109        self._activity_version = '0'
    110110        self._summary = None
    111         self._maximum_instances = None
     111        self._single_instance = False
    112112
    113113        info_file = self.get_file('activity/activity.info')
    114114        if info_file is None:
     
    129129        if cp.has_option(section, 'bundle_id'):
    130130            self._bundle_id = cp.get(section, 'bundle_id')
    131131        else:
    132             raise MalformedBundleException(
    133                 'Activity bundle %s does not specify a bundle id' %
    134                 self._path)
     132            if cp.has_option(section, 'service_name'):
     133                self._bundle_id = cp.get(section, 'service_name')
     134                logging.error('ATTENTION: service_name property in the '
     135                              'activity.info file is deprecated, should be '
     136                              ' changed to bundle_id')
     137            else:
     138                raise MalformedBundleException(
     139                    'Activity bundle %s does not specify a bundle id' %
     140                    self._path)
     141
     142        if ' ' in self._bundle_id:
     143            raise MalformedBundleException('Space in bundle_id')
    135144
    136145        if cp.has_option(section, 'name'):
    137146            self._name = cp.get(section, 'name')
     
    174183        if cp.has_option(section, 'summary'):
    175184            self._summary = cp.get(section, 'summary')
    176185
    177         if cp.has_option(section, 'maximum_instances'):
    178             maximum_instances = cp.get(section, 'maximum_instances')
    179             try:
    180                 self._maximum_instances = int(maximum_instances)
    181             except ValueError:
    182                 logging.error(
    183                     'Activity bundle %s has invalid maximum_instances %s' %
    184                     (self._path, maximum_instances))
    185                 self._maximum_instances = None
     186        if cp.has_option(section, 'single_instance'):
     187            if cp.get(section, 'single_instance') == 'yes':
     188                self._single_instance = True
    186189
    187190    def _get_linfo_file(self):
    188191        # Using method from gettext.py, first find languages from environ
     
    284287        """Get the summary that describe the activity"""
    285288        return self._summary
    286289
    287     def get_maximum_instances(self):
    288         """Get the summary that describe the activity"""
    289         return self._maximum_instances
     290    def get_single_instance(self):
     291        """Get whether there should be a single instance for the activity"""
     292        return self._single_instance
    290293
    291294    def get_show_launcher(self):
    292295        """Get whether there should be a visible launcher for the activity"""
     
    345348            return
    346349        if not os.path.islink(dst) and os.path.exists(dst):
    347350            raise RuntimeError('Do not remove %s if it was not '
    348                                'installed by sugar', dst)
    349         logging.debug('Link resource %s to %s', src, dst)
     351                               'installed by sugar' % dst)
     352        logging.debug('Link resource %s to %s' % (src, dst))
    350353        if os.path.lexists(dst):
    351354            logging.debug('Relink %s', dst)
    352355            os.unlink(dst)
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/bundle.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/activitybundle.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/activitybundle.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/activitybundle.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/activitybundle.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/bundle.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/bundle.py
    old new  
    117117            try:
    118118                f = open(path, 'rb')
    119119            except IOError:
     120                logging.debug("cannot open path %s" % path)
    120121                return None
    121122        else:
    122123            path = os.path.join(self._zip_root_dir, filename)
     
    124125                data = self._zip_file.read(path)
    125126                f = StringIO.StringIO(data)
    126127            except KeyError:
    127                 logging.debug('%s not found.', filename)
     128                logging.debug('%s not found in zip %s.' % (filename, path))
     129                return None
    128130
    129131        return f
    130132
     
    161163        installed."""
    162164        return self._installation_time
    163165
     166    def get_show_launcher(self):
     167        return True
     168
    164169    def _unzip(self, install_dir):
    165170        if self._zip_file is None:
    166171            raise AlreadyInstalledException
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/contentbundle.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/bundle.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/bundle.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/bundle.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/bundle.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/bundleversion.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/bundleversion.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/bundleversion.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/bundleversion.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/contentbundle.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/contentbundle.py
    old new  
    9797            self._icon = cp.get(section, 'icon')
    9898
    9999        # Compatibility with old content bundles
    100         if not self._global_name is None \
     100        if self._global_name is not None \
    101101                and cp.has_option(section, 'bundle_class'):
    102102            self._global_name = cp.get(section, 'bundle_class')
    103103
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/datastore/datastore.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/contentbundle.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/contentbundle.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/contentbundle.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/contentbundle.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/helpers.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/helpers.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/helpers.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/helpers.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/__init__.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/__init__.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/__init__.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/bundle/__init__.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/config.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/config.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/config.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/config.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/datastore/datastore.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/datastore/datastore.py
    old new  
    2626import os
    2727import tempfile
    2828from gi.repository import GObject
    29 from gi.repository import GConf
    3029from gi.repository import Gio
    3130import dbus
    3231
     
    168167        self._metadata.update(properties)
    169168
    170169    def get_metadata(self):
    171         if self._metadata is None and not self.object_id is None:
     170        if self._metadata is None and self.object_id is not None:
    172171            properties = _get_data_store().get_properties(self.object_id)
    173172            metadata = DSMetadata(properties)
    174173            self._metadata = metadata
     
    181180    metadata = property(get_metadata, set_metadata)
    182181
    183182    def get_file_path(self, fetch=True):
    184         if fetch and self._file_path is None and not self.object_id is None:
     183        if fetch and self._file_path is None and self.object_id is not None:
    185184            self.set_file_path(_get_data_store().get_filename(self.object_id))
    186185            self._owns_file = True
    187186        return self._file_path
     
    225224
    226225    def __init__(self, file_path):
    227226        stat = os.stat(file_path)
    228         client = GConf.Client.get_default()
     227        settings = Gio.Settings('org.sugarlabs.user')
    229228        metadata = {
    230229            'uid': file_path,
    231230            'title': os.path.basename(file_path),
     
    233232            'mime_type': Gio.content_type_guess(file_path, None)[0],
    234233            'activity': '',
    235234            'activity_id': '',
    236             'icon-color': client.get_string('/desktop/sugar/user/color'),
     235            'icon-color': settings.get_string('color'),
    237236            'description': file_path,
    238237        }
    239238
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/icon.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/datastore/datastore.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/datastore/datastore.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/datastore/datastore.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/datastore/datastore.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/datastore/__init__.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/datastore/__init__.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/datastore/__init__.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/datastore/__init__.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/dispatch/dispatcher.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/dispatch/dispatcher.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/dispatch/dispatcher.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/dispatch/dispatcher.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/dispatch/__init__.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/dispatch/__init__.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/dispatch/__init__.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/dispatch/__init__.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/dispatch/saferef.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/dispatch/saferef.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/dispatch/saferef.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/dispatch/saferef.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/env.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/env.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/env.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/env.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/alert.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/alert.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/alert.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/alert.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/animator.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/animator.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/animator.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/animator.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/colorbutton.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/colorbutton.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/colorbutton.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/colorbutton.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/combobox.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/combobox.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/combobox.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/combobox.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/iconentry.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/iconentry.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/iconentry.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/iconentry.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/icon.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/icon.py
    old new  
    3232from gi.repository import Rsvg
    3333import cairo
    3434
     35from sugar3.graphics import style
    3536from sugar3.graphics.xocolor import XoColor
    3637from sugar3.util import LRU
    3738
     
    99100        self.height = None
    100101        self.cache = False
    101102        self.scale = 1.0
     103        self.pixbuf = None
    102104
    103105    def _get_cache_key(self, sensitive):
    104106        if self.background_color is None:
     
    106108        else:
    107109            color = (self.background_color.red, self.background_color.green,
    108110                     self.background_color.blue)
    109         return (self.icon_name, self.file_name, self.fill_color,
     111
     112        return (self.icon_name, self.file_name, self.pixbuf, self.fill_color,
    110113                self.stroke_color, self.badge_name, self.width, self.height,
    111114                color, sensitive)
    112115
     
    238241        icon_source.set_direction_wildcarded(False)
    239242        icon_source.set_size_wildcarded(False)
    240243
    241         style = widget.get_style()
    242         pixbuf = style.render_icon(icon_source, widget.get_direction(),
    243                                    Gtk.StateType.INSENSITIVE, -1, widget,
    244                                    'sugar-icon')
     244        widget_style = widget.get_style()
     245        pixbuf = widget_style.render_icon(
     246            icon_source, widget.get_direction(),
     247            Gtk.StateType.INSENSITIVE, -1, widget,
     248            'sugar-icon')
    245249
    246250        return pixbuf
    247251
     
    250254        if cache_key in self._surface_cache:
    251255            return self._surface_cache[cache_key]
    252256
    253         # We run two attempts at finding the icon. First, we try the icon
    254         # requested by the user. If that fails, we fall back on
    255         # document-generic. If that doesn't work out, bail.
    256         icon_width = None
    257         for (file_name, icon_name) in ((self.file_name, self.icon_name),
    258                                       (None, 'document-generic')):
    259             icon_info = self._get_icon_info(file_name, icon_name)
    260             if icon_info.file_name is None:
    261                 return None
    262 
    263             is_svg = icon_info.file_name.endswith('.svg')
    264 
    265             if is_svg:
    266                 try:
    267                     handle = self._load_svg(icon_info.file_name)
    268                     icon_width = handle.props.width
    269                     icon_height = handle.props.height
    270                     break
    271                 except IOError:
    272                     pass
    273             else:
    274                 try:
    275                     path = icon_info.file_name
    276                     pixbuf = GdkPixbuf.Pixbuf.new_from_file(path)
    277                     icon_width = pixbuf.get_width()
    278                     icon_height = pixbuf.get_height()
    279                     break
    280                 except GObject.GError:
    281                     pass
     257        if self.pixbuf:
     258            # We alredy have the pixbuf for this icon.
     259            pixbuf = self.pixbuf
     260            icon_width = pixbuf.get_width()
     261            icon_height = pixbuf.get_height()
     262            icon_info = self._get_icon_info(self.file_name, self.icon_name)
     263            is_svg = False
     264        else:
     265            # We run two attempts at finding the icon. First, we try the icon
     266            # requested by the user. If that fails, we fall back on
     267            # document-generic. If that doesn't work out, bail.
     268            icon_width = None
     269            for (file_name, icon_name) in ((self.file_name, self.icon_name),
     270                                           (None, 'document-generic')):
     271                icon_info = self._get_icon_info(file_name, icon_name)
     272                if icon_info.file_name is None:
     273                    return None
     274
     275                is_svg = icon_info.file_name.endswith('.svg')
     276
     277                if is_svg:
     278                    try:
     279                        handle = self._load_svg(icon_info.file_name)
     280                        icon_width = handle.props.width
     281                        icon_height = handle.props.height
     282                        break
     283                    except IOError:
     284                        pass
     285                else:
     286                    try:
     287                        path = icon_info.file_name
     288                        pixbuf = GdkPixbuf.Pixbuf.new_from_file(path)
     289                        icon_width = pixbuf.get_width()
     290                        icon_height = pixbuf.get_height()
     291                        break
     292                    except GObject.GError:
     293                        pass
    282294
    283295        if icon_width is None:
    284296            # Neither attempt found an icon for us to use
     
    335347
    336348    __gtype_name__ = 'SugarIcon'
    337349
     350    # FIXME: deprecate icon_size
     351    _MENU_SIZES = (Gtk.IconSize.MENU, Gtk.IconSize.DND,
     352                   Gtk.IconSize.SMALL_TOOLBAR, Gtk.IconSize.BUTTON)
     353
    338354    def __init__(self, **kwargs):
    339355        self._buffer = _IconBuffer()
    340356        # HACK: need to keep a reference to the path so it doesn't get garbage
     
    344360        self._alpha = 1.0
    345361        self._scale = 1.0
    346362
     363        # FIXME: deprecate icon_size
     364        if 'icon_size' in kwargs:
     365            logging.warning("icon_size is deprecated. Use pixel_size instead.")
     366
    347367        GObject.GObject.__init__(self, **kwargs)
    348368
    349369    def get_file(self):
     
    355375
    356376    file = GObject.property(type=object, setter=set_file, getter=get_file)
    357377
     378    def get_pixbuf(self):
     379        return self._buffer.pixbuf
     380
     381    def set_pixbuf(self, pixbuf):
     382        self._buffer.pixbuf = pixbuf
     383
     384    pixbuf = GObject.property(type=object, setter=set_pixbuf,
     385                              getter=get_pixbuf)
     386
    358387    def _sync_image_properties(self):
    359388        if self._buffer.icon_name != self.props.icon_name:
    360389            self._buffer.icon_name = self.props.icon_name
     
    362391        if self._buffer.file_name != self.props.file:
    363392            self._buffer.file_name = self.props.file
    364393
     394        # FIXME: deprecate icon_size
     395        pixel_size = None
    365396        if self.props.pixel_size == -1:
    366             valid_, width, height = Gtk.icon_size_lookup(self.props.icon_size)
     397            if self.props.icon_size in self._MENU_SIZES:
     398                pixel_size = style.SMALL_ICON_SIZE
     399            else:
     400                pixel_size = style.STANDARD_ICON_SIZE
    367401        else:
    368             width = height = self.props.pixel_size
     402            pixel_size = self.props.pixel_size
     403
     404        width = height = pixel_size
     405
    369406        if self._buffer.width != width or self._buffer.height != height:
    370407            self._buffer.width = width
    371408            self._buffer.height = height
     
    416453
    417454        allocation = self.get_allocation()
    418455        x = math.floor(xpad +
    419                       (allocation.width - requisition.width) * xalign)
     456                       (allocation.width - requisition.width) * xalign)
    420457        y = math.floor(ypad +
    421                       (allocation.height - requisition.height) * yalign)
     458                       (allocation.height - requisition.height) * yalign)
    422459
    423460        if self._scale != 1.0:
    424461            cr.scale(self._scale, self._scale)
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/menuitem.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/icon.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/icon.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/icon.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/icon.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/__init__.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/__init__.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/__init__.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/__init__.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/menuitem.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/menuitem.py
    old new  
    2626from gi.repository import Gtk
    2727
    2828from sugar3.graphics.icon import Icon
     29from sugar3.graphics import style
    2930
    3031
    3132class MenuItem(Gtk.ImageMenuItem):
    3233
    33     def __init__(self, text_label=None, icon_name=None, text_maxlen=60,
    34                  xo_color=None, file_name=None):
     34    def __init__(self, text_label=None, icon_name=None,
     35                 text_maxlen=style.MENU_WIDTH_CHARS, xo_color=None,
     36                 file_name=None):
    3537        GObject.GObject.__init__(self)
    3638        self._accelerator = None
    3739
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/objectchooser.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/menuitem.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/menuitem.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/menuitem.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/menuitem.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/notebook.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/notebook.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/notebook.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/notebook.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/objectchooser.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/objectchooser.py
    old new  
    228228    def __chooser_response_cb(self, chooser_id, object_id):
    229229        if chooser_id != self._chooser_id:
    230230            return
    231         logging.debug('ObjectChooser.__chooser_response_cb: %r', object_id)
     231        logging.debug('ObjectChooser.__chooser_response_cb: %r' % object_id)
    232232        self._response_code = Gtk.ResponseType.ACCEPT
    233233        self._object_id = object_id
    234234        self._cleanup()
     
    236236    def __chooser_cancelled_cb(self, chooser_id):
    237237        if chooser_id != self._chooser_id:
    238238            return
    239         logging.debug('ObjectChooser.__chooser_cancelled_cb: %r', chooser_id)
     239        logging.debug('ObjectChooser.__chooser_cancelled_cb: %r' % chooser_id)
    240240        self._response_code = Gtk.ResponseType.CANCEL
    241241        self._cleanup()
    242242
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettegroup.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/objectchooser.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/objectchooser.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/objectchooser.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/objectchooser.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettegroup.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettegroup.py
    old new  
    7575        self._sig_ids[palette].append(sid)
    7676
    7777    def remove(self, palette):
    78         if not palette in self._palettes:
     78        if palette not in self._palettes:
    7979            # This happens when converting a window based palette to a menu
    8080            # based one.
    8181            return
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettemenu.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettegroup.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettegroup.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettegroup.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettegroup.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettemenu.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettemenu.py
    old new  
    7878    }
    7979
    8080    def __init__(self, text_label=None, icon_name=None, text_maxlen=60,
    81                  xo_color=None, file_name=None):
     81                 xo_color=None, file_name=None, accelerator=None):
     82
     83        """
     84            text_label -- str
     85                a text to display in the menu.
     86
     87            icon_name -- str
     88                the name of a sugar icon to be displayed. Takse precedence
     89                over file_name.
     90
     91            text_maxlen -- int
     92                the desired maximum width of the label, in characters.
     93                By default is 60.
     94
     95            xo_color -- sugar.graphics.XoColor
     96                the color to be applied to the icon.
     97
     98            file_name -- str
     99                the path to a svg file used as icon.
     100
     101            accelerator -- str
     102                a text used to display the keyboard shortcut associated
     103                to the menu.
     104
     105        """
    82106
    83107        Gtk.EventBox.__init__(self)
    84108        self.set_above_child(True)
     
    120144        self._hbox.pack_start(align, expand=True, fill=True,
    121145                              padding=style.DEFAULT_PADDING)
    122146
     147        self._accelerator_label = Gtk.AccelLabel('')
     148        if accelerator is not None:
     149            self._accelerator_label.set_text(accelerator)
     150        self._hbox.pack_start(self._accelerator_label, expand=False,
     151                              fill=False, padding=style.DEFAULT_PADDING)
     152
    123153        self.id_bt_release_cb = self.connect('button-release-event',
    124154                                             self.__button_release_cb)
    125155        self.id_enter_notify_cb = self.connect('enter-notify-event',
     
    150180                              padding=style.DEFAULT_PADDING)
    151181        self._hbox.reorder_child(icon, 0)
    152182
     183    def set_accelerator(self, text):
     184        self._accelerator_label.set_text(text)
     185
    153186    def set_sensitive(self, sensitive):
    154187        is_sensitive = bool(not self.get_state_flags() &
    155188                            Gtk.StateFlags.INSENSITIVE)
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palette.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettemenu.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettemenu.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettemenu.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettemenu.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palette.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palette.py
    old new  
    2222"""
    2323STABLE.
    2424"""
    25 
    2625from gi.repository import Gtk
     26from gi.repository import Gdk
    2727from gi.repository import GObject
    2828from gi.repository import Pango
    2929
     
    101101    __gtype_name__ = 'SugarPalette'
    102102
    103103    def __init__(self, label=None, accel_path=None,
    104                  text_maxlen=60, **kwargs):
     104                 text_maxlen=style.MENU_WIDTH_CHARS, **kwargs):
    105105        # DEPRECATED: label is passed with the primary-text property,
    106106        # accel_path is set via the invoker property
    107107
     
    111111        self._icon_visible = True
    112112        self._palette_state = self.PRIMARY
    113113
     114        self._primary_event_box = Gtk.EventBox()
     115        self._primary_event_box.show()
    114116        self._primary_box = Gtk.HBox()
     117        self._primary_event_box.add(self._primary_box)
    115118        self._primary_box.show()
    116119
    117120        self._icon_box = Gtk.HBox()
     
    135138            self._label.set_max_width_chars(text_maxlen)
    136139            self._label.set_ellipsize(Pango.EllipsizeMode.MIDDLE)
    137140        labels_box.pack_start(self._label, True, True, 0)
     141        self._primary_event_box.connect('button-release-event',
     142                                        self.__button_release_event_cb)
     143        self._primary_event_box.set_events(Gdk.EventMask.BUTTON_RELEASE_MASK)
    138144
    139145        self._secondary_label = Gtk.Label()
    140146        self._secondary_label.set_alignment(0, 0.5)
     
    255261                                    getter=get_primary_text,
    256262                                    setter=set_primary_text)
    257263
     264    def __button_release_event_cb(self, widget, event):
     265        if self.props.invoker is not None:
     266            self.props.invoker.primary_text_clicked()
     267
    258268    def set_secondary_text(self, label):
    259269        if label is not None:
    260270            label = label.split('\n', 1)[0]
     
    334344            self._setup_widget()
    335345
    336346            self._palette_box = Gtk.VBox()
    337             self._palette_box.pack_start(self._primary_box, False, True, 0)
     347            self._palette_box.pack_start(self._primary_event_box, False, True,
     348                                         0)
    338349            self._palette_box.pack_start(self._secondary_box, True, True, 0)
    339350
    340351            self._widget.add(self._palette_box)
    341352            self._palette_box.show()
    342353            height = style.GRID_CELL_SIZE - 2 * self._widget.get_border_width()
    343             self._primary_box.set_size_request(-1, height)
     354            self._primary_event_box.set_size_request(-1, height)
    344355
    345356        if self._content.get_children():
    346357            self._content.remove(self._content.get_children()[0])
     
    405416        if self._widget is None \
    406417                or not isinstance(self._widget, _PaletteMenuWidget):
    407418            if self._widget is not None:
    408                 self._palette_box.remove(self._primary_box)
     419                self._palette_box.remove(self._primary_event_box)
    409420                self._palette_box.remove(self._secondary_box)
    410421                self._teardown_widget()
    411422                self._widget.destroy()
    412423
    413424            self._widget = _PaletteMenuWidget()
    414425
    415             self._label_menuitem = _HeaderItem(self._primary_box)
     426            self._label_menuitem = _HeaderItem(self._primary_event_box)
    416427            self._label_menuitem.show()
    417428            self._widget.append(self._label_menuitem)
    418429
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettewindow.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palette.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palette.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palette.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palette.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettewindow.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettewindow.py
    old new  
    10521052        if not self.props.cache_palette:
    10531053            self.set_palette(None)
    10541054
     1055    def primary_text_clicked(self):
     1056        """Implemented by invokers that can be clicked"""
     1057        pass
     1058
    10551059
    10561060class WidgetInvoker(Invoker):
    10571061
     
    13451349        else:
    13461350            return self.LEFT + self.RIGHT
    13471351
     1352    def primary_text_clicked(self):
     1353        self._widget.emit('clicked')
     1354
    13481355
    13491356class CellRendererInvoker(Invoker):
    13501357
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/style.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettewindow.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettewindow.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettewindow.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/palettewindow.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/panel.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/panel.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/panel.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/panel.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/progressicon.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/progressicon.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/progressicon.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/progressicon.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/radiopalette.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/radiopalette.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/radiopalette.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/radiopalette.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/radiotoolbutton.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/radiotoolbutton.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/radiotoolbutton.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/radiotoolbutton.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/style.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/style.py
    old new  
    2727
    2828from gi.repository import Gdk
    2929from gi.repository import Pango
    30 from gi.repository import GConf
     30from gi.repository import Gio
    3131
    3232
    3333FOCUS_LINE_WIDTH = 2
     
    110110LINE_WIDTH = zoom(2)
    111111
    112112STANDARD_ICON_SIZE = zoom(55)
    113 SMALL_ICON_SIZE = zoom(55 * 0.5)
     113SMALL_ICON_SIZE = zoom(33)
    114114MEDIUM_ICON_SIZE = zoom(55 * 1.5)
    115115LARGE_ICON_SIZE = zoom(55 * 2.0)
    116116XLARGE_ICON_SIZE = zoom(55 * 2.75)
    117117
    118 client = GConf.Client.get_default()
    119 FONT_SIZE = client.get_float('/desktop/sugar/font/default_size')
    120 FONT_FACE = client.get_string('/desktop/sugar/font/default_face')
     118settings = Gio.Settings('org.sugarlabs.font')
     119FONT_SIZE = settings.get_double('default-size')
     120FONT_FACE = settings.get_string('default-face')
    121121
    122122FONT_NORMAL = Font('%s %f' % (FONT_FACE, FONT_SIZE))
    123123FONT_BOLD = Font('%s bold %f' % (FONT_FACE, FONT_SIZE))
     
    145145PALETTE_CURSOR_DISTANCE = zoom(10)
    146146
    147147TOOLBAR_ARROW_SIZE = zoom(24)
     148
     149MENU_WIDTH_CHARS = 60
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toolbarbox.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/style.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/style.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/style.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/style.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toggletoolbutton.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toggletoolbutton.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toggletoolbutton.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toggletoolbutton.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toolbarbox.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toolbarbox.py
    old new  
    171171        return self.toolbar.get_nth_item(self._expanded_button_index)
    172172
    173173    def set_expanded_button(self, button):
    174         if not button in self.toolbar:
     174        if button not in self.toolbar:
    175175            self._expanded_button_index = -1
    176176            return
    177177        self._expanded_button_index = self.toolbar.get_item_index(button)
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/window.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toolbarbox.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toolbarbox.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toolbarbox.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toolbarbox.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toolbox.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toolbox.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toolbox.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toolbox.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toolbutton.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toolbutton.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toolbutton.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toolbutton.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toolcombobox.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toolcombobox.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toolcombobox.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/toolcombobox.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/tray.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/tray.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/tray.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/tray.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/window.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/window.py
    old new  
    9292        self.set_decorated(False)
    9393        self.maximize()
    9494        self.connect('realize', self.__window_realize_cb)
    95         self.connect('key-press-event', self.__key_press_cb)
     95        self.connect_after('key-press-event', self.__key_press_cb)
    9696
    9797        # OSK support: canvas auto panning based on input focus
    9898        if GObject.signal_lookup('request-clear-area', Window) != 0 and \
     
    145145            timestamp = GdkX11.x11_get_server_time(window)
    146146        window.focus(timestamp)
    147147
     148    def is_fullscreen(self):
     149        return self._is_fullscreen
     150
    148151    def fullscreen(self):
    149152        palettegroup.popdown_all()
    150153        if self._toolbar_box is not None:
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/xocolor.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/window.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/window.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/window.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/window.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/xocolor.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/xocolor.py
    old new  
    2222import random
    2323import logging
    2424
    25 from gi.repository import GConf
     25from gi.repository import Gio
    2626
    2727colors = [['#B20008', '#FF2B34'],
    2828          ['#FF2B34', '#B20008'],
     
    229229        parsed_color = None
    230230
    231231        if color_string is None:
    232             client = GConf.Client.get_default()
    233             color_string = client.get_string('/desktop/sugar/user/color')
     232            settings = Gio.Settings('org.sugarlabs.user')
     233            color_string = settings.get_string('color')
    234234
    235235        if color_string is not None:
    236236            parsed_color = _parse_string(color_string)
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/logger.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/xocolor.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/xocolor.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/xocolor.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/graphics/xocolor.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/__init__.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/__init__.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/__init__.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/__init__.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/logger.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/logger.py
    old new  
    6161    try:
    6262        logging.getLogger('').setLevel(int(level))
    6363    except ValueError:
    64         logging.warning('Invalid log level: %r', level)
     64        logging.warning('Invalid log level: %r' % level)
    6565
    6666
    6767# pylint: disable-msg=E1101,F0401
     
    235235        try:
    236236            res = f(*args, **kwargs)
    237237        except:
    238             trace_logger.exception("Exception occured in %s", f.__name__)
     238            trace_logger.exception("Exception occured in %s" % f.__name__)
    239239            raise
    240240
    241241        trace_logger.log(TRACE, "%s(%s) returned %s", f.__name__,
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/mime.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/logger.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/logger.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/logger.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/logger.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/mime.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/mime.py
    old new  
    2929from gi.repository import GdkPixbuf
    3030from gi.repository import Gio
    3131
    32 from gi.repository import SugarExt
    33 
    3432_ = lambda msg: gettext.dgettext('sugar-toolkit-gtk3', msg)
    3533
    3634GENERIC_TYPE_TEXT = 'Text'
     
    3836GENERIC_TYPE_AUDIO = 'Audio'
    3937GENERIC_TYPE_VIDEO = 'Video'
    4038GENERIC_TYPE_LINK = 'Link'
     39GENERIC_TYPE_BUNDLE = 'Bundle'
    4140
    4241
    4342def _get_supported_image_mime_types():
     
    4948
    5049_extensions = {}
    5150_globs_timestamps = []
     51_subclasses = {}
     52_subclasses_timestamps = []
     53
    5254_generic_types = [{
    5355    'id': GENERIC_TYPE_TEXT,
    5456    'name': _('Text'),
     
    8486    'name': _('Link'),
    8587    'icon': 'text-uri-list',
    8688    'types': ['text/x-moz-url', 'text/uri-list'],
     89}, {
     90    'id': GENERIC_TYPE_BUNDLE,
     91    'name': _('Bundle'),
     92    'icon': 'user-documents',
     93    'types': ['application/vnd.olpc-sugar'],
    8794}]
    8895
    8996
     
    118125
    119126    file_name = os.path.realpath(file_name)
    120127
    121     mime_type = SugarExt.mime_get_mime_type_for_file(file_name, None)
    122     if mime_type == 'application/octet-stream':
    123         if _file_looks_like_text(file_name):
    124             return 'text/plain'
    125         else:
    126             return 'application/octet-stream'
     128    f = Gio.File.new_for_path(file_name)
     129    try:
     130        info = f.query_info(Gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, 0, None)
     131        mime_type = info.get_content_type()
     132    except GLib.GError:
     133        mime_type = Gio.content_type_guess(file_name, None)[0]
    127134
    128135    return mime_type
    129136
    130137
    131138def get_from_file_name(file_name):
    132     return SugarExt.mime_get_mime_type_from_file_name(file_name)
     139    """
     140    DEPRECATED: 0.102 (removed in 4 releases)
     141    Use Gio.content_type_guess(file_name, None)[0] instead.
     142    """
     143    return Gio.content_type_guess(file_name, None)[0]
    133144
    134145
    135146def get_mime_icon(mime_type):
     
    149160
    150161
    151162def get_mime_parents(mime_type):
    152     return SugarExt.mime_list_mime_parents(mime_type)
     163    global _subclasses
     164    global _subclasses_timestamps
    153165
     166    dirs = _get_mime_data_directories()
    154167
    155 def get_primary_extension(mime_type):
    156     global _extensions
    157     global _globs_timestamps
     168    timestamps = []
     169    subclasses_path_list = []
     170    for f in dirs:
     171        subclasses_path = os.path.join(f, 'mime', 'subclasses')
     172        try:
     173            mtime = os.stat(subclasses_path).st_mtime
     174            timestamps.append([subclasses_path, mtime])
     175            subclasses_path_list.append(subclasses_path)
     176        except OSError:
     177            pass
     178
     179    if timestamps != _subclasses_timestamps:
     180        _subclasses = {}
     181        for subclasses_path in subclasses_path_list:
     182            with open(subclasses_path) as parents_file:
     183                for line in parents_file:
     184                    subclass, parent = line.split()
     185                    if subclass not in _subclasses.keys():
     186                        _subclasses[subclass] = [parent]
     187                    else:
     188                        _subclasses[subclass].append(parent)
     189
     190        _subclasses_timestamps = timestamps
     191
     192    if mime_type in _subclasses.keys():
     193        return _subclasses[mime_type]
     194    else:
     195        return []
    158196
     197
     198def _get_mime_data_directories():
    159199    dirs = []
    160200
    161201    if 'XDG_DATA_HOME' in os.environ:
     
    167207        dirs.extend(os.environ['XDG_DATA_DIRS'].split(':'))
    168208    else:
    169209        dirs.extend(['/usr/local/share/', '/usr/share/'])
     210    return dirs
     211
     212
     213def get_primary_extension(mime_type):
     214    global _extensions
     215    global _globs_timestamps
     216
     217    dirs = _get_mime_data_directories()
    170218
    171219    timestamps = []
    172220    globs_path_list = []
     
    252300    return GLib.uri_list_extract_uris(uri_list)
    253301
    254302
    255 def _file_looks_like_text(file_name):
    256     f = open(file_name, 'r')
    257     try:
    258         sample = f.read(256)
    259     finally:
    260         f.close()
    261 
    262     if '\000' in sample:
    263         return False
    264 
    265     for encoding in ('ascii', 'latin_1', 'utf_8', 'utf_16'):
    266         try:
    267             unicode(sample, encoding)
    268             return True
    269         except Exception:
    270             pass
    271 
    272     return False
    273 
    274 
    275303def _get_generic_type_for_mime(mime_type):
    276304    for generic_type in _generic_types:
    277305        if mime_type in generic_type['types']:
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/activity.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/mime.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/mime.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/mime.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/mime.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/network.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/network.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/network.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/network.pyo son distintos
    Sólo en 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3: power.py
    Sólo en 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3: power.pyc
    Sólo en 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3: power.pyo
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/activity.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/activity.py
    old new  
    114114        self._joined_buddies = {}
    115115
    116116        self._get_properties_call = None
    117         if not self.room_handle is None:
     117        if self.room_handle is not None:
    118118            self._start_tracking_properties()
    119119
    120120    def _start_tracking_properties(self):
     
    138138            dbus_interface=CONN_INTERFACE_ACTIVITY_PROPERTIES)
    139139
    140140    def __activity_properties_changed_cb(self, room_handle, properties):
    141         _logger.debug('%r: Activity properties changed to %r', self,
    142                       properties)
     141        _logger.debug('%r: Activity properties changed to %r' % (self,
     142                      properties))
    143143        self._update_properties(properties)
    144144
    145145    def __got_properties_cb(self, properties):
    146         _logger.debug('__got_properties_cb %r', properties)
     146        _logger.debug('__got_properties_cb %r' % properties)
    147147        self._get_properties_call = None
    148148        self._update_properties(properties)
    149149
    150150    def __error_handler_cb(self, error):
    151         _logger.debug('__error_handler_cb %r', error)
     151        _logger.debug('__error_handler_cb %r' % error)
    152152
    153153    def _update_properties(self, new_props):
    154154        val = new_props.get('name', self._name)
     
    188188
    189189        if self._get_properties_call is not None:
    190190            _logger.debug('%r: Blocking on GetProperties() because someone '
    191                           'wants property %s', self, pspec.name)
     191                          'wants property %s' % (self, pspec.name))
    192192            self._get_properties_call.block()
    193193
    194194        if pspec.name == 'id':
     
    218218        elif pspec.name == 'private':
    219219            self._private = val
    220220        else:
    221             raise ValueError('Unknown property %r', pspec.name)
     221            raise ValueError('Unknown property %r' % pspec.name)
    222222
    223223        self._publish_properties()
    224224
    225225    def set_private(self, val, reply_handler, error_handler):
    226         _logger.debug('set_private %r', val)
     226        _logger.debug('set_private %r' % val)
    227227        self._activity.SetProperties({'private': bool(val)},
    228228                                     reply_handler=reply_handler,
    229229                                     error_handler=error_handler)
     
    271271        raise NotImplementedError()
    272272
    273273    def __joined_cb(self, join_command, error):
    274         _logger.debug('%r: Join finished %r', self, error)
     274        _logger.debug('%r: Join finished %r' % (self, error))
    275275        if error is not None:
    276276            self.emit('joined', error is None, str(error))
    277277        self.telepathy_text_chan = join_command.text_channel
     
    295295        channel.connect_to_signal('Closed', self.__text_channel_closed_cb)
    296296
    297297    def __get_all_members_cb(self, members, local_pending, remote_pending):
    298         _logger.debug('__get_all_members_cb %r %r', members,
    299                       self._text_channel_group_flags)
     298        _logger.debug('__get_all_members_cb %r %r' % (members,
     299                      self._text_channel_group_flags))
    300300        if self._channel_self_handle in members:
    301301            members.remove(self._channel_self_handle)
    302302
     
    324324            get_handle_owners_cb(input_handles)
    325325
    326326    def _add_initial_buddies(self, contact_ids):
    327         _logger.debug('__add_initial_buddies %r', contact_ids)
     327        _logger.debug('__add_initial_buddies %r' % contact_ids)
    328328        for contact_id in contact_ids:
    329329            self._buddies[contact_id] = self._get_buddy(contact_id)
    330330            self._joined_buddies[contact_id] = self._get_buddy(contact_id)
     
    335335    def __text_channel_members_changed_cb(self, message, added, removed,
    336336                                          local_pending, remote_pending,
    337337                                          actor, reason):
    338         _logger.debug('__text_channel_members_changed_cb %r',
     338        _logger.debug('__text_channel_members_changed_cb %r' %
    339339                      [added, message, added, removed, local_pending,
    340340                       remote_pending, actor, reason])
    341341        if self._channel_self_handle in added:
     
    382382            self.emit('joined', True, None)
    383383            return
    384384
    385         _logger.debug('%r: joining', self)
     385        _logger.debug('%r: joining' % self)
    386386
    387387        self._join_command = _JoinCommand(self.telepathy_conn,
    388388                                          self.room_handle)
     
    390390        self._join_command.run()
    391391
    392392    def share(self, share_activity_cb, share_activity_error_cb):
    393         if not self.room_handle is None:
     393        if self.room_handle is not None:
    394394            raise ValueError('Already have a room handle')
    395395
    396396        self._share_command = _ShareCommand(self.telepathy_conn, self._id)
     
    402402
    403403    def __shared_cb(self, share_activity_cb, share_activity_error_cb,
    404404                    share_command, error):
    405         _logger.debug('%r: Share finished %r', self, error)
     405        _logger.debug('%r: Share finished %r' % (self, error))
    406406        if error is None:
    407407            self._joined = True
    408408            self.room_handle = share_command.room_handle
     
    438438            dbus_interface=CONN_INTERFACE_ACTIVITY_PROPERTIES)
    439439
    440440    def __share_error_cb(self, share_activity_error_cb, error):
    441         logging.debug('%r: Share failed because: %s', self, error)
     441        logging.debug('%r: Share failed because: %s' % (self, error))
    442442        share_activity_error_cb(self, error)
    443443
    444444    # GetChannels() wrapper
     
    459459        channels = [self.telepathy_text_chan.object_path,
    460460                    self.telepathy_tubes_chan.object_path]
    461461
    462         _logger.debug('%r: bus name is %s, connection is %s, channels are %r',
    463                       self, bus_name, connection_path, channels)
     462        _logger.debug('%r: bus name is %s, connection is %s, channels are %r' %
     463                      (self, bus_name, connection_path, channels))
    464464        return bus_name, connection_path, channels
    465465
    466466    # Leaving
     
    470470
    471471    def leave(self):
    472472        """Leave this shared activity"""
    473         _logger.debug('%r: leaving', self)
     473        _logger.debug('%r: leaving' % self)
    474474        self.telepathy_text_chan.Close()
    475475
    476476
     
    511511            dbus_interface=CONNECTION)
    512512
    513513    def __got_handles_cb(self, handles):
    514         logging.debug('__got_handles_cb %r', handles)
     514        logging.debug('__got_handles_cb %r' % handles)
    515515        self.room_handle = handles[0]
    516516
    517517        self._join_command = _JoinCommand(self._connection, self.room_handle)
     
    519519        self._join_command.run()
    520520
    521521    def __joined_cb(self, join_command, error):
    522         _logger.debug('%r: Join finished %r', self, error)
     522        _logger.debug('%r: Join finished %r' % (self, error))
    523523        if error is not None:
    524524            self._finished = True
    525525            self.emit('finished', error)
     
    597597        self.emit('finished', error)
    598598
    599599    def __tubes_channel_ready_cb(self, channel):
    600         _logger.debug('%r: Tubes channel %r is ready', self, channel)
     600        _logger.debug('%r: Tubes channel %r is ready' % (self, channel))
    601601        self.tubes_channel = channel
    602602        self._tubes_ready()
    603603
    604604    def __text_channel_ready_cb(self, channel):
    605         _logger.debug('%r: Text channel %r is ready', self, channel)
     605        _logger.debug('%r: Text channel %r is ready' % (self, channel))
    606606        self.text_channel = channel
    607607        self._tubes_ready()
    608608
     
    611611                self.tubes_channel is None:
    612612            return
    613613
    614         _logger.debug('%r: finished setting up tubes', self)
     614        _logger.debug('%r: finished setting up tubes' % self)
    615615
    616616        self._add_self_to_channel()
    617617
    618618    def __text_channel_group_flags_changed_cb(self, added, removed):
    619         _logger.debug('__text_channel_group_flags_changed_cb %r %r', added,
    620                       removed)
     619        _logger.debug('__text_channel_group_flags_changed_cb %r %r' % (added,
     620                      removed))
    621621        self.text_channel_group_flags |= added
    622622        self.text_channel_group_flags &= ~removed
    623623
     
    629629
    630630        def got_all_members(members, local_pending, remote_pending):
    631631            _logger.debug('got_all_members members %r local_pending %r '
    632                           'remote_pending %r', members, local_pending,
    633                           remote_pending)
     632                          'remote_pending %r' % (members, local_pending,
     633                                                 remote_pending))
    634634
    635635            if self.text_channel_group_flags & \
    636636                    CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES:
     
    639639                self_handle = self._global_self_handle
    640640
    641641            if self_handle in local_pending:
    642                 _logger.debug('%r: We are in local pending - entering', self)
     642                _logger.debug('%r: We are in local pending - entering' % self)
    643643                group.AddMembers([self_handle], '',
    644644                                 reply_handler=lambda: None,
    645645                                 error_handler=lambda e: self._join_failed_cb(
     
    675675                                          actor, reason):
    676676        _logger.debug('__text_channel_members_changed_cb added %r removed %r '
    677677                      'local_pending %r remote_pending %r channel_self_handle '
    678                       '%r', added, removed, local_pending, remote_pending,
    679                       self.channel_self_handle)
     678                      '%r' % (added, removed, local_pending, remote_pending,
     679                              self.channel_self_handle))
    680680
    681681        if self.text_channel_group_flags & \
    682682                CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES:
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/buddy.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/activity.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/activity.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/activity.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/activity.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/buddy.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/buddy.py
    old new  
    2424import logging
    2525
    2626from gi.repository import GObject
     27from gi.repository import Gio
    2728import dbus
    28 from gi.repository import GConf
    2929from telepathy.interfaces import CONNECTION, \
    3030    CONNECTION_INTERFACE_ALIASING, \
    3131    CONNECTION_INTERFACE_CONTACTS
     
    243243    def __init__(self):
    244244        BaseBuddy.__init__(self)
    245245
    246         client = GConf.Client.get_default()
    247         self.props.nick = client.get_string('/desktop/sugar/user/nick')
    248         self.props.color = client.get_string('/desktop/sugar/user/color')
     246        settings = Gio.Settings('org.sugarlabs.user')
     247        self.props.nick = settings.get_string('nick')
     248        self.props.color = settings.get_string('color')
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/presenceservice.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/buddy.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/buddy.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/buddy.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/buddy.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/connectionmanager.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/connectionmanager.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/connectionmanager.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/connectionmanager.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/__init__.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/__init__.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/__init__.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/__init__.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/presenceservice.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/presenceservice.py
    old new  
    8181            for account_path, connection in connections_per_account.items():
    8282                if not connection.connected:
    8383                    continue
    84                 logging.debug('Calling GetActivity on %s', account_path)
     84                logging.debug('Calling GetActivity on %s' % account_path)
    8585                try:
    8686                    room_handle = connection.connection.GetActivity(
    8787                        activity_id,
     
    9090                    name = 'org.freedesktop.Telepathy.Error.NotAvailable'
    9191                    if e.get_dbus_name() == name:
    9292                        logging.debug("There's no shared activity with the id "
    93                                       "%s", activity_id)
     93                                      "%s" % activity_id)
    9494                    else:
    9595                        raise
    9696                else:
     
    162162                    dbus_interface=CONNECTION)
    163163                return self.get_buddy(account_path, contact_ids[0])
    164164
    165         raise ValueError('Unknown buddy in connection %s with handle %d',
    166                          tp_conn_path, handle)
     165        raise ValueError('Unknown buddy in connection %s with handle %d' %
     166                         (tp_conn_path, handle))
    167167
    168168    def get_owner(self):
    169169        """Retrieves the laptop Buddy object."""
     
    198198        properties['private'] = private
    199199
    200200        if self._activity_cache is not None:
    201             raise ValueError('Activity %s is already tracked',
     201            raise ValueError('Activity %s is already tracked' %
    202202                             activity.get_id())
    203203
    204204        connection_manager = get_connection_manager()
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/profile.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/presenceservice.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/presenceservice.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/presenceservice.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/presenceservice.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/sugartubeconn.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/sugartubeconn.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/sugartubeconn.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/sugartubeconn.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/tubeconn.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/tubeconn.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/tubeconn.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/presence/tubeconn.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/profile.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/profile.py
    old new  
    1616# Boston, MA 02111-1307, USA.
    1717
    1818"""User settings/configuration loading.
    19 
    20 DEPRECATED. We are using GConf now to store preferences.
    2119"""
    2220
    23 from gi.repository import GConf
     21from gi.repository import Gio
    2422import os
    2523import logging
    2624from ConfigParser import ConfigParser
     
    3634class Profile(object):
    3735    """Local user's current options/profile information
    3836
    39     User settings were previously stored in an INI-style
    40     configuration file. We moved to gconf now. The deprected
    41     API is kept around to not break activities still using it.
    42 
    4337    The profile is also responsible for loading the user's
    4438    public and private ssh keys from disk.
    4539
     
    6862    privkey_hash = property(fget=_get_privkey_hash)
    6963
    7064    def is_valid(self):
    71         client = GConf.Client.get_default()
    72         nick = client.get_string('/desktop/sugar/user/nick')
    73         color = client.get_string('/desktop/sugar/user/color')
     65        settings = Gio.Settings('org.sugarlabs.user')
     66        nick = settings.get_string('nick')
     67        color = settings.get_string('color')
    7468
    7569        return nick is not '' and \
    7670            color is not '' and \
     
    140134        path = os.path.join(env.get_profile_path(), 'config')
    141135        cp.read([path])
    142136
    143         client = GConf.Client.get_default()
    144 
     137        settings = Gio.Settings('org.sugarlabs.user')
    145138        if cp.has_option('Buddy', 'NickName'):
    146139            name = cp.get('Buddy', 'NickName')
    147140            # decode nickname from ascii-safe chars to unicode
    148141            nick = name.decode('utf-8')
    149             client.set_string('/desktop/sugar/user/nick', nick)
     142            settings.set_string('nick', nick)
    150143        if cp.has_option('Buddy', 'Color'):
    151144            color = cp.get('Buddy', 'Color')
    152             client.set_string('/desktop/sugar/user/color', color)
     145            settings.set_string('color', color)
     146
    153147        if cp.has_option('Jabber', 'Server'):
    154148            server = cp.get('Jabber', 'Server')
    155             client.set_string('/desktop/sugar/collaboration/jabber_server',
    156                               server)
     149            settings = Gio.Settings('org.sugarlabs.collaboration')
     150            settings.set_string('jabber-server', server)
     151
    157152        if cp.has_option('Date', 'Timezone'):
    158153            timezone = cp.get('Date', 'Timezone')
    159             client.set_string('/desktop/sugar/date/timezone', timezone)
     154            settings = Gio.Settings('org.sugarlabs.date')
     155            settings.set_string('timezone', timezone)
     156
     157        settings = Gio.Settings('org.sugarlabs.frame')
    160158        if cp.has_option('Frame', 'HotCorners'):
    161159            delay = float(cp.get('Frame', 'HotCorners'))
    162             client.set_int('/desktop/sugar/frame/corner_delay', int(delay))
     160            settings.set_int('corner-delay', int(delay))
    163161        if cp.has_option('Frame', 'WarmEdges'):
    164162            delay = float(cp.get('Frame', 'WarmEdges'))
    165             client.set_int('/desktop/sugar/frame/edge_delay', int(delay))
     163            settings.set_int('edge-delay', int(delay))
     164
    166165        if cp.has_option('Server', 'Backup1'):
    167166            backup1 = cp.get('Server', 'Backup1')
    168             client.set_string('/desktop/sugar/backup_url', backup1)
     167            settings = Gio.Settings('org.sugarlabs')
     168            settings.set_string('backup-url', backup1)
     169
    169170        if cp.has_option('Sound', 'Volume'):
    170171            volume = float(cp.get('Sound', 'Volume'))
    171             client.set_int('/desktop/sugar/sound/volume', int(volume))
     172            settings = Gio.Settings('org.sugarlabs.sound')
     173            settings.set_int('volume', int(volume))
     174
     175        settings = Gio.Settings('org.sugarlabs.power')
    172176        if cp.has_option('Power', 'AutomaticPM'):
    173177            state = cp.get('Power', 'AutomaticPM')
    174178            if state.lower() == 'true':
    175                 client.set_bool('/desktop/sugar/power/automatic', True)
     179                settings.set_boolean('automatic', True)
    176180        if cp.has_option('Power', 'ExtremePM'):
    177181            state = cp.get('Power', 'ExtremePM')
    178182            if state.lower() == 'true':
    179                 client.set_bool('/desktop/sugar/power/extreme', True)
     183                settings.set_boolean('extreme', True)
     184
    180185        if cp.has_option('Shell', 'FavoritesLayout'):
    181186            layout = cp.get('Shell', 'FavoritesLayout')
    182             client.set_string('/desktop/sugar/desktop/favorites_layout',
    183                               layout)
     187            settings = Gio.Settings('org.sugarlabs.desktop')
     188            settings.set_string('favorites-layout', layout)
    184189        del cp
    185190        try:
    186191            os.unlink(path)
     
    199204
    200205
    201206def get_nick_name():
    202     client = GConf.Client.get_default()
    203     return client.get_string('/desktop/sugar/user/nick')
     207    settings = Gio.Settings('org.sugarlabs.user')
     208    return settings.get_string('nick')
    204209
    205210
    206211def get_color():
    207     client = GConf.Client.get_default()
    208     color = client.get_string('/desktop/sugar/user/color')
     212    settings = Gio.Settings('org.sugarlabs.user')
     213    color = settings.get_string('color')
    209214    return XoColor(color)
    210215
    211216
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/uitree.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/profile.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/profile.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/profile.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/profile.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/discover.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/discover.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/discover.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/discover.pyo son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/__init__.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/__init__.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/__init__.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/__init__.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/uitree.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/uitree.py
    old new  
    4747                if e.code == Atspi.Error.IPC:
    4848                    continue
    4949
    50                 logging.error("GError code %d", e.code)
     50                logging.error("GError code %d" % e.code)
    5151                raise
    5252
    5353            expect_none = kwargs.get("expect_none", False)
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/unittest.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/uitree.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/uitree.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/uitree.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/uitree.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/unittest.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/unittest.py
    old new  
    2828
    2929from sugar3.test import uitree
    3030
     31import dbus
     32from dbus.mainloop.glib import DBusGMainLoop
     33DBusGMainLoop(set_as_default=True)
     34bus = dbus.SessionBus()
     35
    3136
    3237class UITestCase(unittest.TestCase):
     38
     39    def __init__(self, *args, **kwargs):
     40        super(UITestCase, self).__init__(*args, **kwargs)
     41        self.bundle_id = None
     42
    3343    def setUp(self):
    3444        logger = logging.getLogger()
    3545        self._orig_level = logger.getEffectiveLevel()
     
    4656
    4757        try:
    4858            yield
     59        except:
     60            logging.debug(uitree.get_root().dump())
     61            raise
     62        finally:
     63            process.terminate()
     64
     65    @contextmanager
     66    def run_activity(self):
     67        if self.bundle_id is not None:
     68            process = subprocess.Popen(["sugar-launch", self.bundle_id])
     69        else:
     70            print "No bundle_id specified."
     71            return
     72
     73        try:
     74            yield
    4975        except:
    5076            logging.debug(uitree.get_root().dump())
    5177            raise
  • .olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/util.py

    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/unittest.pyc y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/unittest.pyc son distintos
    Los ficheros binarios 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/unittest.pyo y 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/test/unittest.pyo son distintos
    diff -ru 0.100/sugar-toolkit-gtk3-0.99.4.git20131009-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/util.py 0.102/sugar-toolkit-gtk3-0.101-1.olpcau.x86_64/usr/lib/python2.7/site-packages/sugar3/util.py
    old new  
    307307        if path is None:
    308308            fd, path = tempfile.mkstemp()
    309309            os.close(fd)
    310         logging.debug('TempFilePath created %r', path)
     310        logging.debug('TempFilePath created %r' % path)
    311311
    312312        if path in _tracked_paths:
    313313            _tracked_paths[path] += 1
     
    322322
    323323            if os.path.exists(self):
    324324                os.unlink(self)
    325                 logging.debug('TempFilePath deleted %r', self)
     325                logging.debug('TempFilePath deleted %r' % self)
    326326            else:
    327                 logging.warning('TempFilePath already deleted %r', self)
     327                logging.warning('TempFilePath already deleted %r' % self)
    328328        else:
    329329            _tracked_paths[self] -= 1
    330330