~jconti/recent-notifications/trunk

« back to all changes in this revision

Viewing changes to unity/About.py

  • Committer: Jason Conti
  • Date: 2011-03-28 15:21:31 UTC
  • Revision ID: jason.conti@gmail.com-20110328152131-8lljgad7fnqzdcy4
Added a working menu and about dialog. Found more issues with gobject introspection in natty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
"""
 
2
About.py
 
3
by Jason Conti
 
4
February 19, 2010
 
5
updated: March 28, 2011
 
6
 
 
7
Shows the About dialog for the applet.
 
8
"""
 
9
 
 
10
from gi.repository import Gtk
 
11
 
 
12
import Icon
 
13
 
 
14
from Globals import VERSION, WEBSITE
 
15
from Translations import _
 
16
 
 
17
license = _("""
 
18
This program is free software: you can redistribute it and/or modify
 
19
it under the terms of the GNU General Public License as published by
 
20
the Free Software Foundation, either version 3 of the License, or
 
21
(at your option) any later version.
 
22
 
 
23
This program is distributed in the hope that it will be useful,
 
24
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
25
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
26
GNU General Public License for more details.
 
27
 
 
28
You should have received a copy of the GNU General Public License
 
29
along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
30
""")
 
31
 
 
32
def show_about():
 
33
  about = Gtk.AboutDialog()
 
34
 
 
35
  #about.set_authors("Jason Conti <jason.conti@gmail.com>")
 
36
  about.set_comments(_("View recent notifications"))
 
37
  about.set_copyright(_(u"Copyright \xa9 2010 Jason Conti."))
 
38
  about.set_license(license)
 
39
  about.set_translator_credits(_("translator-credits"))
 
40
 
 
41
  icon = Icon.load("recent-notifications")
 
42
  if icon != None:
 
43
    about.set_logo(icon)
 
44
 
 
45
  about.set_name(_("Recent Notifications"))
 
46
  about.set_version(VERSION)
 
47
  about.set_website(WEBSITE)
 
48
 
 
49
  about.connect("response", lambda self, *args: self.destroy())
 
50
  about.show_all()
 
51