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):
57 class AccountInfo(object):
59 def __init__(self, widgetTree):
60 self._callbackList = gtk.ListStore(gobject.TYPE_STRING)
61 self._accountViewNumberDisplay = widgetTree.get_widget("gcnumber_display")
62 self._callbackSelectButton = widgetTree.get_widget("callbackSelectButton")
63 self._clearCookiesButton = widgetTree.get_widget("clearcookies")
65 self._notifyCheckbox = widgetTree.get_widget("notifyCheckbox")
66 self._minutesEntryButton = widgetTree.get_widget("minutesEntryButton")
67 self._missedCheckbox = widgetTree.get_widget("missedCheckbox")
68 self._voicemailCheckbox = widgetTree.get_widget("voicemailCheckbox")
69 self._smsCheckbox = widgetTree.get_widget("smsCheckbox")
72 self._callbackSelectButton.set_sensitive(False)
73 self._clearCookiesButton.set_sensitive(False)
75 self._notifyCheckbox.set_sensitive(False)
76 self._minutesEntryButton.set_sensitive(False)
77 self._missedCheckbox.set_sensitive(False)
78 self._voicemailCheckbox.set_sensitive(False)
79 self._smsCheckbox.set_sensitive(False)
81 self._accountViewNumberDisplay.set_label("")
84 self._callbackSelectButton.set_sensitive(True)
85 self._clearCookiesButton.set_sensitive(True)
87 self._notifyCheckbox.set_sensitive(True)
88 self._minutesEntryButton.set_sensitive(True)
89 self._missedCheckbox.set_sensitive(True)
90 self._voicemailCheckbox.set_sensitive(True)
91 self._smsCheckbox.set_sensitive(True)
94 def update(force = False):
103 return "Account Info"
105 def load_settings(self, config, sectionName):
108 def save_settings(self, config, sectionName):
110 @note Thread Agnostic
115 class CallHistoryView(object):
117 def __init__(self, widgetTree):
118 self._historyFilterSelector = widgetTree.get_widget("historyFilterSelector")
121 self._historyFilterSelector.set_sensitive(False)
124 self._historyFilterSelector.set_sensitive(True)
126 def update(self, force = False):
135 return "Recent Calls"
137 def load_settings(self, config, sectionName):
140 def save_settings(self, config, sectionName):
142 @note Thread Agnostic
147 class MessagesView(object):
149 def __init__(self, widgetTree):
150 self._messageTypeButton = widgetTree.get_widget("messageTypeButton")
151 self._messageStatusButton = widgetTree.get_widget("messageStatusButton")
154 self._messageTypeButton.set_sensitive(False)
155 self._messageStatusButton.set_sensitive(False)
158 self._messageTypeButton.set_sensitive(True)
159 self._messageStatusButton.set_sensitive(True)
161 def update(self, force = False):
172 def load_settings(self, config, sectionName):
175 def save_settings(self, config, sectionName):
177 @note Thread Agnostic
182 class ContactsView(object):
184 def __init__(self, widgetTree):
185 self._bookSelectionButton = widgetTree.get_widget("addressbookSelectButton")
188 self._bookSelectionButton.set_sensitive(False)
191 self._bookSelectionButton.set_sensitive(True)
193 def update(self, force = False):
204 def load_settings(self, config, sectionName):
207 def save_settings(self, config, sectionName):
209 @note Thread Agnostic