Example #1
0
	def __init__(self):
		AboutDialog.__init__(self)
		
		self.set_skip_pager_hint(True)
		self.set_skip_taskbar_hint(True)
		
		program_name = 'gnome-shortcuts'
		program_version = '0.1'
		website = 'http://gnomeshortcuts.googlecode.com/'
		logo = pixbuf_new_from_file(join(data_path, 'icon.svg'))
		
		authors = ['Fred Morcos <*****@*****.**>']
		documenters = ['Fred Morcos <*****@*****.**>']
		artists = ['Fred Morcos <*****@*****.**>']
		
		self.set_program_name(program_name)
		self.set_version(program_version)
		self.set_logo(logo)
		
		self.set_website(website)
		self.set_website_label(website)
		
		self.set_authors(authors)
		self.set_documenters(documenters)
		self.set_artists(artists)
		self.set_license(
				'Licensed under the GPLv3. See COPYING for more information.')
    def __init__(self, icon):
        from os.path import exists, abspath, join
        from gtk.gdk import pixbuf_new_from_file
        AboutDialog.__init__(self)

        self.set_icon(pixbuf_new_from_file(icon))
        self.set_name("gtkpacman")
        self.set_version("2.0")
        self.set_copyright(_("Copyright (C)2005-2008 by Stefano Esposito.\nRights to copy, modify, and redistribute are granted under the GNU General Public License Terms"))
        self.set_comments(_("Gtk package manager based on pacman"))
        self.set_license(_("""gtkPacman 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 2 of the License, or
(at your option) any later version.

gtkPacman 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, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA"""))
        self.set_website("http://gtkpacman.berlios.de")
        self.set_authors(["Stefano Esposito <*****@*****.**>"])
        self.set_artists(["James D <*****@*****.**>"])

        path = "/usr/share/gtkpacman/"
        if not exists(path):
            path = abspath("data/")
            
        fname = join(path, "icons/pacman.png")
        logo = pixbuf_new_from_file(fname)
        self.set_logo(logo)
Example #3
0
    def __init__(self):
        AboutDialog.__init__(self)

        self.set_skip_pager_hint(True)
        self.set_skip_taskbar_hint(True)

        program_name = 'Grafer'
        program_version = '0.2'
        website = 'http://grafer.googlecode.com/'
        logo = gdk.pixbuf_new_from_file(join(data_path, 'icons', 'grafer.svg'))

        authors = ['Fred Morcos <*****@*****.**>']
        documenters = ['Fred Morcos <*****@*****.**>']
        artists = [
            'Fred Morcos <*****@*****.**>',
            'Laila Hassaballa <*****@*****.**>'
        ]

        self.set_program_name(program_name)
        self.set_version(program_version)
        self.set_logo(logo)

        self.set_website(website)
        self.set_website_label(website)

        self.set_authors(authors)
        self.set_documenters(documenters)
        self.set_artists(artists)
        self.set_license(
            'Licensed under the GPLv3. See COPYING for more information.')
Example #4
0
    def __init__(self, parent, backend):
        self.backend = backend
        self.dialog = GtkAboutDialog()
        self.dialog.set_transient_for(parent)
        self.dialog.set_modal(True)
        self.dialog.set_name(_("Subscription Manager"))
        self.dialog.set_license(LICENSE)
        self.dialog.set_wrap_license(True)
        self.dialog.set_website("https://fedorahosted.org/subscription-manager/")
        self.dialog.set_copyright(_("Copyright (c) 2012 Red Hat, Inc."))
        self.dialog.set_logo(gdk.pixbuf_new_from_file_at_size(LOGO_PATH, 100, 100))

        rhsm_version_label = Label()
        backend_version_label = Label()
        context_box = self.dialog.vbox.get_children()[0]
        context_box.pack_end(rhsm_version_label)
        context_box.pack_end(backend_version_label)

        # Set the component versions.
        versions = get_version_dict(self.backend.uep)
        self.dialog.set_version(versions['subscription manager'])
        rhsm_version_label.set_markup(_("<b>python-rhsm version:</b> %s" % \
            versions['python-rhsm']))
        backend_version_label.set_markup(_("<b>remote entitlement server version:</b> %s" % \
            versions['candlepin']))

        self.dialog.connect("response", self._handle_response)
        self.dialog.show_all()
