def set_group_id(self, group_id): if self._group_id: group = palettegroup.get_group(self._group_id) group.remove(self) if group_id: self._group_id = group_id group = palettegroup.get_group(group_id) group.add(self)
def _deactivate_view(self, level): group = palettegroup.get_group('default') group.popdown() if level == ShellModel.ZOOM_HOME: self._home_box.suspend() elif level == ShellModel.ZOOM_MESH: self._mesh_box.suspend()
def __init__(self, **kwargs): PaletteWindow.__init__(self, **kwargs) self.set_border_width(0) self._has_focus = False group = palettegroup.get_group('default') group.connect('popdown', self.__group_popdown_cb) self.set_group_id('toolbarbox')
def _palette_do_popup(self): immediate = False if self.is_up(): self._popdown_anim.stop() return if self._group_id: group = palettegroup.get_group(self._group_id) if group and group.is_up(): immediate = True group.popdown() self.popup(immediate=immediate)
def __init__(self): logging.debug('STARTUP: Loading the frame') self.mode = None self._palette_group = palettegroup.get_group('frame') self._palette_group.connect('popdown', self._palette_group_popdown_cb) self._left_panel = None self._right_panel = None self._top_panel = None self._bottom_panel = None self.current_position = 0.0 self._animator = None self._event_area = EventArea() self._event_area.connect('enter', self._enter_corner_cb) self._event_area.show() self._top_panel = self._create_top_panel() self._bottom_panel = self._create_bottom_panel() self._left_panel = self._create_left_panel() self._right_panel = self._create_right_panel() screen = gtk.gdk.screen_get_default() screen.connect('size-changed', self._size_changed_cb) self._key_listener = _KeyListener(self) self._mouse_listener = _MouseListener(self) self._notif_by_icon = {} notification_service = notifications.get_service() notification_service.notification_received.connect( self.__notification_received_cb) notification_service.notification_cancelled.connect( self.__notification_cancelled_cb)
def _set_focus(self, new_focus): self._has_focus = new_focus if not self._has_focus: group = palettegroup.get_group('default') if not group.is_up(): self.popdown()