Пример #1
0
def mcomix_icons():
    """ Returns a list of differently sized pixbufs for the
    application icon. """

    sizes = ('16x16', '32x32', '48x48')
    pixbufs = [
        image_tools.load_pixbuf_data(
            tools.read_binary('images', size, 'mcomix.png')) for size in sizes
    ]

    return pixbufs
Пример #2
0
def mcomix_icons():
    """ Returns a list of differently sized pixbufs for the
    application icon. """

    sizes = ('16x16', '32x32', '48x48')
    pixbufs = [
        image_tools.load_pixbuf_data(
            resource_string('mcomix.images', size + '/mcomix.png'))
        for size in sizes
    ]

    return pixbufs
Пример #3
0
def mcomix_icons():
    """ Returns a list of differently sized pixbufs for the
    application icon. """

    sizes = ('16x16', '32x32', '48x48')
    pixbufs = [
        image_tools.load_pixbuf_data(
            resource_string('mcomix.images', size + '/mcomix.png')
        ) for size in sizes
    ]

    return pixbufs
Пример #4
0
def load_icons():
    _icons = (('gimp-flip-horizontal.png',
               'mcomix-flip-horizontal'), ('gimp-flip-vertical.png',
                                           'mcomix-flip-vertical'),
              ('gimp-rotate-180.png',
               'mcomix-rotate-180'), ('gimp-rotate-270.png',
                                      'mcomix-rotate-270'),
              ('gimp-rotate-90.png',
               'mcomix-rotate-90'), ('gimp-thumbnails.png',
                                     'mcomix-thumbnails'),
              ('gimp-transform.png',
               'mcomix-transform'), ('tango-enhance-image.png',
                                     'mcomix-enhance-image'),
              ('tango-add-bookmark.png',
               'mcomix-add-bookmark'), ('tango-archive.png', 'mcomix-archive'),
              ('tango-image.png', 'mcomix-image'), ('library.png',
                                                    'mcomix-library'),
              ('comments.png', 'mcomix-comments'), ('zoom.png', 'mcomix-zoom'),
              ('lens.png', 'mcomix-lens'), ('double-page.png',
                                            'mcomix-double-page'),
              ('manga.png', 'mcomix-manga'), ('fitbest.png', 'mcomix-fitbest'),
              ('fitwidth.png',
               'mcomix-fitwidth'), ('fitheight.png',
                                    'mcomix-fitheight'), ('fitmanual.png',
                                                          'mcomix-fitmanual'),
              ('goto-first-page.png',
               'mcomix-goto-first-page'), ('goto-last-page.png',
                                           'mcomix-goto-last-page'),
              ('next-page.png', 'mcomix-next-page'), ('previous-page.png',
                                                      'mcomix-previous-page'),
              ('next-archive.png',
               'mcomix-next-archive'), ('previous-archive.png',
                                        'mcomix-previous-archive'),
              ('next-directory.png',
               'mcomix-next-directory'), ('previous-directory.png',
                                          'mcomix-previous-directory'))

    # Load window title icons.
    pixbufs = mcomix_icons()
    gtk.window_set_default_icon_list(*pixbufs)
    # Load application icons.
    factory = gtk.IconFactory()
    for filename, stockid in _icons:
        try:
            icon_data = resource_string('mcomix.images', filename)
            pixbuf = image_tools.load_pixbuf_data(icon_data)
            iconset = gtk.IconSet(pixbuf)
            factory.add(stockid, iconset)
        except Exception:
            log.warning(_('! Could not load icon "%s"'), filename)
    factory.add_default()
Пример #5
0
    def __init__(self, window):
        super(_AboutDialog, self).__init__()
        self.set_transient_for(window)

        self.set_name(constants.APPNAME)
        self.set_program_name(constants.APPNAME)
        self.set_version(constants.VERSION)
        self.set_website('https://sourceforge.net/p/mcomix/wiki/')
        self.set_copyright('Copyright © 2005-2016')

        icon_data = tools.read_binary('images', 'mcomix.png')
        pixbuf = image_tools.load_pixbuf_data(icon_data)
        self.set_logo(pixbuf)

        comment = \
            _('%s is an image viewer specifically designed to handle comic books.') % \
            constants.APPNAME + ' ' + \
            _('It reads ZIP, RAR and tar archives, as well as plain image files.')
        self.set_comments(comment)

        license = \
            _('%s is licensed under the terms of the GNU General Public License.') % constants.APPNAME + \
            ' ' + \
            _('A copy of this license can be obtained from %s') % \
            'http://www.gnu.org/licenses/gpl-2.0.html'
        self.set_wrap_license(True)
        self.set_license(license)

        authors = [
            '%s: %s' % (name, description)
            for name, description in strings.AUTHORS
        ]
        self.set_authors(authors)

        translators = [
            '%s: %s' % (name, description)
            for name, description in strings.TRANSLATORS
        ]
        self.set_translator_credits('\n'.join(translators))

        artists = [
            '%s: %s' % (name, description)
            for name, description in strings.ARTISTS
        ]
        self.set_artists(artists)

        self.connect('activate-link', self._on_activate_link)

        self.show_all()
