def __init__(self): layout = SpreadLayout() # Round off icon size to an even number to ensure that the icon self._owner_icon = BuddyIcon(buddy=get_owner_instance(), pixel_size=style.XLARGE_ICON_SIZE & ~1) ViewContainer.__init__(self, layout, self._owner_icon) self._animator = animator.Animator(0.3) self._animator.connect('completed', self._animation_completed_cb)
def __init__(self): layout = SpreadLayout() # Round off icon size to an even number to ensure that the icon owner = get_owner_instance() self._owner_icon = Icon(icon_name='computer-xo', xo_color=owner.get_color(), pixel_size=style.XLARGE_ICON_SIZE & ~1) ViewContainer.__init__(self, layout, self._owner_icon) self._animator = animator.Animator(0.3, widget=self) self._animator.connect('completed', self._animation_completed_cb)
def __init__(self, toolbar): logging.debug('STARTUP: Loading the mesh view') layout = SpreadLayout() # Round off icon size to an even number to ensure that the icon owner_icon = BuddyIcon(get_owner_instance(), style.STANDARD_ICON_SIZE & ~1) ViewContainer.__init__(self, layout, owner_icon) self.set_can_focus(False) self.wireless_networks = {} self._adhoc_manager = None self._adhoc_networks = [] self._model = neighborhood.get_model() self._buddies = {} self._activities = {} self._mesh = [] self._buddy_to_activity = {} self._suspended = True self._query = '' toolbar.connect('query-changed', self._toolbar_query_changed_cb) toolbar.search_entry.connect('icon-press', self.__clear_icon_pressed_cb) for buddy_model in self._model.get_buddies(): self._add_buddy(buddy_model) self._model.connect('buddy-added', self._buddy_added_cb) self._model.connect('buddy-removed', self._buddy_removed_cb) for activity_model in self._model.get_activities(): self._add_activity(activity_model) self._model.connect('activity-added', self._activity_added_cb) self._model.connect('activity-removed', self._activity_removed_cb) netmgr_observer = NetworkManagerObserver(self) netmgr_observer.listen()
def __init__(self, toolbar): logging.debug('STARTUP: Loading the group view') layout = SpreadLayout() # Round off icon size to an even number to ensure that the icon owner_icon = BuddyIcon(get_owner_instance(), style.LARGE_ICON_SIZE & ~1) ViewContainer.__init__(self, layout, owner_icon) self._query = '' toolbar.connect('query-changed', self._toolbar_query_changed_cb) toolbar.search_entry.connect('icon-press', self.__clear_icon_pressed_cb) self._friends = {} friends_model = friends.get_model() for friend in friends_model: self.add_friend(friend) friends_model.connect('friend-added', self._friend_added_cb) friends_model.connect('friend-removed', self._friend_removed_cb)