Ejemplo n.º 1
0
			def about(*args):
				import webbrowser
				global about_dialog, GPL2
				if about_dialog:
					about_dialog.show()
					about_dialog.present()
					return
				dialog = gtk.AboutDialog()
				def on_website_hook(dialog, web, *args):
					''' called when the website item is selected '''
					webbrowser.open(SITE_URL)
				def on_email_hook(dialog, mail, *args):
					webbrowser.open("mailto://[email protected]")
				gtk.about_dialog_set_url_hook(on_website_hook)
				gtk.about_dialog_set_email_hook(on_email_hook)
				dialog.set_name("Xpra")
				from xpra import __version__
				dialog.set_version(__version__)
				dialog.set_copyright('Copyright (c) 2012, Nagafix Ltd')
				dialog.set_authors(('Antoine Martin <*****@*****.**>',''))
				dialog.set_license(str(GPL2))
				dialog.set_website(SITE_URL)
				dialog.set_website_label(SITE_DOMAIN)
				dialog.set_logo(get_icon("xpra.png"))
				dialog.set_program_name(APPLICATION_NAME)
				def response(*args):
					dialog.destroy()
					global about_dialog
					about_dialog = None
				dialog.connect("response", response)
				about_dialog = dialog
				dialog.show()
Ejemplo n.º 2
0
    def __init__(self):
        super(AboutDialog, self).__init__()
        url_hook = lambda dialog, url, data: open_url(url)
        gtk.about_dialog_set_url_hook(url_hook, None)
        email_hook = lambda dialog, email, data: open_email(email)
        gtk.about_dialog_set_email_hook(email_hook, None)
        self.set_logo(gtk.gdk.pixbuf_new_from_file(get_image('diglib.svg')))
        self.set_name(about.NAME)
        self.set_program_name(about.NAME)
        self.set_version(about.VERSION)
        self.set_comments(about.DESCRIPTION)
        self.set_authors([about.AUTHOR])
        self.set_copyright(about.COPYRIGHT)
        self.set_wrap_license(True)
        self.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 \
any later version.\n\n\
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.\n\n\
You should have received a copy of the GNU General Public License along with \
this program. If not, see http://www.gnu.org/licenses/.')
Ejemplo n.º 3
0
def get_about_dialog():
    """Returns an AboutDialog with all the necessary info"""
    
    _MAX_WIDTH = 20
    wrapped_name = fill(consts.APP_LONG_NAME, _MAX_WIDTH)
    
    abt = gtk.AboutDialog()
    
    # attach an icon
    icon = abt.render_icon(gtk.STOCK_ABOUT, gtk.ICON_SIZE_MENU)
    abt.set_icon(icon)
    
    filepath = os.path.join(consts.IMAGES_DIR, 'VF_logo.png')
    logo = gtk.gdk.pixbuf_new_from_file(filepath)
    
    
    abt.set_logo(logo)
    gtk.about_dialog_set_url_hook(lambda abt, url: url_show(url))
    gtk.about_dialog_set_email_hook(lambda d, e: url_show("mailto:%s" % e))
    
    if gtk.pygtk_version >= (2, 11, 0):
        abt.set_program_name(wrapped_name)
    else:
        abt.set_name(wrapped_name)
    
    abt.set_version(consts.APP_VERSION)
    abt.set_copyright(_('Vodafone Spain S.A.'))
    abt.set_authors(consts.APP_AUTHORS)
    abt.set_documenters(consts.APP_DOCUMENTERS)
    abt.set_artists(consts.APP_ARTISTS)
    abt.set_website(consts.APP_URL)
    
    # XXX: pango here? I tried w/o success
    abt.set_website_label('http://forge.vodafonebetavine.net/..')
    
    trans_credits = _('translated to $LANG by $translater')
    # only enable them when necessary
    if trans_credits != 'translated to $LANG by $translater':
        abt.set_translator_credits(trans_credits)
    
    _license = """
Vodafone Mobile Connect Card driver for Linux
Copyright (C) 2006-2007 Vodafone España S.A.

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 2 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, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"""
    abt.set_license(_license)
    
    return abt
Ejemplo n.º 4
0
    def __init__(self):
        super(AboutDialog, self).__init__()
        url_hook = lambda dialog, url, data: open_url(url)
        gtk.about_dialog_set_url_hook(url_hook, None)
        email_hook = lambda dialog, email, data: open_email(email)
        gtk.about_dialog_set_email_hook(email_hook, None)
        self.set_logo(gtk.gdk.pixbuf_new_from_file(get_image('diglib.svg')))
        self.set_name(about.NAME)
        self.set_program_name(about.NAME)
        self.set_version(about.VERSION)
        self.set_comments(about.DESCRIPTION)
        self.set_authors([about.AUTHOR])
        self.set_copyright(about.COPYRIGHT)
        self.set_wrap_license(True)
        self.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 \
any later version.\n\n\
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.\n\n\
You should have received a copy of the GNU General Public License along with \
this program. If not, see http://www.gnu.org/licenses/.')
Ejemplo n.º 5
0
    def _register_uri_handlers(self):
        """Register the URL and email handlers

        Use open and mailto from virtaal.support.openmailto
        """
        gtk.about_dialog_set_url_hook(self.on_url, "url")
        gtk.about_dialog_set_email_hook(self.on_url, "mail")
Ejemplo n.º 6
0
def show_about_dialog(app_name, run=True):
    def uri_open(uri):
        Popen(["xdg-open", uri], stdout=PIPE)

    def email_hook(dialog, email, black_hole):
        uri_open("mailto:" + email)

    def url_hook(dialog, url, black_hole):
        uri_open(url)

    gtk.about_dialog_set_email_hook(email_hook, None)
    gtk.about_dialog_set_url_hook(url_hook, None)

    about = gtk.AboutDialog()
    about.set_name(app_name)
    about.set_version(VERSION)
    about.set_translator_credits(_("translator-credits"))
    about.set_copyright("Copyright \xc2\xa9 2008 Valmantas Palikša\n" "Copyright \xc2\xa9 2008 Tadas Dailyda")
    about.set_comments(_("Blueman is a GTK based Bluetooth manager"))
    about.set_website(WEBSITE)
    about.set_icon(get_icon("blueman"))
    about.set_logo(get_icon("blueman", 48))
    authors = ["Valmantas Palikša <*****@*****.**>", "Tadas Dailyda <*****@*****.**>"]
    about.set_authors(authors)
    if run:
        about.run()
        about.destroy()
    else:
        return about
Ejemplo n.º 7
0
    def _register_uri_handlers(self):
        """Register the URL and email handlers

        Use open and mailto from virtaal.support.openmailto
        """
        gtk.about_dialog_set_url_hook(self.on_url, "url")
        gtk.about_dialog_set_email_hook(self.on_url, "mail")
Ejemplo n.º 8
0
 def acerca_de(self):
     gtk.about_dialog_set_email_hook(self.launch_browser_mailer, 'email')
     gtk.about_dialog_set_url_hook(self.launch_browser_mailer, 'web')
     vacerca = gtk.AboutDialog()
     vacerca.set_name('Geotex-INN')
     vacerca.set_version(__version__)
     vacerca.set_comments('Software ERP para Geotexan')
     vacerca.set_authors(['Francisco José Rodríguez Bogado '
                          '<*****@*****.**>',
                          'Diego Muñoz Escalante <*****@*****.**>'])
     config = ConfigConexion()
     logo = gtk.gdk.pixbuf_new_from_file(os.path.join(
             os.path.dirname(os.path.realpath(__file__)),
             '..', 'imagenes', config.get_logo()))
     logo = escalar_a(300, 200, logo)
     vacerca.set_logo(logo)
     vacerca.set_license(open(os.path.join(
             os.path.dirname(os.path.realpath(__file__)),
             '..', 'gpl.txt')).read())
     vacerca.set_website('http://ginn.sf.net')
     vacerca.set_artists(['Iconos gartoon por Kuswanto (a.k.a. Zeus) '
                          '<*****@*****.**>'])
     vacerca.set_copyright('Copyright 2005-2014  Francisco José Rodríguez'
                           ' Bogado, Diego Muñoz Escalante.')
     vacerca.run()
     vacerca.destroy()
