~jconti/recent-notifications/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
"""
About.py
by Jason Conti
February 19, 2010

Shows the About dialog for the applet.
"""

import gtk

from Globals import VERSION, WEBSITE
from Icon import load_icon
from Translations import _

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/>.
""")

def show_about(parent):
  about = gtk.AboutDialog()

  about.set_authors(["Jason Conti <jason.conti@gmail.com>"])
  about.set_comments(_("View recent notifications"))
  about.set_copyright(_(u"Copyright \xa9 2010 Jason Conti."))
  about.set_license(license)
  about.set_translator_credits(_("translator-credits"))

  icon = load_icon("recent-notifications")
  if icon != None:
    about.set_logo(icon)

  about.set_name(_("Recent Notifications"))
  about.set_version(VERSION)
  about.set_website(WEBSITE)

  about.connect("response", lambda self, *args: self.destroy())
  about.set_screen(parent.get_screen())
  about.show_all()