~kklimonda/ubuntu/natty/hamster-applet/lp.697667

« back to all changes in this revision

Viewing changes to src/hamster/about.py

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2010-02-10 02:52:31 UTC
  • mfrom: (1.1.14 upstream)
  • Revision ID: james.westby@ubuntu.com-20100210025231-x0q5h4q7nlvihl09
Tags: 2.29.90-0ubuntu1
* New upstream version
  - workspace tracking - switch activity, when switching desktops
  - chart improvements - theme friendly and less noisier
  - for those without GNOME panel there is now a standalone version, 
    accessible via Applications -> Accessories -> Time Tracker
  - overview window remembers position
  - maintaining cursor on the selected row after edits / refreshes
  - descriptions once again in the main input field, delimited by comma
  - activity suggestion box now sorts items by recency (Patryk Zawadzki)
  - searching
  - simplified save report dialog, thanks to the what you see is what you 
    report revamp
  - overview/stats replaced with activities / totals and stats accessible 
    from totals
  - interactive graphs to drill down in totals
  - miscellaneous performance improvements
  - pixel-perfect graphs
* Updated 01_startup-fix.patch to apply to new source layout
* debian/control:
  - Add build-depend on gnome-doc-utils

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
 
 
3
# Copyright (C) 2007, 2008 Toms Bauģis <toms.baugis at gmail.com>
 
4
 
 
5
# This file is part of Project Hamster.
 
6
 
 
7
# Project Hamster is free software: you can redistribute it and/or modify
 
8
# it under the terms of the GNU General Public License as published by
 
9
# the Free Software Foundation, either version 3 of the License, or
 
10
# (at your option) any later version.
 
11
 
 
12
# Project Hamster is distributed in the hope that it will be useful,
 
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
# GNU General Public License for more details.
 
16
 
 
17
# You should have received a copy of the GNU General Public License
 
18
# along with Project Hamster.  If not, see <http://www.gnu.org/licenses/>.
 
19
 
 
20
 
 
21
from os.path import join
 
22
from defs import VERSION
 
23
import gtk
 
24
 
 
25
def on_email(about, mail):
 
26
    gtk.show_uri(gtk.gdk.Screen(), "mailto:%s" % mail, 0L)
 
27
 
 
28
def on_url(about, link):
 
29
    gtk.show_uri(gtk.gdk.Screen(), link, 0L)
 
30
 
 
31
gtk.about_dialog_set_email_hook(on_email)
 
32
gtk.about_dialog_set_url_hook(on_url)
 
33
 
 
34
class About(object):
 
35
    def __init__(self, parent = None):
 
36
        about = gtk.AboutDialog()
 
37
        self.window = about
 
38
        infos = {
 
39
            "program-name" : _("Time Tracker"),
 
40
            "name" : _("Time Tracker"), #this should be deprecated in gtk 2.10
 
41
            "version" : VERSION,
 
42
            "comments" : _("Project Hamster — track your time"),
 
43
            "copyright" : _(u"Copyright © 2007–2009 Toms Bauģis and others"),
 
44
            "website" : "http://projecthamster.wordpress.com/",
 
45
            "website-label" : _("Project Hamster Website"),
 
46
            "title": _("About Time Tracker"),
 
47
            "wrap-license": True
 
48
        }
 
49
 
 
50
        about.set_authors(["Toms Bauģis <toms.baugis@gmail.com>",
 
51
                           "Patryk Zawadzki <patrys@pld-linux.org>",
 
52
                           "Pēteris Caune <cuu508@gmail.com>",
 
53
                           "Juanje Ojeda <jojeda@emergya.es>"])
 
54
        about.set_artists(["Kalle Persson <kalle@kallepersson.se>"])
 
55
 
 
56
        about.set_translator_credits(_("translator-credits"))
 
57
 
 
58
        for prop, val in infos.items():
 
59
            about.set_property(prop, val)
 
60
 
 
61
        about.set_logo_icon_name("hamster-applet")
 
62
 
 
63
        about.connect("response", lambda self, *args: self.destroy())
 
64
        about.show_all()
 
65