1
# -*- coding: utf-8 -*-
3
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
4
#Copyright (c) 2006 Ali Afshar aafshar@gmail.com
6
#Permission is hereby granted, free of charge, to any person obtaining a copy
7
#of this software and associated documentation files (the "Software"), to deal
8
#in the Software without restriction, including without limitation the rights
9
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
#copies of the Software, and to permit persons to whom the Software is
11
#furnished to do so, subject to the following conditions:
13
#The above copyright notice and this permission notice shall be included in
14
#all copies or substantial portions of the Software.
16
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
import pida.core.service as service
29
class about_dialog(gtk.AboutDialog):
31
gtk.AboutDialog.__init__(self)
34
class help(service.service):
37
dialog = gtk.AboutDialog()
38
dialog.set_transient_for(self.boss.get_main_window())
39
from pkg_resources import Requirement, resource_filename
40
icon_file = resource_filename(Requirement.parse('pida'),
43
im.set_from_file(icon_file)
44
dialog.set_logo(im.get_pixbuf())
45
dialog.set_version(self.boss.version)
46
dialog.set_copyright(copyright)
47
dialog.set_license(license)
48
dialog.set_authors(authors)
51
def act_about(self, action):
54
def get_menu_definition(self):
56
<menu name="base_help" action="base_help_menu">
57
<menuitem name="about" action="help+about" />
62
from pkg_resources import Requirement, resource_filename
63
req = Requirement.parse('pida')
64
license_file = open(resource_filename(req, 'COPYING'))
65
license = license_file.read()
67
authors_file = open(resource_filename(req, 'AUTHORS'))
68
authors = [n.strip() for n in authors_file.read().splitlines()]
70
copyright = 'Copyright (c) 2005-6 The PIDA Project aafshar@gmail.com'