Trying to fix some title issues and use Python Launcher
authorepage <eopage@byu.net>
Tue, 5 Aug 2008 03:12:24 +0000 (03:12 +0000)
committerepage <eopage@byu.net>
Tue, 5 Aug 2008 03:12:24 +0000 (03:12 +0000)
git-svn-id: file:///svnroot/gc-dialer/trunk@123 c39d3808-3fe2-4d86-a59f-b7f623ee9f21

Makefile
src/gc_dialer.py

index 5aea7d4..bd97baa 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,7 @@ CTAGS=ctags-exuberant
 
 .PHONY: all run debug test lint tags build package clean
 
-all: test tags package
+all: test package
 
 run: $(SOURCE)
        cd $(SOURCE_PATH) ; ./gc_dialer.py
@@ -123,7 +123,7 @@ $(BUILD_BIN): $(SOURCE)
        mkdir -p $(dir $(BUILD_BIN))
 
        #Construct the program by cat-ing all the python files together
-       echo "#!/usr/bin/python2.5" > $(BUILD_BIN)
+       echo "#!/usr/bin/python" > $(BUILD_BIN)
        #echo "from __future__ import with_statement" >> $(PRE_PACKAGE_PATH)/usr/local/bin/gc_dialer.py
        cat $(SOURCE_PATH)/gc_dialer.py $(SOURCE_PATH)/gcbackend.py $(SOURCE_PATH)/browser_emu.py | grep -e '^import ' | sort -u >> $(BUILD_BIN)
        cat $(SOURCE_PATH)/browser_emu.py $(SOURCE_PATH)/gcbackend.py $(SOURCE_PATH)/gc_dialer.py | grep -v 'browser_emu' | grep -v 'gcbackend' | grep -v "#!" >> $(BUILD_BIN)
index 69957a5..9c0df9b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.5
+#!/usr/bin/python
 
 # GC Dialer - Front end for Google's Grand Central service.
 # Copyright (C) 2008  Mark Bergman bergman AT merctech DOT com
@@ -287,7 +287,6 @@ class Dialpad(object):
                        hildon = None
                elif hildon is not None:
                        self._app = hildon.Program()
-                       self._window.set_title("%s - Keypad" % self.__pretty_app_name__)
                        self._app.add_window(self._window)
                        self._widgetTree.get_widget("callbackcombo").get_child().set_property('hildon-input-mode', (1 << 4))
                        self._widgetTree.get_widget("usernameentry").set_property('hildon-input-mode', 7)
@@ -305,6 +304,11 @@ class Dialpad(object):
                else:
                        warnings.warn("No Hildon", UserWarning, 2)
 
+               if hildon is not None:
+                       self._window.set_title("Keypad")
+               else:
+                       self._window.set_title("%s - Keypad" % self.__pretty_app_name__)
+
                self._osso = None
                self._ebook = None
                if osso is not None:
@@ -646,9 +650,11 @@ class Dialpad(object):
                elif page_num == 3 and self._callbackNeedsSetup:
                        gobject.idle_add(self._idly_setup_callback_combo)
 
-               if hildon:
-                       hildonTitle = self._notebook.get_tab_label(self._notebook.get_nth_page(page_num)).get_text()
-                       self._window.set_title("%s - %s" % (self.__pretty_app_name__, hildonTitle))
+               tabTitle = self._notebook.get_tab_label(self._notebook.get_nth_page(page_num)).get_text()
+               if hildon is not None:
+                       self._window.set_title(tabTitle)
+               else:
+                       self._window.set_title("%s - %s" % (self.__pretty_app_name__, tabTitle))
 
        def _on_dial_clicked(self, widget):
                """
@@ -716,7 +722,7 @@ class DummyOptions(object):
 
 if __name__ == "__main__":
        if hildon is not None:
-               gtk.set_application_name("Dialer")
+               gtk.set_application_name(Dialpad.__pretty_app_name__)
 
        if optparse is not None:
                parser = optparse.OptionParser()