* Changed the file headers to doc strings
authorepage <eopage@byu.net>
Mon, 18 May 2009 12:58:42 +0000 (12:58 +0000)
committerepage <eopage@byu.net>
Mon, 18 May 2009 12:58:42 +0000 (12:58 +0000)
* Experimenting with the tabs being on the side to give more vertical room
* Always displaying the phone select dialog now with the option to directly dial from it

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

src/dc_glade.py
src/dialcentral.glade
src/evo_backend.py
src/file_backend.py
src/gc_backend.py
src/gc_views.py
src/gv_backend.py
src/null_backend.py
src/null_views.py

index 9a2e3d7..38e782a 100755 (executable)
@@ -1,25 +1,22 @@
 #!/usr/bin/python2.5
 
-# DialCentral - Front end for Google's Grand Central service.
-# Copyright (C) 2008  Mark Bergman bergman AT merctech DOT com
-# 
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# 
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-# 
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+"""
+DialCentral - Front end for Google's Grand Central service.
+Copyright (C) 2008  Mark Bergman bergman AT merctech DOT com
 
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
 
-"""
-DialCentral: A phone dialer using GrandCentral
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 @todo Add logging support to make debugging issues for people a lot easier
 """
@@ -138,6 +135,7 @@ class Dialcentral(object):
                if self._window:
                        self._window.connect("destroy", gtk.main_quit)
                        self._window.show_all()
+                       self._window.set_default_size(800, 300)
 
                backgroundSetup = threading.Thread(target=self._idle_setup)
                backgroundSetup.setDaemon(True)
@@ -427,7 +425,7 @@ class Dialcentral(object):
        def _on_notebook_switch_page(self, notebook, page, page_num):
                if page_num == 1:
                        self._contactsViews[self._selectedBackendId].update()
-               elif page_num == 3:
+               elif page_num == 2:
                        self._recentViews[self._selectedBackendId].update()
 
                tabTitle = self._notebook.get_tab_label(self._notebook.get_nth_page(page_num)).get_text()
index bf7180d..fcb547d 100644 (file)
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Fri Mar 20 21:35:31 2009 -->
+<?xml version="1.0"?>
 <glade-interface>
+  <!-- interface-requires gtk+ 2.16 -->
+  <!-- interface-naming-policy toplevel-contextual -->
   <widget class="GtkWindow" id="mainWindow">
     <property name="title" translatable="yes">Dialer</property>
     <property name="default_width">800</property>
                     <property name="visible">True</property>
                     <child>
                       <widget class="GtkImageMenuItem" id="login_menu_item">
+                        <property name="label">_New Login</property>
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">_New Login</property>
                         <property name="use_underline">True</property>
+                        <property name="use_stock">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>
@@ -40,8 +36,8 @@
                     </child>
                     <child>
                       <widget class="GtkImageMenuItem" id="quit_menu_item">
+                        <property name="label">gtk-quit</property>
                         <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"/>
@@ -61,8 +57,8 @@
                     <property name="visible">True</property>
                     <child>
                       <widget class="GtkImageMenuItem" id="paste_menu_item">
+                        <property name="label">gtk-paste</property>
                         <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"/>
                     </child>
                     <child>
                       <widget class="GtkImageMenuItem" id="delete_menu_item">
+                        <property name="label">Clear Number</property>
                         <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>
+                        <property name="use_stock">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>
@@ -97,6 +89,7 @@
           </widget>
           <packing>
             <property name="expand">False</property>
+            <property name="position">0</property>
           </packing>
         </child>
         <child>
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">False</property>
+                    <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
                   <widget class="GtkLabel" id="errorDescription">
                     <property name="visible">True</property>
                     <property name="use_markup">True</property>
-                    <property name="ellipsize">PANGO_ELLIPSIZE_END</property>
+                    <property name="ellipsize">end</property>
                     <property name="single_line_mode">True</property>
                   </widget>
                   <packing>
           <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="tab_pos">left</property>
             <property name="show_border">False</property>
             <property name="homogeneous">True</property>
             <signal name="switch_page" handler="on_notebook_switch_page"/>
                     <property name="visible">True</property>
                     <property name="label" translatable="yes">&lt;span size="35000" weight="bold"&gt;&lt;/span&gt;</property>
                     <property name="use_markup">True</property>
-                    <property name="justify">GTK_JUSTIFY_CENTER</property>
+                    <property name="justify">center</property>
                   </widget>
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">False</property>
+                    <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
                     <child>
                       <widget class="GtkButton" id="digit1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="receives_default">False</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"/>
+                        <accelerator key="1" signal="clicked"/>
                         <child>
                           <widget class="GtkLabel" id="label12">
                             <property name="visible">True</property>
                     <child>
                       <widget class="GtkButton" id="digit2">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="receives_default">False</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"/>
+                        <accelerator key="c" signal="clicked"/>
+                        <accelerator key="b" signal="clicked"/>
+                        <accelerator key="a" signal="clicked"/>
+                        <accelerator key="2" 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>
+                            <property name="justify">center</property>
                           </widget>
                         </child>
                       </widget>
                     <child>
                       <widget class="GtkButton" id="digit3">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="receives_default">False</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"/>
+                        <accelerator key="f" signal="clicked"/>
+                        <accelerator key="e" signal="clicked"/>
+                        <accelerator key="d" signal="clicked"/>
+                        <accelerator key="3" 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>
+                            <property name="justify">center</property>
                           </widget>
                         </child>
                       </widget>
                     <child>
                       <widget class="GtkButton" id="digit4">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="receives_default">False</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"/>
+                        <accelerator key="i" signal="clicked"/>
+                        <accelerator key="h" signal="clicked"/>
+                        <accelerator key="g" signal="clicked"/>
+                        <accelerator key="4" 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>
+                            <property name="justify">center</property>
                           </widget>
                         </child>
                       </widget>
                     <child>
                       <widget class="GtkButton" id="digit5">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="receives_default">False</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"/>
+                        <accelerator key="l" signal="clicked"/>
+                        <accelerator key="k" signal="clicked"/>
+                        <accelerator key="j" signal="clicked"/>
+                        <accelerator key="5" 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>
+                            <property name="justify">center</property>
                           </widget>
                         </child>
                       </widget>
                     <child>
                       <widget class="GtkButton" id="digit6">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="receives_default">False</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"/>
+                        <accelerator key="o" signal="clicked"/>
+                        <accelerator key="n" signal="clicked"/>
+                        <accelerator key="m" signal="clicked"/>
+                        <accelerator key="6" 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>
+                            <property name="justify">center</property>
                           </widget>
                         </child>
                       </widget>
                     <child>
                       <widget class="GtkButton" id="digit7">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="receives_default">False</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"/>
+                        <accelerator key="s" signal="clicked"/>
+                        <accelerator key="r" signal="clicked"/>
+                        <accelerator key="q" signal="clicked"/>
+                        <accelerator key="p" signal="clicked"/>
+                        <accelerator key="7" 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>
+                            <property name="justify">center</property>
                           </widget>
                         </child>
                       </widget>
                     <child>
                       <widget class="GtkButton" id="digit8">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="receives_default">False</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"/>
+                        <accelerator key="v" signal="clicked"/>
+                        <accelerator key="u" signal="clicked"/>
+                        <accelerator key="t" signal="clicked"/>
+                        <accelerator key="8" 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>
+                            <property name="justify">center</property>
                           </widget>
                         </child>
                       </widget>
                     <child>
                       <widget class="GtkButton" id="digit9">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="receives_default">False</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"/>
+                        <accelerator key="z" signal="clicked"/>
+                        <accelerator key="y" signal="clicked"/>
+                        <accelerator key="x" signal="clicked"/>
+                        <accelerator key="w" signal="clicked"/>
+                        <accelerator key="9" 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>
+                            <property name="justify">center</property>
                           </widget>
                         </child>
                       </widget>
                     <child>
                       <widget class="GtkButton" id="back">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="receives_default">False</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"/>
+                        <accelerator key="BackSpace" signal="clicked"/>
                         <child>
                           <widget class="GtkHBox" id="hbox2">
                             <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="stock">gtk-no</property>
                               </widget>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
                             </child>
                             <child>
                               <widget class="GtkLabel" id="label9">
                     <child>
                       <widget class="GtkButton" id="digit0">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="receives_default">False</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"/>
+                        <accelerator key="0" 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>
+                            <property name="justify">center</property>
                           </widget>
                         </child>
                       </widget>
                     <child>
                       <widget class="GtkButton" id="dial">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="has_default">True</property>
-                        <property name="response_id">0</property>
+                        <property name="receives_default">False</property>
                         <signal name="clicked" handler="on_dial_clicked"/>
-                        <accelerator key="Return" modifiers="" signal="clicked"/>
+                        <accelerator key="Return" signal="clicked"/>
                         <child>
                           <widget class="GtkHBox" id="hbox1">
                             <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="stock">gtk-yes</property>
                               </widget>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
                             </child>
                             <child>
                               <widget class="GtkLabel" id="label8">
                 <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>
+                <property name="type">tab</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>
+                    <property name="hscrollbar_policy">never</property>
                     <child>
                       <widget class="GtkTreeView" id="contactsview">
                         <property name="visible">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_grid_lines">horizontal</property>
                         <property name="enable_tree_lines">True</property>
                         <signal name="row_activated" handler="on_contactsview_row_activated"/>
                       </widget>
                 <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>
+                <property name="type">tab</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">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">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">2</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="position">2</property>
+                <property name="tab_expand">True</property>
+                <property name="tab_fill">False</property>
+                <property name="type">tab</property>
               </packing>
             </child>
             <child>
                 <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>
                 </child>
                 <child>
                   <widget class="GtkButton" id="clearcookies">
+                    <property name="label" translatable="yes">Clear Account Information
+(must reauthenticate)</property>
                     <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="xpad">5</property>
                     <property name="label" translatable="yes">GrandCentral
 Number:</property>
-                    <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                    <property name="justify">right</property>
                   </widget>
                 </child>
+                <child>
+                  <placeholder/>
+                </child>
               </widget>
               <packing>
-                <property name="position">2</property>
+                <property name="position">3</property>
                 <property name="tab_expand">True</property>
                 <property name="tab_fill">False</property>
               </packing>
@@ -676,46 +718,9 @@ Number:</property>
                 <property name="label" translatable="yes">Account</property>
               </widget>
               <packing>
-                <property name="type">tab</property>
-                <property name="position">2</property>
+                <property name="position">3</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>
@@ -731,9 +736,9 @@ Number:</property>
     <property name="title" translatable="yes">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="window_position">center-on-parent</property>
     <property name="destroy_with_parent">True</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="type_hint">dialog</property>
     <property name="skip_taskbar_hint">True</property>
     <property name="skip_pager_hint">True</property>
     <property name="deletable">False</property>
@@ -805,38 +810,44 @@ Number:</property>
         <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>
+            <property name="layout_style">end</property>
             <child>
               <widget class="GtkButton" id="logins_close_button">
+                <property name="label" translatable="yes">gtk-close</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="label" translatable="yes">gtk-close</property>
                 <property name="use_stock">True</property>
-                <property name="response_id">0</property>
                 <signal name="clicked" handler="on_loginclose_clicked"/>
               </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
             </child>
             <child>
               <widget class="GtkButton" id="loginbutton">
+                <property name="label" translatable="yes">gtk-ok</property>
                 <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">gtk-ok</property>
                 <property name="use_stock">True</property>
-                <property name="response_id">0</property>
                 <signal name="clicked" handler="on_loginbutton_clicked"/>
               </widget>
               <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
                 <property name="position">1</property>
               </packing>
             </child>
           </widget>
           <packing>
             <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
           </packing>
         </child>
       </widget>
@@ -847,9 +858,9 @@ Number:</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="window_position">center-on-parent</property>
     <property name="destroy_with_parent">True</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="type_hint">dialog</property>
     <property name="skip_taskbar_hint">True</property>
     <property name="skip_pager_hint">True</property>
     <property name="deletable">False</property>
@@ -862,6 +873,7 @@ Number:</property>
           <widget class="GtkTreeView" id="phonetypes">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
+            <property name="rules_hint">True</property>
             <signal name="row_activated" handler="on_phonetype_select"/>
           </widget>
           <packing>
@@ -871,33 +883,53 @@ Number:</property>
         <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>
+            <property name="layout_style">end</property>
             <child>
-              <widget class="GtkButton" id="select_button">
+              <widget class="GtkButton" id="dial_button">
+                <property name="label" translatable="yes">Dial</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkButton" id="select_button">
                 <property name="label" translatable="yes">Select</property>
-                <property name="response_id">0</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
                 <signal name="clicked" handler="on_phonetype_select"/>
               </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
             </child>
             <child>
               <widget class="GtkButton" id="cancel_button">
+                <property name="label" translatable="yes">Cancel</property>
                 <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>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
               </packing>
             </child>
           </widget>
           <packing>
             <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
           </packing>
         </child>
       </widget>
index cbed08a..4b6910d 100644 (file)
@@ -1,24 +1,23 @@
 #!/usr/bin/python
 
-# DialCentral - Front end for Google's Grand Central service.
-# Copyright (C) 2008  Eric Warnke ericew AT gmail DOT com
-# 
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# 
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-# 
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+"""
+DialCentral - Front end for Google's Grand Central service.
+Copyright (C) 2008  Eric Warnke ericew AT gmail DOT com
 
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
-"""
 Evolution Contact Support
 
 It seems the evolution contact API used is specific to the desktop.  evolution.ebook combined with abook is what is needed for Maemo.
index 4931c86..ddd89b3 100644 (file)
@@ -1,24 +1,23 @@
 #!/usr/bin/python
 
-# DialCentral - Front end for Google's Grand Central service.
-# Copyright (C) 2008  Eric Warnke ericew AT gmail DOT com
-# 
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# 
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-# 
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+"""
+DialCentral - Front end for Google's Grand Central service.
+Copyright (C) 2008  Eric Warnke ericew AT gmail DOT com
 
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
-"""
 Filesystem backend for contact support
 """
 
