Exemplo n.º 1
0
    def copy_image(self, *args):
        ''' Copies the current image to clipboard. '''

        if self._window.filehandler.file_loaded:
            # Get pixbuf for current page
            current_page_pixbufs = self._window.imagehandler.get_pixbufs(
                2 if self._window.displayed_double() else
                1)  # XXX limited to at most 2 pages

            if len(current_page_pixbufs) == 1:
                pixbuf = current_page_pixbufs[0]
            else:
                pixbuf = image_tools.combine_pixbufs(
                    current_page_pixbufs[0], current_page_pixbufs[1],
                    self._window.is_manga_mode)

            self._clipboard.set_image(pixbuf)
Exemplo n.º 2
0
    def copy_page(self, *args):
        """ Copies the currently opened page and pixbuf to clipboard. """

        if self._window.filehandler.file_loaded:
            # Get pixbuf for current page
            current_page_pixbufs = self._window.imagehandler.get_pixbufs()

            if len(current_page_pixbufs) == 1:
                pixbuf = current_page_pixbufs[0]
            else:
                pixbuf = image_tools.combine_pixbufs(
                    current_page_pixbufs[0], current_page_pixbufs[1],
                    self._window.is_manga_mode)

            # Get path for current page
            path = self._window.imagehandler.get_path_to_page()
            self.copy(path, pixbuf)
Exemplo n.º 3
0
    def copy_page(self, *args):
        """ Copies the currently opened page and pixbuf to clipboard. """

        if self._window.filehandler.file_loaded:
            # Get pixbuf for current page
            current_page_pixbufs = self._window.imagehandler.get_pixbufs()

            if len(current_page_pixbufs) == 1:
                pixbuf = current_page_pixbufs[ 0 ]
            else:
                pixbuf = image_tools.combine_pixbufs(
                        current_page_pixbufs[ 0 ],
                        current_page_pixbufs[ 1 ],
                        self._window.is_manga_mode )

            # Get path for current page
            path = self._window.imagehandler.get_path_to_page()
            self.copy(path, pixbuf)
Exemplo n.º 4
0
    def copy_page(self, *args):
        """ Copies the currently opened page and pixbuf to clipboard. """

        if self._window.filehandler.file_loaded:
            # Get pixbuf for current page
            current_page_pixbufs = self._window.imagehandler.get_pixbufs(
                2 if self._window.displayed_double() else
                1)  # XXX limited to at most 2 pages

            if len(current_page_pixbufs) == 1:
                pixbuf = current_page_pixbufs[0]
            else:
                pixbuf = image_tools.combine_pixbufs(
                    current_page_pixbufs[0], current_page_pixbufs[1],
                    self._window.is_manga_mode)

            path = self._window.imagehandler.get_path_to_page()
            self.copy(path, pixbuf)
Exemplo n.º 5
0
    def copy_page(self, *args):

        if self._window.filehandler.file_loaded:
            # Get pixbuf for current page
            current_page_pixbufs = self._window.imagehandler.get_pixbufs()

            if len(current_page_pixbufs) == 1:
                pixbuf = current_page_pixbufs[ 0 ]
            else:
                pixbuf = image_tools.combine_pixbufs(
                        current_page_pixbufs[ 0 ],
                        current_page_pixbufs[ 1 ],
                        self._window.is_manga_mode )

            # Get path for current page
            path = self._window.imagehandler.get_path_to_page()
            if sys.platform == 'win32':
                self._copy_windows(pixbuf, path)
            else:
                self._copy_linux(pixbuf, path.encode('utf-8'))