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
2b470ccc
Commit
2b470ccc
authored
Jun 26, 2013
by
Saul Ibarra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added label with account registration status to preferences panel
parent
da449a8a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
38 deletions
+74
-38
preferences.py
blink/preferences.py
+23
-0
preferences.ui
resources/preferences.ui
+51
-38
No files found.
blink/preferences.py
View file @
2b470ccc
...
...
@@ -177,6 +177,7 @@ class PreferencesWindow(base_class, ui_class):
# Account
self
.
account_list
.
selectionModel
()
.
selectionChanged
.
connect
(
self
.
_SH_AccountListSelectionChanged
)
self
.
account_list
.
model
()
.
dataChanged
.
connect
(
self
.
_SH_AccountListDataChanged
)
self
.
add_account_button
.
clicked
.
connect
(
self
.
show_add_account_dialog
)
self
.
delete_account_button
.
clicked
.
connect
(
self
.
_SH_DeleteAccountButtonClicked
)
...
...
@@ -561,6 +562,14 @@ class PreferencesWindow(base_class, ui_class):
self
.
display_name_editor
.
setText
(
account
.
display_name
or
u''
)
if
account
is
not
bonjour_account
:
self
.
password_editor
.
setText
(
account
.
auth
.
password
)
selected_index
=
self
.
account_list
.
selectionModel
()
.
selectedIndexes
()[
0
]
selected_account_info
=
self
.
account_list
.
model
()
.
data
(
selected_index
,
Qt
.
UserRole
)
if
selected_account_info
.
registration_state
:
self
.
account_registration_label
.
setText
(
u'Registration
%
s'
%
selected_account_info
.
registration_state
.
title
())
else
:
self
.
account_registration_label
.
setText
(
u'Not Registered'
)
else
:
self
.
account_registration_label
.
setText
(
u''
)
# Media tab
self
.
account_audio_codecs_list
.
clear
()
...
...
@@ -728,6 +737,20 @@ class PreferencesWindow(base_class, ui_class):
self
.
xcap_root_editor
.
inactiveText
=
u"Taken from the DNS TXT record for xcap.
%
s"
%
selected_account
.
id
.
domain
self
.
load_account_settings
(
selected_account
)
def
_SH_AccountListDataChanged
(
self
,
topLeft
,
bottomRight
):
try
:
selected_index
=
self
.
account_list
.
selectionModel
()
.
selectedIndexes
()[
0
]
except
IndexError
:
pass
else
:
account_info
=
self
.
account_list
.
model
()
.
data
(
topLeft
,
Qt
.
UserRole
)
selected_account_info
=
self
.
account_list
.
model
()
.
data
(
selected_index
,
Qt
.
UserRole
)
if
selected_account_info
is
account_info
:
if
account_info
.
registration_state
:
self
.
account_registration_label
.
setText
(
u'Registration
%
s'
%
account_info
.
registration_state
.
title
())
else
:
self
.
account_registration_label
.
setText
(
u'Not Registered'
)
def
_SH_DeleteAccountButtonClicked
(
self
):
model
=
self
.
account_list
.
model
()
...
...
resources/preferences.ui
View file @
2b470ccc
...
...
@@ -150,6 +150,39 @@
<property
name=
"margin"
>
<number>
10
</number>
</property>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QLabel"
name=
"password_label"
>
<property
name=
"text"
>
<string>
Password:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
</widget>
</item>
<item
row=
"3"
column=
"1"
>
<widget
class=
"QLineEdit"
name=
"password_editor"
>
<property
name=
"echoMode"
>
<enum>
QLineEdit::Password
</enum>
</property>
</widget>
</item>
<item
row=
"4"
column=
"0"
colspan=
"2"
>
<spacer
name=
"account_information_spacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
25
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"0"
column=
"0"
colspan=
"2"
>
<widget
class=
"QCheckBox"
name=
"account_enabled_button"
>
<property
name=
"text"
>
...
...
@@ -170,6 +203,19 @@
</property>
</spacer>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QLineEdit"
name=
"display_name_editor"
/>
</item>
<item
row=
"2"
column=
"0"
>
<widget
class=
"QLabel"
name=
"display_name_label"
>
<property
name=
"text"
>
<string>
Display Name:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
colspan=
"2"
>
<widget
class=
"Line"
name=
"line"
>
<property
name=
"minimumSize"
>
...
...
@@ -183,52 +229,19 @@
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<widget
class=
"QLabel"
name=
"display_name_label"
>
<property
name=
"text"
>
<string>
Display Name:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
<item
row=
"7"
column=
"0"
colspan=
"2"
>
<widget
class=
"QLabel"
name=
"account_registration_label"
>
<property
name=
"layoutDirection"
>
<enum>
Qt::LeftToRight
</enum>
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QLineEdit"
name=
"display_name_editor"
/>
</item>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QLabel"
name=
"password_label"
>
<property
name=
"text"
>
<string
>
Password:
</string
>
<string
/
>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
</widget>
</item>
<item
row=
"3"
column=
"1"
>
<widget
class=
"QLineEdit"
name=
"password_editor"
>
<property
name=
"echoMode"
>
<enum>
QLineEdit::Password
</enum>
</property>
</widget>
</item>
<item
row=
"4"
column=
"0"
colspan=
"2"
>
<spacer
name=
"account_information_spacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
25
</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"media_tab"
>
...
...
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