| ... |
... |
@@ -88,7 +88,10 @@ def __init__(self, account, contact, page=None): |
|
88
|
88
|
side_bar_switcher.hide_row('settings')
|
|
89
|
89
|
side_bar_switcher.hide_row('groups')
|
|
90
|
90
|
side_bar_switcher.hide_row('notes')
|
|
91
|
|
- if not contact.is_pm_contact:
|
|
|
91
|
+ if contact.is_pm_contact:
|
|
|
92
|
+ if contact.real_jid is None:
|
|
|
93
|
+ side_bar_switcher.hide_row('devices')
|
|
|
94
|
+ else:
|
|
92
|
95
|
side_bar_switcher.hide_row('devices')
|
|
93
|
96
|
|
|
94
|
97
|
if page is not None:
|
| ... |
... |
@@ -110,8 +113,19 @@ def __init__(self, account, contact, page=None): |
|
110
|
113
|
self._ui.contact_jid_label.set_text(str(contact.jid))
|
|
111
|
114
|
self._ui.contact_jid_label.set_tooltip_text(str(contact.jid))
|
|
112
|
115
|
|
|
|
116
|
+ self._update_timeout_id = None
|
|
|
117
|
+ self._time = 0
|
|
|
118
|
+ self._devices = {}
|
|
|
119
|
+ self._received_devices = set()
|
|
|
120
|
+ self._received_times = set()
|
|
|
121
|
+
|
|
113
|
122
|
if contact.is_pm_contact:
|
|
114
|
123
|
if contact.real_jid is not None:
|
|
|
124
|
+ self._devices_grid = DevicesGrid(self._ui.devices_grid)
|
|
|
125
|
+ self._query_devices()
|
|
|
126
|
+ self._update_timeout_id = GLib.timeout_add(
|
|
|
127
|
+ 100, self._update_timer)
|
|
|
128
|
+
|
|
115
|
129
|
self._ui.contact_jid_label.set_text(
|
|
116
|
130
|
str(contact.real_jid.bare))
|
|
117
|
131
|
self._ui.contact_jid_label.set_tooltip_text(
|
| ... |
... |
@@ -127,15 +141,9 @@ def __init__(self, account, contact, page=None): |
|
127
|
141
|
jid=contact.jid,
|
|
128
|
142
|
callback=self._on_vcard_received)
|
|
129
|
143
|
|
|
130
|
|
- self._update_timeout_id = None
|
|
131
|
144
|
if contact.is_in_roster:
|
|
132
|
|
- self._devices = {}
|
|
133
|
|
- self._received_devices = set()
|
|
134
|
|
- self._received_times = set()
|
|
135
|
145
|
self._devices_grid = DevicesGrid(self._ui.devices_grid)
|
|
136
|
146
|
self._query_devices()
|
|
137
|
|
-
|
|
138
|
|
- self._time = 0
|
|
139
|
147
|
self._update_timeout_id = GLib.timeout_add(100, self._update_timer)
|
|
140
|
148
|
|
|
141
|
149
|
if contact.is_in_roster:
|
| ... |
... |
@@ -239,12 +247,16 @@ def _query_device(self, contact): |
|
239
|
247
|
}
|
|
240
|
248
|
self._rebuild_devices_grid()
|
|
241
|
249
|
|
|
|
250
|
+ jid = contact.jid
|
|
|
251
|
+ if contact.is_pm_contact and contact.real_jid is not None:
|
|
|
252
|
+ jid = contact.real_jid
|
|
|
253
|
+
|
|
242
|
254
|
task = self._client.get_module('SoftwareVersion').request_software_version(
|
|
243
|
|
- contact.jid, callback=self._set_os_info, user_data=contact)
|
|
|
255
|
+ jid, callback=self._set_os_info, user_data=contact)
|
|
244
|
256
|
self._tasks.append(task)
|
|
245
|
257
|
|
|
246
|
258
|
task = self._client.get_module('EntityTime').request_entity_time(
|
|
247
|
|
- contact.jid, callback=self._set_entity_time, user_data=contact)
|
|
|
259
|
+ jid, callback=self._set_entity_time, user_data=contact)
|
|
248
|
260
|
self._tasks.append(task)
|
|
249
|
261
|
|
|
250
|
262
|
def _set_os_info(self, task):
|