Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tuneit
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
tuneit
Commits
0ac920aa
Commit
0ac920aa
authored
Apr 24, 2025
by
Roman Alifanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix false signal triggers during widget initialization
parent
67fe9af6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
setting.py
src/settings/setting/setting.py
+1
-0
FileChooser.py
src/settings/setting/widgets/FileChooser.py
+8
-7
No files found.
src/settings/setting/setting.py
View file @
0ac920aa
...
@@ -54,6 +54,7 @@ class Setting(BaseSetting):
...
@@ -54,6 +54,7 @@ class Setting(BaseSetting):
return
backend
.
get_range
(
self
.
key
,
self
.
gtype
)
return
backend
.
get_range
(
self
.
key
,
self
.
gtype
)
def
_set_backend_value
(
self
,
value
):
def
_set_backend_value
(
self
,
value
):
self
.
logger
.
info
(
f
"SET VALUE {value}"
)
backend
=
self
.
_get_backend
()
backend
=
self
.
_get_backend
()
if
backend
:
if
backend
:
backend
.
set_value
(
self
.
key
,
value
,
self
.
gtype
)
backend
.
set_value
(
self
.
key
,
value
,
self
.
gtype
)
...
...
src/settings/setting/widgets/FileChooser.py
View file @
0ac920aa
...
@@ -31,7 +31,7 @@ class FileChooser(BaseWidget):
...
@@ -31,7 +31,7 @@ class FileChooser(BaseWidget):
valign
=
Gtk
.
Align
.
CENTER
,
valign
=
Gtk
.
Align
.
CENTER
,
halign
=
Gtk
.
Align
.
END
,
halign
=
Gtk
.
Align
.
END
,
)
)
self
.
entry
.
connect
(
"changed"
,
self
.
_on_entry_changed
)
self
.
entry
_handler_id
=
self
.
entry
.
connect
(
"changed"
,
self
.
_on_entry_changed
)
control_box
.
append
(
self
.
entry
)
control_box
.
append
(
self
.
entry
)
else
:
else
:
self
.
info_label
=
Gtk
.
Label
(
self
.
info_label
=
Gtk
.
Label
(
...
@@ -210,12 +210,13 @@ class FileChooser(BaseWidget):
...
@@ -210,12 +210,13 @@ class FileChooser(BaseWidget):
self
.
info_label
.
set_label
(
f
"{count} files selected"
if
count
else
"No files selected"
)
self
.
info_label
.
set_label
(
f
"{count} files selected"
if
count
else
"No files selected"
)
def
_update_single_file_display
(
self
,
current
):
def
_update_single_file_display
(
self
,
current
):
self
.
entry
.
set_text
(
current
or
""
)
with
self
.
entry
.
handler_block
(
self
.
entry_handler_id
):
if
current
:
self
.
entry
.
set_text
(
current
or
""
)
file
=
Gio
.
File
.
new_for_path
(
current
)
if
current
:
self
.
entry
.
set_tooltip_text
(
file
.
get_parse_name
())
file
=
Gio
.
File
.
new_for_path
(
current
)
else
:
self
.
entry
.
set_tooltip_text
(
file
.
get_parse_name
())
self
.
entry
.
set_tooltip_text
(
None
)
else
:
self
.
entry
.
set_tooltip_text
(
None
)
def
_on_entry_changed
(
self
,
entry
):
def
_on_entry_changed
(
self
,
entry
):
if
not
self
.
folder_mode
and
not
self
.
multiple_mode
:
if
not
self
.
folder_mode
and
not
self
.
multiple_mode
:
...
...
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