The following patch extracted from the SF.net discussion linked above fixes the issue for me.
Steve -- --- xine-ui-0.99.3.orig/src/xitk/menus.c +++ xine-ui-0.99.3/src/xitk/menus.c @@ -425,8 +425,7 @@ int x, y; xitk_menu_widget_t menu; char buffer[2048]; - char *sh[255]; - int shc = 0; + int i; xitk_widget_t *w; #ifdef HAVE_XINERAMA int fullscr_mode = (FULLSCR_MODE | FULLSCR_XI_MODE); @@ -439,15 +438,15 @@ "<title>", NULL, NULL }, { _("Show controls"), - (sh[shc++] = menu_get_shortcut("ToggleVisibility")), + menu_get_shortcut("ToggleVisibility"), panel_is_visible() ? "<checked>" : "<check>", menu_panel_visibility, NULL }, { _("Show video window"), - (sh[shc++] = menu_get_shortcut("ToggleWindowVisibility")), + menu_get_shortcut("ToggleWindowVisibility"), video_window_is_visible() ? "<checked>" : "<check>", menu_video_ctrl, (void *) VIDEO_TOGGLE }, { _("Fullscreen"), - (sh[shc++] = menu_get_shortcut("ToggleFullscreen")), + menu_get_shortcut("ToggleFullscreen"), (video_window_get_fullscreen_mode() & fullscr_mode) ? "<checked>" : "<check>", menu_video_ctrl, (void *) VIDEO_FULLSCR }, { "SEP", @@ -459,7 +458,7 @@ "<branch>", NULL, NULL }, { _("Open/File..."), - (sh[shc++] = menu_get_shortcut("FileSelector")), + menu_get_shortcut("FileSelector"), NULL, menu_file_selector, NULL }, { _("Open/Playlist..."), @@ -467,7 +466,7 @@ NULL, menu_playlist_ctrl, (void *) PLAYL_LOAD }, { _("Open/Location..."), - (sh[shc++] = menu_get_shortcut("MrlBrowser")), + menu_get_shortcut("MrlBrowser"), NULL, menu_mrl_browser, NULL }, { _("Playback"), @@ -475,15 +474,15 @@ "<Branch>", NULL, NULL }, { _("Playback/Play"), - (sh[shc++] = menu_get_shortcut("Play")), + menu_get_shortcut("Play"), NULL, menu_playback_ctrl, (void *) PLAYB_PLAY }, { _("Playback/Stop"), - (sh[shc++] = menu_get_shortcut("Stop")), + menu_get_shortcut("Stop"), NULL, menu_playback_ctrl, (void *) PLAYB_STOP }, { _("Playback/Pause"), - (sh[shc++] = menu_get_shortcut("Pause")), + menu_get_shortcut("Pause"), NULL, menu_playback_ctrl, (void *) PLAYB_PAUSE }, { _("Playback/SEP"), @@ -491,11 +490,11 @@ "<separator>", NULL, NULL }, { _("Playback/Next MRL"), - (sh[shc++] = menu_get_shortcut("NextMrl")), + menu_get_shortcut("NextMrl"), NULL, menu_playback_ctrl, (void *) PLAYB_NEXT }, { _("Playback/Previous MRL"), - (sh[shc++] = menu_get_shortcut("PriorMrl")), + menu_get_shortcut("PriorMrl"), NULL, menu_playback_ctrl, (void *) PLAYB_PREV }, { _("Playback/SEP"), @@ -503,11 +502,11 @@ "<separator>", NULL, NULL }, { _("Playback/Increase Speed"), - (sh[shc++] = menu_get_shortcut("SpeedFaster")), + menu_get_shortcut("SpeedFaster"), NULL, menu_playback_ctrl, (void *) PLAYB_SPEEDM }, { _("Playback/Decrease Speed"), - (sh[shc++] = menu_get_shortcut("SpeedSlower")), + menu_get_shortcut("SpeedSlower"), NULL, menu_playback_ctrl, (void *) PLAYB_SPEEDL }, { _("Playlist"), @@ -523,7 +522,7 @@ NULL, menu_playlist_ctrl, (void *) PLAYL_LOAD }, { _("Playlist/Editor..."), - (sh[shc++] = menu_get_shortcut("PlaylistEditor")), + menu_get_shortcut("PlaylistEditor"), NULL, menu_playlist_ctrl, (void *) PLAYL_EDIT }, { _("Playlist/SEP"), @@ -555,7 +554,7 @@ (gGui->playlist.loop == PLAYLIST_LOOP_SHUF_PLUS) ? "<checked>" : "<check>", menu_playlist_ctrl, (void *) PLAYL_SHUF_PLUS }, { _("Playlist/Continue Playback"), - (sh[shc++] = menu_get_shortcut("PlaylistStop")), + menu_get_shortcut("PlaylistStop"), (gGui->playlist.control & PLAYLIST_CONTROL_STOP) ? "<check>" : "<checked>", menu_playlist_ctrl, (void *) PLAYL_CTRL_STOP }, { "SEP", @@ -567,7 +566,7 @@ "<branch>", NULL, NULL }, { _("Menus/Navigation..."), - (sh[shc++] = menu_get_shortcut("EventSenderShow")), + menu_get_shortcut("EventSenderShow"), NULL, menu_event_sender, NULL }, { _("Menus/SEP"), @@ -583,11 +582,11 @@ "<branch>", NULL, NULL }, { _("Stream/Information..."), - (sh[shc++] = menu_get_shortcut("StreamInfosShow")), + menu_get_shortcut("StreamInfosShow"), NULL, menu_stream, (void *) STREAM_WINI }, { _("Stream/Information (OSD)"), - (sh[shc++] = menu_get_shortcut("OSDStreamInfos")), + menu_get_shortcut("OSDStreamInfos"), NULL, menu_stream, (void *) STREAM_OSDI }, { _("Video"), @@ -595,7 +594,7 @@ "<branch>", NULL, NULL }, { _("Video/Deinterlace"), - (sh[shc++] = menu_get_shortcut("ToggleInterleave")), + menu_get_shortcut("ToggleInterleave"), (gGui->deinterlace_enable) ? "<checked>" : "<check>", menu_video_ctrl, (void *) VIDEO_INTERLEAVE }, { _("Video/SEP"), @@ -627,15 +626,15 @@ (aspect == XINE_VO_ASPECT_DVB) ? "<checked>" : "<check>", menu_aspect, (void *) XINE_VO_ASPECT_DVB }, { _("Video/200%"), - (sh[shc++] = menu_get_shortcut("Window200")), + menu_get_shortcut("Window200"), (video_window_get_mag() == 2.0) ? "<checked>" : "<check>", menu_video_ctrl, (void *) VIDEO_2X }, { _("Video/100%"), - (sh[shc++] = menu_get_shortcut("Window100")), + menu_get_shortcut("Window100"), (video_window_get_mag() == 1.0) ? "<checked>" : "<check>", menu_video_ctrl, (void *) VIDEO_1X }, { _("Video/50%"), - (sh[shc++] = menu_get_shortcut("Window50")), + menu_get_shortcut("Window50"), (video_window_get_mag() == .5) ? "<checked>" : "<check>", menu_video_ctrl, (void *) VIDEO__5X }, { _("Video/SEP"), @@ -647,11 +646,11 @@ "<branch>", NULL, NULL }, { _("Video/Postprocess/Chain Reaction..."), - (sh[shc++] = menu_get_shortcut("VPProcessShow")), + menu_get_shortcut("VPProcessShow"), NULL, menu_video_ctrl, (void *) VIDEO_PPROCESS }, { _("Video/Postprocess/Enable Postprocessing"), - (sh[shc++] = menu_get_shortcut("VPProcessEnable")), + menu_get_shortcut("VPProcessEnable"), gGui->post_enable ? "<checked>" : "<check>", menu_video_ctrl, (void *) VIDEO_PPROCESS_ENABLE }, { _("Audio"), @@ -663,7 +662,7 @@ "<branch>", NULL, NULL }, { _("Audio/Volume/Mute"), - (sh[shc++] = menu_get_shortcut("Mute")), + menu_get_shortcut("Mute"), gGui->mixer.mute ? "<checked>" : "<check>", menu_audio_ctrl, (void *) AUDIO_MUTE }, { _("Audio/Volume/Increase 10%"), @@ -699,25 +698,25 @@ "<branch>", NULL, NULL }, { _("Settings/Setup..."), - (sh[shc++] = menu_get_shortcut("SetupShow")), + menu_get_shortcut("SetupShow"), NULL, menu_settings, (void *) SETS_SETUP }, #ifdef HAVE_CURL { _("Settings/Skin Downloader..."), - (sh[shc++] = menu_get_shortcut("SkinDownload")), + menu_get_shortcut("SkinDownload"), NULL, menu_settings, (void *) SETS_SKINDL }, #endif { _("Settings/Keymap Editor..."), - (sh[shc++] = menu_get_shortcut("KeyBindingEditor")), + menu_get_shortcut("KeyBindingEditor"), NULL, menu_settings, (void *) SETS_KEYMAP }, { _("Settings/Video..."), - (sh[shc++] = menu_get_shortcut("ControlShow")), + menu_get_shortcut("ControlShow"), NULL, menu_settings, (void *) SETS_VIDEO }, { _("Settings/TV Analog..."), - (sh[shc++] = menu_get_shortcut("TVAnalogShow")), + menu_get_shortcut("TVAnalogShow"), NULL, menu_settings, (void *) SETS_TVANALOG }, { "SEP", @@ -725,11 +724,11 @@ "<separator>", NULL, NULL }, { _("Help..."), - (sh[shc++] = menu_get_shortcut("HelpShow")), + menu_get_shortcut("HelpShow"), NULL, menu_help, NULL }, { _("Logs..."), - (sh[shc++] = menu_get_shortcut("ViewlogShow")), + menu_get_shortcut("ViewlogShow"), NULL, menu_settings, (void *) SETS_LOGS }, { "SEP", @@ -737,7 +736,7 @@ "<separator>", NULL, NULL }, { _("Quit"), - (sh[shc++] = menu_get_shortcut("Quit")), + menu_get_shortcut("Quit"), NULL, menu_quit, NULL }, { NULL, @@ -765,8 +764,9 @@ w = xitk_noskin_menu_create(wl, &menu, x + 1, y + 1); - while(shc > 0) - free(sh[--shc]); + for (i = 0; i <sizeof(menu_entries)/sizeof(*menu_entries); i++) + if (menu_entries[i].shortcut) + free(menu_entries[i].shortcut); /* Subtitle loader */ if(gGui->playlist.num) { @@ -1155,12 +1155,11 @@ xitk_menu_widget_t menu; xitk_widget_t *w = NULL; char buffer[2048]; - char *sh[50]; - int shc = 0; + int i; xitk_menu_entry_t menu_entries_nosel[] = { { NULL , NULL, "<title>", NULL, NULL }, { "SEP", NULL, "<separator>", NULL, NULL }, - { _("Scan"), (sh[shc] = menu_get_shortcut("ScanPlaylistInfo")), + { _("Scan"), menu_get_shortcut("ScanPlaylistInfo"), NULL, menu_scan_infos, NULL }, { _("Add"), NULL, NULL, menu_open_mrlbrowser, NULL }, { NULL, NULL, NULL, NULL, NULL } @@ -1172,7 +1171,7 @@ { "SEP", NULL, "<separator>", NULL, NULL }, { _("Scan"), NULL, NULL, menu_scan_infos_selected, NULL }, { _("Add"), NULL, NULL, menu_open_mrlbrowser, NULL }, - { _("Edit"), (sh[shc] = menu_get_shortcut("MediamarkEditor")), + { _("Edit"), menu_get_shortcut("MediamarkEditor"), NULL, menu_playlist_mmk_editor, NULL }, { _("Delete"), NULL, NULL, menu_playlist_delete_current, NULL }, { _("Delete All"), NULL, NULL, menu_playlist_delete_all, NULL }, @@ -1200,8 +1199,12 @@ w = xitk_noskin_menu_create(wl, &menu, x, y); - while(shc > 0) - free(sh[--shc]); + for (i = 0; i <sizeof(menu_entries_nosel)/sizeof(*menu_entries_nosel); i++) + if (menu_entries_nosel[i].shortcut) + free(menu_entries_nosel[i].shortcut); + for (i = 0; i <sizeof(menu_entries_sel)/sizeof(*menu_entries_sel); i++) + if (menu_entries_sel[i].shortcut) + free(menu_entries_sel[i].shortcut); if(!selected && gGui->playlist.num) { xitk_menu_entry_t menu_entry; -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]