Пример #6
0
    def __init__(self, window):
        gtk.AboutDialog.__init__(self)

        self.set_name(constants.APPNAME)
        self.set_program_name(constants.APPNAME)
        self.set_version(constants.VERSION)
        self.set_website('http://mcomix.sourceforge.net')
        self.set_copyright('Copyright © 2005-2012')

        icon_data = pkg_resources.resource_string('mcomix.images',
                                                  'mcomix.png')
        pixbuf = image_tools.load_pixbuf_data(icon_data)
        self.set_logo(pixbuf)

        comment = \
            _('%s is an image viewer specifically designed to handle comic books.') % \
            constants.APPNAME + u' ' + \
            _('It reads ZIP, RAR and tar archives, as well as plain image files.')
        self.set_comments(comment)

        license = \
            _('%s is licensed under the terms of the GNU General Public License.') % constants.APPNAME + \
            ' ' + \
            _('A copy of this license can be obtained from %s') % \
            'http://www.gnu.org/licenses/gpl-2.0.html'
        self.set_wrap_license(True)
        self.set_license(license)

        authors = [
            u'%s: %s' % (name, description)
            for name, description in strings.AUTHORS
        ]
        self.set_authors(authors)

        translators = [
            u'%s: %s' % (name, description)
            for name, description in strings.TRANSLATORS
        ]
        self.set_translator_credits("\n".join(translators))

        artists = [
            u'%s: %s' % (name, description)
            for name, description in strings.ARTISTS
        ]
        self.set_artists(artists)

        self.show_all()
Пример #7
0
def load_icons():
    _icons = (('gimp-flip-horizontal.png',   'mcomix-flip-horizontal'),
              ('gimp-flip-vertical.png',     'mcomix-flip-vertical'),
              ('gimp-rotate-180.png',        'mcomix-rotate-180'),
              ('gimp-rotate-270.png',        'mcomix-rotate-270'),
              ('gimp-rotate-90.png',         'mcomix-rotate-90'),
              ('gimp-thumbnails.png',        'mcomix-thumbnails'),
              ('gimp-transform.png',         'mcomix-transform'),
              ('tango-enhance-image.png',    'mcomix-enhance-image'),
              ('tango-add-bookmark.png',     'mcomix-add-bookmark'),
              ('tango-archive.png',          'mcomix-archive'),
              ('tango-image.png',            'mcomix-image'),
              ('library.png',                'mcomix-library'),
              ('comments.png',               'mcomix-comments'),
              ('zoom.png',                   'mcomix-zoom'),
              ('lens.png',                   'mcomix-lens'),
              ('double-page.png',            'mcomix-double-page'),
              ('manga.png',                  'mcomix-manga'),
              ('fitbest.png',                'mcomix-fitbest'),
              ('fitwidth.png',               'mcomix-fitwidth'),
              ('fitheight.png',              'mcomix-fitheight'),
              ('fitmanual.png',              'mcomix-fitmanual'),
              ('goto-first-page.png',        'mcomix-goto-first-page'),
              ('goto-last-page.png',         'mcomix-goto-last-page'),
              ('next-page.png',              'mcomix-next-page'),
              ('previous-page.png',          'mcomix-previous-page'),
              ('next-archive.png',           'mcomix-next-archive'),
              ('previous-archive.png',       'mcomix-previous-archive'),
              ('next-directory.png',         'mcomix-next-directory'),
              ('previous-directory.png',     'mcomix-previous-directory'))

    # Load window title icons.
    pixbufs = mcomix_icons()
    gtk.window_set_default_icon_list(*pixbufs)
    # Load application icons.
    factory = gtk.IconFactory()
    for filename, stockid in _icons:
        try:
            icon_data = resource_string('mcomix.images', filename)
            pixbuf = image_tools.load_pixbuf_data(icon_data)
            iconset = gtk.IconSet(pixbuf)
            factory.add(stockid, iconset)
        except Exception:
            log.warning(_('! Could not load icon "%s"'), filename)
    factory.add_default()
