Merge lp:~fader/gvoice-notifier/nicer-credentials-ui into lp:~matt-mossholder/gvoice-notifier/trunk

Proposed by Ronald McCollam
Status: Needs review
Proposed branch: lp:~fader/gvoice-notifier/nicer-credentials-ui
Merge into: lp:~matt-mossholder/gvoice-notifier/trunk
Diff against target: 235 lines (+130/-4) (has conflicts)
8 files modified
.bzr-builddeb/default.conf (+2/-0)
debian/changelog (+5/-0)
debian/compat (+1/-0)
debian/control (+27/-0)
debian/copyright (+33/-0)
debian/rules (+6/-0)
po/gvoice-notifier.pot (+12/-4)
src/gvoice-notifier (+44/-0)
Text conflict in po/gvoice-notifier.pot
Text conflict in src/gvoice-notifier
To merge this branch: bzr merge lp:~fader/gvoice-notifier/nicer-credentials-ui
Reviewer Review Type Date Requested Status
Matt Mossholder Pending
Review via email: mp+29158@code.launchpad.net

Description of the change

I replaced the multiple popups asking for the email address, password, and check interval with a single dialog asking for all three as this seems like a slightly nicer experience to me. This involved replacing the flexible getText() function with a single function I called getCredentials().

I also simplified the interval selection. While it was quite powerful, it was also difficult to enter. I'm not sure what the use case is for someone wanting to check Google Voice only every 45 days, 16 hours, and 3 minutes. Thus I have simplified the string to a single spinbutton specifying the time interval in minutes.

Thanks for writing this notifier... I use it all the time and it's incredibly helpful to me!

To post a comment you must log in.
Revision history for this message
inverser (resrevni) wrote :

Hi Ronald thank you for your work. It looks great.

I was wondering if you could help with a credential issue I am having. I am unable to log in using any of my Google Voice accounts. I get hit with "Could not log in with provided credentials" at every attempt.

I am absolutely sure that I am using the correct password. I log into Gmail/Voice every day. I'd really, really appreciate it. gvoice-notifier would be such a great addition to my desktop. Cheers.

Unmerged revisions

24. By Ronald McCollam

Better message on dialog, remove superfluous print statements

23. By Ronald McCollam

Replaced multi-dialog configuration UI with a single dialog

22. By Ken VanDine

releasing version 0.0.0+r23

21. By Ken VanDine

Initial package.

20. By Ken VanDine