Ejemplo n.º 9
0
    def open_about_window(self, menuitem):
        gtk.about_dialog_set_url_hook(self._open_url, None)
        gtk.about_dialog_set_email_hook(self._open_email, None)
        about = gtk.AboutDialog()

        about.set_name("Rounder")
        about.set_version("0.0.1")
        about.set_copyright("Copyright © 2008 Devan Goodwin & James Bowes")
        about.set_comments("Poker for the GNOME Desktop")
        # XXX Put the full license in here
        about.set_license("GPLv2")
        about.set_website("http://dangerouslyinc.com")
        about.set_website_label("http://dangerouslyinc.com")
        about.set_authors(('Devan Goodwin <*****@*****.**>',
            'James Bowes <*****@*****.**>',
            'Kenny MacDermid <*****@*****.**>'))
        about.set_artists(('Anette Goodwin <*****@*****.**>',
            'James Bowes <*****@*****.**>'))
        about.set_logo(gtk.gdk.pixbuf_new_from_file(
            find_file_on_path(ROUNDER_LOGO_FILE)))

        about.set_icon_from_file(find_file_on_path(ROUNDER_ICON_FILE))

        about.connect('response', lambda x, y: about.destroy())
        about.show_all()
Ejemplo n.º 10
0
    def __init__(self, parent):
        gtk.AboutDialog.__init__(self)

        gtk.about_dialog_set_url_hook(common.url_hook)
        gtk.about_dialog_set_email_hook(common.email_hook)

        self.set_transient_for(parent)
        self.set_icon_from_file(os.path.join(const.IMAGEDIR, "icon_logo.png"))
        self.set_modal(True)
        self.set_property("skip-taskbar-hint", True)

        self.set_name(const.NAME)
        self.set_version(const.VERSION)
        self.set_copyright(const.COPYRIGHT)
        self.set_comments(const.DESCRIPTION)
        self.set_website(const.WEBSITE)
        self.set_website_label("Pigeon Planner website")
        self.set_authors(const.AUTHORS)
        self.set_artists(const.ARTISTS)
        self.set_translator_credits(_("translator-credits"))
        self.set_license(const.LICENSE)
        self.set_logo(
            gtk.gdk.pixbuf_new_from_file_at_size(
                os.path.join(const.IMAGEDIR, "icon_logo.png"), 80, 80))
        self.run()
        self.destroy()
Ejemplo n.º 11
0
    def acerca_de(self):
        """
        Calcado de menu.py. Modificado ligeramente para hacerlo funcionar aquí.
        """
        from formularios.menu import __version__
        from utils.ui import launch_browser_mailer
        from framework.configuracion import ConfigConexion

        gtk.about_dialog_set_email_hook(launch_browser_mailer, 'email')
        gtk.about_dialog_set_url_hook(launch_browser_mailer, 'web')
        vacerca = gtk.AboutDialog()
        vacerca.set_name('CICAN')
        vacerca.set_version(__version__)
        vacerca.set_comments('Software de gestión del Centro de Investigadión de Carreteras de ANdalucía')
        vacerca.set_authors(
            ['Francisco José Rodríguez Bogado <*****@*****.**>', 
             'Algunas partes del código por: Diego Muñoz Escalante <*****@*****.**>'])
        config = ConfigConexion()
        logo = gtk.gdk.pixbuf_new_from_file(
            os.path.join('imagenes', config.get_logo()))
        vacerca.set_logo(logo)
        fichero_licencia = os.path.join(
                            os.path.dirname(__file__), "..", 'COPYING')
        try:
            content_licencia = open(fichero_licencia).read()
        except IOError:
            content_licencia = open("COPYING").read()
        vacerca.set_license(content_licencia)
        vacerca.set_website('http://informatica.novaweb.es')
        vacerca.set_artists(['Iconos gartoon por Kuswanto (a.k.a. Zeus) <*****@*****.**>'])
        vacerca.set_copyright('Copyright 2009-2010  Francisco José Rodríguez Bogado.')
        vacerca.run()
        vacerca.destroy()
Ejemplo n.º 12
0
def show_about_dialog(app_name, run=True):
    def uri_open(uri):
        Popen(['xdg-open', uri], stdout=PIPE)

    def email_hook(dialog, email, black_hole):
        uri_open('mailto:' + email)

    def url_hook(dialog, url, black_hole):
        uri_open(url)

    gtk.about_dialog_set_email_hook(email_hook, None)
    gtk.about_dialog_set_url_hook(url_hook, None)

    about = gtk.AboutDialog()
    about.set_name(app_name)
    about.set_version(VERSION)
    about.set_translator_credits(_("translator-credits"))
    about.set_copyright('Copyright \xc2\xa9 2008 Valmantas Palikša\n'\
         'Copyright \xc2\xa9 2008 Tadas Dailyda')
    about.set_comments(_('Blueman is a GTK based Bluetooth manager'))
    about.set_website(WEBSITE)
    about.set_icon(get_icon('blueman'))
    about.set_logo(get_icon('blueman', 48))
    authors = [
        'Valmantas Palikša <*****@*****.**>',
        'Tadas Dailyda <*****@*****.**>'
    ]
    about.set_authors(authors)
    if run:
        about.run()
        about.destroy()
    else:
        return about
Ejemplo n.º 13
0
def get_about_dialog():
    """Returns an AboutDialog with all the necessary info"""

    _MAX_WIDTH = 20
    wrapped_name = fill(consts.APP_LONG_NAME, _MAX_WIDTH)

    abt = gtk.AboutDialog()

    # attach an icon
    icon = abt.render_icon(gtk.STOCK_ABOUT, gtk.ICON_SIZE_MENU)
    abt.set_icon(icon)

    filepath = os.path.join(consts.IMAGES_DIR, 'VF_logo.png')
    logo = gtk.gdk.pixbuf_new_from_file(filepath)

    abt.set_logo(logo)
    gtk.about_dialog_set_url_hook(lambda abt, url: url_show(url))
    gtk.about_dialog_set_email_hook(lambda d, e: url_show("mailto:%s" % e))

    if gtk.pygtk_version >= (2, 11, 0):
        abt.set_program_name(wrapped_name)
    else:
        abt.set_name(wrapped_name)

    abt.set_version(consts.APP_VERSION)
    abt.set_copyright(_('Vodafone Spain S.A.'))
    abt.set_authors(consts.APP_AUTHORS)
    abt.set_documenters(consts.APP_DOCUMENTERS)
    abt.set_artists(consts.APP_ARTISTS)
    abt.set_website(consts.APP_URL)

    # XXX: pango here? I tried w/o success
    abt.set_website_label('http://forge.vodafonebetavine.net/..')

    trans_credits = _('translated to $LANG by $translater')
    # only enable them when necessary
    if trans_credits != 'translated to $LANG by $translater':
        abt.set_translator_credits(trans_credits)

    _license = """
Vodafone Mobile Connect Card driver for Linux
Copyright (C) 2006-2007 Vodafone España S.A.

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 2 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, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"""
    abt.set_license(_license)

    return abt
Ejemplo n.º 14
0
	def connectLinkHooks(self):
		## Make hooks for opening URLs and e-mails.
		if (useful.checkLinkHandler):
			gtk.about_dialog_set_email_hook(self.URLorMailOpen, 'mail')
			gtk.about_dialog_set_url_hook(self.URLorMailOpen, 'url')
		else:
			# xdg-open doesn't exist.
			print _("%s not found, links & e-mail addresses will not be clickable" % useful.linkHandler)
Ejemplo n.º 15
0
 def __init__(self):
     """Object constructor.
     
     Calls base constructor and sets hooks for e-mail and url.
     """
     super(AboutDialog, self).__init__()
     gtk.about_dialog_set_email_hook(self.email_hook, None)
     gtk.about_dialog_set_url_hook(self.url_hook, None)
Ejemplo n.º 16
0
    def __init_ui(self):
        self.menu = gtk.Menu()

        self.database_item = gtk.MenuItem(_('Database'))
        self.database_item.show()
        self.database_item.set_sensitive(False)

        self.unlock_item = gtk.MenuItem(_('Unlock File'))
        self.unlock_item.show()
        self.unlock_item.connect(
            'activate',
            lambda w, d=None: self.file_open(self.config.get("file"))
        )

        self.lock_item = gtk.MenuItem(_('Lock File'))
        self.lock_item.connect(
            'activate',
            lambda w, d=None: self.file_close()
        )

        self.prefs_item = gtk.MenuItem(_('Preferences'))
        self.prefs_item.show()
        self.prefs_item.connect(
            'activate',
            lambda w, d=None: self.prefs()
        )

        self.about_item = gtk.MenuItem(_('About'))
        self.about_item.show()
        self.about_item.connect('activate', self.__cb_about)

        self.quit_item = gtk.MenuItem('Quit')
        self.quit_item.show()
        self.quit_item.connect('activate', gtk.main_quit)

        self.menu.append(self.database_item)
        self.menu.append(gtk.SeparatorMenuItem())
        self.menu.append(self.unlock_item)
        self.menu.append(self.lock_item)
        self.menu.append(gtk.SeparatorMenuItem())
        self.menu.append(self.prefs_item)
        self.menu.append(self.about_item)
        self.menu.append(self.quit_item)

        self.ind.set_menu(self.menu)
        #self.menu.show_all()

        gtk.about_dialog_set_url_hook(
            lambda d, l: gtk.show_uri(None, l, gtk.get_current_event_time())
        )

        gtk.about_dialog_set_email_hook(
            lambda d, l: gtk.show_uri(None, "mailto:" + l, gtk.get_current_event_time())
        )

        ## set up various ui element holders
        self.popup_entryview = None
        self.popup_entrylist = None
def show_about_dialog():
    abt = gtk.AboutDialog()
    abt.set_icon(gtk.gdk.pixbuf_new_from_file(DIALOG_ICON))

    gtk.about_dialog_set_url_hook(lambda abt, url: show_uri(url))
    gtk.about_dialog_set_email_hook(lambda d, e: show_uri("mailto:%s" % e))

    if gtk.pygtk_version >= (2, 11, 0):
        abt.set_program_name(APP_NAME)
    else:
        abt.set_name(APP_NAME)
    abt.set_version(APP_VERSION)
    _copyright = """\
Copyright (C) 2006-2012 Vodafone España S.A.
Copyright (C) 2008-2010 Warp Networks, S.L.
Copyright (C) 2008-2009 Wader contributors"""
    abt.set_copyright(_copyright)
    abt.set_authors(APP_AUTHORS)
    abt.set_documenters(APP_DOCUMENTERS)
    abt.set_artists(APP_ARTISTS)
    abt.set_website(APP_URL)
    abt.set_translator_credits(_('translator-credits'))

    abt.set_website_label(APP_URL)
    _license = """\
V Mobile Broadband

%s

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 2 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, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
"""
    abt.set_license(_license % _copyright)

    def close(dialog, response):
        dialog.destroy()

    abt.connect("response", close)

    return abt
Ejemplo n.º 18
0
def show_about_dialog():
    abt = gtk.AboutDialog()
    abt.set_icon(gtk.gdk.pixbuf_new_from_file(DIALOG_ICON))

    gtk.about_dialog_set_url_hook(lambda abt, url: show_uri(url))
    gtk.about_dialog_set_email_hook(lambda d, e: show_uri("mailto:%s" % e))

    if gtk.pygtk_version >= (2, 11, 0):
        abt.set_program_name(APP_NAME)
    else:
        abt.set_name(APP_NAME)
    abt.set_version(APP_VERSION)
    _copyright = """\
Copyright (C) 2006-2012 Vodafone España S.A.
Copyright (C) 2008-2010 Warp Networks, S.L.
Copyright (C) 2008-2009 Wader contributors"""
    abt.set_copyright(_copyright)
    abt.set_authors(APP_AUTHORS)
    abt.set_documenters(APP_DOCUMENTERS)
    abt.set_artists(APP_ARTISTS)
    abt.set_website(APP_URL)
    abt.set_translator_credits(_("translator-credits"))

    abt.set_website_label(APP_URL)
    _license = """\
V Mobile Broadband

%s

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 2 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, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
"""
    abt.set_license(_license % _copyright)

    def close(dialog, response):
        dialog.destroy()

    abt.connect("response", close)

    return abt
Ejemplo n.º 19
0
	def showAboutDialog( self, uicomponent, verb ):
		gtk.about_dialog_set_email_hook( lambda dialog, mail: gnomevfs.url_show( "mailto:" + mail ) )
		gtk.about_dialog_set_url_hook( lambda dialog, url: gnomevfs.url_show( url ) )
		about = gtk.AboutDialog()
		about.set_name("Menu Tuquito")
		import commands
		about.set_version("1.0")
		try:
           		h = open('/usr/share/common-licenses/GPL','r')
			s = h.readlines()
			gpl = ""
		        for line in s:
		            gpl += line
		        h.close()
		        about.set_license(gpl)
        	except Exception, detail:
            		print detail            	        
Ejemplo n.º 20
0
Archivo: menu.py Proyecto: Virako/fpinn
 def acerca_de(self):
     gtk.about_dialog_set_email_hook(self.launch_browser_mailer, 'email')
     gtk.about_dialog_set_url_hook(self.launch_browser_mailer, 'web')
     vacerca = gtk.AboutDialog()
     vacerca.set_name('FP-INN')
     vacerca.set_version(_VERSION)
     vacerca.set_comments('Software de gestión para FresParaíso')
     vacerca.set_authors(['Francisco José Rodríguez Bogado <*****@*****.**>', 'Diego Muñoz Escalante <*****@*****.**>'])
     config = ConfigConexion()
     logo = gtk.gdk.pixbuf_new_from_file(os.path.join('imagenes', config.get_logo()))
     vacerca.set_logo(logo)
     vacerca.set_license(open(os.path.join('gpl.txt')).read())
     vacerca.set_website('http://fpinn.sf.net')
     vacerca.set_artists(['Iconos gartoon por Kuswanto (a.k.a. Zeus) <*****@*****.**>'])
     vacerca.set_copyright('Copyright 2005-2008  Francisco José Rodríguez Bogado.')
     vacerca.run()
     vacerca.destroy()
Ejemplo n.º 21
0
    def __init__(self):
        gtk.AboutDialog.__init__(self)
        gtk.about_dialog_set_email_hook(self.__url_hook, "mailto:")
        gtk.about_dialog_set_url_hook(self.__url_hook, "")

        self.set_logo_icon_name(NAME.lower())
        self.set_name(NAME)
        self.set_version(VERSION)
        self.set_copyright("Copyright (C) 2008 Johan Svedberg, 2013-2014 Neil McNab")
        #self.set_website("http://live.gnome.org/GGet")
        self.set_website("http://sourceforge.net/projects/metalinks/")
        self.set_comments(_("GGet is a Download Manager for the GNOME desktop."))
        self.set_authors(["Johan Svedberg <*****@*****.**>", "Neil McNab <*****@*****.**>"])
        self.set_translator_credits(_("translator-credits"))
        self.set_license("GNU General Public License version 2")
        # self.set_artists([""])

        self.connect("response", lambda self, *args: self.destroy())
Ejemplo n.º 22
0
    def __init__(self, al):

        gtk.AboutDialog.__init__(self)
        gtk.about_dialog_set_email_hook(self._open_url)
        gtk.about_dialog_set_url_hook(self._open_url)
        self.al = al

        self.set_logo(utils.get_image('%s/pixmaps/animelist_logo_256.png' % al.path))
        self.set_name(al.name)
        self.set_version(al.version)
        self.set_comments('MyAnimeList.net anime list manager + some extra stuff.')
        self.set_copyright('Copyright (c) 2009 Frank Smit')
        self.set_authors(['Frank Smit <*****@*****.**>'])
        self.set_website('http://61924.nl/projects/animelist.html')
        self.set_license(self._read_licence_file())

        self.run()
        self.destroy()
