~ubuntu-branches/ubuntu/wily/hamster-applet/wily

« back to all changes in this revision

Viewing changes to hamster/about.py

  • Committer: Bazaar Package Importer
  • Author(s): Pedro Fragoso
  • Date: 2008-12-15 17:42:14 UTC
  • mto: (1.1.16 upstream) (20.1.1 lucid-proposed)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20081215174214-ri1ezw1c2pdnl3i6
Tags: upstream-2.25.3
Import upstream version 2.25.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
from os.path import join
22
22
from hamster import SHARED_DATA_DIR
23
23
from hamster.defs import VERSION
24
 
import gtk, gnomevfs
 
24
import gtk
25
25
import hamster
26
26
 
27
27
 
28
28
def on_email(about, mail):
29
 
    gnomevfs.url_show("mailto:%s" % mail)
 
29
    gtk.show_uri(gtk.gdk.Screen(), "mailto:%s" % mail, 0L)
30
30
 
31
31
def on_url(about, link):
32
 
    gnomevfs.url_show(link)
 
32
    gtk.show_uri(gtk.gdk.Screen(), link, 0L)
33
33
 
34
34
gtk.about_dialog_set_email_hook(on_email)
35
35
gtk.about_dialog_set_url_hook(on_url)
39
39
    infos = {
40
40
        "name" : _("Time Tracker"),
41
41
        "version" : VERSION,
42
 
        "comments" : _("Time tracking for masses."),
43
 
        "copyright" : _("Copyright © 2007-2008 Toms Baugis and others"),
44
 
        "website" : "http://live.gnome.org/ProjectHamster",
 
42
        "comments" : _("Project Hamster - track your time"),
 
43
        "copyright" : _(u"Copyright © 2007-2008 Toms Baugis and others"),
 
44
        "website" : "http://live.gnome.org/ProjectHamster",
45
45
        "website-label" : _("Hamster Website"),
46
46
    }
47
 
 
 
47
    
48
48
    about.set_authors(["Toms Baugis <toms.baugis@gmail.com>",
49
49
                       "Patryk Zawadzki <patrys@pld-linux.org>",
50
50
                       "Peteris Caune <cuu508@gmail.com>",
51
 
                       "Juanje Ojeda <jojeda@emergya.es>"])
 
51
                       "Juanje Ojeda <jojeda@emergya.es>"])
52
52
    about.set_artists(["Kalle Persson <kalle@kallepersson.se>"])
53
 
 
 
53
    
54
54
    about.set_translator_credits(_("translator-credits"))
55
55
 
56
56
    for prop, val in infos.items():
57
57
        about.set_property(prop, val)
58
58
 
59
 
    hamster_logo = join(SHARED_DATA_DIR, 'art', 'hamster-applet.png')
60
 
        
61
 
    zupa = gtk.gdk.pixbuf_new_from_file(hamster_logo)
62
 
    about.set_logo(zupa)
 
59
    about.set_logo_icon_name("hamster-applet")
 
60
    
 
61
    def on_destroy():
 
62
        parent.about = None
63
63
 
64
64
    about.connect("response", lambda self, *args: self.destroy())
 
65
    about.connect("destroy", lambda self, *args: on_destroy())
65
66
    about.set_screen(parent.get_screen())
66
67
    about.show_all()
 
68
    parent.about = about
67
69