Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
dabec348
Commit
dabec348
authored
Aug 27, 2013
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set focus to the appropriate widgets during Google contacts authorization
parent
655baef2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
contacts.py
blink/contacts.py
+9
-1
No files found.
blink/contacts.py
View file @
dabec348
...
...
@@ -1317,9 +1317,14 @@ class GoogleContactsDialog(base_class, ui_class):
def
open
(
self
):
settings
=
SIPSimpleSettings
()
username
=
settings
.
google_contacts
.
username
or
u''
self
.
username_editor
.
setEnabled
(
True
)
self
.
username_editor
.
setText
(
settings
.
google_contacts
.
username
or
u''
)
self
.
username_editor
.
setText
(
username
)
self
.
password_editor
.
setText
(
u''
)
if
username
:
self
.
password_editor
.
setFocus
()
else
:
self
.
username_editor
.
setFocus
()
self
.
show
()
def
open_for_incorrect_password
(
self
):
...
...
@@ -1328,6 +1333,7 @@ class GoogleContactsDialog(base_class, ui_class):
self
.
username_editor
.
setEnabled
(
False
)
self
.
username_editor
.
setText
(
settings
.
google_contacts
.
username
)
self
.
status_label
.
value
=
Status
(
'Error authenticating with Google. Please enter your password:'
,
color
=
red
)
self
.
password_editor
.
setFocus
()
self
.
show
()
@
run_in_green_thread
...
...
@@ -1353,10 +1359,12 @@ class GoogleContactsDialog(base_class, ui_class):
except
RequestError
:
self
.
captcha_token
=
None
call_in_gui_thread
(
self
.
username_editor
.
setEnabled
,
True
)
call_in_gui_thread
(
call_later
,
0
,
self
.
password_editor
.
setFocus
)
call_in_gui_thread
(
setattr
,
self
.
status_label
,
'value'
,
Status
(
'Error authenticating with Google'
,
color
=
red
))
except
Exception
:
self
.
captcha_token
=
None
call_in_gui_thread
(
self
.
username_editor
.
setEnabled
,
True
)
call_in_gui_thread
(
call_later
,
0
,
self
.
password_editor
.
setFocus
)
call_in_gui_thread
(
setattr
,
self
.
status_label
,
'value'
,
Status
(
'Error connecting with Google'
,
color
=
red
))
else
:
self
.
captcha_token
=
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment