Skip to content

Commit d9882a3

Browse files
hanatyan128claude
andcommitted
fix: Improve hotkey UX with immediate status dock updates and toggle fixes
- Emit outputUserEnabledChanged signal from setters when value changes, connected to status dock for immediate checkbox sync on hotkey press - Fix hotkey pair toggle logic: return false when already in desired state so OBS correctly alternates enable/disable callbacks - Move setRecordingUserEnabled/setReplayBufferUserEnabled to cpp files - Add serviceCount check inside isStreamingEnabled to prevent stale slots - Register hotkeys conditionally based on enabled output types - Translate hotkey locale strings for all supported languages Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3fd8192 commit d9882a3

15 files changed

Lines changed: 323 additions & 182 deletions

data/locale/ca-ES.ini

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,14 @@ ReplayBufferEstimate.ToolTip="Re-check or apply settings to refresh the estimate
177177
Status.ReplayBuffer="Buffering"
178178
SaveReplayBufferHotkey="Save '%1' Replay Buffer"
179179
SaveReplayBufferAllHotkey="Save all Branch Output replay buffers"
180-
EnableAllStreamingHotkey="Enable '%1' All Streaming"
181-
DisableAllStreamingHotkey="Disable '%1' All Streaming"
182-
EnableStreamingServiceHotkey="Enable '%1' Streaming %2"
183-
DisableStreamingServiceHotkey="Disable '%1' Streaming %2"
184-
EnableRecordingIndividualHotkey="Enable '%1' Recording"
185-
DisableRecordingIndividualHotkey="Disable '%1' Recording"
186-
EnableReplayBufferIndividualHotkey="Enable '%1' Replay Buffer"
187-
DisableReplayBufferIndividualHotkey="Disable '%1' Replay Buffer"
180+
EnableAllStreamingHotkey="Activa '%1' Totes les emissions"
181+
DisableAllStreamingHotkey="Desactiva '%1' Totes les emissions"
182+
EnableStreamingServiceHotkey="Activa '%1' Emissió %2"
183+
DisableStreamingServiceHotkey="Desactiva '%1' Emissió %2"
184+
EnableRecordingIndividualHotkey="Activa '%1' Enregistrament"
185+
DisableRecordingIndividualHotkey="Desactiva '%1' Enregistrament"
186+
EnableReplayBufferIndividualHotkey="Activa '%1' Memòria intermèdia de repetició"
187+
DisableReplayBufferIndividualHotkey="Desactiva '%1' Memòria intermèdia de repetició"
188188
SaveAllReplayBuffers="Save All Replay Buffers"
189189
ReplayBuffer.Saved="Replay Saved"
190190
AdvancedSettings="Advanced Settings"

data/locale/de-DE.ini

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,14 @@ ReplayBufferEstimate.ToolTip="Erneut ankreuzen oder Einstellungen anwenden, um d
177177
Status.ReplayBuffer="Pufferung"
178178
SaveReplayBufferHotkey="'%1' Wiederholungspuffer speichern"
179179
SaveReplayBufferAllHotkey="Alle Branch Output Wiederholungspuffer speichern"
180-
EnableAllStreamingHotkey="Enable '%1' All Streaming"
181-
DisableAllStreamingHotkey="Disable '%1' All Streaming"
182-
EnableStreamingServiceHotkey="Enable '%1' Streaming %2"
183-
DisableStreamingServiceHotkey="Disable '%1' Streaming %2"
184-
EnableRecordingIndividualHotkey="Enable '%1' Recording"
185-
DisableRecordingIndividualHotkey="Disable '%1' Recording"
186-
EnableReplayBufferIndividualHotkey="Enable '%1' Replay Buffer"
187-
DisableReplayBufferIndividualHotkey="Disable '%1' Replay Buffer"
180+
EnableAllStreamingHotkey="'%1' Alle Streams aktivieren"
181+
DisableAllStreamingHotkey="'%1' Alle Streams deaktivieren"
182+
EnableStreamingServiceHotkey="'%1' Stream %2 aktivieren"
183+
DisableStreamingServiceHotkey="'%1' Stream %2 deaktivieren"
184+
EnableRecordingIndividualHotkey="'%1' Aufnahme aktivieren"
185+
DisableRecordingIndividualHotkey="'%1' Aufnahme deaktivieren"
186+
EnableReplayBufferIndividualHotkey="'%1' Wiederholungspuffer aktivieren"
187+
DisableReplayBufferIndividualHotkey="'%1' Wiederholungspuffer deaktivieren"
188188
SaveAllReplayBuffers="Alle Wiederholungspuffer speichern"
189189
ReplayBuffer.Saved="Wiederholung gespeichert"
190190
AdvancedSettings="Erweiterte Einstellungen"

data/locale/fr-FR.ini

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,14 @@ ReplayBufferEstimate.ToolTip="Recochez ou appliquez les paramètres pour actuali
177177
Status.ReplayBuffer="Mise en tampon"
178178
SaveReplayBufferHotkey="Sauvegarder le tampon de relecture '%1'"
179179
SaveReplayBufferAllHotkey="Sauvegarder tous les tampons de relecture Branch Output"
180-
EnableAllStreamingHotkey="Enable '%1' All Streaming"
181-
DisableAllStreamingHotkey="Disable '%1' All Streaming"
182-
EnableStreamingServiceHotkey="Enable '%1' Streaming %2"
183-
DisableStreamingServiceHotkey="Disable '%1' Streaming %2"
184-
EnableRecordingIndividualHotkey="Enable '%1' Recording"
185-
DisableRecordingIndividualHotkey="Disable '%1' Recording"
186-
EnableReplayBufferIndividualHotkey="Enable '%1' Replay Buffer"
187-
DisableReplayBufferIndividualHotkey="Disable '%1' Replay Buffer"
180+
EnableAllStreamingHotkey="Activer '%1' Tous les flux"
181+
DisableAllStreamingHotkey="Désactiver '%1' Tous les flux"
182+
EnableStreamingServiceHotkey="Activer '%1' Flux %2"
183+
DisableStreamingServiceHotkey="Désactiver '%1' Flux %2"
184+
EnableRecordingIndividualHotkey="Activer '%1' Enregistrement"
185+
DisableRecordingIndividualHotkey="Désactiver '%1' Enregistrement"
186+
EnableReplayBufferIndividualHotkey="Activer '%1' Tampon de relecture"
187+
DisableReplayBufferIndividualHotkey="Désactiver '%1' Tampon de relecture"
188188
SaveAllReplayBuffers="Sauvegarder tous les tampons de relecture"
189189
ReplayBuffer.Saved="Relecture sauvegardée"
190190
AdvancedSettings="Paramètres avancés"

data/locale/ko-KR.ini

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,14 @@ ReplayBufferEstimate.ToolTip="다시 체크하거나 설정을 적용하면 추
177177
Status.ReplayBuffer="버퍼링 중"
178178
SaveReplayBufferHotkey="'%1' 리플레이 버퍼 저장"
179179
SaveReplayBufferAllHotkey="모든 Branch Output 리플레이 버퍼 저장"
180-
EnableAllStreamingHotkey="Enable '%1' All Streaming"
181-
DisableAllStreamingHotkey="Disable '%1' All Streaming"
182-
EnableStreamingServiceHotkey="Enable '%1' Streaming %2"
183-
DisableStreamingServiceHotkey="Disable '%1' Streaming %2"
184-
EnableRecordingIndividualHotkey="Enable '%1' Recording"
185-
DisableRecordingIndividualHotkey="Disable '%1' Recording"
186-
EnableReplayBufferIndividualHotkey="Enable '%1' Replay Buffer"
187-
DisableReplayBufferIndividualHotkey="Disable '%1' Replay Buffer"
180+
EnableAllStreamingHotkey="'%1' 모든 스트리밍 활성화"
181+
DisableAllStreamingHotkey="'%1' 모든 스트리밍 비활성화"
182+
EnableStreamingServiceHotkey="'%1' 스트리밍 %2 활성화"
183+
DisableStreamingServiceHotkey="'%1' 스트리밍 %2 비활성화"
184+
EnableRecordingIndividualHotkey="'%1' 녹화 활성화"
185+
DisableRecordingIndividualHotkey="'%1' 녹화 비활성화"
186+
EnableReplayBufferIndividualHotkey="'%1' 리플레이 버퍼 활성화"
187+
DisableReplayBufferIndividualHotkey="'%1' 리플레이 버퍼 비활성화"
188188
SaveAllReplayBuffers="모든 리플레이 버퍼 저장"
189189
ReplayBuffer.Saved="리플레이 저장됨"
190190
AdvancedSettings="고급 설정"