Ejemplo n.º 23
0
	def showAboutDialog( self, uicomponent, verb ):

		gtk.about_dialog_set_email_hook( lambda dialog, mail: gnomevfs.url_show( "mailto:" + mail ) )
		gtk.about_dialog_set_url_hook( lambda dialog, url: gnomevfs.url_show( url ) )
		about = gtk.AboutDialog()
		about.set_name("mintMenu")
		import commands
		version = commands.getoutput("/usr/lib/linuxmint/common/version.py mintmenu")
		about.set_version(version)
		try:
           		h = open('/usr/share/common-licenses/GPL','r')
			s = h.readlines()
			gpl = ""
		        for line in s:
		            gpl += line
		        h.close()
		        about.set_license(gpl)
        	except Exception, detail:
            		print detail            	        
Ejemplo n.º 24
0
    def __init__(self):
        gtk.about_dialog_set_email_hook(lambda widget, link:
                webbrowser.open(link, new=2))
        gtk.about_dialog_set_url_hook(lambda widget, link:
                webbrowser.open(link, new=2))
        parent = get_toplevel_window()
        self.win = gtk.AboutDialog()
        self.win.set_transient_for(parent)
        self.win.set_name('Tryton')
        self.win.set_version(__version__)
        self.win.set_copyright(COPYRIGHT)
        self.win.set_license(LICENSE)
        self.win.set_website('http://www.tryton.org/')
        self.win.set_authors(AUTHORS)
        self.win.set_logo(TRYTON_ICON)

        self.win.run()
        parent.present()
        self.win.destroy()
Ejemplo n.º 25
0
    def __init__(self):
        gtk.about_dialog_set_email_hook(
            lambda widget, link: webbrowser.open(link, new=2))
        gtk.about_dialog_set_url_hook(
            lambda widget, link: webbrowser.open(link, new=2))
        parent = get_toplevel_window()
        self.win = gtk.AboutDialog()
        self.win.set_transient_for(parent)
        self.win.set_name('Tryton')
        self.win.set_version(VERSION)
        self.win.set_copyright(COPYRIGHT)
        self.win.set_license(LICENSE)
        self.win.set_website(WEBSITE)
        self.win.set_authors(AUTHORS)
        self.win.set_logo(TRYTON_ICON)

        self.win.run()
        parent.present()
        self.win.destroy()
Ejemplo n.º 26
0
    def __init__(self):
        if hasattr(gtk, 'about_dialog_set_email_hook'):
            gtk.about_dialog_set_email_hook(lambda widget, link:
                    webbrowser.open(link, new=2))
        if hasattr(gtk, 'about_dialog_set_url_hook'):
            gtk.about_dialog_set_url_hook(lambda widget, link:
                    webbrowser.open(link, new=2))
        parent = get_toplevel_window()
        self.win = gtk.AboutDialog()
        self.win.set_transient_for(parent)
        self.win.set_name(CONFIG['client.title'])
        self.win.set_version(__version__)
        self.win.set_comments(COMMENTS)
        self.win.set_license(LICENSE)
        self.win.set_website('http://health.gnu.org/')
        self.win.set_logo(GNUHEALTH_ICON)

        self.win.run()
        parent.present()
        self.win.destroy()
Ejemplo n.º 27
0
 def acerca_de(self):
     gtk.about_dialog_set_email_hook(self.launch_browser_mailer, 'email')
     gtk.about_dialog_set_url_hook(self.launch_browser_mailer, 'web')
     vacerca = gtk.AboutDialog()
     vacerca.set_name('Universal Pilates')
     vacerca.set_version(__version__)
     vacerca.set_comments('Software para Universal Pilates Vitality Studio')
     vacerca.set_authors(
         ['Francisco José Rodríguez Bogado <*****@*****.**>', 
          'Algunas partes del código por: Diego Muñoz Escalante <*****@*****.**>'])
     config = ConfigConexion()
     logo = gtk.gdk.pixbuf_new_from_file(
         os.path.join('..', 'imagenes', config.get_logo()))
     vacerca.set_logo(logo)
     vacerca.set_license(open(os.path.join('..', 'gpl.txt')).read())
     vacerca.set_website('http://informatica.novaweb.es')
     vacerca.set_artists(['Iconos gartoon por Kuswanto (a.k.a. Zeus) <*****@*****.**>'])
     vacerca.set_copyright('Copyright 2009-2010  Francisco José Rodríguez Bogado.')
     vacerca.run()
     vacerca.destroy()
Ejemplo n.º 28
0
    def __init__(self):
        gtk.about_dialog_set_email_hook(lambda widget, link:
                webbrowser.open(link, new=2))
        gtk.about_dialog_set_url_hook(lambda widget, link:
                webbrowser.open(link, new=2))
        parent = get_toplevel_window()
        self.win = gtk.AboutDialog()
        self.win.set_transient_for(parent)
        # MAR : Fix #5107 : Replace tryton references with Coog
        self.win.set_name('Coog')
        self.win.set_version(__version_coog__)
        self.win.set_copyright(COPYRIGHT)
        self.win.set_license(LICENSE)
        self.win.set_website('http://coopengo.com/')
        self.win.set_authors(AUTHORS)
        self.win.set_logo(TRYTON_ICON)

        self.win.run()
        parent.present()
        self.win.destroy()
Ejemplo n.º 29
0
 def on_about_click(self, item):
     dlg = gtk.AboutDialog()
     dlg.set_program_name("pyvolwheel")
     dlg.set_version(pyvolwheel.__version__)
     dlg.set_comments("Volume control tray icon")
     dlg.set_copyright(pyvolwheel.__copyright__)
     dlg.set_license(pyvolwheel.__license__)
     dlg.set_website(pyvolwheel.__url__)
     dlg.set_authors([pyvolwheel.__author__])
     dlg.set_logo_icon_name('multimedia-volume-control')
     # Website handler
     def launch_website(dialog, link):
         Popen(["xdg-open", link])
     gtk.about_dialog_set_url_hook(launch_website)
     # E-Mail handler
     def launch_email(dialog, address):
         Popen(["xdg-email", address])
     gtk.about_dialog_set_email_hook(launch_email)
     dlg.run()
     dlg.destroy()
     return True
Ejemplo n.º 30
0
    def __init__(self):
        if hasattr(gtk, 'about_dialog_set_email_hook'):
            gtk.about_dialog_set_email_hook(
                lambda widget, link: webbrowser.open(link, new=2))
        if hasattr(gtk, 'about_dialog_set_url_hook'):
            gtk.about_dialog_set_url_hook(
                lambda widget, link: webbrowser.open(link, new=2))
        parent = get_toplevel_window()
        self.win = gtk.AboutDialog()
        self.win.set_transient_for(parent)
        self.win.set_name(CONFIG['client.title'])
        self.win.set_version('4.2.1.0')
        #self.win.set_copyright(COPYRIGHT)
        self.win.set_license('Licencia Nodux')
        self.win.set_website('http://nodux.ec/')
        #self.win.set_authors(AUTHORS)
        self.win.set_logo(TRYTON_ICON)

        self.win.run()
        parent.present()
        self.win.destroy()
Ejemplo n.º 31
0
    def __init__(self, application):
        gtk.AboutDialog.__init__(self)
        self.application = application

        self.set_name("FreeSpeak")
        self.set_version(defs.VERSION)
        self.set_comments(_("A free frontend to online translator engines"))
        self.set_license("""
        FreeSpeak 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.
        
        FreeSpeak 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 Library 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.
        """)
        # TODO: this must not be application-wide
        gtk.about_dialog_set_url_hook(self.on_url, "")
        gtk.about_dialog_set_email_hook(self.on_url, "mailto:")

        self.set_website_label("http://freespeak.berlios.de/")
        self.set_website("http://freespeak.berlios.de/")
        self.set_authors(["Luca Bruno\t<*****@*****.**>"])
        logo = self.application.icon_theme.load_icon('freespeak', 64, 0)
        self.set_logo(logo)
        self.set_artists(["Coviello Giuseppe\t<*****@*****.**>"])
        self.set_translator_credits("Luca Bruno\t<*****@*****.**>")

        self.set_copyright(
            "Copyright (C) 2005, 2006, 2007, 2008, 2009  Luca Bruno <*****@*****.**>"
        )

        self.connect('response', self.on_response)
        self.show_all()
	def show_about(self, widget):
		'''
			Display "About" window
		'''
		version = 'v1.0'
		license_file = open(license_path, "r")
		license = license_file.read()
		license_file.close()
		license = str(license)
		authors = ["Wheelz <*****@*****.**>",\
				"Henry Huang <*****@*****.**>",\
				"longshow <*****@*****.**>",]

		logo = gtk.gdk.pixbuf_new_from_file(icon_path)
		comments=_("drcom-client")
		translator_credits = "translator-credits"

		about=gtk.AboutDialog()
		try:
			gtk.about_dialog_set_email_hook(self.__url_hook, "mailto:")
			gtk.about_dialog_set_url_hook(self.__url_hook, "")
		except:
			pass

		about.set_name(_("drcom-client"))
		about.set_version(version)
		about.set_copyright(_("Copyright © 2009 drcom-client team"))
		about.set_license(license)
		about.set_website("http://www.drcom-client.org/")
		about.set_authors(authors)
		about.set_translator_credits(translator_credits)
		about.set_logo(logo)
        
		icon = gtk.gdk.pixbuf_new_from_file(icon_path)
		about.set_icon(icon)
               
		about.connect("response", lambda d, r: about.destroy())
        
		about.show_all()
		return True
Ejemplo n.º 33
0
    def showAboutDialog(self, uicomponent, verb):

        gtk.about_dialog_set_email_hook(
            lambda dialog, mail: gnomevfs.url_show("mailto:" + mail))
        gtk.about_dialog_set_url_hook(
            lambda dialog, url: gnomevfs.url_show(url))
        about = gtk.AboutDialog()
        about.set_name("mintMenu")
        import commands
        version = commands.getoutput(
            "/usr/lib/linuxmint/common/version.py mintmenu")
        about.set_version(version)
        try:
            h = open('/usr/share/common-licenses/GPL', 'r')
            s = h.readlines()
            gpl = ""
            for line in s:
                gpl += line
            h.close()
            about.set_license(gpl)
        except Exception, detail:
            print detail
Ejemplo n.º 34
0
            def about(*args):
                import webbrowser
                global about_dialog, GPL2
                if about_dialog:
                    about_dialog.show()
                    about_dialog.present()
                    return
                dialog = gtk.AboutDialog()

                def on_website_hook(dialog, web, *args):
                    ''' called when the website item is selected '''
                    webbrowser.open(SITE_URL)

                def on_email_hook(dialog, mail, *args):
                    webbrowser.open(
                        "mailto://[email protected]")

                gtk.about_dialog_set_url_hook(on_website_hook)
                gtk.about_dialog_set_email_hook(on_email_hook)
                dialog.set_name("Xpra")
                from xpra import __version__
                dialog.set_version(__version__)
                dialog.set_copyright('Copyright (c) 2012, Nagafix Ltd')
                dialog.set_authors(
                    ('Antoine Martin <*****@*****.**>', ''))
                dialog.set_license(str(GPL2))
                dialog.set_website(SITE_URL)
                dialog.set_website_label(SITE_DOMAIN)
                dialog.set_logo(get_icon("xpra.png"))
                dialog.set_program_name(APPLICATION_NAME)

                def response(*args):
                    dialog.destroy()
                    global about_dialog
                    about_dialog = None

                dialog.connect("response", response)
                about_dialog = dialog
                dialog.show()
Ejemplo n.º 35
0
    def __init__(self):
        if hasattr(gtk, 'about_dialog_set_email_hook'):
            gtk.about_dialog_set_email_hook(
                lambda widget, link: webbrowser.open(link, new=2))
        if hasattr(gtk, 'about_dialog_set_url_hook'):
            gtk.about_dialog_set_url_hook(
                lambda widget, link: webbrowser.open(link, new=2))
        parent = get_toplevel_window()
        self.win = gtk.AboutDialog()
        self.win.set_transient_for(parent)
        self.win.set_name(CONFIG['client.title'])
        # MAR : Fix #5107 : Replace tryton references with Coog
        self.win.set_version(__version_coog__)
        self.win.set_copyright(COPYRIGHT)
        self.win.set_license(LICENSE)
        self.win.set_website('http://coopengo.com/')
        self.win.set_authors(AUTHORS)
        self.win.set_logo(TRYTON_ICON)

        self.win.run()
        parent.present()
        self.win.destroy()
Ejemplo n.º 36
0
def show_about_dialog():
    abt = gtk.AboutDialog()
    icon = abt.render_icon(gtk.STOCK_ABOUT, gtk.ICON_SIZE_MENU)
    abt.set_icon(icon)

    gtk.about_dialog_set_url_hook(lambda abt, url: show_uri(url))
    gtk.about_dialog_set_email_hook(lambda d, e: show_uri("mailto:%s" % e))

    icon = gtk.gdk.pixbuf_new_from_file(os.path.join(GLADE_DIR, 'wader.png'))
    abt.set_icon(icon)
    abt.set_program_name(APP_NAME)
    abt.set_version(APP_VERSION)
    abt.set_copyright("Copyright (C) 2008-2009 Wader contributors")
    abt.set_authors(APP_AUTHORS)
    abt.set_documenters(APP_DOCUMENTERS)
    abt.set_artists(APP_ARTISTS)
    abt.set_website(APP_URL)
    abt.set_translator_credits(_('translator-credits'))

    abt.set_website_label(APP_URL)
    _license = """
The Wader project
Copyright (C) 2008-2009  Warp Networks, S.L.

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 2 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, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"""
    abt.set_license(_license)
    return abt
Ejemplo n.º 37
0
    def __init__ (self, application):
        gtk.AboutDialog.__init__ (self)
        self.application = application

        self.set_name ("FreeSpeak")
        self.set_version (defs.VERSION)
        self.set_comments (_("A free frontend to online translator engines")) 
        self.set_license ("""
        FreeSpeak 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.
        
        FreeSpeak 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 Library 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.
        """)
        # TODO: this must not be application-wide
        gtk.about_dialog_set_url_hook (self.on_url, "")
        gtk.about_dialog_set_email_hook (self.on_url, "mailto:")
                          
        self.set_website_label ("http://freespeak.berlios.de/")
        self.set_website ("http://freespeak.berlios.de/")
        self.set_authors (["Luca Bruno\t<*****@*****.**>"])
        logo = self.application.icon_theme.load_icon ('freespeak', 64, 0)
        self.set_logo (logo)
        self.set_artists (["Coviello Giuseppe\t<*****@*****.**>"])
        self.set_translator_credits ("Luca Bruno\t<*****@*****.**>")
                                     
        self.set_copyright ("Copyright (C) 2005, 2006, 2007, 2008, 2009  Luca Bruno <*****@*****.**>")

        self.connect ('response', self.on_response)
        self.show_all()
Ejemplo n.º 38
0
# -*- coding: utf-8 -*-
from os.path import join
from gettext import gettext as _
from invest.defs import VERSION
import invest
import gtk, gtk.gdk
from gnome import url_show

gtk.about_dialog_set_email_hook(lambda dialog, email: url_show("mailto:%s" % email))

invest_logo = None
try:
	invest_logo = gtk.gdk.pixbuf_new_from_file_at_size(join(invest.ART_DATA_DIR, "invest_neutral.svg"), 96, 96)
except Exception, msg:
	pass
	
def show_about():
	about = gtk.AboutDialog()
	infos = {
		"program-name" : _("Invest"),
		"logo" : invest_logo,
		"version" : VERSION,
		"comments" : _("Track your invested money."),
		"copyright" : "Copyright © 2004-2005 Raphael Slinckx."
	}

	about.set_authors(["Raphael Slinckx <*****@*****.**>"])
