Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gajim
gajim
Commits
a496dbbb
Commit
a496dbbb
authored
May 10, 2022
by
Philipp Hörist
Browse files
feat: Settings: Show lock icon if setting has an override
parent
195ec814
Changes
1
Hide whitespace changes
Inline
Side-by-side
gajim/gtk/settings.py
View file @
a496dbbb
...
...
@@ -204,6 +204,16 @@ def __init__(self,
self
.
enabled_func
=
enabled_func
self
.
setting_value
=
self
.
get_value
()
self
.
_locked_icon
=
Gtk
.
Image
.
new_from_icon_name
(
'feather-lock-symbolic'
,
Gtk
.
IconSize
.
MENU
)
self
.
_locked_icon
.
set_visible
(
False
)
self
.
_locked_icon
.
set_no_show_all
(
True
)
self
.
_locked_icon
.
set_halign
(
Gtk
.
Align
.
END
)
self
.
_locked_icon
.
set_tooltip_text
(
_
(
'Setting is locked by the system'
))
self
.
_grid
.
add
(
self
.
_locked_icon
)
description_box
=
Gtk
.
Box
(
orientation
=
Gtk
.
Orientation
.
VERTICAL
,
spacing
=
0
)
description_box
.
set_valign
(
Gtk
.
Align
.
CENTER
)
...
...
@@ -372,6 +382,13 @@ def on_row_activated(self) -> None:
raise
NotImplementedError
def
update_activatable
(
self
)
->
None
:
if
self
.
type_
==
SettingType
.
CONFIG
:
if
app
.
settings
.
has_app_override
(
self
.
value
):
self
.
set_activatable
(
False
)
self
.
set_sensitive
(
False
)
self
.
_locked_icon
.
show
()
return
if
self
.
enabled_func
is
None
:
return
...
...
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