Opened 6 years ago

Closed 6 years ago

#7544 closed enhancement (fixed)

[sugar-toolkit] Add a "Publish" option to sugar profile

Reported by: gdesmott Owned by: marco
Priority: normal Milestone: 9.1.0-cancelled
Component: sugar Version: not specified
Keywords: r+ Cc:
Blocked By: Blocking:
Deployments affected: Action Needed: finalize
Verified: no

Description

This ticket is to track Gadget integration in sugar-toolkit.

See http://wiki.laptop.org/go/Gadget and related pages for more information about Gadget.

We need to add a "publish" option in the Jabber section of sugar's profile. If this option is set then PS will register to Gadget when connected.

Change History (13)

comment:2 Changed 6 years ago by marco

  • Action Needed changed from never set to review
  • Keywords r? added
  • Milestone changed from 8.2.0 (was Update.2) to 9.1.0

comment:3 Changed 6 years ago by gdesmott

Would be cool if a sugar dev could review this patch as I'd like to merge it at the beginning of the 9.1.0 cycle.

comment:4 Changed 6 years ago by gdesmott

This should be done using gconf now. This branch add a the needed key: https://dev.laptop.org/git?p=users/guillaume/sugar;a=shortlog;h=7544

comment:5 Changed 6 years ago by gdesmott

The patch adding the gconf key was merged.
We still need to add code using it before closing this bug.

comment:6 follow-up: Changed 6 years ago by gdesmott

https://dev.laptop.org/git?p=users/guillaume/sugar;a=shortlog;h=7544 has been updated and now publish information to Gadget when discovered if needed.

comment:7 in reply to: ↑ 6 Changed 6 years ago by gdesmott

Replying to gdesmott:

https://dev.laptop.org/git?p=users/guillaume/sugar;a=shortlog;h=7544 has been updated and now publish information to Gadget when discovered if needed.

reviewed by Simon and merged.

The last part is to watch the gconf key and call Publish when it's changed. But I can't do that now as sugar-control-panel is broken.

comment:8 Changed 6 years ago by gdesmott

  • spec_reviewed set to 0
  • spec_stage set to unknown

I added a gconf watcher but for some reason, the callback is not called when the key is changed. Help welcome.
https://dev.laptop.org/git?p=users/guillaume/sugar;a=shortlog;h=7544

comment:9 Changed 6 years ago by erikos

self.gconf_client.add_dir('/desktop/sugar/user', gconf.CLIENT_PRELOAD_NONE)

the directory you want to preload is '/desktop/sugar/collaboration/'

comment:10 Changed 6 years ago by gdesmott

Of course, I'm an idiot. Sorry.

I fixed my branch which is now working.

comment:11 Changed 6 years ago by erikos

  • Keywords r+ added; r? removed

Looks good. You don't need to cache default client - it is cached in the lib - the API is not nice that you have to request the client first when interacting. Anyhow if you cache it please make it private -> self._gconf_client.

comment:12 Changed 6 years ago by gdesmott

I removed the cache.

comment:13 Changed 6 years ago by gdesmott

  • Action Needed changed from review to finalize
  • Resolution set to fixed
  • Status changed from new to closed

Thanks for the review. Merged to master.

Note: See TracTickets for help on using tickets.