#	about.set_artists([])
#	about.set_documenters([])
	
	#translators: These appear in the About dialog, usual format applies.
Ejemplo n.º 39
0
Archivo: panel.py Proyecto: sun-im/ibus
ICON_ENGINE = "ibus-engine"

def show_uri(screen, link):
    try:
        gtk.show_uri(screen, link, 0)
    except:
        print >> sys.stderr, "pygtk do not support show_uri"

def url_hook(about, link, user_data):
    show_uri(about.get_screen(), link)

def email_hook(about, email, user_data):
    show_uri(about.get_screen(), "mailto:%s" % email)

gtk.about_dialog_set_url_hook(url_hook, None)
gtk.about_dialog_set_email_hook(email_hook, None)

class Panel(ibus.PanelBase):
    __gtype_name__ = "IBusPanel"
    def __init__(self, bus):
        super(Panel, self).__init__(bus)
        self.__bus = bus
        self.__config = self.__bus.get_config()
        self.__focus_ic = None
        self.__setup_pid = 0
        self.__prefix = os.getenv("IBUS_PREFIX")
        self.__data_dir = path.join(self.__prefix, "share", "ibus")
        # self.__icons_dir = path.join(self.__data_dir, "icons")
        self.__setup_cmd = path.join(self.__prefix, "bin", "ibus-setup")

        # hanlder signal
Ejemplo n.º 40
0
(URL_TYPE_SITE, URL_TYPE_EMAIL) = range(2)


@threaded
def open_link(obj, link, url_type):
    if url_type == URL_TYPE_SITE:
        command = [GNOME_OPEN_PATH, link]
    elif url_type == URL_TYPE_EMAIL:
        command = [GNOME_OPEN_PATH, "mailto:" + link]

    execute_command(command)


if GNOME_OPEN_PATH:
    gtk.about_dialog_set_email_hook(open_link, URL_TYPE_EMAIL)
    gtk.about_dialog_set_url_hook(open_link, URL_TYPE_SITE)


class about(gtk.AboutDialog):
    def __init__(self, logo, Parent=None):

        gtk.AboutDialog.__init__(self)

        page = ()

        if APP_AUTHORS:
            page = page + (_("Developers:"), ) + APP_AUTHORS + ('', )

        if APP_CONTRIB:
            page = page + (_('Contributors:'), ) + APP_CONTRIB
Ejemplo n.º 41
0
    try:
        gtk.show_uri(screen, link, 0)
    except:
        print >> sys.stderr, "pygtk do not support show_uri"


def url_hook(about, link, user_data):
    show_uri(about.get_screen(), link)


def email_hook(about, email, user_data):
    show_uri(about.get_screen(), "mailto:%s" % email)


gtk.about_dialog_set_url_hook(url_hook, None)
gtk.about_dialog_set_email_hook(email_hook, None)


class Panel(ibus.PanelBase):
    __gtype_name__ = "IBusPanel"

    def __init__(self, bus):
        super(Panel, self).__init__(bus)
        self.__bus = bus
        self.__config = self.__bus.get_config()
        self.__focus_ic = None
        self.__setup_pid = None
        self.__prefix = os.getenv("IBUS_PREFIX")
        self.__data_dir = path.join(self.__prefix, "share", "ibus")
        # self.__icons_dir = path.join(self.__data_dir, "icons")
        self.__setup_cmd = path.join(self.__prefix, "bin", "ibus-setup")
Ejemplo n.º 42
0
(URL_TYPE_SITE, URL_TYPE_EMAIL) = range(2)


@threaded
def open_link(obj, link, url_type):
    if url_type == URL_TYPE_SITE:
        command = [GNOME_OPEN_PATH, link]
    elif url_type == URL_TYPE_EMAIL:
        command = [GNOME_OPEN_PATH, "mailto:" + link]

    execute_command(command)


if GNOME_OPEN_PATH:
    gtk.about_dialog_set_email_hook(open_link, URL_TYPE_EMAIL)
    gtk.about_dialog_set_url_hook(open_link, URL_TYPE_SITE)


class about(gtk.AboutDialog):
    def __init__(self, logo, Parent=None):

        gtk.AboutDialog.__init__(self)

        page = ()

        if APP_AUTHORS:
            page = page + (_("Ocara:"),) + APP_AUTHORS + ("",)

        if APP_CONTRIB:
            page = page + (_("Ocara:"),) + APP_CONTRIB
Ejemplo n.º 43
0
    def __create_dialogs(self):
        self.open_chooser = gtk.FileChooserDialog(
            title=_('Select language database to open'),
            action=gtk.FILE_CHOOSER_ACTION_OPEN,
            buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN,
                     gtk.RESPONSE_OK))

        self.save_chooser = gtk.FileChooserDialog(
            title=_('Save as...'),
            action=gtk.FILE_CHOOSER_ACTION_SAVE,
            buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN,
                     gtk.RESPONSE_OK))

        all_filter = gtk.FileFilter()
        all_filter.set_name(_('All files'))
        all_filter.add_pattern('*')

        langdb_filter = gtk.FileFilter()
        langdb_filter.set_name(_('Language Database'))
        langdb_filter.add_mime_type('text/xml')
        langdb_filter.add_pattern('*.' + LanguageDB.FILE_EXTENSION)

        self.open_chooser.add_filter(all_filter)
        self.open_chooser.add_filter(langdb_filter)
        self.save_chooser.add_filter(langdb_filter)
        self.save_chooser.add_filter(all_filter)

        # Message dialog
        self.dlg_error = gtk.MessageDialog(parent=self.main_window,
                                           flags=gtk.DIALOG_MODAL,
                                           type=gtk.MESSAGE_ERROR,
                                           buttons=gtk.BUTTONS_OK,
                                           message_format='')

        self.dlg_info = gtk.MessageDialog(parent=self.main_window,
                                          flags=gtk.DIALOG_MODAL,
                                          type=gtk.MESSAGE_INFO,
                                          buttons=gtk.BUTTONS_OK,
                                          message_format='')

        self.dlg_prompt = gtk.MessageDialog(parent=self.main_window,
                                            flags=gtk.DIALOG_MODAL,
                                            type=gtk.MESSAGE_QUESTION,
                                            buttons=gtk.BUTTONS_YES_NO,
                                            message_format='')

        # Source dialog wrapper
        self.dlg_source = DlgSource(self.glade, self.icon_filename)
        # LanguageDB loading dialog
        self.dlg_dbload = DlgDBLoad(self.glade, self)

        # About dialog
        def on_about_url(dialog, uri, data):
            if data == "mail":
                openmailto.mailto(uri)
            elif data == "url":
                openmailto.open(uri)

        self.dlg_about = gtk.AboutDialog()
        gtk.about_dialog_set_url_hook(on_about_url, "url")
        gtk.about_dialog_set_email_hook(on_about_url, "mail")
        self.dlg_about.set_name("Spelt")
        self.dlg_about.set_version(__version__)
        self.dlg_about.set_copyright(
            _("© Copyright 2007-2008 Zuza Software Foundation"))
        self.dlg_about.set_comments(
            _("A tool to categorize words from a language database according to its root."
              ))
        self.dlg_about.set_license(LICENSE)
        self.dlg_about.set_website(
            "http://translate.sourceforge.net/wiki/spelt/index")
        self.dlg_about.set_website_label(_("Spelt website"))
        self.dlg_about.set_authors(
            ["Walter Leibbrandt <*****@*****.**>"])
        self.dlg_about.set_translator_credits(_("translator-credits"))
        self.dlg_about.set_icon(self.main_window.get_icon())
        # XXX entries that we may want to add (commented out):
        #self.dlg_about.set_logo()
        self.dlg_about.set_documenters([
            "Friedel Wolff <*****@*****.**>",
            "Wynand Winterbach <*****@*****.**>",
            "Walter Leibbrandt <*****@*****.**>"
        ])
        #self.dlg_about.set_artists()

        # Set icon on all dialogs
        for dlg in (self.open_chooser, self.save_chooser, self.dlg_error,
                    self.dlg_info, self.dlg_prompt, self.dlg_about):
            dlg.set_icon_from_file(self.icon_filename)