Example #5
0
    def __init__(self, parent, backend):
        self.backend = backend
        self.dialog = GtkAboutDialog()
        self.dialog.set_transient_for(parent)
        self.dialog.set_modal(True)
        self.dialog.set_name(_("Subscription Manager"))
        self.dialog.set_license(LICENSE)
        self.dialog.set_wrap_license(True)
        self.dialog.set_website("https://fedorahosted.org/subscription-manager/")
        self.dialog.set_copyright(_("Copyright (c) 2012 Red Hat, Inc."))
        self.dialog.set_logo(gdk.pixbuf_new_from_file_at_size(LOGO_PATH, 100, 100))

        rhsm_version_label = Label()
        backend_version_label = Label()
        context_box = self.dialog.vbox.get_children()[0]
        context_box.pack_end(rhsm_version_label)
        context_box.pack_end(backend_version_label)

        # Set the component versions.
        server_versions = get_server_versions(self.backend.uep)
        client_versions = get_client_versions()

        self.dialog.set_version(client_versions['subscription-manager'])
        rhsm_version_label.set_markup(_("<b>python-rhsm version:</b> %s" % \
            client_versions['python-rhsm']))
        backend_version_label.set_markup(_("<b>subscription management service version:</b> %s" % \
            server_versions['candlepin']))

        self.dialog.connect("response", self._handle_response)
        self.dialog.show_all()
Example #6
0
    def __init__(self, parent, backend):
        self.backend = backend
        self.dialog = GtkAboutDialog()
        self.dialog.set_transient_for(parent)
        self.dialog.set_modal(True)
        self.dialog.set_name(_("Subscription Manager"))
        self.dialog.set_license(LICENSE)
        self.dialog.set_wrap_license(True)
        if not get_running_as_firstboot():
            self.dialog.set_website(
                "https://fedorahosted.org/subscription-manager/")
        self.dialog.set_copyright(_("Copyright (c) 2012 Red Hat, Inc."))
        self.dialog.set_logo_icon_name("subscription-manager")
        self.dialog.set_icon_name("subscription-manager")

        next_update_label = Label()
        rhsm_version_label = Label()
        backend_version_label = Label()
        context_box = self.dialog.vbox.get_children()[0]
        context_box.pack_end(next_update_label)
        context_box.pack_end(rhsm_version_label)
        context_box.pack_end(backend_version_label)

        self._set_next_update(next_update_label)

        # Set the component versions.
        server_versions = get_server_versions(
            self.backend.cp_provider.get_consumer_auth_cp())
        client_versions = get_client_versions()

        self.dialog.set_version(client_versions['subscription-manager'])
        rhsm_version_label.set_markup(
            _("<b>%s version:</b> %s") %
            ("python-rhsm", client_versions['python-rhsm']))
        backend_version_label.set_markup(
            _("<b>subscription management service version:</b> %s") %
            server_versions['candlepin'])

        self.dialog.connect("response", self._handle_response)
        self.dialog.show_all()
    def __init__(self, parent, backend):
        self.backend = backend
        self.dialog = GtkAboutDialog()
        self.dialog.set_transient_for(parent)
        self.dialog.set_modal(True)
        self.dialog.set_name(_("Subscription Manager"))
        self.dialog.set_license(LICENSE)
        self.dialog.set_wrap_license(True)
        if not get_running_as_firstboot():
            self.dialog.set_website("https://fedorahosted.org/subscription-manager/")
        self.dialog.set_copyright(_("Copyright (c) 2012 Red Hat, Inc."))
        self.dialog.set_logo_icon_name("subscription-manager")
        self.dialog.set_icon_name("subscription-manager")

        next_update_label = Label()
        python_rhsm_version_label = Label()
        sub_man_version_label = Label()
        backend_version_label = Label()
        context_box = self.dialog.vbox.get_children()[0]
        context_box.pack_end(next_update_label)
        context_box.pack_end(python_rhsm_version_label)
        context_box.pack_end(sub_man_version_label)
        context_box.pack_end(backend_version_label)

        self._set_next_update(next_update_label)

        # Set the component versions.
        server_versions = get_server_versions(self.backend.cp_provider.get_consumer_auth_cp())
        client_versions = get_client_versions()

        python_rhsm_version_label.set_markup(_("<b>%s version:</b> %s") %
                                        ("python-rhsm", client_versions['python-rhsm']))
        sub_man_version_label.set_markup(_("<b>%s version:</b> %s") %
                                        ("subscription manager", client_versions['subscription-manager']))
        backend_version_label.set_markup(_("<b>subscription management service version:</b> %s") %
                                           server_versions['candlepin'])

        self.dialog.connect("response", self._handle_response)
        self.dialog.show_all()
