home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / lib / python2.4 / site-packages / invest / about.py < prev    next >
Encoding:
Python Source  |  2006-08-30  |  1.2 KB  |  47 lines

  1. from os.path import join
  2. from gettext import gettext as _
  3. from invest.defs import VERSION
  4. import invest
  5. import gtk, gtk.gdk, gnomevfs, gobject
  6.  
  7.  
  8. def on_email(about, mail):
  9.     gnomevfs.url_show("mailto:%s" % mail)
  10.  
  11. def on_url(about, link):
  12.     gnomevfs.url_show(link)
  13.  
  14. gtk.about_dialog_set_email_hook(on_email)
  15. gtk.about_dialog_set_url_hook(on_url)
  16.  
  17. invest_logo = None
  18. try:
  19.     invest_logo = gtk.gdk.pixbuf_new_from_file_at_size(join(invest.ART_DATA_DIR, "invest.svg"), 96,96)
  20. except Exception, msg:
  21.     pass
  22.     
  23. def show_about():
  24.     about = gtk.AboutDialog()
  25.     infos = {
  26.         "name" : _("Invest"),
  27.         "logo" : invest_logo,
  28.         "version" : VERSION,
  29.         "comments" : _("Track your invested money."),
  30.         "copyright" : "Copyright ┬⌐ 2004-2005 Raphael Slinckx.",
  31.         "website" : "http://raphael.slinckx.net/invest",
  32.         "website-label" : _("Invest Website"),
  33.     }
  34.  
  35.     about.set_authors(["Raphael Slinckx <raphael@slinckx.net>"])
  36. #    about.set_artists([])
  37. #    about.set_documenters([])
  38.     
  39.     #translators: These appear in the About dialog, usual format applies.
  40.     about.set_translator_credits( _("translator-credits") )
  41.     
  42.     for prop, val in infos.items():
  43.         about.set_property(prop, val)
  44.     
  45.     about.connect ("response", lambda self, *args: self.destroy ())
  46.     about.show_all()
  47.