Ejemplo n.º 44
0
# -*- coding: utf-8 -*-
import gtk
from lib import i18n
import lib.common as common


def on_email(about, mail):
    gtk.show_uri(gtk.gdk.Screen(), "mailto:%s" % mail, 0L)

def on_url(about, link):
    gtk.show_uri(gtk.gdk.Screen(), link, 0L)

gtk.about_dialog_set_email_hook(on_email)
gtk.about_dialog_set_url_hook(on_url)

TRANSLATORS = _("translator-credits")

class AboutDialog(gtk.AboutDialog):
    def __init__(self, parent = None):
        gtk.AboutDialog.__init__(self)
        self.set_icon_from_file(common.APP_ICON)

        self.set_name(common.APPNAME)
        self.set_version(common.APPVERSION)
        self.set_copyright(common.COPYRIGHTS)
        self.set_logo(gtk.gdk.pixbuf_new_from_file(common.APP_ICON))
        self.set_translator_credits(TRANSLATORS)
        self.set_license(common.LICENSE)
        self.set_website(common.WEBSITE)
        self.set_website_label(_("%s's Website") % common.APPNAME)
        self.set_authors(common.AUTHORS)
Ejemplo n.º 45
0
	def __init_ui(self):
		"Sets up the main ui"

		gtk.about_dialog_set_url_hook(lambda d,l: gtk.show_uri(None, l, gtk.get_current_event_time()))
		gtk.about_dialog_set_email_hook(lambda d,l: gtk.show_uri(None, "mailto:" + l, gtk.get_current_event_time()))

		# set up applet
		self.applet.set_flags(gnomeapplet.EXPAND_MINOR)

		# set up window icons
		pixbufs = [ self.items.get_pixbuf("revelation", size) for size in ( 48, 32, 24, 16) ]
		pixbufs = [ pixbuf for pixbuf in pixbufs if pixbuf != None ]

		if len(pixbufs) > 0:
			gtk.window_set_default_icon_list(*pixbufs)

		# set up popup menu
		self.applet.setup_menu("""
			<popup name="button3">
				<menuitem name="file-unlock"	verb="file-unlock"	label=\"""" + _('Unlock File') + """\"		pixtype="stock" pixname="revelation-unlock" />
				<menuitem name="file-lock"	verb="file-lock"	label=\"""" + _('Lock File') + """\"		pixtype="stock" pixname="revelation-lock" />
				<menuitem name="file-reload"	verb="file-reload"	label=\"""" + _('Reload File') + """\"		pixtype="stock" pixname="revelation-reload" />
				<separator />
				<menuitem name="revelation"	verb="revelation"	label=\"""" + _('Start Revelation') + """\"	pixtype="stock" pixname="revelation-revelation" />
				<menuitem name="prefs"		verb="prefs"		label=\"""" + _('Preferences') + """\"		pixtype="stock"	pixname="gtk-properties" />
				<menuitem name="about"		verb="about"		label=\"""" + _('About') + """\"		pixtype="stock"	pixname="gnome-stock-about" />
			</popup>
		""", (
			( "about",		lambda w,d=None: self.about() ),
			( "file-lock",		lambda w,d=None: self.file_close() ),
			( "file-reload",	lambda w,d=None: self.file_reload() ),
			( "file-unlock",	lambda w,d=None: self.file_open(self.config.get("file")) ),
			( "prefs",		lambda w,d=None: self.prefs() ),
			( "revelation",		lambda w,d=None: util.execute_child("@bindir@/revelation") ),
		), None)

		# set up ui items
		self.entry = ui.Entry()
		self.entry.set_width_chars(14)
		self.entry.connect("activate", self.__cb_entry_activate)
		self.entry.connect("button_press_event", self.__cb_entry_buttonpress)
		self.entry.connect("key_press_event", lambda w,d=None: self.locktimer.reset())

		self.icon = ui.Image()
		self.icon.set_from_stock(ui.STOCK_REVELATION, ui.ICON_SIZE_APPLET)

		self.eventbox = ui.EventBox(self.icon)
		self.eventbox.connect("button_press_event", self.__cb_icon_buttonpress)

		self.hbox = ui.HBox(self.eventbox, self.entry)
		self.applet.add(self.hbox)
		
		# handle Gnome Panel background
		self.applet.connect("change-background",self.panel_bg)

		self.applet.show_all()

		# set up various ui element holders
		self.popup_entryview	= None
		self.popup_entrylist	= None

		self.entrymenu		= None
Ejemplo n.º 46
0
Archivo: ui.py Proyecto: krig/jamaendo
    def show_about(self, w, win):
        dialog = gtk.AboutDialog()
        dialog.set_program_name("jamaendo")
        dialog.set_website("http://jamaendo.garage.maemo.org/")
        dialog.set_website_label("http://jamaendo.garage.maemo.org/")
        dialog.set_version(VERSION)
        dialog.set_license("""Copyright (c) 2010, Kristoffer Gronlund
    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/>.



 Copyright (c) 2010, Kristoffer Gronlund
 All rights reserved.

 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
     * Redistributions of source code must retain the above copyright
       notice, this list of conditions and the following disclaimer.

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.



 Copyright (c) 2008-2010 The Panucci Audiobook and Podcast Player Project

 Panucci 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.

 Panucci 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 Panucci.  If not, see <http://www.gnu.org/licenses/>.

""")
        dialog.set_authors(("Kristoffer Gronlund <*****@*****.**>",
                            "Based on Panucci, written by Thomas Perl <thpinfo.com>",
                            "Icons by Joseph Wain <http://glyphish.com/>"))
        dialog.set_comments("""Jamaendo plays music from the music catalog of JAMENDO.

JAMENDO is an online platform that distributes musical works under Creative Commons licenses.""")
        gtk.about_dialog_set_email_hook(self.open_link, dialog)
        gtk.about_dialog_set_url_hook(self.open_link, dialog)
        dialog.connect( 'response', lambda dlg, response: dlg.destroy())
        for parent in dialog.vbox.get_children():
            for child in parent.get_children():
                if isinstance(child, gtk.Label):
                    child.set_selectable(False)
                    child.set_alignment(0.0, 0.5)
        dialog.run()
        dialog.destroy()
Ejemplo n.º 47
0
        parser = make_parser()
        parser.setContentHandler(AuthorParser(authors, contributors))

        authors_file = open(const.AUTHORS_FILE)
        parser.parse(authors_file)
        authors_file.close()

        authors_text = ([AUTHORS_HEADER] + authors + [CONTRIB_HEADER] +
                        contributors)

    except (IOError, OSError, SAXParseException):
        authors_text = const.AUTHORS

    return authors_text


#-------------------------------------------------------------------------
#
# _show_url
#
#-------------------------------------------------------------------------
def _show_url(dialog, link, prefix):
    """Show links in About dialog."""
    if prefix is not None:
        link = prefix + link
    display_url(link)


gtk.about_dialog_set_url_hook(_show_url, None)
gtk.about_dialog_set_email_hook(_show_url, 'mailto:')
Ejemplo n.º 48
0
#!/usr/bin/python

import gtk
import os, webbrowser


def url_hook(dlg, link):
    webbrowser.open(link, new=2, autoraise=1)


def email_hook(dlg, link):
    webbrowser.open(link)


gtk.about_dialog_set_url_hook(url_hook)
gtk.about_dialog_set_email_hook(email_hook)


