Codebase list sugar-toolkit-gtk3 / f5c86da
flake8 fixes (several remain to be fixed) James Cameron 4 years ago
1 changed file(s) with 22 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
201201 from gi.repository import SugarExt
202202
203203
204 def _(msg): return gettext.dgettext('sugar-toolkit-gtk3', msg)
204 def _(msg):
205 return gettext.dgettext('sugar-toolkit-gtk3', msg)
205206
206207
207208 SCOPE_PRIVATE = 'private'
287288 Initialise an Activity.
288289
289290 Args:
290 handle (:class:`~sugar3.activity.activityhandle.ActivityHandle`): instance providing the activity id and access to the presence service which *may* provide sharing for this application
291 create_jobject (boolean): DEPRECATED: define if it should create a journal object if we are not resuming. The parameter is ignored, and always will be created a object in the Journal.
291 handle (:class:`~sugar3.activity.activityhandle.ActivityHandle`):
292 instance providing the activity id and access to the presence
293 service which *may* provide sharing for this application
294
295 create_jobject (boolean):
296 DEPRECATED: define if it should create a journal object if
297 we are not resuming. The parameter is ignored, and always
298 will be created a object in the Journal.
292299
293300 **Signals:**
294 * **shared** - the activity has been shared on a network in order that other users may join,
295 * **joined** - the activity has joined with other instances of the activity to create a shared network activity.
301 * **shared** - the activity has been shared on a network in
302 order that other users may join,
303
304 * **joined** - the activity has joined with other instances of
305 the activity to create a shared network activity.
296306
297307 Side effects:
298308
299 * sets the gdk screen DPI setting (resolution) to the Sugar screen resolution.
309 * sets the gdk screen DPI setting (resolution) to the Sugar
310 screen resolution.
300311
301312 * connects our "destroy" message to our _destroy_cb method.
302313
10961107 '''
10971108 self._invites_queue.append((account_path, contact_id))
10981109
1099 if (self.shared_activity is None
1100 or not self.shared_activity.props.joined):
1110 if (self.shared_activity is None or
1111 not self.shared_activity.props.joined):
11011112 self.share(True)
11021113 else:
11031114 self._send_invites()
14721483 in_signature='ss', out_signature='v')
14731484 def Get(self, interface_name, property_name):
14741485 if interface_name in self._prop_getters \
1475 and property_name in self._prop_getters[interface_name]:
1486 and property_name in self._prop_getters[interface_name]:
14761487 return self._prop_getters[interface_name][property_name]()
14771488 else:
14781489 logging.debug('InvalidArgument')
14811492 in_signature='ssv', out_signature='')
14821493 def Set(self, interface_name, property_name, value):
14831494 if interface_name in self._prop_setters \
1484 and property_name in self._prop_setters[interface_name]:
1495 and property_name in self._prop_setters[interface_name]:
14851496 self._prop_setters[interface_name][property_name](value)
14861497 else:
14871498 logging.debug('PermissionDenied')
14961507 return r
14971508 else:
14981509 logging.debug('InvalidArgument')
1510
14991511
15001512 _session = None
15011513