def _set_effective_group_id(self, group_id):
     if self._group_id:
         group = palettegroup.get_group(self._group_id)
         group.remove(self)
     if group_id:
         group = palettegroup.get_group(group_id)
         group.add(self)
 def _set_effective_group_id(self, group_id):
     if self._group_id:
         group = palettegroup.get_group(self._group_id)
         group.remove(self)
     if group_id:
         group = palettegroup.get_group(group_id)
         group.add(self)
Beispiel #3
0
 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()
Beispiel #4
0
    def __init__(self):
        logging.debug('STARTUP: Loading the frame')

        self.settings = Gio.Settings('org.sugarlabs.frame')
        self._palette_group = palettegroup.get_group('frame')

        self._left_panel = None
        self._right_panel = None
        self._top_panel = None
        self._bottom_panel = None

        self._wanted = False
        self.current_position = 0.0
        self._animator = None

        self._event_area = EventArea(self.settings)
        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 = Gdk.Screen.get_default()
        screen.connect('size-changed', self._size_changed_cb)

        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)
Beispiel #5
0
    def __init__(self):
        logging.debug('STARTUP: Loading the frame')

        self._palette_group = palettegroup.get_group('frame')

        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 = Gdk.Screen.get_default()
        screen.connect('size-changed', self._size_changed_cb)

        self._key_listener = _KeyListener(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)
Beispiel #6
0
 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._has_focus = False

        group = palettegroup.get_group('default')
        group.connect('popdown', self.__group_popdown_cb)
        self.set_group_id('toolbarbox')

        self._widget = _PaletteWindowWidget()
        self._widget.set_border_width(0)
        self._setup_widget()

        self._widget.connect('realize', self._realize_cb)
    def __init__(self, **kwargs):
        PaletteWindow.__init__(self, **kwargs)
        self._has_focus = False

        group = palettegroup.get_group('default')
        group.connect('popdown', self.__group_popdown_cb)
        self.set_group_id('toolbarbox')

        self._widget = _PaletteWindowWidget()
        self._widget.set_border_width(0)
        self._setup_widget()

        self._widget.connect('realize', self._realize_cb)
    def __init__(self, **kwargs):
        PaletteWindow.__init__(self, **kwargs)
        self._has_focus = False

        group = palettegroup.get_group("default")
        group.connect("popdown", self.__group_popdown_cb)
        self.set_group_id("toolbarbox")

        self._widget = _PaletteWindowWidget()
        self._widget.set_border_width(0)
        self._setup_widget()

        self._widget.connect("realize", self._realize_cb)
    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 _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)
Beispiel #12
0
    def __init__(self):
        logging.debug('STARTUP: Loading the frame')

        self._palette_group = palettegroup.get_group('frame')

        self.navigation_queue = []
        self.navigation_position = 0
        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._right_panel = self._create_right_panel()
        self._bottom_panel = self._create_bottom_panel()
        self._left_panel = self._create_left_panel()

        screen = Gdk.Screen.get_default()
        screen.connect('size-changed', self._size_changed_cb)

        self._key_listener = _KeyListener(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()
 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()