diff options
author | mio <[email protected]> | 2024-10-06 10:41:24 +1000 |
---|---|---|
committer | mio <[email protected]> | 2024-10-06 17:16:41 +1000 |
commit | f460840a5e1c4e6cc262177f2b60cebfe469d393 (patch) | |
tree | 97a47405e1714970d9eda9616ac3450a0ca2ccfb /src/app/insertAspectRatioMenuItems.cpp | |
parent | cc8974895a02a98823419846e75f23651aa0abc0 (diff) | |
download | codeine-f460840a5e1c4e6cc262177f2b60cebfe469d393.tar.gz codeine-f460840a5e1c4e6cc262177f2b60cebfe469d393.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]>
Diffstat (limited to 'src/app/insertAspectRatioMenuItems.cpp')
-rw-r--r-- | src/app/insertAspectRatioMenuItems.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/app/insertAspectRatioMenuItems.cpp b/src/app/insertAspectRatioMenuItems.cpp index d2baafc..f0438a7 100644 --- a/src/app/insertAspectRatioMenuItems.cpp +++ b/src/app/insertAspectRatioMenuItems.cpp @@ -1,8 +1,8 @@ // Copyright 2005 Max Howell ([email protected]) // See COPYING file for licensing information +#include <tdeactionclasses.h> #include <tqpopupmenu.h> -#include <xine.h> TQString i18n( const char *text ); @@ -11,15 +11,15 @@ TQString i18n( const char *text ); namespace Codeine { void - insertAspectRatioMenuItems( TQPopupMenu *menu ) + insertAspectRatioMenuItems(TDESelectAction *action) { - menu->insertItem( i18n( "Determine &Automatically" ), XINE_VO_ASPECT_AUTO ); - menu->insertSeparator(); - menu->insertItem( i18n( "&Square (1:1)" ), XINE_VO_ASPECT_SQUARE ); - menu->insertItem( i18n( "&4:3" ), XINE_VO_ASPECT_4_3 ); - menu->insertItem( i18n( "Ana&morphic (16:9)" ), XINE_VO_ASPECT_ANAMORPHIC ); - menu->insertItem( i18n( "&DVB (2.11:1)" ), XINE_VO_ASPECT_DVB ); + TQStringList items(i18n("Determine &Automatically")); + items.append(i18n("&Square (1:1)")); + items.append(i18n("&4:3")); + items.append(i18n("Ana&morphic (16:9)")); + items.append(i18n("&DVB (2.11:1)")); - menu->setItemChecked( XINE_VO_ASPECT_AUTO, true ); + action->setItems(items); + action->popupMenu()->insertSeparator(1); } } |