1
# -*- coding: utf-8 -*-
3
# Copyright (c) 2007 The PIDA Project
5
#Permission is hereby granted, free of charge, to any person obtaining a copy
6
#of this software and associated documentation files (the "Software"), to deal
7
#in the Software without restriction, including without limitation the rights
8
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
#copies of the Software, and to permit persons to whom the Software is
10
#furnished to do so, subject to the following conditions:
12
#The above copyright notice and this permission notice shall be included in
13
#all copies or substantial portions of the Software.
15
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
from pida.core.service import Service
29
from pida.core.features import FeaturesConfig
30
from pida.core.commands import CommandsConfig
31
from pida.core.events import EventsConfig
32
from pida.core.actions import ActionsConfig
33
from pida.core.actions import TYPE_NORMAL, TYPE_MENUTOOL, TYPE_RADIO, TYPE_TOGGLE
35
from pida.core.environment import get_pixmap_path
37
from pida import PIDA_NAME, PIDA_VERSION, PIDA_AUTHORS, PIDA_COPYRIGHT, \
38
PIDA_LICENSE, PIDA_WEBSITE, PIDA_SHORT_DESCRIPTION
42
from pida.core.locale import Locale
43
locale = Locale('help')
46
class PidaAboutDialog(gtk.AboutDialog):
48
def __init__(self, boss):
49
gtk.AboutDialog.__init__(self)
50
self.set_transient_for(boss.get_window())
51
self.set_name(PIDA_NAME)
52
self.set_version(PIDA_VERSION)
53
self.set_logo(self._create_logo())
54
self.set_copyright(PIDA_COPYRIGHT)
55
self.set_license(PIDA_LICENSE)
56
self.set_wrap_license(True)
57
self.set_authors(PIDA_AUTHORS)
58
self.set_website(PIDA_WEBSITE)
59
self.set_comments(PIDA_SHORT_DESCRIPTION)
61
def _create_logo(self):
62
pb = gdk.pixbuf_new_from_file_at_size(
63
get_pixmap_path('pida-icon.svg'), 128, 128)
66
class HelpActionsConfig(ActionsConfig):
68
def create_actions(self):
75
self.show_about_dialog
78
def show_about_dialog(self, action):
79
dialog = PidaAboutDialog(self.svc.boss)
85
"""Describe your Service Here"""
87
actions_config = HelpActionsConfig
89
# Required Service attribute for service loading
94
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: