In playing with direct dial I found I setup the user-agent incorrectly
[gc-dialer] / src / null_views.py
index 41d759a..2299b28 100644 (file)
@@ -26,17 +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")
-               self._smsButton = widgetTree.get_widget("sms")
 
        def enable(self):
-               self._dialButton.set_sensitive(False)
-               self._smsButton.set_sensitive(False)
+               for button in self._buttons:
+                       button.set_sensitive(False)
 
        def disable(self):
-               self._dialButton.set_sensitive(True)
-               self._smsButton.set_sensitive(True)
+               for button in self._buttons:
+                       button.set_sensitive(True)
 
        @staticmethod
        def name():
@@ -51,6 +53,14 @@ 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):
 
@@ -109,17 +119,25 @@ 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, force = False):
                return False
@@ -141,17 +159,28 @@ 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, force = False):
                return False
@@ -173,6 +202,14 @@ 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):
 
@@ -204,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)