* Renamed glade file to reflect project naming
authorepage <eopage@byu.net>
Tue, 17 Feb 2009 04:19:41 +0000 (04:19 +0000)
committerepage <eopage@byu.net>
Tue, 17 Feb 2009 04:19:41 +0000 (04:19 +0000)
* Refactored out contacts related stuff (mostly)

git-svn-id: file:///svnroot/gc-dialer/trunk@189 c39d3808-3fe2-4d86-a59f-b7f623ee9f21

src/dialcentral.glade [new file with mode: 0644]
src/gc_dialer.glade [deleted file]
src/gc_dialer.py

diff --git a/src/dialcentral.glade b/src/dialcentral.glade
new file mode 100644 (file)
index 0000000..ef2f853
--- /dev/null
@@ -0,0 +1,850 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.4.5 on Mon Feb 16 18:53:53 2009 -->
+<glade-interface>
+  <widget class="GtkWindow" id="Dialpad">
+    <property name="width_request">400</property>
+    <property name="height_request">350</property>
+    <property name="title" translatable="yes">Dialer</property>
+    <child>
+      <widget class="GtkVBox" id="vbox1">
+        <property name="visible">True</property>
+        <child>
+          <widget class="GtkMenuBar" id="dialpad_menubar">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkMenuItem" id="file_menu_item">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_File</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="menu1">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="login_menu_item">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_New Login</property>
+                        <property name="use_underline">True</property>
+                        <signal name="activate" handler="on_clearcookies_clicked"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="menu-item-image11">
+                            <property name="stock">gtk-new</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="quit_menu_item">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">gtk-quit</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                        <signal name="activate" handler="on_dialpad_quit"/>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="edit_menu_item">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Edit</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="menu2">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="paste_menu_item">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">gtk-paste</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                        <signal name="activate" handler="on_paste"/>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="delete_menu_item">
+                        <property name="visible">True</property>
+                        <property name="tooltip" translatable="yes">Clear Number</property>
+                        <property name="label" translatable="yes">Clear Number</property>
+                        <property name="use_underline">True</property>
+                        <signal name="activate" handler="on_clear_number"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="menu-item-image2">
+                            <property name="stock">gtk-delete</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="about">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_About</property>
+                <property name="use_underline">True</property>
+                <signal name="activate" handler="on_about_activate"/>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkNotebook" id="notebook">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="tab_pos">GTK_POS_BOTTOM</property>
+            <property name="show_border">False</property>
+            <property name="homogeneous">True</property>
+            <signal name="switch_page" handler="on_notebook_switch_page"/>
+            <child>
+              <widget class="GtkVBox" id="keypad_vbox">
+                <property name="visible">True</property>
+                <child>
+                  <widget class="GtkLabel" id="numberdisplay">
+                    <property name="height_request">50</property>
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;span size="35000" weight="bold"&gt;(518) 555-1212&lt;/span&gt;</property>
+                    <property name="use_markup">True</property>
+                    <property name="justify">GTK_JUSTIFY_CENTER</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkTable" id="keypadview">
+                    <property name="visible">True</property>
+                    <property name="n_rows">4</property>
+                    <property name="n_columns">3</property>
+                    <property name="homogeneous">True</property>
+                    <child>
+                      <widget class="GtkButton" id="digit1">
+                        <property name="visible">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="response_id">0</property>
+                        <signal name="clicked" handler="on_digit_clicked"/>
+                        <accelerator key="1" modifiers="" signal="clicked"/>
+                        <child>
+                          <widget class="GtkLabel" id="label12">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">&lt;span size="33000" weight="bold"&gt;1&lt;/span&gt;
+&lt;span size="9000"&gt;  &lt;/span&gt;</property>
+                            <property name="use_markup">True</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="digit2">
+                        <property name="visible">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="response_id">0</property>
+                        <signal name="clicked" handler="on_digit_clicked"/>
+                        <accelerator key="2" modifiers="" signal="clicked"/>
+                        <accelerator key="a" modifiers="" signal="clicked"/>
+                        <accelerator key="b" modifiers="" signal="clicked"/>
+                        <accelerator key="c" modifiers="" signal="clicked"/>
+                        <child>
+                          <widget class="GtkLabel" id="label10">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">&lt;span size="30000" weight="bold"&gt;2&lt;/span&gt;
+&lt;span size="12000"&gt;ABC&lt;/span&gt;</property>
+                            <property name="use_markup">True</property>
+                            <property name="justify">GTK_JUSTIFY_CENTER</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="digit3">
+                        <property name="visible">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="response_id">0</property>
+                        <signal name="clicked" handler="on_digit_clicked"/>
+                        <accelerator key="3" modifiers="" signal="clicked"/>
+                        <accelerator key="d" modifiers="" signal="clicked"/>
+                        <accelerator key="e" modifiers="" signal="clicked"/>
+                        <accelerator key="f" modifiers="" signal="clicked"/>
+                        <child>
+                          <widget class="GtkLabel" id="label11">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">&lt;span size="30000" weight="bold" stretch="ultraexpanded"&gt;3&lt;/span&gt;
+&lt;span size="12000"&gt;DEF&lt;/span&gt;</property>
+                            <property name="use_markup">True</property>
+                            <property name="justify">GTK_JUSTIFY_CENTER</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="digit4">
+                        <property name="visible">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="response_id">0</property>
+                        <signal name="clicked" handler="on_digit_clicked"/>
+                        <accelerator key="4" modifiers="" signal="clicked"/>
+                        <accelerator key="g" modifiers="" signal="clicked"/>
+                        <accelerator key="h" modifiers="" signal="clicked"/>
+                        <accelerator key="i" modifiers="" signal="clicked"/>
+                        <child>
+                          <widget class="GtkLabel" id="label13">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">&lt;span size="30000" weight="bold"&gt;4&lt;/span&gt;
+&lt;span size="12000"&gt;GHI&lt;/span&gt;</property>
+                            <property name="use_markup">True</property>
+                            <property name="justify">GTK_JUSTIFY_CENTER</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="digit5">
+                        <property name="visible">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="response_id">0</property>
+                        <signal name="clicked" handler="on_digit_clicked"/>
+                        <accelerator key="5" modifiers="" signal="clicked"/>
+                        <accelerator key="j" modifiers="" signal="clicked"/>
+                        <accelerator key="k" modifiers="" signal="clicked"/>
+                        <accelerator key="l" modifiers="" signal="clicked"/>
+                        <child>
+                          <widget class="GtkLabel" id="label14">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">&lt;span size="30000" weight="bold"&gt;5&lt;/span&gt;
+&lt;span size="12000"&gt;JKL&lt;/span&gt;</property>
+                            <property name="use_markup">True</property>
+                            <property name="justify">GTK_JUSTIFY_CENTER</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="digit6">
+                        <property name="visible">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="response_id">0</property>
+                        <signal name="clicked" handler="on_digit_clicked"/>
+                        <accelerator key="6" modifiers="" signal="clicked"/>
+                        <accelerator key="m" modifiers="" signal="clicked"/>
+                        <accelerator key="n" modifiers="" signal="clicked"/>
+                        <accelerator key="o" modifiers="" signal="clicked"/>
+                        <child>
+                          <widget class="GtkLabel" id="label15">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">&lt;span size="30000" weight="bold"&gt;6&lt;/span&gt;
+&lt;span size="12000"&gt;MNO&lt;/span&gt;</property>
+                            <property name="use_markup">True</property>
+                            <property name="justify">GTK_JUSTIFY_CENTER</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="digit7">
+                        <property name="visible">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="response_id">0</property>
+                        <signal name="clicked" handler="on_digit_clicked"/>
+                        <accelerator key="7" modifiers="" signal="clicked"/>
+                        <accelerator key="p" modifiers="" signal="clicked"/>
+                        <accelerator key="q" modifiers="" signal="clicked"/>
+                        <accelerator key="r" modifiers="" signal="clicked"/>
+                        <accelerator key="s" modifiers="" signal="clicked"/>
+                        <child>
+                          <widget class="GtkLabel" id="label16">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">&lt;span size="30000" weight="bold"&gt;7&lt;/span&gt;
+&lt;span size="12000"&gt;PQRS&lt;/span&gt;</property>
+                            <property name="use_markup">True</property>
+                            <property name="justify">GTK_JUSTIFY_CENTER</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="digit8">
+                        <property name="visible">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="response_id">0</property>
+                        <signal name="clicked" handler="on_digit_clicked"/>
+                        <accelerator key="8" modifiers="" signal="clicked"/>
+                        <accelerator key="t" modifiers="" signal="clicked"/>
+                        <accelerator key="u" modifiers="" signal="clicked"/>
+                        <accelerator key="v" modifiers="" signal="clicked"/>
+                        <child>
+                          <widget class="GtkLabel" id="label17">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">&lt;span size="30000" weight="bold"&gt;8&lt;/span&gt;
+&lt;span size="12000"&gt;TUV&lt;/span&gt;</property>
+                            <property name="use_markup">True</property>
+                            <property name="justify">GTK_JUSTIFY_CENTER</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="digit9">
+                        <property name="visible">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="response_id">0</property>
+                        <signal name="clicked" handler="on_digit_clicked"/>
+                        <accelerator key="9" modifiers="" signal="clicked"/>
+                        <accelerator key="w" modifiers="" signal="clicked"/>
+                        <accelerator key="x" modifiers="" signal="clicked"/>
+                        <accelerator key="y" modifiers="" signal="clicked"/>
+                        <accelerator key="z" modifiers="" signal="clicked"/>
+                        <child>
+                          <widget class="GtkLabel" id="label18">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">&lt;span size="30000" weight="bold"&gt;9&lt;/span&gt;
+&lt;span size="12000"&gt;WXYZ&lt;/span&gt;</property>
+                            <property name="use_markup">True</property>
+                            <property name="justify">GTK_JUSTIFY_CENTER</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="back">
+                        <property name="visible">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="response_id">0</property>
+                        <signal name="pressed" handler="on_back_pressed"/>
+                        <signal name="clicked" handler="on_back_clicked"/>
+                        <signal name="released" handler="on_back_released"/>
+                        <accelerator key="BackSpace" modifiers="" signal="clicked"/>
+                        <child>
+                          <widget class="GtkHBox" id="hbox2">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkImage" id="image2">
+                                <property name="visible">True</property>
+                                <property name="xalign">1</property>
+                                <property name="stock">gtk-no</property>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label9">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="xpad">5</property>
+                                <property name="label" translatable="yes">&lt;span size="17000" weight="Bold"&gt;Back&lt;/span&gt;</property>
+                                <property name="use_markup">True</property>
+                              </widget>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="digit0">
+                        <property name="visible">True</property>
+                        <property name="focus_on_click">False</property>
+                        <property name="response_id">0</property>
+                        <signal name="clicked" handler="on_digit_clicked"/>
+                        <accelerator key="0" modifiers="" signal="clicked"/>
+                        <child>
+                          <widget class="GtkLabel" id="label19">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">&lt;span size="33000" weight="bold"&gt;0&lt;/span&gt;
+&lt;span size="9000"&gt;&lt;/span&gt;</property>
+                            <property name="use_markup">True</property>
+                            <property name="justify">GTK_JUSTIFY_CENTER</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="dial">
+                        <property name="visible">True</property>
+                        <property name="has_default">True</property>
+                        <property name="response_id">0</property>
+                        <signal name="clicked" handler="on_dial_clicked"/>
+                        <accelerator key="Return" modifiers="" signal="clicked"/>
+                        <child>
+                          <widget class="GtkHBox" id="hbox1">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkImage" id="image1">
+                                <property name="visible">True</property>
+                                <property name="xalign">1</property>
+                                <property name="stock">gtk-yes</property>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label8">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="xpad">5</property>
+                                <property name="label" translatable="yes">&lt;span size="17000" weight="bold"&gt;Dial&lt;/span&gt;</property>
+                                <property name="use_markup">True</property>
+                              </widget>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="tab_expand">True</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="keypad">
+                <property name="height_request">30</property>
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Keypad</property>
+              </widget>
+              <packing>
+                <property name="type">tab</property>
+                <property name="tab_expand">True</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkTable" id="contacts_table">
+                <property name="visible">True</property>
+                <property name="n_rows">2</property>
+                <child>
+                  <widget class="GtkComboBox" id="addressbook_combo">
+                    <property name="visible">True</property>
+                    <signal name="changed" handler="on_addressbook_combo_changed"/>
+                  </widget>
+                  <packing>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkScrolledWindow" id="contacts_scrolledwindow">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+                    <child>
+                      <widget class="GtkTreeView" id="contactsview">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="headers_visible">False</property>
+                        <property name="enable_search">False</property>
+                        <property name="fixed_height_mode">True</property>
+                        <property name="enable_grid_lines">GTK_TREE_VIEW_GRID_LINES_HORIZONTAL</property>
+                        <property name="enable_tree_lines">True</property>
+                        <signal name="row_activated" handler="on_contactsview_row_activated"/>
+                      </widget>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+                <property name="tab_expand">True</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="contacts">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Contacts</property>
+              </widget>
+              <packing>
+                <property name="type">tab</property>
+                <property name="position">1</property>
+                <property name="tab_expand">True</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkTable" id="accountview">
+                <property name="visible">True</property>
+                <property name="border_width">11</property>
+                <property name="n_rows">3</property>
+                <property name="n_columns">2</property>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <widget class="GtkComboBoxEntry" id="callbackcombo">
+                    <property name="visible">True</property>
+                    <child internal-child="entry">
+                      <widget class="GtkEntry" id="callback_comboboxentry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <signal name="changed" handler="on_callbackentry_changed"/>
+                      </widget>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="callback_number_label">
+                    <property name="visible">True</property>
+                    <property name="xalign">1</property>
+                    <property name="xpad">5</property>
+                    <property name="label" translatable="yes">Callback Number:</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkButton" id="clearcookies">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="label" translatable="yes">Clear Account Information
+must reauthenticate</property>
+                    <property name="response_id">0</property>
+                    <signal name="clicked" handler="on_clearcookies_clicked"/>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="gcnumber_display">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;span size="15000" weight="bold"&gt;(518) 555-1212&lt;/span&gt;</property>
+                    <property name="use_markup">True</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="gcnumber_label">
+                    <property name="visible">True</property>
+                    <property name="xalign">1</property>
+                    <property name="xpad">5</property>
+                    <property name="label" translatable="yes">GrandCentral
+Number:</property>
+                    <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">2</property>
+                <property name="tab_expand">True</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="account">
+                <property name="height_request">30</property>
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Account</property>
+              </widget>
+              <packing>
+                <property name="type">tab</property>
+                <property name="position">2</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkScrolledWindow" id="recent_scrolledwindow">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+                <child>
+                  <widget class="GtkTreeView" id="recentview">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="headers_visible">False</property>
+                    <property name="enable_search">False</property>
+                    <property name="fixed_height_mode">True</property>
+                    <property name="enable_grid_lines">GTK_TREE_VIEW_GRID_LINES_HORIZONTAL</property>
+                    <property name="enable_tree_lines">True</property>
+                    <signal name="row_activated" handler="on_recentview_row_activated"/>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+                <property name="tab_expand">True</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="recent">
+                <property name="height_request">30</property>
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Recent</property>
+              </widget>
+              <packing>
+                <property name="type">tab</property>
+                <property name="position">1</property>
+                <property name="tab_expand">True</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+  <widget class="GtkDialog" id="login_dialog">
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Grandcentral Login</property>
+    <property name="resizable">False</property>
+    <property name="modal">True</property>
+    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="destroy_with_parent">True</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="skip_taskbar_hint">True</property>
+    <property name="skip_pager_hint">True</property>
+    <property name="deletable">False</property>
+    <property name="transient_for">Dialpad</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkTable" id="table1">
+            <property name="visible">True</property>
+            <property name="n_rows">2</property>
+            <property name="n_columns">2</property>
+            <child>
+              <widget class="GtkEntry" id="passwordentry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="visibility">False</property>
+              </widget>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkEntry" id="usernameentry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+              </widget>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="password_label">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Password</property>
+              </widget>
+              <packing>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="username_label">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Username</property>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <widget class="GtkButton" id="loginbutton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">Login</property>
+                <property name="response_id">0</property>
+                <signal name="clicked" handler="on_loginbutton_clicked"/>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkButton" id="closebutton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">Close</property>
+                <property name="response_id">0</property>
+                <signal name="clicked" handler="on_loginclose_clicked"/>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+  <widget class="GtkDialog" id="phonetype_dialog">
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Select Phone Type</property>
+    <property name="resizable">False</property>
+    <property name="modal">True</property>
+    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="destroy_with_parent">True</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="skip_taskbar_hint">True</property>
+    <property name="skip_pager_hint">True</property>
+    <property name="deletable">False</property>
+    <property name="transient_for">Dialpad</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox3">
+        <property name="visible">True</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkTreeView" id="phonetypes">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <signal name="row_activated" handler="on_phonetype_select"/>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area3">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <widget class="GtkButton" id="select_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="label" translatable="yes">Select</property>
+                <property name="response_id">0</property>
+                <signal name="clicked" handler="on_phonetype_select"/>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkButton" id="cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">Cancel</property>
+                <property name="response_id">0</property>
+                <signal name="clicked" handler="on_phonetype_cancel"/>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>
diff --git a/src/gc_dialer.glade b/src/gc_dialer.glade
deleted file mode 100644 (file)
index ef2f853..0000000
+++ /dev/null
@@ -1,850 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Mon Feb 16 18:53:53 2009 -->
-<glade-interface>
-  <widget class="GtkWindow" id="Dialpad">
-    <property name="width_request">400</property>
-    <property name="height_request">350</property>
-    <property name="title" translatable="yes">Dialer</property>
-    <child>
-      <widget class="GtkVBox" id="vbox1">
-        <property name="visible">True</property>
-        <child>
-          <widget class="GtkMenuBar" id="dialpad_menubar">
-            <property name="visible">True</property>
-            <child>
-              <widget class="GtkMenuItem" id="file_menu_item">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_File</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="menu1">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="login_menu_item">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">_New Login</property>
-                        <property name="use_underline">True</property>
-                        <signal name="activate" handler="on_clearcookies_clicked"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="menu-item-image11">
-                            <property name="stock">gtk-new</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
-                        <property name="visible">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="quit_menu_item">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">gtk-quit</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="on_dialpad_quit"/>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="edit_menu_item">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Edit</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="menu2">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="paste_menu_item">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">gtk-paste</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="on_paste"/>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="delete_menu_item">
-                        <property name="visible">True</property>
-                        <property name="tooltip" translatable="yes">Clear Number</property>
-                        <property name="label" translatable="yes">Clear Number</property>
-                        <property name="use_underline">True</property>
-                        <signal name="activate" handler="on_clear_number"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="menu-item-image2">
-                            <property name="stock">gtk-delete</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="about">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_About</property>
-                <property name="use_underline">True</property>
-                <signal name="activate" handler="on_about_activate"/>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkNotebook" id="notebook">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="tab_pos">GTK_POS_BOTTOM</property>
-            <property name="show_border">False</property>
-            <property name="homogeneous">True</property>
-            <signal name="switch_page" handler="on_notebook_switch_page"/>
-            <child>
-              <widget class="GtkVBox" id="keypad_vbox">
-                <property name="visible">True</property>
-                <child>
-                  <widget class="GtkLabel" id="numberdisplay">
-                    <property name="height_request">50</property>
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">&lt;span size="35000" weight="bold"&gt;(518) 555-1212&lt;/span&gt;</property>
-                    <property name="use_markup">True</property>
-                    <property name="justify">GTK_JUSTIFY_CENTER</property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkTable" id="keypadview">
-                    <property name="visible">True</property>
-                    <property name="n_rows">4</property>
-                    <property name="n_columns">3</property>
-                    <property name="homogeneous">True</property>
-                    <child>
-                      <widget class="GtkButton" id="digit1">
-                        <property name="visible">True</property>
-                        <property name="focus_on_click">False</property>
-                        <property name="response_id">0</property>
-                        <signal name="clicked" handler="on_digit_clicked"/>
-                        <accelerator key="1" modifiers="" signal="clicked"/>
-                        <child>
-                          <widget class="GtkLabel" id="label12">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">&lt;span size="33000" weight="bold"&gt;1&lt;/span&gt;
-&lt;span size="9000"&gt;  &lt;/span&gt;</property>
-                            <property name="use_markup">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="digit2">
-                        <property name="visible">True</property>
-                        <property name="focus_on_click">False</property>
-                        <property name="response_id">0</property>
-                        <signal name="clicked" handler="on_digit_clicked"/>
-                        <accelerator key="2" modifiers="" signal="clicked"/>
-                        <accelerator key="a" modifiers="" signal="clicked"/>
-                        <accelerator key="b" modifiers="" signal="clicked"/>
-                        <accelerator key="c" modifiers="" signal="clicked"/>
-                        <child>
-                          <widget class="GtkLabel" id="label10">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">&lt;span size="30000" weight="bold"&gt;2&lt;/span&gt;
-&lt;span size="12000"&gt;ABC&lt;/span&gt;</property>
-                            <property name="use_markup">True</property>
-                            <property name="justify">GTK_JUSTIFY_CENTER</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="digit3">
-                        <property name="visible">True</property>
-                        <property name="focus_on_click">False</property>
-                        <property name="response_id">0</property>
-                        <signal name="clicked" handler="on_digit_clicked"/>
-                        <accelerator key="3" modifiers="" signal="clicked"/>
-                        <accelerator key="d" modifiers="" signal="clicked"/>
-                        <accelerator key="e" modifiers="" signal="clicked"/>
-                        <accelerator key="f" modifiers="" signal="clicked"/>
-                        <child>
-                          <widget class="GtkLabel" id="label11">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">&lt;span size="30000" weight="bold" stretch="ultraexpanded"&gt;3&lt;/span&gt;
-&lt;span size="12000"&gt;DEF&lt;/span&gt;</property>
-                            <property name="use_markup">True</property>
-                            <property name="justify">GTK_JUSTIFY_CENTER</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="right_attach">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="digit4">
-                        <property name="visible">True</property>
-                        <property name="focus_on_click">False</property>
-                        <property name="response_id">0</property>
-                        <signal name="clicked" handler="on_digit_clicked"/>
-                        <accelerator key="4" modifiers="" signal="clicked"/>
-                        <accelerator key="g" modifiers="" signal="clicked"/>
-                        <accelerator key="h" modifiers="" signal="clicked"/>
-                        <accelerator key="i" modifiers="" signal="clicked"/>
-                        <child>
-                          <widget class="GtkLabel" id="label13">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">&lt;span size="30000" weight="bold"&gt;4&lt;/span&gt;
-&lt;span size="12000"&gt;GHI&lt;/span&gt;</property>
-                            <property name="use_markup">True</property>
-                            <property name="justify">GTK_JUSTIFY_CENTER</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="digit5">
-                        <property name="visible">True</property>
-                        <property name="focus_on_click">False</property>
-                        <property name="response_id">0</property>
-                        <signal name="clicked" handler="on_digit_clicked"/>
-                        <accelerator key="5" modifiers="" signal="clicked"/>
-                        <accelerator key="j" modifiers="" signal="clicked"/>
-                        <accelerator key="k" modifiers="" signal="clicked"/>
-                        <accelerator key="l" modifiers="" signal="clicked"/>
-                        <child>
-                          <widget class="GtkLabel" id="label14">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">&lt;span size="30000" weight="bold"&gt;5&lt;/span&gt;
-&lt;span size="12000"&gt;JKL&lt;/span&gt;</property>
-                            <property name="use_markup">True</property>
-                            <property name="justify">GTK_JUSTIFY_CENTER</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="digit6">
-                        <property name="visible">True</property>
-                        <property name="focus_on_click">False</property>
-                        <property name="response_id">0</property>
-                        <signal name="clicked" handler="on_digit_clicked"/>
-                        <accelerator key="6" modifiers="" signal="clicked"/>
-                        <accelerator key="m" modifiers="" signal="clicked"/>
-                        <accelerator key="n" modifiers="" signal="clicked"/>
-                        <accelerator key="o" modifiers="" signal="clicked"/>
-                        <child>
-                          <widget class="GtkLabel" id="label15">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">&lt;span size="30000" weight="bold"&gt;6&lt;/span&gt;
-&lt;span size="12000"&gt;MNO&lt;/span&gt;</property>
-                            <property name="use_markup">True</property>
-                            <property name="justify">GTK_JUSTIFY_CENTER</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="right_attach">3</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="digit7">
-                        <property name="visible">True</property>
-                        <property name="focus_on_click">False</property>
-                        <property name="response_id">0</property>
-                        <signal name="clicked" handler="on_digit_clicked"/>
-                        <accelerator key="7" modifiers="" signal="clicked"/>
-                        <accelerator key="p" modifiers="" signal="clicked"/>
-                        <accelerator key="q" modifiers="" signal="clicked"/>
-                        <accelerator key="r" modifiers="" signal="clicked"/>
-                        <accelerator key="s" modifiers="" signal="clicked"/>
-                        <child>
-                          <widget class="GtkLabel" id="label16">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">&lt;span size="30000" weight="bold"&gt;7&lt;/span&gt;
-&lt;span size="12000"&gt;PQRS&lt;/span&gt;</property>
-                            <property name="use_markup">True</property>
-                            <property name="justify">GTK_JUSTIFY_CENTER</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="digit8">
-                        <property name="visible">True</property>
-                        <property name="focus_on_click">False</property>
-                        <property name="response_id">0</property>
-                        <signal name="clicked" handler="on_digit_clicked"/>
-                        <accelerator key="8" modifiers="" signal="clicked"/>
-                        <accelerator key="t" modifiers="" signal="clicked"/>
-                        <accelerator key="u" modifiers="" signal="clicked"/>
-                        <accelerator key="v" modifiers="" signal="clicked"/>
-                        <child>
-                          <widget class="GtkLabel" id="label17">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">&lt;span size="30000" weight="bold"&gt;8&lt;/span&gt;
-&lt;span size="12000"&gt;TUV&lt;/span&gt;</property>
-                            <property name="use_markup">True</property>
-                            <property name="justify">GTK_JUSTIFY_CENTER</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="digit9">
-                        <property name="visible">True</property>
-                        <property name="focus_on_click">False</property>
-                        <property name="response_id">0</property>
-                        <signal name="clicked" handler="on_digit_clicked"/>
-                        <accelerator key="9" modifiers="" signal="clicked"/>
-                        <accelerator key="w" modifiers="" signal="clicked"/>
-                        <accelerator key="x" modifiers="" signal="clicked"/>
-                        <accelerator key="y" modifiers="" signal="clicked"/>
-                        <accelerator key="z" modifiers="" signal="clicked"/>
-                        <child>
-                          <widget class="GtkLabel" id="label18">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">&lt;span size="30000" weight="bold"&gt;9&lt;/span&gt;
-&lt;span size="12000"&gt;WXYZ&lt;/span&gt;</property>
-                            <property name="use_markup">True</property>
-                            <property name="justify">GTK_JUSTIFY_CENTER</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="right_attach">3</property>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="back">
-                        <property name="visible">True</property>
-                        <property name="focus_on_click">False</property>
-                        <property name="response_id">0</property>
-                        <signal name="pressed" handler="on_back_pressed"/>
-                        <signal name="clicked" handler="on_back_clicked"/>
-                        <signal name="released" handler="on_back_released"/>
-                        <accelerator key="BackSpace" modifiers="" signal="clicked"/>
-                        <child>
-                          <widget class="GtkHBox" id="hbox2">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkImage" id="image2">
-                                <property name="visible">True</property>
-                                <property name="xalign">1</property>
-                                <property name="stock">gtk-no</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label9">
-                                <property name="visible">True</property>
-                                <property name="xalign">0</property>
-                                <property name="xpad">5</property>
-                                <property name="label" translatable="yes">&lt;span size="17000" weight="Bold"&gt;Back&lt;/span&gt;</property>
-                                <property name="use_markup">True</property>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="digit0">
-                        <property name="visible">True</property>
-                        <property name="focus_on_click">False</property>
-                        <property name="response_id">0</property>
-                        <signal name="clicked" handler="on_digit_clicked"/>
-                        <accelerator key="0" modifiers="" signal="clicked"/>
-                        <child>
-                          <widget class="GtkLabel" id="label19">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">&lt;span size="33000" weight="bold"&gt;0&lt;/span&gt;
-&lt;span size="9000"&gt;&lt;/span&gt;</property>
-                            <property name="use_markup">True</property>
-                            <property name="justify">GTK_JUSTIFY_CENTER</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="dial">
-                        <property name="visible">True</property>
-                        <property name="has_default">True</property>
-                        <property name="response_id">0</property>
-                        <signal name="clicked" handler="on_dial_clicked"/>
-                        <accelerator key="Return" modifiers="" signal="clicked"/>
-                        <child>
-                          <widget class="GtkHBox" id="hbox1">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkImage" id="image1">
-                                <property name="visible">True</property>
-                                <property name="xalign">1</property>
-                                <property name="stock">gtk-yes</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label8">
-                                <property name="visible">True</property>
-                                <property name="xalign">0</property>
-                                <property name="xpad">5</property>
-                                <property name="label" translatable="yes">&lt;span size="17000" weight="bold"&gt;Dial&lt;/span&gt;</property>
-                                <property name="use_markup">True</property>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="right_attach">3</property>
-                        <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="tab_expand">True</property>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="keypad">
-                <property name="height_request">30</property>
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">Keypad</property>
-              </widget>
-              <packing>
-                <property name="type">tab</property>
-                <property name="tab_expand">True</property>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkTable" id="contacts_table">
-                <property name="visible">True</property>
-                <property name="n_rows">2</property>
-                <child>
-                  <widget class="GtkComboBox" id="addressbook_combo">
-                    <property name="visible">True</property>
-                    <signal name="changed" handler="on_addressbook_combo_changed"/>
-                  </widget>
-                  <packing>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkScrolledWindow" id="contacts_scrolledwindow">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                    <child>
-                      <widget class="GtkTreeView" id="contactsview">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="headers_visible">False</property>
-                        <property name="enable_search">False</property>
-                        <property name="fixed_height_mode">True</property>
-                        <property name="enable_grid_lines">GTK_TREE_VIEW_GRID_LINES_HORIZONTAL</property>
-                        <property name="enable_tree_lines">True</property>
-                        <signal name="row_activated" handler="on_contactsview_row_activated"/>
-                      </widget>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-                <property name="tab_expand">True</property>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="contacts">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">Contacts</property>
-              </widget>
-              <packing>
-                <property name="type">tab</property>
-                <property name="position">1</property>
-                <property name="tab_expand">True</property>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkTable" id="accountview">
-                <property name="visible">True</property>
-                <property name="border_width">11</property>
-                <property name="n_rows">3</property>
-                <property name="n_columns">2</property>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <widget class="GtkComboBoxEntry" id="callbackcombo">
-                    <property name="visible">True</property>
-                    <child internal-child="entry">
-                      <widget class="GtkEntry" id="callback_comboboxentry">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <signal name="changed" handler="on_callbackentry_changed"/>
-                      </widget>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="callback_number_label">
-                    <property name="visible">True</property>
-                    <property name="xalign">1</property>
-                    <property name="xpad">5</property>
-                    <property name="label" translatable="yes">Callback Number:</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkButton" id="clearcookies">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="label" translatable="yes">Clear Account Information
-must reauthenticate</property>
-                    <property name="response_id">0</property>
-                    <signal name="clicked" handler="on_clearcookies_clicked"/>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="gcnumber_display">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">&lt;span size="15000" weight="bold"&gt;(518) 555-1212&lt;/span&gt;</property>
-                    <property name="use_markup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="gcnumber_label">
-                    <property name="visible">True</property>
-                    <property name="xalign">1</property>
-                    <property name="xpad">5</property>
-                    <property name="label" translatable="yes">GrandCentral
-Number:</property>
-                    <property name="justify">GTK_JUSTIFY_RIGHT</property>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-                <property name="tab_expand">True</property>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="account">
-                <property name="height_request">30</property>
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">Account</property>
-              </widget>
-              <packing>
-                <property name="type">tab</property>
-                <property name="position">2</property>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkScrolledWindow" id="recent_scrolledwindow">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-                <child>
-                  <widget class="GtkTreeView" id="recentview">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="headers_visible">False</property>
-                    <property name="enable_search">False</property>
-                    <property name="fixed_height_mode">True</property>
-                    <property name="enable_grid_lines">GTK_TREE_VIEW_GRID_LINES_HORIZONTAL</property>
-                    <property name="enable_tree_lines">True</property>
-                    <signal name="row_activated" handler="on_recentview_row_activated"/>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-                <property name="tab_expand">True</property>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="recent">
-                <property name="height_request">30</property>
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">Recent</property>
-              </widget>
-              <packing>
-                <property name="type">tab</property>
-                <property name="position">1</property>
-                <property name="tab_expand">True</property>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkDialog" id="login_dialog">
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Grandcentral Login</property>
-    <property name="resizable">False</property>
-    <property name="modal">True</property>
-    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
-    <property name="destroy_with_parent">True</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <property name="skip_taskbar_hint">True</property>
-    <property name="skip_pager_hint">True</property>
-    <property name="deletable">False</property>
-    <property name="transient_for">Dialpad</property>
-    <property name="has_separator">False</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox1">
-        <property name="visible">True</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkTable" id="table1">
-            <property name="visible">True</property>
-            <property name="n_rows">2</property>
-            <property name="n_columns">2</property>
-            <child>
-              <widget class="GtkEntry" id="passwordentry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="visibility">False</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkEntry" id="usernameentry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="password_label">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">Password</property>
-              </widget>
-              <packing>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="username_label">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">Username</property>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
-            <child>
-              <widget class="GtkButton" id="loginbutton">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="label" translatable="yes">Login</property>
-                <property name="response_id">0</property>
-                <signal name="clicked" handler="on_loginbutton_clicked"/>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkButton" id="closebutton">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="label" translatable="yes">Close</property>
-                <property name="response_id">0</property>
-                <signal name="clicked" handler="on_loginclose_clicked"/>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkDialog" id="phonetype_dialog">
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Select Phone Type</property>
-    <property name="resizable">False</property>
-    <property name="modal">True</property>
-    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
-    <property name="destroy_with_parent">True</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <property name="skip_taskbar_hint">True</property>
-    <property name="skip_pager_hint">True</property>
-    <property name="deletable">False</property>
-    <property name="transient_for">Dialpad</property>
-    <property name="has_separator">False</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox3">
-        <property name="visible">True</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkTreeView" id="phonetypes">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <signal name="row_activated" handler="on_phonetype_select"/>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area3">
-            <property name="visible">True</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
-            <child>
-              <widget class="GtkButton" id="select_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="label" translatable="yes">Select</property>
-                <property name="response_id">0</property>
-                <signal name="clicked" handler="on_phonetype_select"/>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkButton" id="cancel_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="label" translatable="yes">Cancel</property>
-                <property name="response_id">0</property>
-                <signal name="clicked" handler="on_phonetype_cancel"/>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
index cf00b56..f1ae0c0 100755 (executable)
@@ -347,7 +347,7 @@ class AccountInfo(object):
        def __init__(self, widgetTree, backend = None):
                self._backend = backend
 
-               self._callbackList = None
+               self._callbackList = gtk.ListStore(gobject.TYPE_STRING)
                self._accountViewNumberDisplay = widgetTree.get_widget("gcnumber_display")
                self._callbackCombo = widgetTree.get_widget("callbackcombo")
                if hildon is not None:
@@ -387,7 +387,7 @@ class AccountInfo(object):
                if self._backend is None:
                        return
 
-               self._callbackList = gtk.ListStore(gobject.TYPE_STRING)
+               self._callbackList.clear()
                for number, description in self._backend.get_callback_numbers().iteritems():
                        self._callbackList.append((make_pretty(number),))
 
@@ -426,6 +426,8 @@ class RecentCallsView(object):
                widgetTree.signal_autoconnect(callbackMapping)
 
                self._init_recent_view()
+               if hildon is not None:
+                       hildon.hildon_helper_set_thumb_scrollbar(widgetTree.get_widget('recent_scrolledwindow'), True)
 
        def set_backend(self, backend):
                self._backend = backend
@@ -476,6 +478,175 @@ class RecentCallsView(object):
                self._recentviewselection.unselect_all()
 
 
+class ContactsView(object):
+
+       def __init__(self, widgetTree, backend = None):
+               self._backend = backend
+
+               self._booksList = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING)
+               self._addressBook = None
+               self._addressBookFactories = []
+               self._combobox = widgetTree.get_widget("addressbook_combo")
+
+               self._contactstime = 0.0
+               self._contactsmodel = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING)
+               self._contactsviewselection = None
+               self._contactsview = widgetTree.get_widget("contactsview")
+
+               self._phoneTypeSelector = PhoneTypeSelector(widgetTree, self._backend)
+
+               callbackMapping = {
+                       "on_contactsview_row_activated" : self._on_contactsview_row_activated,
+                       "on_addressbook_combo_changed": self._on_addressbook_combo_changed,
+               }
+               widgetTree.signal_autoconnect(callbackMapping)
+               if hildon is not None:
+                       hildon.hildon_helper_set_thumb_scrollbar(widgetTree.get_widget('contacts_scrolledwindow'), True)
+
+               self._init_contacts_view()
+
+       def get_addressbooks(self):
+               """
+               @returns Iterable of ((Factory Id, Book Id), (Factory Name, Book Name))
+               """
+               for i, factory in enumerate(self._addressBookFactories):
+                       for bookFactory, bookId, bookName in factory.get_addressbooks():
+                               yield (i, bookId), (factory.factory_name(), bookName)
+
+       def open_addressbook(self, bookFactoryId, bookId):
+               self._addressBook = self._addressBookFactories[bookFactoryId].open_addressbook(bookId)
+               self._contactstime = 0
+               backgroundPopulate = threading.Thread(target=self._idly_populate_contactsview)
+               backgroundPopulate.setDaemon(True)
+               backgroundPopulate.start()
+
+       def set_backend(self, backend):
+               self._backend = backend
+
+       def update(self):
+               if (time.time() - self._contactstime) < 300:
+                       return
+               backgroundPopulate = threading.Thread(target=self._idly_populate_contactsview)
+               backgroundPopulate.setDaemon(True)
+               backgroundPopulate.start()
+
+       def clear(self):
+               self._contactstime = 0.0
+               self._contactsmodel.clear()
+
+       def clear_caches(self):
+               for factory in self._addressBookFactories:
+                       factory.clear_caches()
+               self._addressBook.clear_caches()
+
+       def append(self, book):
+               self._addressBookFactories.append(book)
+
+       def extend(self, books):
+               self._addressBookFactories.extend(books)
+
+       def _init_contacts_view(self):
+               self._contactsview.set_model(self._contactsmodel)
+
+               # Add the column to the treeview
+               column = gtk.TreeViewColumn("Contact")
+
+               #displayContactSource = False
+               displayContactSource = True
+               if displayContactSource:
+                       textrenderer = gtk.CellRendererText()
+                       column.pack_start(textrenderer, expand=False)
+                       column.add_attribute(textrenderer, 'text', 0)
+
+               textrenderer = gtk.CellRendererText()
+               column.pack_start(textrenderer, expand=True)
+               column.add_attribute(textrenderer, 'text', 1)
+
+               textrenderer = gtk.CellRendererText()
+               column.pack_start(textrenderer, expand=True)
+               column.add_attribute(textrenderer, 'text', 4)
+
+               column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
+               column.set_sort_column_id(1)
+               column.set_visible(True)
+               self._contactsview.append_column(column)
+
+               self._contactsviewselection = self._contactsview.get_selection()
+               self._contactsviewselection.set_mode(gtk.SELECTION_SINGLE)
+
+               return False
+
+       def _idly_populate_books(self):
+               self._booksList.clear()
+               for (factoryId, bookId), (factoryName, bookName) in self.get_addressbooks():
+                       if factoryName and bookName:
+                               entryName = "%s: %s" % (factoryName, bookName)
+                       elif factoryName:
+                               entryName = factoryName
+                       elif bookName:
+                               entryName = bookName
+                       else:
+                               entryName = "Bad name (%d)" % factoryId
+                       row = (str(factoryId), bookId, entryName)
+                       gtk.gdk.threads_enter()
+                       self._booksList.append(row)
+                       gtk.gdk.threads_leave()
+
+               gtk.gdk.threads_enter()
+               self._combobox.set_model(self._booksList)
+               cell = gtk.CellRendererText()
+               self._combobox.pack_start(cell, True)
+               self._combobox.add_attribute(cell, 'text', 2)
+               self._combobox.set_active(0)
+               gtk.gdk.threads_leave()
+
+       def _idly_populate_contactsview(self):
+               #@todo Add a lock so only one code path can be in here at a time
+               self.clear()
+
+               # completely disable updating the treeview while we populate the data
+               self._contactsview.freeze_child_notify()
+               self._contactsview.set_model(None)
+
+               addressBook = self._addressBook
+               for contactId, contactName in addressBook.get_contacts():
+                       contactType = (addressBook.contact_source_short_name(contactId),)
+                       self._contactsmodel.append(contactType + (contactName, "", contactId) + ("",))
+
+               # restart the treeview data rendering
+               self._contactsview.set_model(self._contactsmodel)
+               self._contactsview.thaw_child_notify()
+               return False
+
+       def _on_addressbook_combo_changed(self, *args, **kwds):
+               itr = self._combobox.get_active_iter()
+
+               factoryId = int(self._booksList.get_value(itr, 0))
+               bookId = self._booksList.get_value(itr, 1)
+               self.open_addressbook(factoryId, bookId)
+
+       def _on_contactsview_row_activated(self, treeview, path, view_column):
+               model, itr = self._contactsviewselection.get_selected()
+               if not itr:
+                       return
+
+               contactId = self._contactsmodel.get_value(itr, 3)
+               contactDetails = self._addressBook.get_contact_details(contactId)
+               contactDetails = [phoneNumber for phoneNumber in contactDetails]
+
+               if len(contactDetails) == 0:
+                       phoneNumber = ""
+               elif len(contactDetails) == 1:
+                       phoneNumber = contactDetails[0][1]
+               else:
+                       phoneNumber = self._phoneTypeSelector.run(contactDetails)
+
+               if 0 < len(phoneNumber):
+                       self.number_selected(phoneNumber)
+
+               self._contactsviewselection.unselect_all()
+
+
 class Dialcentral(object):
 
        __pretty_app_name__ = "DialCentral"
@@ -484,26 +655,17 @@ class Dialcentral(object):
        __app_magic__ = 0xdeadbeef
 
        _glade_files = [
-               '/usr/lib/dialcentral/gc_dialer.glade',
-               os.path.join(os.path.dirname(__file__), "gc_dialer.glade"),
-               os.path.join(os.path.dirname(__file__), "../lib/gc_dialer.glade"),
+               '/usr/lib/dialcentral/dialcentral.glade',
+               os.path.join(os.path.dirname(__file__), "dialcentral.glade"),
+               os.path.join(os.path.dirname(__file__), "../lib/dialcentral.glade"),
        ]
 
        def __init__(self):
                self._gcBackend = None
-               self._booksList = None
-               self._addressBook = None
-               self._addressBookFactories = None
-               self._phoneTypeSelector = None
-
                self._clipboard = gtk.clipboard_get()
 
                self._deviceIsOnline = True
 
-               self._contactstime = 0.0
-               self._contactsmodel = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING)
-               self._contactsviewselection = None
-
                for path in Dialcentral._glade_files:
                        if os.path.isfile(path):
                                self._widgetTree = gtk.glade.XML(path)
@@ -520,6 +682,8 @@ class Dialcentral(object):
                self._accountView = AccountInfo(self._widgetTree)
                self._recentView = RecentCallsView(self._widgetTree)
                self._recentView.number_selected = self._on_number_selected
+               self._contactsView = ContactsView(self._widgetTree)
+               self._contactsView.number_selected = self._on_number_selected
 
                self._window = self._widgetTree.get_widget("Dialpad")
                self._notebook = self._widgetTree.get_widget("notebook")
@@ -537,8 +701,6 @@ class Dialcentral(object):
                        self._app.add_window(self._window)
                        self._widgetTree.get_widget("usernameentry").set_property('hildon-input-mode', 7)
                        self._widgetTree.get_widget("passwordentry").set_property('hildon-input-mode', 7|(1 << 29))
-                       hildon.hildon_helper_set_thumb_scrollbar(self._widgetTree.get_widget('contacts_scrolledwindow'), True)
-                       hildon.hildon_helper_set_thumb_scrollbar(self._widgetTree.get_widget('recent_scrolledwindow'), True)
 
                        gtkMenu = self._widgetTree.get_widget("dialpad_menubar")
                        menu = gtk.Menu()
@@ -567,9 +729,6 @@ class Dialcentral(object):
 
                        "on_clearcookies_clicked": self._on_clearcookies_clicked,
                        "on_notebook_switch_page": self._on_notebook_switch_page,
-                       "on_contactsview_row_activated" : self._on_contactsview_row_activated,
-
-                       "on_addressbook_combo_changed": self._on_addressbook_combo_changed,
                        "on_about_activate": self._on_about_activate,
                }
                self._widgetTree.signal_autoconnect(callbackMapping)
@@ -596,6 +755,7 @@ class Dialcentral(object):
                self._gcBackend = gc_backend.GCDialer()
                self._accountView.set_backend(self._gcBackend)
                self._recentView.set_backend(self._gcBackend)
+               self._contactsView.set_backend(self._gcBackend)
 
                try:
                        import osso
@@ -624,50 +784,16 @@ class Dialcentral(object):
                else:
                        warnings.warn("No Internet Connectivity API ", UserWarning, 2)
 
-
                addressBooks = [
                        self._gcBackend,
                        evo_backend.EvolutionAddressBook(),
                        DummyAddressBook(),
                ]
                mergedBook = MergedAddressBook(addressBooks, MergedAddressBook.basic_lastname_sorter)
-               self._addressBookFactories = list(addressBooks)
-               self._addressBookFactories.insert(0, mergedBook)
-               self._addressBook = None
-               self.open_addressbook(*self.get_addressbooks().next()[0][0:2])
-
-               gtk.gdk.threads_enter()
-               self._booksList = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING)
-               gtk.gdk.threads_leave()
-
-               for (factoryId, bookId), (factoryName, bookName) in self.get_addressbooks():
-                       if factoryName and bookName:
-                               entryName = "%s: %s" % (factoryName, bookName)
-                       elif factoryName:
-                               entryName = factoryName
-                       elif bookName:
-                               entryName = bookName
-                       else:
-                               entryName = "Bad name (%d)" % factoryId
-                       row = (str(factoryId), bookId, entryName)
-                       gtk.gdk.threads_enter()
-                       self._booksList.append(row)
-                       gtk.gdk.threads_leave()
-
-               gtk.gdk.threads_enter()
-               combobox = self._widgetTree.get_widget("addressbook_combo")
-               combobox.set_model(self._booksList)
-               cell = gtk.CellRendererText()
-               combobox.pack_start(cell, True)
-               combobox.add_attribute(cell, 'text', 2)
-               combobox.set_active(0)
-               gtk.gdk.threads_leave()
-
-               self._phoneTypeSelector = PhoneTypeSelector(self._widgetTree, self._gcBackend)
-
-               gtk.gdk.threads_enter()
-               self._init_contacts_view()
-               gtk.gdk.threads_leave()
+               self._contactsView.append(mergedBook)
+               self._contactsView.extend(addressBooks)
+               self._contactsView.open_addressbook(*self._contactsView.get_addressbooks().next()[0][0:2])
+               self._contactsView._idly_populate_books()
 
                #This is where the blocking can start
                if self._gcBackend.is_authed():
@@ -679,58 +805,6 @@ class Dialcentral(object):
 
                return False
 
-       def _init_contacts_view(self):
-               contactsview = self._widgetTree.get_widget("contactsview")
-               contactsview.set_model(self._contactsmodel)
-
-               # Add the column to the treeview
-               column = gtk.TreeViewColumn("Contact")
-
-               #displayContactSource = False
-               displayContactSource = True
-               if displayContactSource:
-                       textrenderer = gtk.CellRendererText()
-                       column.pack_start(textrenderer, expand=False)
-                       column.add_attribute(textrenderer, 'text', 0)
-
-               textrenderer = gtk.CellRendererText()
-               column.pack_start(textrenderer, expand=True)
-               column.add_attribute(textrenderer, 'text', 1)
-
-               textrenderer = gtk.CellRendererText()
-               column.pack_start(textrenderer, expand=True)
-               column.add_attribute(textrenderer, 'text', 4)
-
-               column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
-               column.set_sort_column_id(1)
-               column.set_visible(True)
-               contactsview.append_column(column)
-
-               self._contactsviewselection = contactsview.get_selection()
-               self._contactsviewselection.set_mode(gtk.SELECTION_SINGLE)
-
-               return False
-
-       def _idly_populate_contactsview(self):
-               #@todo Add a lock so only one code path can be in here at a time
-               self._contactstime = time.time()
-               self._contactsmodel.clear()
-
-               # completely disable updating the treeview while we populate the data
-               contactsview = self._widgetTree.get_widget("contactsview")
-               contactsview.freeze_child_notify()
-               contactsview.set_model(None)
-
-               addressBook = self._addressBook
-               for contactId, contactName in addressBook.get_contacts():
-                       contactType = (addressBook.contact_source_short_name(contactId),)
-                       self._contactsmodel.append(contactType + (contactName, "", contactId) + ("",))
-
-               # restart the treeview data rendering
-               contactsview.set_model(self._contactsmodel)
-               contactsview.thaw_child_notify()
-               return False
-
        def attempt_login(self, numOfAttempts = 1):
                """
                @todo Handle user notification better like attempting to login and failed login
@@ -779,21 +853,6 @@ class Dialcentral(object):
                error_dialog.connect("response", close, self)
                error_dialog.run()
 
-       def get_addressbooks(self):
-               """
-               @returns Iterable of ((Factory Id, Book Id), (Factory Name, Book Name))
-               """
-               for i, factory in enumerate(self._addressBookFactories):
-                       for bookFactory, bookId, bookName in factory.get_addressbooks():
-                               yield (i, bookId), (factory.factory_name(), bookName)
-
-       def open_addressbook(self, bookFactoryId, bookId):
-               self._addressBook = self._addressBookFactories[bookFactoryId].open_addressbook(bookId)
-               self._contactstime = 0
-               backgroundPopulate = threading.Thread(target=self._idly_populate_contactsview)
-               backgroundPopulate.setDaemon(True)
-               backgroundPopulate.start()
-
        @staticmethod
        def _on_close(*args, **kwds):
                gtk.main_quit()
@@ -807,9 +866,7 @@ class Dialcentral(object):
                """
                if memory_low:
                        self._gcBackend.clear_caches()
