summaryrefslogtreecommitdiffstats
path: root/src/app/xineEngine.cpp
diff options
context:
space:
mode:
authormio <[email protected]>2024-10-06 10:41:24 +1000
committerMichele Calgaro <[email protected]>2024-10-06 17:38:04 +0900
commit39912d87d5982a40d5fd3633da12568d160b67c7 (patch)
treeb25213a9a2466b4367f81fe8d0def782ca32f569 /src/app/xineEngine.cpp
parent5100a0909b52226219ebe33342f1fb9ee7f8e49b (diff)
downloadcodeine-39912d87d5982a40d5fd3633da12568d160b67c7.tar.gz
codeine-39912d87d5982a40d5fd3633da12568d160b67c7.zip
Fix channel selection menus disappearing
When adding/removing an action to/from the toolbar, the aspect ratio, audio channel, and subtitle channel menus would disappear from the parent settings menu. My understanding is that this happened because nothing was keeping those menus present (plugged?) when other actions were plugged/unplugged. This changes it so "Aspect Ratio", "Subtitles", and "Audio Channels" each are a TDESelectAction that is dynamically filled with items. This way, each popup menu is still present after other actions being plugged/unplugged. Resolves: TDE/codeine#24 Signed-off-by: mio <[email protected]> (cherry picked from commit f460840a5e1c4e6cc262177f2b60cebfe469d393)
Diffstat (limited to 'src/app/xineEngine.cpp')
-rw-r--r--src/app/xineEngine.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/app/xineEngine.cpp b/src/app/xineEngine.cpp
index e38ff4e..708ab13 100644
--- a/src/app/xineEngine.cpp
+++ b/src/app/xineEngine.cpp
@@ -579,13 +579,13 @@ VideoWindow::setStreamParameter( int value )
parameter = XINE_PARAM_VO_CONTRAST;
else if( sender == "brightness" )
parameter = XINE_PARAM_VO_BRIGHTNESS;
- else if( sender == "subtitle_channels_menu" )
+ else if( sender == "subtitle_channels_select" )
parameter = XINE_PARAM_SPU_CHANNEL,
value -= 2;
- else if( sender == "audio_channels_menu" )
+ else if( sender == "audio_channels_select" )
parameter = XINE_PARAM_AUDIO_CHANNEL_LOGICAL,
value -= 2;
- else if( sender == "aspect_ratio_menu" )
+ else if( sender == "aspect_ratio_select" )
parameter = XINE_PARAM_VO_ASPECT_RATIO;
else if( sender == "volume" )
{
@@ -709,19 +709,19 @@ VideoWindow::customEvent( TQCustomEvent *e )
char s[128]; //apparently sufficient
{
- TQStringList languages( "subtitle_channels_menu" );
+ TQStringList languages;
int channels = xine_get_stream_info( m_stream, XINE_STREAM_INFO_MAX_SPU_CHANNEL );
for( int j = 0; j < channels; j++ )
languages += xine_get_spu_lang( m_stream, j, s ) ? s : i18n("Channel %1").arg( j+1 );
- emit channelsChanged( languages );
+ emit subtitleChannelsChanged(languages);
}
{
- TQStringList languages( "audio_channels_menu" );
+ TQStringList languages;
int channels = xine_get_stream_info( m_stream, XINE_STREAM_INFO_MAX_AUDIO_CHANNEL );
for( int j = 0; j < channels; j++ )
languages += xine_get_audio_lang( m_stream, j, s ) ? s : i18n("Channel %1").arg( j+1 );
- emit channelsChanged( languages );
+ emit audioChannelsChanged(languages);
}
break;
}