~vcs-imports/gnome-mag/master

« back to all changes in this revision

Viewing changes to colorblind/ui/About.py

  • Committer: Carlos Eduardo Rodrigues Diógenes
  • Date: 2007-06-03 23:52:07 UTC
  • Revision ID: git-v1:42a8898cb38357218626e4c81555423da8ab37cd
Tags: GNOME_MAG_0_14_5
commit the changes of the colorblind applet

svn path=/trunk/; revision=515

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
from os.path import join
 
3
from gettext import gettext as _
 
4
from colorblind.defs import VERSION
 
5
from colorblind.Utils import load_icon
 
6
import gtk, gtk.gdk, gnomevfs, gobject
 
7
import colorblind
 
8
 
 
9
 
 
10
def on_email(about, mail):
 
11
        gnomevfs.url_show("mailto:%s" % mail)
 
12
 
 
13
def on_url(about, link):
 
14
        gnomevfs.url_show(link)
 
15
 
 
16
gtk.about_dialog_set_email_hook(on_email)
 
17
gtk.about_dialog_set_url_hook(on_url)
 
18
 
 
19
def show_about(parent):
 
20
        about = gtk.AboutDialog()
 
21
        infos = {
 
22
                "name" : _("Colorblind Applet"),
 
23
                "logo-icon-name" : "colorblind-applet",
 
24
                "version" : VERSION,
 
25
                "comments" : _("Image filters for the colorblind. This is applet is part of gnome-mag, a magnification service for GNOME."),
 
26
                "copyright" : "Copyright © 2007 Carlos Eduardo Rodrigues Diógenes.",
 
27
                "website" : "http://live.gnome.org/GnomeMag",
 
28
                "website-label" : _("gnome-mag website"),
 
29
        }
 
30
 
 
31
        about.set_authors(["Carlos Eduardo Rodrigues Diógenes <cerdiogenes@gmail.com>"])
 
32
        about.set_artists(["Daniel Ruoso <daniel@ruoso.com>"])
 
33
#       about.set_documenters([])
 
34
        
 
35
        #translators: These appear in the About dialog, usual format applies.
 
36
        about.set_translator_credits( _("translator-credits") )
 
37
        
 
38
        for prop, val in infos.items():
 
39
                about.set_property(prop, val)
 
40
        
 
41
        about.connect("response", lambda self, *args: self.destroy())
 
42
        about.set_screen(parent.get_screen())
 
43
        about.show_all()