Пример #8
0
def load_icons():
    _icons = (('gimp-flip-horizontal.png',
               'mcomix-flip-horizontal'), ('gimp-flip-vertical.png',
                                           'mcomix-flip-vertical'),
              ('gimp-rotate-180.png',
               'mcomix-rotate-180'), ('gimp-rotate-270.png',
                                      'mcomix-rotate-270'),
              ('gimp-rotate-90.png',
               'mcomix-rotate-90'), ('gimp-thumbnails.png',
                                     'mcomix-thumbnails'),
              ('gimp-transform.png',
               'mcomix-transform'), ('tango-enhance-image.png',
                                     'mcomix-enhance-image'),
              ('tango-add-bookmark.png',
               'mcomix-add-bookmark'), ('tango-archive.png', 'mcomix-archive'),
              ('tango-image.png', 'mcomix-image'), ('library.png',
                                                    'mcomix-library'),
              ('comments.png', 'mcomix-comments'), ('zoom.png', 'mcomix-zoom'),
              ('lens.png', 'mcomix-lens'), ('double-page.png',
                                            'mcomix-double-page'),
              ('manga.png', 'mcomix-manga'), ('fitbest.png', 'mcomix-fitbest'),
              ('fitwidth.png', 'mcomix-fitwidth'), ('fitheight.png',
                                                    'mcomix-fitheight'),
              ('fitmanual.png', 'mcomix-fitmanual'), ('fitsize.png',
                                                      'mcomix-fitsize'))

    # Load window title icons.
    pixbufs = mcomix_icons()
    Gtk.Window.set_default_icon_list(pixbufs)
    # Load application icons.
    factory = Gtk.IconFactory()
    for filename, stockid in _icons:
        try:
            icon_data = tools.read_binary('images', filename)
            pixbuf = image_tools.load_pixbuf_data(icon_data)
            iconset = Gtk.IconSet.new_from_pixbuf(pixbuf)
            factory.add(stockid, iconset)
        except Exception:
            log.warning(_('! Could not load icon "%s"'), filename)
    factory.add_default()
Пример #9
0
    def __init__(self, window):
        gtk.AboutDialog.__init__(self)

        self.set_name(constants.APPNAME)
        self.set_program_name(constants.APPNAME)
        self.set_version(constants.VERSION)
        self.set_website("https://sourceforge.net/p/mcomix/wiki/")
        self.set_copyright("Copyright © 2005-2013")

        icon_data = pkg_resources.resource_string("mcomix.images", "mcomix.png")
        pixbuf = image_tools.load_pixbuf_data(icon_data)
        self.set_logo(pixbuf)

        comment = (
            _("%s is an image viewer specifically designed to handle comic books.") % constants.APPNAME
            + u" "
            + _("It reads ZIP, RAR and tar archives, as well as plain image files.")
        )
        self.set_comments(comment)

        license = (
            _("%s is licensed under the terms of the GNU General Public License.") % constants.APPNAME
            + " "
            + _("A copy of this license can be obtained from %s") % "http://www.gnu.org/licenses/gpl-2.0.html"
        )
        self.set_wrap_license(True)
        self.set_license(license)

        authors = [u"%s: %s" % (name, description) for name, description in strings.AUTHORS]
        self.set_authors(authors)

        translators = [u"%s: %s" % (name, description) for name, description in strings.TRANSLATORS]
        self.set_translator_credits("\n".join(translators))

        artists = [u"%s: %s" % (name, description) for name, description in strings.ARTISTS]
        self.set_artists(artists)

        self.show_all()
Пример #10
0
    def __init__(self, window):
        super(_AboutDialog, self).__init__()
        self.set_transient_for(window)

        self.set_logo(
            image_tools.load_pixbuf_data(
                tools.read_binary('images', 'mcomix.png')))
        self.set_name(FORK_NAME)
        self.set_program_name(FORK_NAME)
        self.set_version(constants.VERSION)

        self.set_comments(COMMENT)
        self.set_website(FORK_URI)

        self.set_copyright(f'Copyright © {Y_START}-{Y_CURRENT}')
        self.set_license_type(LICENSE)

        self.set_authors([f'{name}: {desc}' for name, desc in strings.AUTHORS])
        self.set_translator_credits('\n'.join(
            f'{name}: {desc}' for name, desc in strings.TRANSLATORS))
        self.set_artists([f'{name}: {desc}' for name, desc in strings.ARTISTS])

        self.show_all()