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
fedca140
Commit
fedca140
authored
Aug 17, 2021
by
Adrian Georgescu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added presence and message_summary account settings
parent
6b6b5b72
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
30 deletions
+68
-30
preferences.py
blink/preferences.py
+24
-0
preferences.ui
resources/preferences.ui
+44
-30
No files found.
blink/preferences.py
View file @
fedca140
...
...
@@ -212,6 +212,8 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
# Account information
self
.
account_enabled_button
.
clicked
.
connect
(
self
.
_SH_AccountEnabledButtonClicked
)
self
.
account_enabled_presence_button
.
clicked
.
connect
(
self
.
_SH_AccountEnabledPresenceButtonClicked
)
self
.
account_enabled_mwi_button
.
clicked
.
connect
(
self
.
_SH_AccountEnabledMWIButtonClicked
)
self
.
display_name_editor
.
editingFinished
.
connect
(
self
.
_SH_DisplayNameEditorEditingFinished
)
self
.
password_editor
.
editingFinished
.
connect
(
self
.
_SH_PasswordEditorEditingFinished
)
...
...
@@ -769,7 +771,15 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
# Account information tab
self
.
account_enabled_button
.
setChecked
(
account
.
enabled
)
self
.
account_enabled_button
.
setEnabled
(
True
if
account
is
not
bonjour_account
else
BonjourAccount
.
mdns_available
)
self
.
account_enabled_presence_button
.
setEnabled
(
account
is
not
bonjour_account
)
self
.
account_enabled_presence_button
.
setChecked
(
account
.
presence
.
enabled
if
account
is
not
bonjour_account
else
False
)
self
.
account_enabled_mwi_button
.
setEnabled
(
account
is
not
bonjour_account
)
self
.
account_enabled_mwi_button
.
setChecked
(
account
.
message_summary
.
enabled
if
account
is
not
bonjour_account
else
False
)
self
.
display_name_editor
.
setText
(
account
.
display_name
or
''
)
if
account
is
not
bonjour_account
:
self
.
password_editor
.
setText
(
account
.
auth
.
password
)
selected_index
=
self
.
account_list
.
selectionModel
()
.
selectedIndexes
()[
0
]
...
...
@@ -1086,6 +1096,16 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
account
.
enabled
=
checked
account
.
save
()
def
_SH_AccountEnabledPresenceButtonClicked
(
self
,
checked
):
account
=
self
.
selected_account
account
.
presence
.
enabled
=
checked
account
.
save
()
def
_SH_AccountEnabledMWIButtonClicked
(
self
,
checked
):
account
=
self
.
selected_account
account
.
message_summary
.
enabled
=
checked
account
.
save
()
def
_SH_DisplayNameEditorEditingFinished
(
self
):
account
=
self
.
selected_account
display_name
=
self
.
display_name_editor
.
text
()
or
None
...
...
@@ -1802,6 +1822,10 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
if
not
account
.
enabled
:
self
.
refresh_account_registration_widgets
(
account
)
self
.
reregister_button
.
setEnabled
(
account
.
enabled
)
if
'message_summary.enabled'
in
notification
.
data
.
modified
:
self
.
account_enabled_mwi_button
.
setChecked
(
account
.
message_summary
.
enabled
)
if
'presence.enabled'
in
notification
.
data
.
modified
:
self
.
account_enabled_presence_button
.
setChecked
(
account
.
presence
.
enabled
)
if
'display_name'
in
notification
.
data
.
modified
:
self
.
display_name_editor
.
setText
(
account
.
display_name
or
''
)
if
'rtp.audio_codec_list'
in
notification
.
data
.
modified
:
...
...
resources/preferences.ui
View file @
fedca140
...
...
@@ -164,7 +164,7 @@
<item
row=
"0"
column=
"3"
>
<widget
class=
"QTabWidget"
name=
"account_tab_widget"
>
<property
name=
"currentIndex"
>
<number>
3
</number>
<number>
0
</number>
</property>
<widget
class=
"QWidget"
name=
"account_information_tab"
>
<attribute
name=
"title"
>
...
...
@@ -186,19 +186,19 @@
<property
name=
"spacing"
>
<number>
5
</number>
</property>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QLabel"
name=
"password_label"
>
<property
name=
"text"
>
<string>
Password:
</string>
<item
row=
"1"
column=
"0"
colspan=
"2"
>
<widget
class=
"Line"
name=
"line"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
10
</height>
</size>
</property>
<property
name=
"
alignment
"
>
<
set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set
>
<property
name=
"
orientation
"
>
<
enum>
Qt::Horizontal
</enum
>
</property>
</widget>
</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"
>
...
...
@@ -209,20 +209,20 @@
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
colspan=
"2"
>
<widget
class=
"Line"
name=
"line"
>
<property
name=
"minimumSize"
>
<item
row=
"6"
column=
"0"
colspan=
"2"
>
<spacer
name=
"account_information_spacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
0
</width>
<height>
1
0
</height>
<width>
2
0
</width>
<height>
4
0
</height>
</size>
</property>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
</widget>
</spacer>
</item>
<item
row=
"
6
"
column=
"0"
colspan=
"2"
>
<item
row=
"
7
"
column=
"0"
colspan=
"2"
>
<widget
class=
"QLabel"
name=
"account_registration_label"
>
<property
name=
"layoutDirection"
>
<enum>
Qt::LeftToRight
</enum>
...
...
@@ -235,6 +235,19 @@
</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>
</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"
>
...
...
@@ -249,18 +262,19 @@
</property>
</widget>
</item>
<item
row=
"
5"
column=
"0"
colspan=
"2
"
>
<
spacer
name=
"account_information_spacer
"
>
<property
name=
"
orientation
"
>
<
enum>
Qt::Vertical
</enum
>
<item
row=
"
4"
column=
"1
"
>
<
widget
class=
"QCheckBox"
name=
"account_enabled_presence_button
"
>
<property
name=
"
text
"
>
<
string>
Enable presence
</string
>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</widget>
</item>
<item
row=
"5"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"account_enabled_mwi_button"
>
<property
name=
"text"
>
<string>
Enable Message Waiting Indicator
</string>
</property>
</
spacer
>
</
widget
>
</item>
</layout>
</widget>
...
...
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