class AboutDialog(gtk.AboutDialog):
    def __init__(self, logo=None):
        gtk.AboutDialog.__init__(self)
        self.set_properties(
            **{
                "name": "TDFPlayerApp_About",
                "version": "1.0",
                "copyright": "Copyright (c) 2009-2009 Cheng Gang",
                "comments": "A little program that helps working with tdf.",
                "license": "You can copy it freely.",
                "website": "http://madge.appen.com.au/~gcheng/",
                "authors": ["Gang Cheng [email protected]"],
                "documenters": ["Gang Cheng [email protected]"],
Ejemplo n.º 49
0
                    elif status == 0:
                        status_text = "running"
                    else:
                        status_text = "Parked (%.3fs remaining)" % \
                            self.paused[device]
                    tt_text += "\n%s: %s" % (device, str(status_text))
                self.set_tooltip(tt_text)

            else:
                assert False

        return True


def on_launch_browser_mailer(dialog, link, user_data=None):
    if user_data == 'mail':
        gtk.show_uri(None, 'mailto:' + link, gtk.gdk.CURRENT_TIME)
    else:
        gtk.show_uri(None, link, gtk.gdk.CURRENT_TIME)


if __name__ == "__main__":
    try:
        gtk.about_dialog_set_email_hook(on_launch_browser_mailer, 'mail')
        gtk.about_dialog_set_url_hook(on_launch_browser_mailer, 'url')

        hdaps_icon = ThinkHDAPSApplet()
        gtk.main()
    except KeyboardInterrupt:
        pass
Ejemplo n.º 50
0
# You should have received a copy of the GNU General Public License
# along with Project Hamster.  If not, see <http://www.gnu.org/licenses/>.


from os.path import join
from configuration import runtime
import gtk

def on_email(about, mail):
    gtk.show_uri(gtk.gdk.Screen(), "mailto:%s" % mail, 0L)

def on_url(about, link):
    gtk.show_uri(gtk.gdk.Screen(), link, 0L)

gtk.about_dialog_set_email_hook(on_email)
gtk.about_dialog_set_url_hook(on_url)

class About(object):
    def __init__(self, parent = None):
        about = gtk.AboutDialog()
        self.window = about
        infos = {
            "program-name" : _("Time Tracker"),
            "name" : _("Time Tracker"), #this should be deprecated in gtk 2.10
            "version" : runtime.version,
            "comments" : _(u"Project Hamster — track your time"),
            "copyright" : _(u"Copyright © 2007–2010 Toms Bauģis and others"),
            "website" : "http://projecthamster.wordpress.com/",
            "website-label" : _("Project Hamster Website"),
            "title": _("About Time Tracker"),
Ejemplo n.º 51
0
class AppIndicator(WindowBase):
    def quit(self, widget):
        sys.exit(0)

    def _create_menu(self):
        self.indicatormenu = gtk.Menu()

        self.visible_item = gtk.MenuItem("Visible/Invisible")
        self.preference_item = gtk.MenuItem("Settings")
        self.color_item = gtk.MenuItem("BaseColor")
        self.about_item = gtk.MenuItem("About")
        self.quit_item = gtk.MenuItem("Quit")

        self.visible_item.connect("activate", self._visibleCtrl)
        self.preference_item.connect("activate", self._preferences)
        self.color_item.connect("activate", self._selectColor)
        self.about_item.connect("activate", self._about)
        self.quit_item.connect("activate", self.quit)

        self.visible_item.show()
        self.preference_item.show()
        self.color_item.show()
        self.about_item.show()
        self.quit_item.show()

        self.indicatormenu.append(self.visible_item)
        self.indicatormenu.append(self.preference_item)
        self.indicatormenu.append(self.color_item)
        self.indicatormenu.append(self.about_item)
        self.indicatormenu.append(self.quit_item)

    def btnDaemonize_clicked(self, widget):
        self.window.hide()
        self.window.set_icon(self._select_icon(self.bCanceled))
        self.bCanceled = False
        self.bVisible = False
        self.indicator.set_icon('wallopt')
        self._switchWidget(False)
        self.timeoutObject = glibobj.timeout_add(
            self.option.opts.interval * 1000, self._timeout, self)
        self.logging.debug('%20s' % 'Start Daemonize ... interval [%d].' %
                           self.option.opts.interval)
        self._runChanger()

    def btnCancelDaemonize_clicked(self, widget):
        self.bCanceled = True
        self.indicator.set_icon('wallopt_off')
        self.window.set_icon(self._select_icon(self.bCanceled))
        glibobj.source_remove(self.timeoutObject)
        self.timeoutObject = None
        self._writeStatusbar(self.statbar, self.cid_stat,
                             'Cancel ... changer action.')
        self._switchWidget(True)

    def _setEmail(self, email):
        gtk.show_uri(None, "mailto:%s" % email, gtk.gdk.CURRENT_TIME)

    def _setUrl(self, link):
        gtk.show_uri(None, link, gtk.gdk.CURRENT_TIME)

    def _aboutDialog_destroy(self, dialog, response):
        dialog.destroy()

    def btnAbout_clicked(self, widget):
        icon = self._select_icon(self.bCanceled)
        about = gtk.AboutDialog()
        about.set_name('WallpaperOptimizer')
        about.set_logo(icon)  # gtk.gdk.Pixbuf
        #		about.set_license('GPLv3')
        about.set_copyright('Copyright @ 2012-2013 Katsuhiro Ogikubo')
        about.set_comments('wallpaperoptimizer is multi wallpaper changer.')
        about.set_version(WallpaperOptimizer.VERSION)
        about.set_authors([WallpaperOptimizer.AUTHOR])
        about.set_documenters([WallpaperOptimizer.AUTHOR])
        about.set_translator_credits(WallpaperOptimizer.AUTHOR)
        about.set_website('http://oggy.no-ip.info/blog/software/')
        about.set_website_label('WallpaperOptimizer page')
        about.connect("response", self._aboutDialog_destroy)
        about.show_all()

    gtk.about_dialog_set_email_hook(_setEmail)
    gtk.about_dialog_set_url_hook(_setUrl)

    def _select_icon(self, bCanceled):
        if bCanceled:
            icon = self.dis_icon
        else:
            icon = self.ena_icon
        return icon

    def _loadIcon(self):
        self.dis_icon = gtk.gdk.pixbuf_new_from_file(
            os.path.abspath(
                os.path.join(self.indicator.get_icon_theme_path(),
                             'wallopt_off.png')))
        self.ena_icon = gtk.gdk.pixbuf_new_from_file(
            os.path.abspath(
                os.path.join(self.indicator.get_icon_theme_path(),
                             'wallopt.png')))

    def __init__(self, option, logging):
        # id, icon_name, category, icon_theme_path
        self.indicator = appindicator.Indicator(
            'WallpaperOptimzier', "wallopt_off",
            appindicator.CATEGORY_APPLICATION_STATUS,
            WallpaperOptimizer.ICONDIR)
        self.option = option
        self.logging = logging

        #  Initialize Status
        self.timeoutObject = None
        self.bVisible = True
        self.bCanceled = True
        self.bEntryPath = [False, False]

        #  Initialize AppIndicator
        self._loadIcon()
        self.indicator.set_status(appindicator.STATUS_ACTIVE)
        self._create_menu()
        self.indicator.set_menu(self.indicatormenu)
        gtk.window_set_default_icon(self._select_icon(self.bCanceled))

        self.indicator.set_icon('wallopt')

        #  optionInitialize
        self.option.opts.window = True
        self.option.args = ['', '']
        self.core = Core(self.option)

        #  Initialize Applet
        self._initializeWindow()
Ejemplo n.º 52
0
                        status_text = "running"
                    else:
                        status_text = "Parked (%.3fs remaining)" % \
                            self.paused[device]
                    tt_text += "\n%s: %s" % (device, str(status_text))
                self.set_tooltip(tt_text)

            else:
                assert False

        return True


def on_launch_browser_mailer(dialog, link, user_data=None):
    if user_data == 'mail':
        gtk.show_uri(None, 'mailto:'+link, gtk.gdk.CURRENT_TIME)
    else:
        gtk.show_uri(None, link, gtk.gdk.CURRENT_TIME)


if __name__ == "__main__":
    try:
        gtk.about_dialog_set_email_hook(on_launch_browser_mailer, 'mail')
        gtk.about_dialog_set_url_hook(on_launch_browser_mailer, 'url')

        hdaps_icon = ThinkHDAPSApplet()
        gtk.main()
    except KeyboardInterrupt:
        pass