Etoys: Sugar-bf.10.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Etoys: Sugar-bf.10.mcz

commits-2
Bert Freudenberg uploaded a new version of Sugar to project Etoys:
http://source.squeak.org/etoys/Sugar-bf.10.mcz

==================== Summary ====================

Name: Sugar-bf.10
Author: bf
Time: 14 April 2011, 8:22:36 am
UUID: 1555626b-143f-4ea5-97ca-7da5bd18bf45
Ancestors: Sugar-bf.9

get user name and user colors from gconf if no presence service

=============== Diff against Sugar-bf.9 ===============

Item was added:
+ ----- Method: SugarLauncher>>gconfPropertiesAt: (in category 'gconf') -----
+ gconfPropertiesAt: aString
+ | dir |
+ "search up tree to guess home dir"
+ dir := Project squeakletDirectory.
+ [dir pathName = '/'] whileFalse: [
+ dir := dir containingDirectory.
+ [FileStream
+ readOnlyFileNamed: dir pathName, '/.gconf', aString, '/%gconf.xml'
+ do: [:f |
+ | props |
+ props := Dictionary new.
+ (XMLDOMParser parseDocumentFrom: f)
+ tagsNamed: #entry do: [:entry |
+ props at: (entry attributeAt: 'name')
+ put: entry elements first contentString].
+ ^props].
+ ] on: FileDoesNotExistException do: [:ignore | ].
+ ].
+ ^self error: 'cannot find gconf path ', aString!

Item was changed:
  ----- Method: SugarLauncher>>ownerBuddy (in category 'accessing') -----
  ownerBuddy
  self isRunningInSugar ifTrue: [
+ "try old Presense Service"
+ [^SugarBuddy fromDictionary: self presence getOwner getProperties ]
+ on: DBusError do: [:ex |
+ "fall back on newer GConf"
+ ^SugarBuddyOwner fromDictionary: (self gconfPropertiesAt: '/desktop/sugar/user')]].
- ^SugarBuddy fromDictionary: self presence getOwner getProperties].
  "fake"
  ^SugarBuddyOwner key: '1234' nick: Utilities authorName colors: '#ff0000,#ffff00' ip: '1.2.3.4'!

Item was changed:
  ----- Method: SugarLauncher>>startUp (in category 'running') -----
  startUp
  self class allInstances do: [:ea | ea shutDown].
 
  Current := self.
 
  SugarNavigatorBar current
  ifNotNilDo: [:bar | bar startUp].
 
  parameters at: 'ACTIVITY_ID' ifPresent: [ :activityId |
  OLPCVirtualScreen setupIfNeeded.
  World windowEventHandler: self.
  DBus sessionBus
  export: SugarEtoysActivity new
  on: 'org.laptop.Activity', activityId
  at: '/org/laptop/Activity/', activityId.
+ Utilities authorName: self ownerBuddy nick.
- Utilities authorName: self presence getOwner nick.
  ServerDirectory
  addServer: (SugarDatastoreDirectory mimetype: 'application/x-squeak-project' extension: '.pr')
  named: SugarLauncher defaultDatastoreDirName.
  self joinSharedActivity.
  self isShared ifFalse: [
  parameters at: 'OBJECT_ID' ifPresent: [:id |
  ^self resumeJournalEntry: id]].
  self isShared ifTrue: [^self].
  ^self welcome: (parameters at: 'URI' ifAbsent: [''])].
 
  self welcome: ''
 
  !

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev