From 29f545b149526c96a0ba15841c20d15333d90e9d Mon Sep 17 00:00:00 2001 From: epage Date: Wed, 3 Jun 2009 22:47:20 +0000 Subject: [PATCH] Version bump to 1.0, description fixes, and adding of names to the recent tab for googlevoice git-svn-id: file:///svnroot/gc-dialer/trunk@355 c39d3808-3fe2-4d86-a59f-b7f623ee9f21 --- src/constants.py | 2 +- src/dc_glade.py | 3 +-- src/evo_backend.py | 2 +- src/gc_views.py | 4 +++- src/gv_backend.py | 37 +++++++++++++++++-------------------- support/builddeb.py | 5 +++-- 6 files changed, 26 insertions(+), 27 deletions(-) diff --git a/src/constants.py b/src/constants.py index 4d399cb..9d145db 100644 --- a/src/constants.py +++ b/src/constants.py @@ -1,4 +1,4 @@ __pretty_app_name__ = "DialCentral" __app_name__ = "dialcentral" -__version__ = "0.9.10" +__version__ = "1.0.0" __app_magic__ = 0xdeadbeef diff --git a/src/dc_glade.py b/src/dc_glade.py index 4b86a93..690039e 100755 --- a/src/dc_glade.py +++ b/src/dc_glade.py @@ -18,7 +18,6 @@ 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 -@bug Need to add unit tests @todo Look into an actor system @bug Session timeouts are bad, possible solutions: @li For every X minutes, if logged in, attempt login @@ -712,7 +711,7 @@ class Dialcentral(object): dlg.set_name(constants.__pretty_app_name__) dlg.set_version(constants.__version__) dlg.set_copyright("Copyright 2008 - LGPL") - dlg.set_comments("Dialer is designed to interface with your Google Grandcentral account. This application is not affiliated with Google or Grandcentral in any way") + dlg.set_comments("Dialcentral is a touch screen enhanced interface to your GoogleVoice/Grandcentral account. This application is not affiliated with Google in any way") dlg.set_website("http://gc-dialer.garage.maemo.org/") dlg.set_authors(["", "Eric Warnke ", "Ed Page "]) dlg.run() diff --git a/src/evo_backend.py b/src/evo_backend.py index 4b6910d..727b898 100644 --- a/src/evo_backend.py +++ b/src/evo_backend.py @@ -20,7 +20,7 @@ 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. +@bug It seems the evolution contact API used is specific to the desktop. evolution.ebook combined with abook is what is needed for Maemo. http://maemo.org/maemo_release_documentation/maemo4.1.x/node8.html#SECTION00870000000000000000 https://garage.maemo.org/svn/pymaemo/packages/python-abook/trunk/tests/ especially contact_get_iter amd filter_model http://pymaemo.garage.maemo.org/documentation/api/abook/index.html diff --git a/src/gc_views.py b/src/gc_views.py index 472c0e3..577b3bb 100644 --- a/src/gc_views.py +++ b/src/gc_views.py @@ -747,7 +747,9 @@ class RecentCallsView(object): for personName, phoneNumber, date, action in recentItems: if not personName: personName = "Unknown" - description = "%s (%s)" % (phoneNumber, personName) + prettyNumber = phoneNumber[2:] if phoneNumber.startswith("+1") else phoneNumber + prettyNumber = make_pretty(prettyNumber) + description = "%s - %s" % (personName, prettyNumber) item = (phoneNumber, date, action.capitalize(), description) with gtk_toolbox.gtk_lock(): self._recentmodel.append(item) diff --git a/src/gv_backend.py b/src/gv_backend.py index 3daf6c6..ef8b5db 100644 --- a/src/gv_backend.py +++ b/src/gv_backend.py @@ -491,10 +491,10 @@ class GVDialer(object): """ @returns Iterable of (personsName, phoneNumber, exact date, relative date, action) """ - for url in ( - self._receivedCallsURL, - self._missedCallsURL, - self._placedCallsURL, + for action, url in ( + ("Recieved", self._receivedCallsURL), + ("Missed", self._missedCallsURL), + ("Placed", self._placedCallsURL), ): try: flatXml = self._browser.download(url) @@ -502,22 +502,19 @@ class GVDialer(object): warnings.warn(traceback.format_exc()) raise RuntimeError("%s is not accesible" % url) - allRecentData = self._grab_json(flatXml) - for recentCallData in allRecentData["messages"].itervalues(): - number = recentCallData["displayNumber"] - exactDate = recentCallData["displayStartDateTime"] - relativeDate = recentCallData["relativeStartTime"] - action = ", ".join(( - label.title() - for label in recentCallData["labels"] - if label.lower() != "all" and label.lower() != "inbox" - )) - number = saxutils.unescape(number) - exactDate = saxutils.unescape(exactDate) - exactDate = datetime.datetime.strptime(exactDate, "%m/%d/%y %I:%M %p") - relativeDate = saxutils.unescape(relativeDate) - action = saxutils.unescape(action) - yield "", number, exactDate, relativeDate, action + allRecentHtml = self._grab_html(flatXml) + allRecentData = self._parse_voicemail(allRecentHtml) + for recentCallData in allRecentData: + exactTime = recentCallData["time"] + if recentCallData["name"]: + header = recentCallData["name"] + elif recentCallData["prettyNumber"]: + header = recentCallData["prettyNumber"] + elif recentCallData["location"]: + header = recentCallData["location"] + else: + header = "Unknown" + yield header, recentCallData["number"], exactTime, recentCallData["relTime"], action _seperateVoicemailsRegex = re.compile(r"""^\s*
""", re.MULTILINE | re.DOTALL) _exactVoicemailTimeRegex = re.compile(r"""(.*?)""", re.MULTILINE) diff --git a/support/builddeb.py b/support/builddeb.py index 32f5735..aeece00 100755 --- a/support/builddeb.py +++ b/support/builddeb.py @@ -12,13 +12,14 @@ import constants __appname__ = constants.__app_name__ -__description__ = "Simple interface to Google's GrandCentral(tm) service" +__description__ = "Touch screen enhanced interface to the GoogleVoice/GrandCentral phone service" __author__ = "Ed Page" __email__ = "eopage@byu.net" __version__ = constants.__version__ __build__ = 0 __changelog__ = ''' -0.9.10 +1.0.0 +* Added names to the recent tab for GoogleVoice 0.9.9 * SMS From Dialpad -- 1.7.9.5