Adding the ignore file
[gc-dialer] / src / null_views.py
1 #!/usr/bin/python2.5
2
3 """
4 DialCentral - Front end for Google's Grand Central service.
5 Copyright (C) 2008  Mark Bergman bergman AT merctech DOT com
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 This library 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 GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
20 """
21
22 import gobject
23 import gtk
24
25
26 class Dialpad(object):
27
28         def __init__(self, widgetTree):
29                 self._numberdisplay = widgetTree.get_widget("numberdisplay")
30                 self._dialButton = widgetTree.get_widget("dial")
31                 self._smsButton = widgetTree.get_widget("sms")
32
33         def enable(self):
34                 self._dialButton.set_sensitive(False)
35                 self._smsButton.set_sensitive(False)
36
37         def disable(self):
38                 self._dialButton.set_sensitive(True)
39                 self._smsButton.set_sensitive(True)
40
41         @staticmethod
42         def name():
43                 return "Dialpad"
44
45         def load_settings(self, config, sectionName):
46                 pass
47
48         def save_settings(self, config, sectionName):
49                 """
50                 @note Thread Agnostic
51                 """
52                 pass
53
54
55 class AccountInfo(object):
56
57         def __init__(self, widgetTree):
58                 self._callbackList = gtk.ListStore(gobject.TYPE_STRING)
59                 self._accountViewNumberDisplay = widgetTree.get_widget("gcnumber_display")
60                 self._callbackSelectButton = widgetTree.get_widget("callbackSelectButton")
61                 self._clearCookiesButton = widgetTree.get_widget("clearcookies")
62
63                 self._notifyCheckbox = widgetTree.get_widget("notifyCheckbox")
64                 self._minutesEntryButton = widgetTree.get_widget("minutesEntryButton")
65                 self._missedCheckbox = widgetTree.get_widget("missedCheckbox")
66                 self._voicemailCheckbox = widgetTree.get_widget("voicemailCheckbox")
67                 self._smsCheckbox = widgetTree.get_widget("smsCheckbox")
68
69         def enable(self):
70                 self._callbackSelectButton.set_sensitive(False)
71                 self._clearCookiesButton.set_sensitive(False)
72
73                 self._notifyCheckbox.set_sensitive(False)
74                 self._minutesEntryButton.set_sensitive(False)
75                 self._missedCheckbox.set_sensitive(False)
76                 self._voicemailCheckbox.set_sensitive(False)
77                 self._smsCheckbox.set_sensitive(False)
78
79                 self._accountViewNumberDisplay.set_label("")
80
81         def disable(self):
82                 self._callbackSelectButton.set_sensitive(True)
83                 self._clearCookiesButton.set_sensitive(True)
84
85                 self._notifyCheckbox.set_sensitive(True)
86                 self._minutesEntryButton.set_sensitive(True)
87                 self._missedCheckbox.set_sensitive(True)
88                 self._voicemailCheckbox.set_sensitive(True)
89                 self._smsCheckbox.set_sensitive(True)
90
91         @staticmethod
92         def update(force = False):
93                 return False
94
95         @staticmethod
96         def clear():
97                 pass
98
99         @staticmethod
100         def name():
101                 return "Account Info"
102
103         def load_settings(self, config, sectionName):
104                 pass
105
106         def save_settings(self, config, sectionName):
107                 """
108                 @note Thread Agnostic
109                 """
110                 pass
111
112
113 class CallHistoryView(object):
114
115         def __init__(self, widgetTree):
116                 self._historyFilterSelector = widgetTree.get_widget("historyFilterSelector")
117
118         def enable(self):
119                 self._historyFilterSelector.set_sensitive(False)
120
121         def disable(self):
122                 self._historyFilterSelector.set_sensitive(True)
123
124         def update(self, force = False):
125                 return False
126
127         @staticmethod
128         def clear():
129                 pass
130
131         @staticmethod
132         def name():
133                 return "Recent Calls"
134
135         def load_settings(self, config, sectionName):
136                 pass
137
138         def save_settings(self, config, sectionName):
139                 """
140                 @note Thread Agnostic
141                 """
142                 pass
143
144
145 class MessagesView(object):
146
147         def __init__(self, widgetTree):
148                 self._messageTypeButton = widgetTree.get_widget("messageTypeButton")
149                 self._messageStatusButton = widgetTree.get_widget("messageStatusButton")
150
151         def enable(self):
152                 self._messageTypeButton.set_sensitive(False)
153                 self._messageStatusButton.set_sensitive(False)
154
155         def disable(self):
156                 self._messageTypeButton.set_sensitive(True)
157                 self._messageStatusButton.set_sensitive(True)
158
159         def update(self, force = False):
160                 return False
161
162         @staticmethod
163         def clear():
164                 pass
165
166         @staticmethod
167         def name():
168                 return "Messages"
169
170         def load_settings(self, config, sectionName):
171                 pass
172
173         def save_settings(self, config, sectionName):
174                 """
175                 @note Thread Agnostic
176                 """
177                 pass
178
179
180 class ContactsView(object):
181
182         def __init__(self, widgetTree):
183                 self._bookSelectionButton = widgetTree.get_widget("addressbookSelectButton")
184
185         def enable(self):
186                 self._bookSelectionButton.set_sensitive(False)
187
188         def disable(self):
189                 self._bookSelectionButton.set_sensitive(True)
190
191         def update(self, force = False):
192                 return False
193
194         @staticmethod
195         def clear():
196                 pass
197
198         @staticmethod
199         def name():
200                 return "Contacts"
201
202         def load_settings(self, config, sectionName):
203                 pass
204
205         def save_settings(self, config, sectionName):
206                 """
207                 @note Thread Agnostic
208                 """
209                 pass