+ if( p_input != NULL )
+ {
+ vlc_value_t val;
+ popupmenu.InsertSeparator( 0 );
+ if (!minimal)
+ {
+ popupmenu.Insert( 0, Stop_Event, wxU(_("Stop")) );
+ popupmenu.Insert( 0, Previous_Event, wxU(_("Previous")) );
+ popupmenu.Insert( 0, Next_Event, wxU(_("Next")) );
+ }
+
+ var_Get( p_input, "state", &val );
+ if( val.i_int == PAUSE_S )
+ popupmenu.Insert( 0, Play_Event, wxU(_("Play")) );
+ else
+ popupmenu.Insert( 0, Pause_Event, wxU(_("Pause")) );
+
+ vlc_object_release( p_input );
+ }
+ else
+ {
+ playlist_t * p_playlist =
+ (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+ FIND_ANYWHERE );
+ if( p_playlist && p_playlist->i_size )
+ {
+ popupmenu.InsertSeparator( 0 );
+ popupmenu.Insert( 0, Play_Event, wxU(_("Play")) );
+ }
+ if( p_playlist ) vlc_object_release( p_playlist );
+ }
+
+ popupmenu.Append( MenuDummy_Event, wxU(_("Miscellaneous")),
+ MiscMenu( p_intf ), wxT("") );
+ if (!minimal)
+ {
+ popupmenu.Append( MenuDummy_Event, wxU(_("Open")),