data/locale/ro-RO.ini

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,14 @@ ReplayBufferEstimate.ToolTip="Re-check or apply settings to refresh the estimate
175175
Status.ReplayBuffer="Buffering"
176176
SaveReplayBufferHotkey="Save '%1' Replay Buffer"
177177
SaveReplayBufferAllHotkey="Save all Branch Output replay buffers"
178-
EnableAllStreamingHotkey="Enable '%1' All Streaming"
179-
DisableAllStreamingHotkey="Disable '%1' All Streaming"
180-
EnableStreamingServiceHotkey="Enable '%1' Streaming %2"
181-
DisableStreamingServiceHotkey="Disable '%1' Streaming %2"
182-
EnableRecordingIndividualHotkey="Enable '%1' Recording"
183-
DisableRecordingIndividualHotkey="Disable '%1' Recording"
184-
EnableReplayBufferIndividualHotkey="Enable '%1' Replay Buffer"
185-
DisableReplayBufferIndividualHotkey="Disable '%1' Replay Buffer"
178+
EnableAllStreamingHotkey="Activare '%1' Toate transmisiunile"
179+
DisableAllStreamingHotkey="Dezactivare '%1' Toate transmisiunile"
180+
EnableStreamingServiceHotkey="Activare '%1' Transmisiune %2"
181+
DisableStreamingServiceHotkey="Dezactivare '%1' Transmisiune %2"
182+
EnableRecordingIndividualHotkey="Activare '%1' Înregistrare"
183+
DisableRecordingIndividualHotkey="Dezactivare '%1' Înregistrare"
184+
EnableReplayBufferIndividualHotkey="Activare '%1' Buffer de reluare"
185+
DisableReplayBufferIndividualHotkey="Dezactivare '%1' Buffer de reluare"
186186
SaveAllReplayBuffers="Save All Replay Buffers"
187187
ReplayBuffer.Saved="Replay Saved"
188188
AdvancedSettings="Advanced Settings"

data/locale/ru-RU.ini

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,14 @@ ReplayBufferEstimate.ToolTip="Установите флажок повторно
177177
Status.ReplayBuffer="Буферизация"
178178
SaveReplayBufferHotkey="Сохранить буфер воспроизведения '%1'"
179179
SaveReplayBufferAllHotkey="Сохранить все буферы воспроизведения Branch Output"
180-
EnableAllStreamingHotkey="Enable '%1' All Streaming"
181-
DisableAllStreamingHotkey="Disable '%1' All Streaming"
182-
EnableStreamingServiceHotkey="Enable '%1' Streaming %2"
183-
DisableStreamingServiceHotkey="Disable '%1' Streaming %2"
184-
EnableRecordingIndividualHotkey="Enable '%1' Recording"
185-
DisableRecordingIndividualHotkey="Disable '%1' Recording"
186-
EnableReplayBufferIndividualHotkey="Enable '%1' Replay Buffer"
187-
DisableReplayBufferIndividualHotkey="Disable '%1' Replay Buffer"
180+
EnableAllStreamingHotkey="Включить '%1' Все трансляции"
181+
DisableAllStreamingHotkey="Отключить '%1' Все трансляции"
182+
EnableStreamingServiceHotkey="Включить '%1' Трансляция %2"
183+
DisableStreamingServiceHotkey="Отключить '%1' Трансляция %2"
184+
EnableRecordingIndividualHotkey="Включить '%1' Запись"
185+
DisableRecordingIndividualHotkey="Отключить '%1' Запись"
186+
EnableReplayBufferIndividualHotkey="Включить '%1' Буфер воспроизведения"
187+
DisableReplayBufferIndividualHotkey="Отключить '%1' Буфер воспроизведения"
188188
SaveAllReplayBuffers="Сохранить все буферы воспроизведения"
189189
ReplayBuffer.Saved="Воспроизведение сохранено"
190190
AdvancedSettings="Расширенные настройки"

data/locale/uk-UA.ini

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,14 @@ ReplayBufferEstimate.ToolTip="Поставте прапорець повторн
177177
Status.ReplayBuffer="Буферизація"
178178
SaveReplayBufferHotkey="Зберегти буфер повтору '%1'"
179179
SaveReplayBufferAllHotkey="Зберегти всі буфери повтору Branch Output"
180-
EnableAllStreamingHotkey="Enable '%1' All Streaming"
181-
DisableAllStreamingHotkey="Disable '%1' All Streaming"
182-
EnableStreamingServiceHotkey="Enable '%1' Streaming %2"
183-
DisableStreamingServiceHotkey="Disable '%1' Streaming %2"
184-
EnableRecordingIndividualHotkey="Enable '%1' Recording"
185-
DisableRecordingIndividualHotkey="Disable '%1' Recording"
186-
EnableReplayBufferIndividualHotkey="Enable '%1' Replay Buffer"
187-
DisableReplayBufferIndividualHotkey="Disable '%1' Replay Buffer"
180+
EnableAllStreamingHotkey="Увімкнути '%1' Усі трансляції"
181+
DisableAllStreamingHotkey="Вимкнути '%1' Усі трансляції"
182+
EnableStreamingServiceHotkey="Увімкнути '%1' Трансляція %2"
183+
DisableStreamingServiceHotkey="Вимкнути '%1' Трансляція %2"
184+
EnableRecordingIndividualHotkey="Увімкнути '%1' Запис"
185+
DisableRecordingIndividualHotkey="Вимкнути '%1' Запис"
186+
EnableReplayBufferIndividualHotkey="Увімкнути '%1' Буфер повтору"
187+
DisableReplayBufferIndividualHotkey="Вимкнути '%1' Буфер повтору"
188188
SaveAllReplayBuffers="Зберегти всі буфери повтору"
189189
ReplayBuffer.Saved="Повтор збережено"
190190
AdvancedSettings="Розширені налаштування"

data/locale/zh-CN.ini

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,14 @@ ReplayBufferEstimate.ToolTip="重新勾选或应用设置以刷新估算值。"
177177
Status.ReplayBuffer="缓冲中"
178178
SaveReplayBufferHotkey="保存 '%1' 回放缓冲"
179179
SaveReplayBufferAllHotkey="保存所有 Branch Output 回放缓冲"
180-
EnableAllStreamingHotkey="Enable '%1' All Streaming"
181-
DisableAllStreamingHotkey="Disable '%1' All Streaming"
182-
EnableStreamingServiceHotkey="Enable '%1' Streaming %2"
183-
DisableStreamingServiceHotkey="Disable '%1' Streaming %2"
184-
EnableRecordingIndividualHotkey="Enable '%1' Recording"
185-
DisableRecordingIndividualHotkey="Disable '%1' Recording"
186-
EnableReplayBufferIndividualHotkey="Enable '%1' Replay Buffer"
187-
DisableReplayBufferIndividualHotkey="Disable '%1' Replay Buffer"
180+
EnableAllStreamingHotkey="启用 '%1' 所有推流"
181+
DisableAllStreamingHotkey="禁用 '%1' 所有推流"
182+
EnableStreamingServiceHotkey="启用 '%1' 推流 %2"
183+
DisableStreamingServiceHotkey="禁用 '%1' 推流 %2"
184+
EnableRecordingIndividualHotkey="启用 '%1' 录制"
185+
DisableRecordingIndividualHotkey="禁用 '%1' 录制"
186+
EnableReplayBufferIndividualHotkey="启用 '%1' 回放缓冲"
187+
DisableReplayBufferIndividualHotkey="禁用 '%1' 回放缓冲"
188188
SaveAllReplayBuffers="保存所有回放缓冲"
189189
ReplayBuffer.Saved="回放已保存"
190190
AdvancedSettings="高级设置"

