4 DialCentral - Front end for Google's Grand Central service.
5 Copyright (C) 2008 Mark Bergman bergman AT merctech DOT com
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.
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.
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
26 class Dialpad(object):
28 def __init__(self, widgetTree):
30 widgetTree.get_widget(buttonName)
31 for buttonName in ("dialpadCall", "dialpadSMS")
33 self._numberdisplay = widgetTree.get_widget("numberdisplay")
36 for button in self._buttons:
37 button.set_sensitive(False)
40 for button in self._buttons:
41 button.set_sensitive(True)
47 def load_settings(self, config, sectionName):
50 def save_settings(self, config, sectionName):
56 def set_orientation(self, orientation):
57 if orientation == gtk.ORIENTATION_VERTICAL:
59 elif orientation == gtk.ORIENTATION_HORIZONTAL:
62 raise NotImplementedError(orientation)
65 class AccountInfo(object):
67 def __init__(self, widgetTree):
68 self._callbackList = gtk.ListStore(gobject.TYPE_STRING)
69 self._accountViewNumberDisplay = widgetTree.get_widget("gcnumber_display")
70 self._callbackSelectButton = widgetTree.get_widget("callbackSelectButton")
71 self._clearCookiesButton = widgetTree.get_widget("clearcookies")
73 self._notifyCheckbox = widgetTree.get_widget("notifyCheckbox")
74 self._minutesEntryButton = widgetTree.get_widget("minutesEntryButton")
75 self._missedCheckbox = widgetTree.get_widget("missedCheckbox")
76 self._voicemailCheckbox = widgetTree.get_widget("voicemailCheckbox")
77 self._smsCheckbox = widgetTree.get_widget("smsCheckbox")
80 self._callbackSelectButton.set_sensitive(False)
81 self._clearCookiesButton.set_sensitive(False)
83 self._notifyCheckbox.set_sensitive(False)
84 self._minutesEntryButton.set_sensitive(False)
85 self._missedCheckbox.set_sensitive(False)
86 self._voicemailCheckbox.set_sensitive(False)
87 self._smsCheckbox.set_sensitive(False)
89 self._accountViewNumberDisplay.set_label("")
92 self._callbackSelectButton.set_sensitive(True)
93 self._clearCookiesButton.set_sensitive(True)
95 self._notifyCheckbox.set_sensitive(True)
96 self._minutesEntryButton.set_sensitive(True)
97 self._missedCheckbox.set_sensitive(True)
98 self._voicemailCheckbox.set_sensitive(True)
99 self._smsCheckbox.set_sensitive(True)
102 def update(force = False):
111 return "Account Info"
113 def load_settings(self, config, sectionName):
116 def save_settings(self, config, sectionName):
118 @note Thread Agnostic
122 def set_orientation(self, orientation):
123 if orientation == gtk.ORIENTATION_VERTICAL:
125 elif orientation == gtk.ORIENTATION_HORIZONTAL:
128 raise NotImplementedError(orientation)
131 class CallHistoryView(object):
133 def __init__(self, widgetTree):
134 self._historyFilterSelector = widgetTree.get_widget("historyFilterSelector")
137 self._historyFilterSelector.set_sensitive(False)
140 self._historyFilterSelector.set_sensitive(True)
142 def update(self, force = False):
151 return "Recent Calls"
153 def load_settings(self, config, sectionName):
156 def save_settings(self, config, sectionName):
158 @note Thread Agnostic
162 def set_orientation(self, orientation):
163 if orientation == gtk.ORIENTATION_VERTICAL:
165 elif orientation == gtk.ORIENTATION_HORIZONTAL:
168 raise NotImplementedError(orientation)
171 class MessagesView(object):
173 def __init__(self, widgetTree):
174 self._messageTypeButton = widgetTree.get_widget("messageTypeButton")
175 self._messageStatusButton = widgetTree.get_widget("messageStatusButton")
178 self._messageTypeButton.set_sensitive(False)
179 self._messageStatusButton.set_sensitive(False)
182 self._messageTypeButton.set_sensitive(True)
183 self._messageStatusButton.set_sensitive(True)
185 def update(self, force = False):
196 def load_settings(self, config, sectionName):
199 def save_settings(self, config, sectionName):
201 @note Thread Agnostic
205 def set_orientation(self, orientation):
206 if orientation == gtk.ORIENTATION_VERTICAL:
208 elif orientation == gtk.ORIENTATION_HORIZONTAL:
211 raise NotImplementedError(orientation)
214 class ContactsView(object):
216 def __init__(self, widgetTree):
217 self._bookSelectionButton = widgetTree.get_widget("addressbookSelectButton")
220 self._bookSelectionButton.set_sensitive(False)
223 self._bookSelectionButton.set_sensitive(True)
225 def update(self, force = False):
236 def load_settings(self, config, sectionName):
239 def save_settings(self, config, sectionName):
241 @note Thread Agnostic
245 def set_orientation(self, orientation):
246 if orientation == gtk.ORIENTATION_VERTICAL:
248 elif orientation == gtk.ORIENTATION_HORIZONTAL:
251 raise NotImplementedError(orientation)