index 042b68d..53e6aa9 100644 (file)
@@ -1,23 +1,23 @@
 #!/usr/bin/python
 
-# DialCentral - Front end for Google's Grand Central service.
-# Copyright (C) 2008  Eric Warnke ericew AT gmail DOT com
-# 
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# 
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-# 
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
 """
+DialCentral - Front end for Google's Grand Central service.
+Copyright (C) 2008  Eric Warnke ericew AT gmail DOT com
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
 Grandcentral backend code
 """
 
index c7184c8..ba0a01f 100644 (file)
@@ -1,21 +1,28 @@
 #!/usr/bin/python2.5
 
-# DialCentral - Front end for Google's Grand Central service.
-# Copyright (C) 2008  Mark Bergman bergman AT merctech DOT com
-# 
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# 
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-# 
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+"""
+DialCentral - Front end for Google's Grand Central service.
+Copyright (C) 2008  Mark Bergman bergman AT merctech DOT com
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+@todo Look into a messages view
+       @li https://www.google.com/voice/inbox/recent/voicemail/
+       @li https://www.google.com/voice/inbox/recent/sms/
+       Would need to either use both json and html or just html
+"""
 
 from __future__ import with_statement
 
@@ -312,6 +319,9 @@ class PhoneTypeSelector(object):
                self._widgetTree = widgetTree
                self._dialog = self._widgetTree.get_widget("phonetype_dialog")
 
