def __init__(self, mount):
        self._mount = mount
        mount_point = mount.get_root().get_path()
        BaseButton.__init__(self, mount_point)

        self.props.icon_name = get_mount_icon_name(mount, Gtk.IconSize.LARGE_TOOLBAR)
        # TODO: retrieve the colors from the owner of the device
        self.props.xo_color = get_mount_color(self._mount)
Exemple #2
0
    def __init__(self, mount):
        self._mount = mount
        mount_point = mount.get_root().get_path()
        BaseButton.__init__(self, mount_point)

        self.props.icon_name = get_mount_icon_name(mount,
                                                   Gtk.IconSize.LARGE_TOOLBAR)
        # TODO: retrieve the colors from the owner of the device
        self.props.xo_color = get_mount_color(self._mount)
Exemple #3
0
    def __init__(self, mount):

        self._mount = mount
        self._icon_name = get_mount_icon_name(mount,
                                              Gtk.IconSize.LARGE_TOOLBAR)
        # TODO: retrieve the colors from the owner of the device
        color = get_mount_color(self._mount)

        TrayIcon.__init__(self, icon_name=self._icon_name, xo_color=color)

        self.set_palette_invoker(FrameWidgetInvoker(self))
        self.palette_invoker.props.toggle_palette = True
Exemple #4
0
    def __init__(self, mount):

        self._mount = mount
        self._icon_name = get_mount_icon_name(mount,
                                              Gtk.IconSize.LARGE_TOOLBAR)
        # TODO: retrieve the colors from the owner of the device
        color = get_mount_color(self._mount)

        TrayIcon.__init__(self, icon_name=self._icon_name, xo_color=color)

        self.set_palette_invoker(FrameWidgetInvoker(self))
        self.palette_invoker.props.toggle_palette = True
Exemple #5
0
    def create_palette(self):
        palette = VolumePalette(self._mount)
        palette.set_group_id('frame')

        menu_item = PaletteMenuItem(_('Show contents'))
        color = get_mount_color(self._mount)
        icon = Icon(icon_name=self._icon_name,
                    pixel_size=style.SMALL_ICON_SIZE,
                    xo_color=color)
        menu_item.set_image(icon)
        icon.show()

        menu_item.connect('activate', self.__show_contents_cb)
        palette.content_box.pack_start(menu_item, True, True, 0)
        palette.content_box.reorder_child(menu_item, 0)
        menu_item.show()

        return palette
Exemple #6
0
    def create_palette(self):
        palette = VolumePalette(self._mount)
        palette.set_group_id('frame')

        menu_item = PaletteMenuItem(_('Show contents'))
        color = get_mount_color(self._mount)
        icon = Icon(icon_name=self._icon_name,
                    pixel_size=style.SMALL_ICON_SIZE,
                    xo_color=color)
        menu_item.set_image(icon)
        icon.show()

        menu_item.connect('activate', self.__show_contents_cb)
        palette.content_box.pack_start(menu_item, True, True, 0)
        palette.content_box.reorder_child(menu_item, 0)
        menu_item.show()

        return palette
Exemple #7
0
    def _add_mount(self, mount):
        mount_path = mount.get_root().get_path()
        if mount_path in self._volumes:
            return
        if self._journalactivity.get_mount_point() == mount_path:
            return
        volume_menu = VolumeMenu(self._journalactivity, self._get_uid_list_cb,
                                 mount.get_name(),
                                 mount.get_root().get_path())
        icon_name = misc.get_mount_icon_name(mount, Gtk.IconSize.MENU)
        icon = Icon(pixel_size=style.SMALL_ICON_SIZE,
                    icon_name=icon_name,
                    xo_color=get_mount_color(mount))

        volume_menu.set_image(icon)
        volume_menu.connect('volume-error', self.__volume_error_cb)
        self._menu.append(volume_menu)
        self._volumes[mount.get_root().get_path()] = volume_menu
        volume_menu.show()
Exemple #8
0
    def _add_mount(self, mount):
        mount_path = mount.get_root().get_path()
        if mount_path in self._volumes:
            return
        if self._journalactivity.get_mount_point() == mount_path:
            return
        volume_menu = VolumeMenu(self._journalactivity,
                                 self._get_uid_list_cb, mount.get_name(),
                                 mount.get_root().get_path())
        icon_name = misc.get_mount_icon_name(mount, Gtk.IconSize.MENU)
        icon = Icon(pixel_size=style.SMALL_ICON_SIZE,
                    icon_name=icon_name,
                    xo_color=get_mount_color(mount))

        volume_menu.set_image(icon)
        volume_menu.connect('volume-error', self.__volume_error_cb)
        self._menu.append(volume_menu)
        self._volumes[mount.get_root().get_path()] = volume_menu
        volume_menu.show()