Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace TelepathyGLib operations with dbus operations #23

Merged
merged 1 commit into from
Jul 6, 2019
Merged

Replace TelepathyGLib operations with dbus operations #23

merged 1 commit into from
Jul 6, 2019

Conversation

Aniket21mathur
Copy link
Contributor

Fixes #22

@@ -772,6 +781,9 @@ def _get_buddy(self, cs_handle):
tp_name, tp_path = pservice.get_preferred_connection()
conn = TelepathyGLib.Connection.new(
TelepathyGLib.DBusDaemon.dup(), tp_name, tp_path)
conn = {}
conn_proxy = dbus.Bus().get_object(tp_name, tp_path)
conn = dbus.Interface(conn_proxy, TelepathyGLib.IFACE_CONNECTION)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is not like the other one; here, conn is replaced with the interface, but in line 291 conn is a dictionary to which the interface is added as a keyed value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I made it a dictionary before, but then gave a second thought on why use a dictionary if we don't need it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, if you want to do it that way; don't initialise the dictionary in line 784.

It's almost the same TextChannelWrapper as used in CollabWrapper. I don't like diverging these classes still further, if it can be avoided. Another answer would be "this is almost the way @quozl did it in https://github.com/sugarlabs/collabwrapper/pull/15/files". 😁

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, made the changes. Also forgot to remove the reference to TelepathyGLib operation did that too. 😅

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed, thanks

@quozl
Copy link
Contributor

quozl commented Jul 6, 2019

Tested; by sharing and invitation on Ubuntu 19.04. Pass.

@quozl quozl merged commit f65de2b into sugarlabs:master Jul 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Low priority; mixed TelepathyGLib and D-Bus API usage
3 participants