aboutsummaryrefslogtreecommitdiff
path: root/parrot_zik/indicator/base.py
blob: 8204fa9e3135021dc3b6973f03ea79a475e79d59 (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
class BaseIndicator(object):
    def __init__(self, icon, menu, statusicon):
        self.menu = menu
        self.statusicon = statusicon
        self.setIcon(icon)

    def setIcon(self, name):
        raise NotImplementedError

    def main(self):
        raise NotImplementedError

    def show_about_dialog(self, widget):
        raise NotImplementedError

    def quit(self, _):
        raise NotImplementedError

class MenuItemBase(object):
    def __init__(self, base_item, sensitive, visible):
        self.base_item = base_item
        self.set_sensitive(sensitive)
        if visible:
            self.show()
        else:
            self.hide()

    def set_sensitive(self, option):
        raise NotImplementedError

    def set_active(self, option):
        raise NotImplementedError

    def get_active(self):
        raise NotImplementedError

    def set_label(self, option):
        raise NotImplementedError

    def show(self):
        self.base_item.show()

    def hide(self):
        self.base_item.hide()

    def set_submenu(self, menu):
        raise NotImplementedError