I don't think most guys have a problem with just looking at a girl without seriously wanting to have sex with her, much less act on the impulse to do so. Like Tedel said, it's something guys usually do around other guys to be funny or show off how manly or straight they are.
If you're around your girlfriend and you know she feels insecure, no matter how gorgeous the person walking by, you should have respect for how she feels and try not to look. I always tell myself, there's an endless pot of gold of eye candy back home, no need to hurt her feelings right now. When you get back home, go on the internet or pop open a magazine, look at all the eye candy you want and then go have a beer.
On that note, guys just want new and unique eye candy. Their eye gets bored very quickly. Guys who tell you they want to hump their bones are just trying to pick at your insecurities.