Example #8
0
class AboutDialog(object):
    def __init__(self, parent, backend):
        self.backend = backend
        self.dialog = GtkAboutDialog()
        self.dialog.set_transient_for(parent)
        self.dialog.set_modal(True)
        self.dialog.set_name(_("Subscription Manager"))
        self.dialog.set_license(LICENSE)
        self.dialog.set_wrap_license(True)
        if not get_running_as_firstboot():
            self.dialog.set_website(
                "https://fedorahosted.org/subscription-manager/")
        self.dialog.set_copyright(_("Copyright (c) 2012 Red Hat, Inc."))
        self.dialog.set_logo_icon_name("subscription-manager")
        self.dialog.set_icon_name("subscription-manager")

        next_update_label = Label()
        rhsm_version_label = Label()
        backend_version_label = Label()
        context_box = self.dialog.vbox.get_children()[0]
        context_box.pack_end(next_update_label)
        context_box.pack_end(rhsm_version_label)
        context_box.pack_end(backend_version_label)

        self._set_next_update(next_update_label)

        # Set the component versions.
        server_versions = get_server_versions(
            self.backend.cp_provider.get_consumer_auth_cp())
        client_versions = get_client_versions()

        self.dialog.set_version(client_versions['subscription-manager'])
        rhsm_version_label.set_markup(
            _("<b>%s version:</b> %s") %
            ("python-rhsm", client_versions['python-rhsm']))
        backend_version_label.set_markup(
            _("<b>subscription management service version:</b> %s") %
            server_versions['candlepin'])

        self.dialog.connect("response", self._handle_response)
        self.dialog.show_all()

    def show(self):
        self.dialog.show()

    def _handle_response(self, dialog, response):
        if response == RESPONSE_DELETE_EVENT or response == RESPONSE_CANCEL:
            self.dialog.destroy()

    def _set_next_update(self, next_update_label):
        try:
            if self._rhsmcertd_on():
                next_update = long(file(UPDATE_FILE).read())
            else:
                next_update = None
        except Exception:
            next_update = None

        if next_update:
            update_time = datetime.datetime.fromtimestamp(next_update)
            next_update_label.set_markup(
                _('<b>Next System Check-in:</b> %s') %
                update_time.strftime("%c"))
            next_update_label.show()
        else:
            next_update_label.hide()

    def _rhsmcertd_on(self):
        try:
            # if exists [method call returns pid] then true
            return bool(subprocess.check_output(['pidof', 'rhsmcertd']))
        except subprocess.CalledProcessError:
            # if does not exist, returns CalledProcessError
            return False