src/UI/output-status-dock.cpp

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,10 @@ void BranchOutputStatusDock::addFilter(BranchOutputFilter *filter)
372372
// Ensure filter removed
373373
removeFilter(filter);
374374

375+
// Immediate checkbox sync when output user-enabled state changes (e.g. from hotkeys)
376+
connect(filter, &BranchOutputFilter::outputUserEnabledChanged, this,
377+
&BranchOutputStatusDock::onOutputUserEnabledChanged, Qt::UniqueConnection);
378+
375379
OBSDataAutoRelease settings = obs_source_get_settings(filter->filterSource);
376380

377381
auto groupIndex = 0;
@@ -388,8 +392,7 @@ void BranchOutputStatusDock::addFilter(BranchOutputFilter *filter)
388392

389393
// Streaming rows
390394
if (filter->isStreamingGroupEnabled(settings)) {
391-
auto serviceCount = (size_t)obs_data_get_int(settings, "service_count");
392-
for (size_t i = 0; i < MAX_SERVICES && i < serviceCount; i++) {
395+
for (size_t i = 0; i < MAX_SERVICES; i++) {
393396
if (filter->isStreamingEnabled(settings, i)) {
394397
addRow(filter, i, ROW_OUTPUT_STREAMING, groupIndex++);
395398
}
@@ -439,6 +442,23 @@ void BranchOutputStatusDock::update()
439442
sort();
440443
}
441444

445+
void BranchOutputStatusDock::updateOutputToggles(BranchOutputFilter *filter)
446+
{
447+
foreach (auto row, outputTableRows) {
448+
if (row->filter == filter) {
449+
row->updateOutputToggle();
450+
}
451+
}
452+
}
453+
454+
void BranchOutputStatusDock::onOutputUserEnabledChanged()
455+
{
456+
auto filter = qobject_cast<BranchOutputFilter *>(sender());
457+
if (filter) {
458+
updateOutputToggles(filter);
459+
}
460+
}
461+
442462
void BranchOutputStatusDock::applyEnableAllButtonEnabled()
443463
{
444464
foreach (auto row, outputTableRows) {
@@ -829,8 +849,7 @@ OutputTableRow::~OutputTableRow()
829849
disconnect(this);
830850
}
831851

832-
// Imitate UI/window-basic-stats.cpp
833-
void OutputTableRow::update()
852+
void OutputTableRow::updateOutputToggle()
834853
{
835854
// Sync per-output toggle checkbox with filter's user-enabled flags.
836855
// Only update when the state has actually changed to avoid unnecessary work
@@ -852,6 +871,12 @@ void OutputTableRow::update()
852871
if (outputName->isChecked() != desiredChecked) {
853872
outputName->setChecked(desiredChecked);
854873
}
874+
}
875+
876+
// Imitate UI/window-basic-stats.cpp
877+
void OutputTableRow::update()
878+
{
879+
updateOutputToggle();
855880

856881
obs_output_t *output;
857882

src/UI/output-status-dock.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ class BranchOutputStatusDock : public QFrame {
250250
Qt::SortOrder sortingOrder;
251251

252252
void update();
253+
void updateOutputToggles(BranchOutputFilter *filter);
253254
void applyEnableAllButtonEnabled();
254255
void applyDisableAllButtonEnabled();
255256
void applySplitRecordingAllButtonEnabled();
@@ -272,6 +273,7 @@ class BranchOutputStatusDock : public QFrame {
272273

273274
private slots:
274275
void onHeaderPressed(int index);
276+
void onOutputUserEnabledChanged();
275277

276278
protected:
277279
virtual void showEvent(QShowEvent *event) override;
@@ -323,6 +325,7 @@ class OutputTableRow : public QObject {
323325
int first_dropped = 0;
324326

325327
void update();
328+
void updateOutputToggle();
326329
void reset();
327330
void splitRecording();
328331
void pauseRecording();

0 commit comments

Comments
 (0)