X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fnull_views.py;h=2299b283ebceec4ec094982b07e09b591abc0e20;hb=9555abf234c0141c05a17c5f7e5009d3146bb474;hp=2412688cf101e3951ffa207f4f0cf1a9c3b52486;hpb=6f35390a55d87618bbc3f135c356d1d7d3f6c0e7;p=gc-dialer diff --git a/src/null_views.py b/src/null_views.py index 2412688..2299b28 100644 --- a/src/null_views.py +++ b/src/null_views.py @@ -26,14 +26,19 @@ import gtk class Dialpad(object): def __init__(self, widgetTree): + self._buttons = [ + widgetTree.get_widget(buttonName) + for buttonName in ("dialpadCall", "dialpadSMS") + ] self._numberdisplay = widgetTree.get_widget("numberdisplay") - self._dialButton = widgetTree.get_widget("dial") def enable(self): - self._dialButton.set_sensitive(False) + for button in self._buttons: + button.set_sensitive(False) def disable(self): - self._dialButton.set_sensitive(True) + for button in self._buttons: + button.set_sensitive(True) @staticmethod def name(): @@ -48,45 +53,53 @@ class Dialpad(object): """ pass + def set_orientation(self, orientation): + if orientation == gtk.ORIENTATION_VERTICAL: + pass + elif orientation == gtk.ORIENTATION_HORIZONTAL: + pass + else: + raise NotImplementedError(orientation) + class AccountInfo(object): def __init__(self, widgetTree): self._callbackList = gtk.ListStore(gobject.TYPE_STRING) self._accountViewNumberDisplay = widgetTree.get_widget("gcnumber_display") - self._callbackCombo = widgetTree.get_widget("callbackcombo") + self._callbackSelectButton = widgetTree.get_widget("callbackSelectButton") self._clearCookiesButton = widgetTree.get_widget("clearcookies") self._notifyCheckbox = widgetTree.get_widget("notifyCheckbox") - self._minutesEntry = widgetTree.get_widget("minutesEntry") + self._minutesEntryButton = widgetTree.get_widget("minutesEntryButton") self._missedCheckbox = widgetTree.get_widget("missedCheckbox") self._voicemailCheckbox = widgetTree.get_widget("voicemailCheckbox") self._smsCheckbox = widgetTree.get_widget("smsCheckbox") def enable(self): - self._callbackCombo.set_sensitive(False) + self._callbackSelectButton.set_sensitive(False) self._clearCookiesButton.set_sensitive(False) self._notifyCheckbox.set_sensitive(False) - self._minutesEntry.set_sensitive(False) + self._minutesEntryButton.set_sensitive(False) self._missedCheckbox.set_sensitive(False) self._voicemailCheckbox.set_sensitive(False) self._smsCheckbox.set_sensitive(False) - self._accountViewNumberDisplay.set_text("") + self._accountViewNumberDisplay.set_label("") def disable(self): - self._callbackCombo.set_sensitive(True) + self._callbackSelectButton.set_sensitive(True) self._clearCookiesButton.set_sensitive(True) self._notifyCheckbox.set_sensitive(True) - self._minutesEntry.set_sensitive(True) + self._minutesEntryButton.set_sensitive(True) self._missedCheckbox.set_sensitive(True) self._voicemailCheckbox.set_sensitive(True) self._smsCheckbox.set_sensitive(True) @staticmethod - def update(): + def update(force = False): return False @staticmethod @@ -106,19 +119,27 @@ class AccountInfo(object): """ pass + def set_orientation(self, orientation): + if orientation == gtk.ORIENTATION_VERTICAL: + pass + elif orientation == gtk.ORIENTATION_HORIZONTAL: + pass + else: + raise NotImplementedError(orientation) + -class RecentCallsView(object): +class CallHistoryView(object): def __init__(self, widgetTree): - pass + self._historyFilterSelector = widgetTree.get_widget("historyFilterSelector") def enable(self): - pass + self._historyFilterSelector.set_sensitive(False) def disable(self): - pass + self._historyFilterSelector.set_sensitive(True) - def update(self): + def update(self, force = False): return False @staticmethod @@ -138,19 +159,30 @@ class RecentCallsView(object): """ pass + def set_orientation(self, orientation): + if orientation == gtk.ORIENTATION_VERTICAL: + pass + elif orientation == gtk.ORIENTATION_HORIZONTAL: + pass + else: + raise NotImplementedError(orientation) + class MessagesView(object): def __init__(self, widgetTree): - pass + self._messageTypeButton = widgetTree.get_widget("messageTypeButton") + self._messageStatusButton = widgetTree.get_widget("messageStatusButton") def enable(self): - pass + self._messageTypeButton.set_sensitive(False) + self._messageStatusButton.set_sensitive(False) def disable(self): - pass + self._messageTypeButton.set_sensitive(True) + self._messageStatusButton.set_sensitive(True) - def update(self): + def update(self, force = False): return False @staticmethod @@ -170,19 +202,27 @@ class MessagesView(object): """ pass + def set_orientation(self, orientation): + if orientation == gtk.ORIENTATION_VERTICAL: + pass + elif orientation == gtk.ORIENTATION_HORIZONTAL: + pass + else: + raise NotImplementedError(orientation) + class ContactsView(object): def __init__(self, widgetTree): - self._booksSelectionBox = widgetTree.get_widget("addressbook_combo") + self._bookSelectionButton = widgetTree.get_widget("addressbookSelectButton") def enable(self): - self._booksSelectionBox.set_sensitive(False) + self._bookSelectionButton.set_sensitive(False) def disable(self): - self._booksSelectionBox.set_sensitive(True) + self._bookSelectionButton.set_sensitive(True) - def update(self): + def update(self, force = False): return False @staticmethod @@ -201,3 +241,11 @@ class ContactsView(object): @note Thread Agnostic """ pass + + def set_orientation(self, orientation): + if orientation == gtk.ORIENTATION_VERTICAL: + pass + elif orientation == gtk.ORIENTATION_HORIZONTAL: + pass + else: + raise NotImplementedError(orientation)