class AboutDialog(object):
    def __init__(self, parent, backend):
        self.backend = backend
        self.dialog = GtkAboutDialog()
        self.dialog.set_transient_for(parent)
        self.dialog.set_modal(True)
        self.dialog.set_name(_("Subscription Manager"))
        self.dialog.set_license(LICENSE)
        self.dialog.set_wrap_license(True)
        if not get_running_as_firstboot():
            self.dialog.set_website("https://fedorahosted.org/subscription-manager/")
        self.dialog.set_copyright(_("Copyright (c) 2012 Red Hat, Inc."))
        self.dialog.set_logo_icon_name("subscription-manager")
        self.dialog.set_icon_name("subscription-manager")

        next_update_label = Label()
        python_rhsm_version_label = Label()
        sub_man_version_label = Label()
        backend_version_label = Label()
        context_box = self.dialog.vbox.get_children()[0]
        context_box.pack_end(next_update_label)
        context_box.pack_end(python_rhsm_version_label)
        context_box.pack_end(sub_man_version_label)
        context_box.pack_end(backend_version_label)

        self._set_next_update(next_update_label)

        # Set the component versions.
        server_versions = get_server_versions(self.backend.cp_provider.get_consumer_auth_cp())
        client_versions = get_client_versions()

        python_rhsm_version_label.set_markup(_("<b>%s version:</b> %s") %
                                        ("python-rhsm", client_versions['python-rhsm']))
        sub_man_version_label.set_markup(_("<b>%s version:</b> %s") %
                                        ("subscription manager", client_versions['subscription-manager']))
        backend_version_label.set_markup(_("<b>subscription management service version:</b> %s") %
                                           server_versions['candlepin'])

        self.dialog.connect("response", self._handle_response)
        self.dialog.show_all()

    def show(self):
        self.dialog.show()

    def _handle_response(self, dialog, response):
        if response == RESPONSE_DELETE_EVENT or response == RESPONSE_CANCEL:
            self.dialog.destroy()

    def _set_next_update(self, next_update_label):
        try:
            if self._rhsmcertd_on():
                next_update = long(file(UPDATE_FILE).read())
            else:
                next_update = None
        except Exception:
            next_update = None

        if next_update:
            update_time = datetime.datetime.fromtimestamp(next_update)
            next_update_label.set_markup(_('<b>Next System Check-in:</b> %s') %
                update_time.strftime("%c"))
            next_update_label.show()
        else:
            next_update_label.hide()

    def _rhsmcertd_on(self):
        fnull = open(os.devnull, "w")
        try:
            # if status == 0 then true

            return not subprocess.call(['pidof', 'rhsmcertd'],
                                       stdout=fnull,
                                       stderr=fnull)
        finally:
            fnull.close()
Example #10
0
def show_about_dialog(*ignored, **kwds):
	"""
	create an about dialog and show it
	"""
	# Use only one instance, stored in _about_dialog
	global _about_dialog
	if _about_dialog:
		ab = _about_dialog
	else:
		ab = AboutDialog()
		ab.set_program_name(version.package_name)
		ab.set_version(version.version)
		ab.set_copyright(version.copyright_info)
		ab.set_license(license_text)
		ab.set_authors(authors)
		ab.connect("response", _response_callback)
		# do not delete window on close
		ab.connect("delete-event", lambda *ign: True)
		_about_dialog = ab
	ab.present()