added initial packaging

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory '.bzr-builddeb'
2=== added file '.bzr-builddeb/default.conf'
3--- .bzr-builddeb/default.conf 1970-01-01 00:00:00 +0000
4+++ .bzr-builddeb/default.conf 2010-07-03 22:14:24 +0000
5@@ -0,0 +1,2 @@
6+[BUILDDEB]
7+merge = True
8
9=== added directory 'debian'
10=== added file 'debian/changelog'
11--- debian/changelog 1970-01-01 00:00:00 +0000
12+++ debian/changelog 2010-07-03 22:14:24 +0000
13@@ -0,0 +1,5 @@
14+gvoice-notifier (0.0.0+r23) maverick; urgency=low
15+
16+ * Initial package.
17+
18+ -- Ken VanDine <ken.vandine@canonical.com> Thu, 10 Jun 2010 12:40:03 -0400
19
20=== added file 'debian/compat'
21--- debian/compat 1970-01-01 00:00:00 +0000
22+++ debian/compat 2010-07-03 22:14:24 +0000
23@@ -0,0 +1,1 @@
24+6
25
26=== added file 'debian/control'
27--- debian/control 1970-01-01 00:00:00 +0000
28+++ debian/control 2010-07-03 22:14:24 +0000
29@@ -0,0 +1,27 @@
30+Source: gvoice-notifier
31+Section: python
32+Priority: extra
33+Build-Depends: cdbs (>= 0.4.43),
34+ debhelper (>= 6),
35+ python,
36+ python-support (>= 0.6.4),
37+ python-distutils-extra (>= 2.10)
38+Maintainer: Ken VanDine <ken.vandine@canonical.com>
39+Standards-Version: 3.8.4
40+XS-Python-Version: current
41+
42+Package: gvoice-notifier
43+Architecture: all
44+XB-Python-Version: ${python:Versions}
45+Depends: ${misc:Depends},
46+ ${python:Depends}${misc:Depends},
47+ ${python:Depends},
48+ python-indicate,
49+ python-gconf,
50+ python-notify,
51+ python-gobject,
52+ python-distutils-extra,
53+ python-gtk2,
54+ python-gnomekeyring
55+Description: Google Voice Notifier
56+ Google Voice Notifier, utilizing the messaging indicator.
57
58=== added file 'debian/copyright'
59--- debian/copyright 1970-01-01 00:00:00 +0000
60+++ debian/copyright 2010-07-03 22:14:24 +0000
61@@ -0,0 +1,33 @@
62+This package was debianized by Ken VanDine <ken.vandine@canonical.com> on
63+Thu, 10 Jun 2010 11:54:27 -0400
64+
65+It was downloaded from <http://launchpad.net/gvoice-notifier>
66+
67+Upstream Author:
68+
69+ Matt Mossholder < matt@mossholder.com>
70+
71+Copyright:
72+
73+ Copyright (C) 2010 Matt Mossholder < matt@mossholder.com>
74+
75+License:
76+
77+ This program is free software: you can redistribute it and/or modify
78+ it under the terms of the GNU General Public License as published by
79+ the Free Software Foundation, either version 3 of the License, or
80+ (at your option) any later version.
81+
82+ This program is distributed in the hope that it will be useful,
83+ but WITHOUT ANY WARRANTY; without even the implied warranty of
84+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
85+ GNU General Public License for more details.
86+
87+ You should have received a copy of the GNU General Public License
88+ along with this program. If not, see <http://www.gnu.org/licenses/>.
89+
90+On Debian systems, the complete text of the GNU General
91+Public License can be found in `/usr/share/common-licenses/GPL-3'.
92+
93+The Debian packaging is (C) 2010, Ken VanDine <ken.vandine@canonical.com> and
94+is licensed under the GPLv3, see `/usr/share/common-licenses/GPL-3'.
95
96=== added file 'debian/rules'
97--- debian/rules 1970-01-01 00:00:00 +0000
98+++ debian/rules 2010-07-03 22:14:24 +0000
99@@ -0,0 +1,6 @@
100+#!/usr/bin/make -f
101+DEB_PYTHON_SYSTEM := pysupport
102+
103+include /usr/share/cdbs/1/rules/debhelper.mk
104+include /usr/share/cdbs/1/class/python-distutils.mk
105+include /usr/share/cdbs/1/rules/langpack.mk
106
107=== modified file 'po/gvoice-notifier.pot'
108--- po/gvoice-notifier.pot 2010-06-11 16:55:02 +0000
109+++ po/gvoice-notifier.pot 2010-07-03 22:14:24 +0000
110@@ -8,7 +8,11 @@
111 msgstr ""
112 "Project-Id-Version: PACKAGE VERSION\n"
113 "Report-Msgid-Bugs-To: \n"
114+<<<<<<< TREE
115 "POT-Creation-Date: 2010-06-11 12:54-0400\n"
116+=======
117+"POT-Creation-Date: 2010-07-03 17:59-0400\n"
118+>>>>>>> MERGE-SOURCE
119 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
120 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
121 "Language-Team: LANGUAGE <LL@li.org>\n"
122@@ -16,6 +20,7 @@
123 "Content-Type: text/plain; charset=CHARSET\n"
124 "Content-Transfer-Encoding: 8bit\n"
125
126+<<<<<<< TREE
127 #: ../src/gvoice-notifier:52
128 msgid "Please enter your username:"
129 msgstr ""
130@@ -29,22 +34,25 @@
131 msgstr ""
132
133 #: ../src/gvoice-notifier:102
134+=======
135+#: ../src/gvoice-notifier:113
136+>>>>>>> MERGE-SOURCE
137 msgid "Could not log in with provided credentials"
138 msgstr ""
139
140-#: ../src/gvoice-notifier:103
141+#: ../src/gvoice-notifier:114
142 msgid "You have a new message."
143 msgstr ""
144
145-#: ../src/gvoice-notifier:104 ../data/gvoice-notifier.desktop.in.h:2
146+#: ../src/gvoice-notifier:115 ../data/gvoice-notifier.desktop.in.h:2
147 msgid "Google Voice Notifier"
148 msgstr ""
149
150-#: ../src/gvoice-notifier:122
151+#: ../src/gvoice-notifier:133
152 msgid "SMS"
153 msgstr ""
154
155-#: ../src/gvoice-notifier:123
156+#: ../src/gvoice-notifier:134
157 msgid "Voicemail"
158 msgstr ""
159
160
161=== modified file 'src/gvoice-notifier'
162--- src/gvoice-notifier 2010-06-11 16:55:02 +0000
163+++ src/gvoice-notifier 2010-07-03 22:14:24 +0000
164@@ -48,6 +48,7 @@
165 def responseToDialog(entry, dialog, response):
166 dialog.response(response)
167
168+<<<<<<< TREE
169 def getText(name, description, hidden=False):
170 _email = _("Please enter your username:")
171 _password = _("Please enter your password:")
172@@ -70,6 +71,41 @@
173 text = entry.get_text()
174 dialog.destroy()
175 return text
176+=======
177+def getCredentials():
178+ dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_QUESTION, gtk.BUTTONS_OK, None)
179+ email = gtk.Entry()
180+ password = gtk.Entry()
181+ password.set_visibility(False)
182+ adjustment = gtk.Adjustment(value=5, lower=0, upper=10080, step_incr=1, page_incr=5, page_size=0)
183+ interval = gtk.SpinButton(adjustment, 1)
184+ email.connect("activate", responseToDialog, dialog, gtk.RESPONSE_OK)
185+ password.connect("activate", responseToDialog, dialog, gtk.RESPONSE_OK)
186+ interval.connect("activate", responseToDialog, dialog, gtk.RESPONSE_OK)
187+
188+ minutesHbox = gtk.HBox()
189+ minutesHbox.pack_start(interval)
190+ minutesHbox.pack_end(gtk.Label("minutes"), False, 5, 5)
191+
192+ containerTable = gtk.Table(3, 2, False)
193+ containerTable.attach(gtk.Label("Email:"), 0, 1, 0, 1)
194+ containerTable.attach(email, 1, 2, 0, 1)
195+ containerTable.attach(gtk.Label("Password:"), 0, 1, 1, 2)
196+ containerTable.attach(password, 1, 2, 1, 2)
197+ containerTable.attach(gtk.Label("Check every"), 0, 1, 2, 3)
198+ containerTable.attach(minutesHbox, 1, 2, 2, 3)
199+
200+ dialog.set_title("Configure your Google Voice connection")
201+ dialog.format_secondary_markup("Please provide your credentials and how often you'd like to check for new messages:")
202+ dialog.vbox.pack_end(containerTable, True, True, 0)
203+ dialog.show_all()
204+ dialog.run()
205+ userEmail = email.get_text()
206+ userPassword = password.get_text()
207+ userInterval = interval.get_value()
208+ dialog.destroy()
209+ return userEmail, userPassword, userInterval
210+>>>>>>> MERGE-SOURCE
211
212 class Message(indicate.Indicator):
213 def __init__(self, msgtype, sender, time , hash, timestamp):
214@@ -312,6 +348,7 @@
215 else:
216 USERNAME, PASSWORD, CHECK_TIME = gkey.getInfo()
217 except:
218+<<<<<<< TREE
219 USERNAME = getText("email", "")
220 PASSWORD = getText("password", "", True)
221 CHECK_TIME = getText("interval", "").strip()
222@@ -328,6 +365,13 @@
223 CHECK_TIME = CHECK_TIME[CHECK_TIME.find(char)+1:]
224 CHECK_TIME = i
225 print "Done"
226+=======
227+ USERNAME, PASSWORD, interval = getCredentials()
228+
229+ # The setup dialog asks for minutes, but we need seconds
230+ CHECK_TIME = int(interval * 60)
231+
232+>>>>>>> MERGE-SOURCE
233 gkey.setInfo(USERNAME, PASSWORD, CHECK_TIME)
234
235 x = Notifier(USERNAME, PASSWORD, CHECK_TIME)

Subscribers

People subscribed via source and target branches