+               self._dialButton = self._widgetTree.get_widget("dial_button")
+               self._dialButton.connect("clicked", self._on_phonetype_dial)
+
                self._selectButton = self._widgetTree.get_widget("select_button")
                self._selectButton.connect("clicked", self._on_phonetype_select)
 
@@ -344,9 +354,7 @@ class PhoneTypeSelector(object):
                userResponse = self._dialog.run()
 
                if userResponse == gtk.RESPONSE_OK:
-                       model, itr = self._typeviewselection.get_selected()
-                       if itr:
-                               phoneNumber = self._typemodel.get_value(itr, 0)
+                       phoneNumber = self._get_number()
                else:
                        phoneNumber = ""
 
@@ -354,6 +362,17 @@ class PhoneTypeSelector(object):
                self._dialog.hide()
                return phoneNumber
 
+       def _get_number(self):
+               model, itr = self._typeviewselection.get_selected()
+               if not itr:
+                       return ""
+               phoneNumber = self._typemodel.get_value(itr, 0)
+               return phonenumber
+
+       def _on_phonetype_dial(self, *args):
+               self.dial(self._get_number())
+               self._dialog.response(gtk.RESPONSE_CANCEL)
+
        def _on_phonetype_select(self, *args):
                self._dialog.response(gtk.RESPONSE_OK)
 
@@ -758,8 +777,6 @@ class ContactsView(object):
                if len(contactDetails) == 0:
                        phoneNumber = ""
                elif len(contactDetails) == 1:
-                       phoneNumber = contactDetails[0][1]
-               else:
                        phoneNumber = self._phoneTypeSelector.run(contactDetails)
 
                if 0 < len(phoneNumber):
index c92412e..1508bfc 100644 (file)
@@ -1,23 +1,23 @@
 #!/usr/bin/python
 
-# DialCentral - Front end for Google's Grand Central service.
-# Copyright (C) 2008  Eric Warnke ericew AT gmail DOT com
-# 
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# 
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-# 
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
 """
+DialCentral - Front end for Google's Grand Central service.
+Copyright (C) 2008  Eric Warnke ericew AT gmail DOT com
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
 Google Voice backend code
 
 Resources
@@ -92,6 +92,8 @@ class GVDialer(object):
        _placedCallsURL = "https://www.google.com/voice/inbox/recent/placed/"
        _receivedCallsURL = "https://www.google.com/voice/inbox/recent/received/"
        _missedCallsURL = "https://www.google.com/voice/inbox/recent/missed/"
+       _voicemailURL = "https://www.google.com/voice/inbox/recent/voicemail/"
+       _smsURL = "https://www.google.com/voice/inbox/recent/sms/"
 
        def __init__(self, cookieFile = None):
                # Important items in this function are the setup of the browser emulation and cookie file
@@ -288,11 +290,12 @@ class GVDialer(object):
                        self._placedCallsURL,
                ):
                        try:
-                               allRecentData = self._grab_json(url)
+                               flatXml = self._browser.download(url)
                        except urllib2.URLError, e:
                                warnings.warn(traceback.format_exc())
                                raise RuntimeError("%s is not accesible" % self._clicktocallURL)
 
+                       allRecentData = self._grab_json(flatXml)
                        for recentCallData in allRecentData["messages"].itervalues():
                                number = recentCallData["displayNumber"]
                                date = recentCallData["relativeStartTime"]
@@ -367,17 +370,44 @@ class GVDialer(object):
                        phoneType = saxutils.unescape(detail_match.group(2))
                        yield (phoneType, phoneNumber)
 
-       def _grab_json(self, url):
-               flatXml = self._browser.download(url)
+       def get_messages(self):
+               try:
+                       voicemailPage = self._browser.download(self._voicemailURL)
+               except urllib2.URLError, e:
+                       warnings.warn(traceback.format_exc())
+                       raise RuntimeError("%s is not accesible" % self._voicemailURL)
+
+               try:
+                       smsPage = self._browser.download(self._smsURL)
+               except urllib2.URLError, e:
+                       warnings.warn(traceback.format_exc())
+                       raise RuntimeError("%s is not accesible" % self._smsURL)
+
+               voicemailHtml = self._grab_html(voicemailPage)
+               smsHtml = self._grab_html(smsPage)
+
+               voicemailTree = ElementTree.fromstring(voicemailHtml)
+               smsTree = ElementTree.fromstring(smsHtml)
+
+               import xml.dom.minidom as minidom
+               print minidom.parseString(voicemailTree).toprettyxml()
+               print minidom.parseString(smsTree).toprettyxml()
+
+       def _grab_json(self, flatXml):
                xmlTree = ElementTree.fromstring(flatXml)
                jsonElement = xmlTree.getchildren()[0]
                flatJson = jsonElement.text
                jsonTree = parse_json(flatJson)
                return jsonTree
 
+       def _grab_html(self, flatXml):
+               xmlTree = ElementTree.fromstring(flatXml)
+               htmlElement = xmlTree.getchildren()[1]
+               flatHtml = htmlElement.text
+               return flatHtml
+
        def _grab_account_info(self):
                page = self._browser.download(self._forwardURL)
-               print page
 
                tokenGroup = self._tokenRe.search(page)
                if tokenGroup is None:
index 795a4b7..b20d2df 100644 (file)
@@ -1,21 +1,23 @@
 #!/usr/bin/python
 
-# DialCentral - Front end for Google's Grand Central service.
-# Copyright (C) 2008  Eric Warnke ericew AT gmail DOT com
-# 
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# 
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-# 
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+"""
+DialCentral - Front end for Google's Grand Central service.
+Copyright (C) 2008  Eric Warnke ericew AT gmail DOT com
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+"""
 
 
 class NullDialer(object):
index 984c5f7..8713ba3 100644 (file)
@@ -1,21 +1,23 @@
 #!/usr/bin/python2.5
 
-# DialCentral - Front end for Google's Grand Central service.
-# Copyright (C) 2008  Mark Bergman bergman AT merctech DOT com
-# 
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-# 
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-# 
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+"""
+DialCentral - Front end for Google's Grand Central service.
+Copyright (C) 2008  Mark Bergman bergman AT merctech DOT com
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+"""
 
 import gobject
 import gtk