Add version number to about and made a variable for version numbering
authorepage <eopage@byu.net>
Thu, 3 Jul 2008 13:50:29 +0000 (13:50 +0000)
committerepage <eopage@byu.net>
Thu, 3 Jul 2008 13:50:29 +0000 (13:50 +0000)
git-svn-id: file:///svnroot/gc-dialer/trunk@50 c39d3808-3fe2-4d86-a59f-b7f623ee9f21

gc_dialer/gc_dialer.glade
gc_dialer/gc_dialer.py

index 2037d22..cc22104 100644 (file)
@@ -528,7 +528,7 @@ must reauthenticate</property>
           <widget class="GtkVBox" id="vbox1">
             <property name="visible">True</property>
             <child>
-              <widget class="GtkLabel" id="label2">
+              <widget class="GtkLabel" id="about_title">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">&lt;span size="20000" weight="bold"&gt;GrandCentral Dialer&lt;/span&gt;
 Copyright 2008</property>
@@ -537,7 +537,7 @@ Copyright 2008</property>
               </widget>
             </child>
             <child>
-              <widget class="GtkLabel" id="label4">
+              <widget class="GtkLabel" id="about_description">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">GUI front-end to initiate outbound call from Grandcentral.com, typically with Grancentral configured to connect the outbound call to a VOIP number accessible via Gizmo on the Internet Tablet.</property>
                 <property name="wrap">True</property>
@@ -547,7 +547,7 @@ Copyright 2008</property>
               </packing>
             </child>
             <child>
-              <widget class="GtkLabel" id="label7">
+              <widget class="GtkLabel" id="about_authors">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">Authors: Mark Bergman &lt;bergman@merctech.com&gt;, Eric Warnke &lt;ericew@gmail.com&gt;</property>
                 <property name="wrap">True</property>
index c190e39..e578a4b 100755 (executable)
@@ -127,6 +127,10 @@ def makepretty(phonenumber):
 
 class Dialpad(object):
 
+       __app_name__ = "gc_dialer"
+       __version__ = "0.7.0"
+
+
        def __init__(self):
                self.phonenumber = ""
                self.prettynumber = ""
@@ -146,13 +150,13 @@ class Dialpad(object):
                                #       self.wTree.add_from_file(path)
                                #else:
                                self.wTree = gtk.glade.XML(path)
-                               self.wTree.get_widget = self.wTree.get_widget
                                break
                else:
                        self.ErrPopUp("Cannot find gc_dialer.glade")
                        gtk.main_quit()
                        return
 
+               self.wTree.get_widget("about_title").set_label(self.wTree.get_widget("about_title").get_label()+"\nVersion "+Dialpad.__version__)
 
                #Get the buffer associated with the number display
                self.numberdisplay = self.wTree.get_widget("numberdisplay")
@@ -171,11 +175,11 @@ class Dialpad(object):
                        print "No Hildon"
 
                if osso is not None:
-                       self.osso = osso.Context("gc_dialer", "0.6.0", False)
+                       self.osso = osso.Context(__name__, Dialpad.__version__, False)
                        device = osso.DeviceState(self.osso)
                        device.set_device_state_callback(self.on_device_state_change, 0)
                        if abook is not None and evobook is not None:
-                               abook.init_with_name("gc_dialer", self.osso)
+                               abook.init_with_name(__name__, self.osso)
                                self.ebook = evo.open_addressbook("default")
                        else:
                                print "No abook and No evolution address book support"