Example #11
0
class AboutDialog(object):
    def __init__(self, parent, backend):
        self.backend = backend
        self.dialog = GtkAboutDialog()
        self.dialog.set_transient_for(parent)
        self.dialog.set_modal(True)
        self.dialog.set_name(_("Subscription Manager"))
        self.dialog.set_license(LICENSE)
        self.dialog.set_wrap_license(True)
        self.dialog.set_website("https://fedorahosted.org/subscription-manager/")
        self.dialog.set_copyright(_("Copyright (c) 2012 Red Hat, Inc."))
        self.dialog.set_logo(gdk.pixbuf_new_from_file_at_size(LOGO_PATH, 100, 100))

        rhsm_version_label = Label()
        backend_version_label = Label()
        context_box = self.dialog.vbox.get_children()[0]
        context_box.pack_end(rhsm_version_label)
        context_box.pack_end(backend_version_label)

        # Set the component versions.
        server_versions = get_server_versions(self.backend.uep)
        client_versions = get_client_versions()

        self.dialog.set_version(client_versions['subscription-manager'])
        rhsm_version_label.set_markup(_("<b>python-rhsm version:</b> %s" % \
            client_versions['python-rhsm']))
        backend_version_label.set_markup(_("<b>subscription management service version:</b> %s" % \
            server_versions['candlepin']))

        self.dialog.connect("response", self._handle_response)
        self.dialog.show_all()

    def show(self):
        self.dialog.show()

    def _handle_response(self, dialog, response):
        if response == RESPONSE_DELETE_EVENT or response == RESPONSE_CANCEL:
            self.dialog.destroy()
    def on_about_activate(self, *args):
        """Displays the Help > About dialog."""
        
        bo_keep_logo_path = get_bo_keep_logo()
        ab = AboutDialog()
        ab.set_transient_for(self.mainwindow)
        ab.set_modal(True)
        ab.set_name("Bo-Keep")
        ab.set_version("1.2.1")
        ab.set_copyright("ParIT Worker Co-operative, Ltd. 2006-2012")
        ab.set_comments(
            """Bo-Keep helps you keep your books so you don't get lost.

Developed with grant funding from:
 - Assiniboine Credit Union <http://assiniboine.mb.ca>
 - Legal Aid Manitoba <http://www.legalaid.mb.ca>
""")
        ab.set_license(
"""Bo-Keep 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/>.
""")
        ab.set_authors(("Mark Jenkins <*****@*****.**>",
                        "Jamie Campbell <*****@*****.**>",
                        "Samuel Pauls <*****@*****.**>",
                        "Andrew Orr <*****@*****.**>",
                        "Sara Arenson <*****@*****.**>",))
        ab.set_artists(("David Henry <*****@*****.**>",))
        ab.set_program_name("Bo-Keep")
        ab.set_logo( pixbuf_new_from_file_at_size(
                bo_keep_logo_path, 300, 266) )
        ab.run()
        ab.destroy()
Example #13
0
class AboutDialog(object):
    def __init__(self, parent, backend):
        self.backend = backend
        self.dialog = GtkAboutDialog()
        self.dialog.set_transient_for(parent)
        self.dialog.set_modal(True)
        self.dialog.set_name(_("Subscription Manager"))
        self.dialog.set_license(LICENSE)
        self.dialog.set_wrap_license(True)
        self.dialog.set_website(
            "https://fedorahosted.org/subscription-manager/")
        self.dialog.set_copyright(_("Copyright (c) 2012 Red Hat, Inc."))
        self.dialog.set_logo(
            gdk.pixbuf_new_from_file_at_size(LOGO_PATH, 100, 100))

        rhsm_version_label = Label()
        backend_version_label = Label()
        context_box = self.dialog.vbox.get_children()[0]
        context_box.pack_end(rhsm_version_label)
        context_box.pack_end(backend_version_label)

        # Set the component versions.
        versions = get_version_dict(self.backend.uep)
        self.dialog.set_version(versions['subscription manager'])
        rhsm_version_label.set_markup(_("<b>python-rhsm version:</b> %s" % \
            versions['python-rhsm']))
        backend_version_label.set_markup(_("<b>remote entitlement server version:</b> %s" % \
            versions['candlepin']))

        self.dialog.connect("response", self._handle_response)
        self.dialog.show_all()

    def show(self):
        self.dialog.show()

    def _handle_response(self, dialog, response):
        if response == RESPONSE_DELETE_EVENT or response == RESPONSE_CANCEL:
            self.dialog.destroy()