[vlc-devel] [PATCH 07/10] gui/qt: menus: always enable bookmarks menu
Filip Roséen
filip at atch.se
Thu May 18 12:29:48 CEST 2017
Due to the changes introduced by 36e12797b4a, the bookmark menu would
not be enabled if there were no choices currently associated with the
input. As a user should be able to manage the bookmarks, even if no
such is present at the current time, we forcefully add
VLC_VAR_HASCHOICE to the i_type.
---
modules/gui/qt/menus.cpp | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt/menus.cpp b/modules/gui/qt/menus.cpp
index 4fb4d64e76..d5a7706d52 100644
--- a/modules/gui/qt/menus.cpp
+++ b/modules/gui/qt/menus.cpp
@@ -1254,10 +1254,13 @@ void VLCMenuBar::UpdateItem( intf_thread_t *p_intf, QMenu *menu,
}
/* Check the type of the object variable */
- /* This HACK is needed so we have a radio button for audio and video tracks
- instread of a checkbox */
+ /* This HACK is needed so that we have:
+ * - a radio button for audio/video tracks instread of a checkbox, and;
+ * - an always enabled bookmark menu (even if there are no bookmarks)
+ **/
if( !strcmp( psz_var, "audio-es" )
- || !strcmp( psz_var, "video-es" ) )
+ || !strcmp( psz_var, "video-es" )
+ || !strcmp( psz_var, "bookmark" ) )
i_type = VLC_VAR_INTEGER | VLC_VAR_HASCHOICE;
else
i_type = var_Type( p_object, psz_var );
--
2.12.2
More information about the vlc-devel
mailing list