2009-02-21: The below patcheset is hereby released into the public domain.

Prevent sudden jumps from big-positive to big-negative angles, which 
causes problems when dialling digits in the lower-left quadrant:
convert positive angles beyond the fingerstop into negative ones.

=== modified file 'rotary_dialer.py'
--- rotary_dialer.py	2009-02-15 17:56:40 +0000
+++ rotary_dialer.py	2009-02-15 18:09:22 +0000
@@ -30,10 +30,13 @@
 """
 def polar(x, y, deg=0):         # radian if deg=0; degree if deg=1
     from math import hypot, atan2, pi
+    angle = atan2(y,x)
+    if angle > 50 * pi/180:
+        angle -= 2*pi
     if deg:
-        return hypot(x, y), 180.0 * atan2(y, x) / pi
+        return hypot(x, y), 180.0 * angle / pi
     else:
-        return hypot(x, y), atan2(y, x)
+        return hypot(x, y), angle
 
 def findcoords(coords):
     x,y = coords

When interpreting clicks, mod click_count with 10 to prevent `0' from 
dialling "1 0".

=== modified file 'rotary_dialer.py'
--- rotary_dialer.py	2009-02-15 18:09:22 +0000
+++ rotary_dialer.py	2009-02-15 18:14:32 +0000
@@ -190,8 +190,9 @@
             print "Click!"
 
     def do_dial(self):
-#        print "Number dialed:", self.click_count
-        self.number_text += str(self.click_count)
+        digit = self.click_count % 10
+#        print "Number dialed:", digit
+        self.number_text += str(digit)
         text = '<span size="large" foreground="white" background="black">' + self.number_text + '</span>'
 #        self.number_box.set_text(text)
         self.number_box.set_markup(text)

Figure out where in the filesystem our data is by looking at argv[0], 
rather than relying on the current working directory being set 
by the user. This allows rotary_dialer.py to be successfully launched by 
a launcher in the main system UI (e.g.: a `.desktop' file).

=== modified file 'rotary_dialer.py'
--- rotary_dialer.py	2009-02-15 18:14:32 +0000
+++ rotary_dialer.py	2009-02-15 18:16:17 +0000
@@ -11,6 +11,10 @@
 
 OnNeo = False           # Turn on fullscreen and vibrate if we are running on Neo
 
+import sys
+import os
+os.chdir(os.path.dirname(sys.argv[0]))
+
 # from http://wiki.python.org/moin/NumericAndScientificRecipes
 """
 Convert from polar (r,w) to rectangular (x,y)

