def __init__(self, activity, **kwargs): palette = RadioPalette() self.private = RadioToolButton(icon_name='zoom-home') palette.append(self.private, _('Private')) self.neighborhood = RadioToolButton(icon_name='zoom-neighborhood', group=self.private) self._neighborhood_handle = self.neighborhood.connect( 'clicked', self.__neighborhood_clicked_cb, activity) palette.append(self.neighborhood, _('My Neighborhood')) activity.connect('shared', self.__update_share_cb) activity.connect('joined', self.__update_share_cb) RadioMenuButton.__init__(self, **kwargs) self.props.palette = palette if activity.max_participants == 1: self.props.sensitive = False
def __init__(self, activity, **kwargs): palette = RadioPalette() self.private = RadioToolButton( icon_name='zoom-home') palette.append(self.private, _('Private')) self.neighborhood = RadioToolButton( icon_name='zoom-neighborhood', group=self.private) self._neighborhood_handle = self.neighborhood.connect( 'clicked', self.__neighborhood_clicked_cb, activity) palette.append(self.neighborhood, _('My Neighborhood')) activity.connect('shared', self.__update_share_cb) activity.connect('joined', self.__update_share_cb) RadioMenuButton.__init__(self, **kwargs) self.props.palette = palette if activity.max_participants == 1: self.props.sensitive = False