summaryrefslogtreecommitdiffstats
path: root/src/Gui/ABRTPlugin.py
blob: 4a94e6705ab9d43c8b530a2897b718978eff46c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# -*- coding: utf-8 -*-

""" PluginInfo keys:
WWW
Name
Enabled
GTKBuilder
Version
Type
Email
Description
"""
from abrt_utils import _

class PluginSettings(dict):
    def __init__(self):
        #print "Init plugin settings"
        pass

    def __init__(self, settings_dict):
        for key in settings_dict.keys():
            self[key] = settings_dict[key]

"""Class to represent common plugin info"""
class PluginInfo():
    types = {"Analyzer":_("Analyzer plugins"), 
             "Action":_("Action plugins"),
             "Reporter":_("Reporter plugins"),
             "Database":_("Database plugins")}
    keys = ["WWW", "Name", "Enabled",
            "GTKBuilder", "Version",
            "Type", "Email", "Description"]

    def __init__(self):
        #print "Init PluginInfo"
        self.WWW = None
        self.Name = None
        self.Enabled = None
        self.GTKBuilder = None
        self.Version = None
        self.Type = None
        self.Email = None
        self.Description = None
        self.Settings = None

    def getName(self):
        return self.Name

    def getDescription(self):
        return self.Description
        
    def getType(self):
        return self.Type

    def getGUI(self):
        return self.GTKBuilder

    def __str__(self):
        return self.Name
        
    def __getitem__(self, item):
        return self.__dict__[item]