-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix missing locale entries #58
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
84ef751
Fix missing locale entries
RamesTheGeneric 176b64f
Merge branch 'Project-Babble:main' into main
RamesTheGeneric 38d888b
Fix tab changes sometimes causing UI to hang.
RamesTheGeneric 29f405f
Save valid int inputs as ints
RamesTheGeneric 4c13436
Start/Stop Calibration buttons load correct state on startup
RamesTheGeneric File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
get_camera_index_by_name, | ||
bg_color_highlight, | ||
bg_color_clear, | ||
is_valid_int_input | ||
) | ||
from lang_manager import LocaleStringManager as lang | ||
|
||
|
@@ -63,7 +64,7 @@ def __init__(self, widget_id: Tab, main_config: BabbleConfig, osc_queue: Queue): | |
self.capture_event = Event() | ||
self.capture_queue = Queue(maxsize=2) | ||
self.roi_queue = Queue(maxsize=2) | ||
self.image_queue = Queue(maxsize=4) | ||
self.image_queue = Queue(maxsize=500) # This is needed to prevent the UI from freezing during widget changes. | ||
|
||
self.babble_cnn = BabbleProcessor( | ||
self.config, | ||
|
@@ -134,14 +135,14 @@ def __init__(self, widget_id: Tab, main_config: BabbleConfig, osc_queue: Queue): | |
key=self.gui_restart_calibration, | ||
button_color=button_color, | ||
tooltip=lang._instance.get_string("camera.startCalibrationTooltip"), | ||
disabled=True, | ||
disabled=not self.settings_config.use_calibration, | ||
), | ||
sg.Button( | ||
lang._instance.get_string("camera.stopCalibration"), | ||
key=self.gui_stop_calibration, | ||
button_color=button_color, | ||
tooltip=lang._instance.get_string("camera.startCalibrationTooltip"), | ||
disabled=True, | ||
disabled=not self.settings_config.use_calibration, | ||
), | ||
], | ||
[ | ||
|
@@ -324,11 +325,11 @@ def render(self, window, event, values): | |
if any(x in str(value) for x in ports): | ||
self.config.capture_source = value | ||
else: | ||
cam = get_camera_index_by_name( | ||
value | ||
) # Set capture_source to the UVC index. Otherwise treat value like an ipcam if we return none | ||
cam = get_camera_index_by_name(value) # Set capture_source to the UVC index. Otherwise treat value like an ipcam if we return none | ||
if cam != None: | ||
self.config.capture_source = get_camera_index_by_name(value) | ||
self.config.capture_source = cam | ||
elif is_valid_int_input(value): | ||
self.config.capture_source = int(value) | ||
else: | ||
self.config.capture_source = value | ||
except ValueError: | ||
|
@@ -395,11 +396,11 @@ def render(self, window, event, values): | |
if self.settings_config.use_calibration == True: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the current state of the app, the "Start Calibration" and "Stop Calibration" buttons are disabled even if the app starts with the "Enable Calibration" checkbox set to true |
||
window[self.gui_restart_calibration].update(disabled=False) | ||
window[self.gui_stop_calibration].update(disabled=False) | ||
print({lang._instance.get_string("info.enabled")}) | ||
print(f'[{lang._instance.get_string("log.info")}] {lang._instance.get_string("info.enabled")}') | ||
else: | ||
window[self.gui_restart_calibration].update(disabled=True) | ||
window[self.gui_stop_calibration].update(disabled=True) | ||
print(lang._instance.get_string("algoritm.disabled")) | ||
print(f'[{lang._instance.get_string("log.info")}] {lang._instance.get_string("info.disabled")}') | ||
|
||
if event == "{}+UP".format(self.gui_roi_selection): | ||
# Event for mouse button up in ROI mode | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No more sourc ;(