-                       for factory in self._addressBookFactories:
-                               factory.clear_caches()
-                       self._addressBook.clear_caches()
+                       self._contactsView.clear_caches()
                        gc.collect()
 
        def _on_connection_change(self, connection, event, magicIdentifier):
@@ -861,51 +918,18 @@ class Dialcentral(object):
 
        def _on_clearcookies_clicked(self, *args):
                self._gcBackend.logout()
-               self._contactstime = 0.0
                self._accountView.clear()
                self._recentView.clear()
+               self._contactsView.clear()
 
                # re-run the inital grandcentral setup
                backgroundLogin = threading.Thread(target=self.attempt_login, args=[2])
                backgroundLogin.setDaemon(True)
                backgroundLogin.start()
 
-       def _on_addressbook_combo_changed(self, *args, **kwds):
-               combobox = self._widgetTree.get_widget("addressbook_combo")
-               itr = combobox.get_active_iter()
-
-               factoryId = int(self._booksList.get_value(itr, 0))
-               bookId = self._booksList.get_value(itr, 1)
-               self.open_addressbook(factoryId, bookId)
-
-       def _on_contactsview_row_activated(self, treeview, path, view_column):
-               model, itr = self._contactsviewselection.get_selected()
-               if not itr:
-                       return
-
-               contactId = self._contactsmodel.get_value(itr, 3)
-               contactDetails = self._addressBook.get_contact_details(contactId)
-               contactDetails = [phoneNumber for phoneNumber in contactDetails]
-
-               if len(contactDetails) == 0:
-                       phoneNumber = ""
-               elif len(contactDetails) == 1:
-                       phoneNumber = contactDetails[0][1]
-               else:
-                       phoneNumber = self._phoneTypeSelector.run(contactDetails)
-
-               if 0 < len(phoneNumber):
-                       self._dialpad.set_number(phoneNumber)
-                       self._notebook.set_current_page(0)
-
-               self._contactsviewselection.unselect_all()
-
        def _on_notebook_switch_page(self, notebook, page, page_num):
                if page_num == 1:
-                       if 300 < (time.time() - self._contactstime):
-                               backgroundPopulate = threading.Thread(target=self._idly_populate_contactsview)
-                               backgroundPopulate.setDaemon(True)
-                               backgroundPopulate.start()
+                       self._contactsView.update()
                elif page_num == 3:
                        self._recentView.update()
                #elif page_num == 2: