本文整理汇总了Python中gi.repository.Gtk.AboutDialog方法的典型用法代码示例。如果您正苦于以下问题:Python Gtk.AboutDialog方法的具体用法?Python Gtk.AboutDialog怎么用?Python Gtk.AboutDialog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gi.repository.Gtk
的用法示例。
在下文中一共展示了Gtk.AboutDialog方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: about
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import AboutDialog [as 别名]
def about(self, *args):
dialog = Gtk.AboutDialog(transient_for=self)
dialog.set_logo_icon_name('io.github.ImEditor')
dialog.set_program_name('ImEditor')
dialog.set_version('0.9.4')
dialog.set_website('https://imeditor.github.io')
dialog.set_authors(['Nathan Seva', 'Hugo Posnic'])
gtk_version = '{}.{}.{}'.format(Gtk.get_major_version(),
Gtk.get_minor_version(), Gtk.get_micro_version())
comment = '{}\n\n'.format(_("Simple & versatile image editor"))
comment += 'Gtk: {} Pillow: {}'.format(gtk_version, pil_version)
dialog.set_comments(comment)
text = _("Distributed under the GNU GPL(v3) license.\n")
text += 'https://github.com/ImEditor/ImEditor/blob/master/LICENSE\n'
dialog.set_license(text)
dialog.run()
dialog.destroy()
示例2: show_about
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import AboutDialog [as 别名]
def show_about(self):
"""Bring about window to focus or create if it doesn't exist."""
try:
self._about_win.present()
except AttributeError:
self._about_win = Gtk.AboutDialog()
self._about_win.set_program_name(PROGRAM_NAME)
self._about_win.set_version(VERSION)
self._about_win.set_copyright(COPYRIGHT)
self._about_win.set_license_type(LICENSE)
self._about_win.set_comments(COMMENTS)
self._about_win.set_website(WEBSITE)
self._about_win.set_logo_icon_name("audio-volume-high")
self._about_win.run()
self._about_win.destroy()
del self._about_win
示例3: on_show_about
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import AboutDialog [as 别名]
def on_show_about(self, widget, data=None):
dlg = Gtk.AboutDialog()
dlg.set_name("AutoKey")
dlg.set_comments(_("A desktop automation utility for Linux and X11."))
dlg.set_version(common.VERSION)
p = Gtk.IconTheme.get_default().load_icon(common.ICON_FILE, 100, 0)
dlg.set_logo(p)
dlg.set_website(common.HOMEPAGE)
dlg.set_authors(["GuoCi (Python 3 port maintainer) <guociz@gmail.com>",
"Chris Dekter (Developer) <cdekter@gmail.com>",
"Sam Peterson (Original developer) <peabodyenator@gmail.com>"])
dlg.set_transient_for(self.ui)
dlg.run()
dlg.destroy()
# Tree widget
示例4: on_about
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import AboutDialog [as 别名]
def on_about(self, *args):
"""Action callback, showing the "about" dialog."""
about_dialog = Gtk.AboutDialog(transient_for=self.props.active_window,
copyright="© 2018-2020 Romain F. T.", authors=["Romain F. T."],
# To tranlators: "translate" this by your name, it will be displayed
# in the "about" dialog
translator_credits=_("translator-credits"),
# To translators: it's credits for the icons, consider that "Art
# Libre" is proper name
artists=["Tobias Bernard", "Romain F. T.",
_("GNOME's \"Art Libre\" icon set authors")],
comments=_("A drawing application for the GNOME desktop."),
license_type=Gtk.License.GPL_3_0,
logo_icon_name=APP_ID, version=str(self._version),
website='https://maoschanz.github.io/drawing/',
website_label=_("Official webpage"))
bug_report_btn = Gtk.LinkButton(halign=Gtk.Align.CENTER, visible=True, \
label=_("Report bugs or ideas"), uri=BUG_REPORT_URL)
# about_dialog.get_content_area().add(bug_report_btn) # should i?
about_dialog.run()
about_dialog.destroy()
示例5: on_about_activate
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import AboutDialog [as 别名]
def on_about_activate(self, widget, optional):
ad = Gtk.AboutDialog(comun.APPNAME, self.win)
ad.set_name(comun.APPNAME)
ad.set_version(comun.VERSION)
ad.set_copyright('Copyrignt (c) 2018-2019\nLorenzo Carbonell')
ad.set_comments(_('A minimal audio player for Linux'))
ad.set_license('''
MIT License
Copyright (c) 2012-2018 Lorenzo Carbonell Cerezo <a.k.a. atareao>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
''')
ad.set_website('http://www.atareao.es')
ad.set_website_label('http://www.atareao.es')
ad.set_authors([
'Lorenzo Carbonell <lorenzo.carbonell.cerezo@gmail.com>'])
ad.set_documenters([
'Lorenzo Carbonell <lorenzo.carbonell.cerezo@gmail.com>'])
ad.set_translator_credits('\
Lorenzo Carbonell <lorenzo.carbonell.cerezo@gmail.com>\n')
ad.set_program_name(comun.APPNAME)
ad.set_logo(GdkPixbuf.Pixbuf.new_from_file(comun.ICON))
ad.run()
ad.destroy()
示例6: __init__
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import AboutDialog [as 别名]
def __init__(self):
Gtk.AboutDialog.__init__(self)
self.set_modal(True)
self._setup_widget()
示例7: get_about_dialog
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import AboutDialog [as 别名]
def get_about_dialog(self):
"""Create and populate the about dialog."""
about_dialog = Gtk.AboutDialog()
about_dialog.set_name(comun.APPNAME)
about_dialog.set_version(comun.VERSION)
about_dialog.set_copyright(
'Copyrignt (c) 2014-2016\nLorenzo Carbonell Cerezo')
about_dialog.set_comments(_('An indicator for Pomodoro Technique'))
about_dialog.set_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/>.
''')
about_dialog.set_website('http://www.atareao.es')
about_dialog.set_website_label('http://www.atareao.es')
about_dialog.set_authors([
'Lorenzo Carbonell <https://launchpad.net/~lorenzo-carbonell>'])
about_dialog.set_documenters([
'Lorenzo Carbonell <https://launchpad.net/~lorenzo-carbonell>'])
about_dialog.set_translator_credits('''
Lorenzo Carbonell <https://launchpad.net/~lorenzo-carbonell>\n
''')
about_dialog.set_icon(GdkPixbuf.Pixbuf.new_from_file(comun.ICON))
about_dialog.set_logo(GdkPixbuf.Pixbuf.new_from_file(comun.ICON))
about_dialog.set_program_name(comun.APPNAME)
return about_dialog
# ##################### callbacks for the menu #######################
示例8: __init__
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import AboutDialog [as 别名]
def __init__(self):
authors = [
'Maksudur Rahman Maateen <https://maateen.me/>',
'Safwan Rahman <https://github.com/safwanrahman>',
'Abdelhak BOUGOUFFA <https://abougouffa.github.io/>'
]
documenters = [
'Maksudur Rahman Maateen <https://maateen.me/>',
]
# initiaing about dialog and params
self.about_dialog = Gtk.AboutDialog()
self.about_dialog.set_program_name('Battery Monitor')
self.about_dialog.set_version('v0.6')
self.about_dialog.set_copyright('Copyright \xa9 2016-2018 Maksudur Rahman Maateen')
self.about_dialog.set_website_label('Official Website')
self.about_dialog.set_website('http://battery-monitor.maateen.me/')
self.about_dialog.set_comments('Battery Monitor is a utility tool developed on Python3 and PyGtk3. It will notify the user about charging, discharging, not charging and critically low battery state of the battery on Linux (surely if the battery is present).')
self.about_dialog.set_license_type (Gtk.License.GPL_3_0,)
self.about_dialog.set_default_icon_from_file(ICONS['app'])
self.about_dialog.set_logo(GdkPixbuf.Pixbuf.new_from_file_at_size(ICONS['app'], 64, 64))
self.about_dialog.set_authors(authors)
self.about_dialog.set_documenters(documenters)
self.about_dialog.add_credit_section('AUR maintained by', ['Yochanan Marqos <https://github.com/yochananmarqos>'])
self.about_dialog.set_title('About Battery Monitor')
self.about_dialog.connect('response', self.__close)
示例9: __init__
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import AboutDialog [as 别名]
def __init__(self, transient_for):
Gtk.AboutDialog.__init__(self, transient_for=transient_for)
self.set_program_name(shared.__program_name__)
self.set_version(shared.__version__)
self.set_comments(shared.__program_desc__)
self.set_website(shared.__website__)
self.set_website_label(shared.__website_label__)
self.set_authors(shared.__authors__)
logo = GdkPixbuf.Pixbuf.new_from_file_at_size(tools.get_full_path('icons/logo.png'), 64, 64)
self.set_logo(logo)
self.connect('response', lambda dialog, response: self.destroy())
示例10: show_about_dialog
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import AboutDialog [as 别名]
def show_about_dialog(self, widget):
'''Show message About info'''
about_dialog = Gtk.AboutDialog()
about_dialog.set_destroy_with_parent(True)
about_dialog.set_name('SUN - About')
about_dialog.set_icon_from_file(self.sun_icon)
about_dialog.set_program_name('SUN')
about_dialog.set_version(__version__)
about_dialog.set_authors([f'{__author__} <{__email__}>'])
about_dialog.set_license('\n'.join(lic))
about_dialog.set_website(__website__)
about_dialog.set_logo(Pixbuf.new_from_file(self.sun_icon))
about_dialog.set_comments(abt)
about_dialog.run()
about_dialog.destroy()
示例11: menu_about
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import AboutDialog [as 别名]
def menu_about(self, *args):
""" Display the "About pympress" dialog.
Handles clicks on the "about" menu.
"""
about = Gtk.AboutDialog(transient_for = self.p_win)
pympress = util.get_pympress_meta()
about.set_program_name('pympress')
about.set_version(pympress['version'])
about.set_copyright(_('Contributors:') + '\n' + pympress['contributors'])
about.set_comments(_('pympress is a little PDF reader written in Python ' +
'using Poppler for PDF rendering and GTK for the GUI.\n') +
_('Some preferences are saved in ') + self.config.path_to_config() + '\n' +
_('Resources are loaded from ') + os.path.dirname(util.get_locale_dir()) + '\n' +
_('The log is written to ') + util.get_log_path() + '\n\n' +
_('Media support uses {}.').format(self.medias.backend_version()) + '\n' +
_('Python version {}').format(sys.version))
about.set_website('https://github.com/Cimbali/pympress')
try:
about.set_logo(GdkPixbuf.Pixbuf.new_from_file(util.get_icon_path('pympress-128.png')))
except Exception:
logger.exception(_('Error loading icon for about window'))
about.run()
about.destroy()
##############################################################################
############################ Document manangement ############################
##############################################################################
示例12: about_dialog
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import AboutDialog [as 别名]
def about_dialog(self, widget, data=None):# The About Dialog
print ("DEBUG: opening about dialog @", (str(datetime.datetime.now())))
about_dialog = Gtk.AboutDialog()
if self.silaty.is_visible():
about_dialog.set_transient_for(self.silaty)
else:
about_dialog.set_position(Gtk.WindowPosition.CENTER)
logo = GdkPixbuf.Pixbuf.new_from_file(os.path.dirname(os.path.realpath(__file__)) + "/icons/hicolor/48x48/apps/silaty.svg")
about_dialog.set_logo(logo)
about_dialog.set_program_name(_("Silaty"))
about_dialog.set_website("https://github.com/AXeL-dev/Silaty")
about_dialog.set_website_label(_("GitHub Project Page"))
about_dialog.set_authors(["AXeL-dev <contact.axel.dev@gmail.com> (Maintainer)", "Jesse Wayde Brandão <www.jwb@gmail.com> (Lead Developer)",\
"Mohamed Alaa <m.alaa8@gmail.com> (Developer)","Eslam Mostafa <CsEslam@gmail.com> (Developer)",\
"Ahmed Youssef <xmonader(at)gmail.com> (Developer)"])
about_dialog.set_artists(["Mustapha Asbbar <abobakrsalafi@gmail.com> (Designer)"])
about_dialog.set_license('''Silaty, A Prayer Times Reminder Application.
Copyright © 2019 Silaty Team
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/>.''')
about_dialog.set_version("1.3")
about_dialog.set_comments(_("A neat Prayer Time Reminder App.\n Simple and complete so no prayer is missed"))
about_dialog.set_copyright(_("Copyright © %s Silaty Team") % '2019')
about_dialog.run()
about_dialog.destroy()
示例13: on_show_about
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import AboutDialog [as 别名]
def on_show_about(self, *args):
dlg = Gtk.AboutDialog('RunSQLRun', self.win)
logo = Pixbuf.new_from_resource(
'/org/runsqlrun/icons/128x128/runsqlrun.png')
dlg.set_logo(logo)
dlg.set_program_name('RunSQLRun')
dlg.set_version(__version__)
dlg.set_copyright('2015 Andi Albrecht <albrecht.andi@gmail.com>')
dlg.set_license_type(Gtk.License.MIT_X11)
dlg.set_website('http://runsqlrun.org')
dlg.set_authors(['Andi Albrecht'])
dlg.run()
dlg.destroy()
示例14: __init__
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import AboutDialog [as 别名]
def __init__(self, app_window):
Gtk.AboutDialog.__init__(self, use_header_bar=False)
self.set_transient_for(app_window)
self.set_modal(True)
self.header_bar = Gtk.HeaderBar(title='About')
self.set_titlebar(self.header_bar)
logo = GdkPixbuf.Pixbuf.new_from_file(LOGO)
self.set_logo(logo)
self.set_program_name("A touchscreen UI")
self.set_version(VERSION)
self.set_comments('LinuxCNC: {} \n GTK: {}'.format(LCNC_VERSION, GTK_VERSION))
self.set_website(VERSION_URL)
self.set_website_label(VERSION_URL)
self.set_copyright(COPYRIGHT)
self.set_license_type(LICENSE)
self.set_authors(AUTHORS)
self.set_title("Hazzy")
self.connect("response", self.on_response)
self.show()
示例15: create_dialog
# 需要导入模块: from gi.repository import Gtk [as 别名]
# 或者: from gi.repository.Gtk import AboutDialog [as 别名]
def create_dialog(self):
about = Gtk.AboutDialog()
about.set_program_name("Bokken")
ui.gtk3.common.set_bokken_icon(about)
about.set_version(glob.version)
about.set_copyright("(c) Hugo Teso <hteso@inguma.eu>")
about.set_comments("A GUI for radare2!")
about.set_website("http://www.bokken.re")
about.set_authors(["Hugo Teso <hteso@inguma.eu>", "David Martínez <ender@inguma.eu>"])
about.set_artists(["Ana Muniesa <ana.muniesa@gmail.com>", "Huahe <juanje@gmail.com> twitter: @huahe", "Marcos Gómez <renx67@gmail.com>"])
about.set_logo(GdkPixbuf.Pixbuf.new_from_file(datafile_path('bokken.svg')))
return about