about_dialog.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:Ebook-Viewer 作者: michaldaniel 项目源码 文件源码
def show_dialog(self):
        """
        Displays app about dialog
        """

        # TODO:  Migrate to custom About application dialog designed in line with elementary OS Human Interface Guidelines
        about_dialog = Gtk.AboutDialog()
        about_dialog.set_position(Gtk.WindowPosition.CENTER)

        software_license = _('''
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License
as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
''')

        authors = [_("Micha? Daniel (developer, maintainer)"),
                   _("Nguy?n Ng?c Thanh Hà (contributor)"),
                   _("Jens Persson (contributor)")]

        # Thank you for the beautiful icon.
        artists = [_("Christian da Silva (www.christianda.com)")]

        logo_pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(
            '/usr/share/easy-ebook-viewer/misc/easy-ebook-viewer-scalable.svg', 128, 128)

        about_dialog.set_logo(logo_pixbuf)
        about_dialog.set_program_name(_("Easy eBook Viewer"))
        about_dialog.set_version("1.0")
        about_dialog.set_authors(authors)
        about_dialog.set_website("https://github.com/michaldaniel/Ebook-Viewer")
        about_dialog.set_website_label(_("Browse code at Github"))
        about_dialog.set_artists(artists)
        _("[DON'T TRANSLATE] Replace name in \"Anonymous Translator ([replace] translation)\" with YOUR name and translation language!\n\nPS. python gettext makes it impossible to leave comments, I hope this works.")
        translator = _("Anonymous Translator ([replace] translation)")
        if translator != "Anonymous Translator ([replace] translation)":
            about_dialog.set_translator_credits(translator)

        about_dialog.set_license(software_license)
        about_dialog.set_comments(
            _("Easy eBook Viewer is a simple and moder ePub files reader written in Python using GTK3 and WebKit."))

        about_dialog.set_title(_("About Easy eBook Viewer"))

        about_dialog.show_all()
        about_dialog.run()
        about_dialog.destroy()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号