Mac, I know this isn't what you said or implied, but let's clarify something:
If you're going to lock a case or deposit a gun somewhere that you can lock, you'd best do so in the most discreet way that you can. Maybe you're driving a Civic and can very nonchalantly lock that glove box door without changing position and being obvious about it. Maybe you're driving an F-350 and have to unbuckle your seat belt and climb over the arm rest to lock that box. Gee, that looks a little odd Officer Friendly's headlights.
I guess I'm kind of countering Mac's advice, though I don't mean to discount what he's said. Once the officer has singled you out, I'd make no movements of any kind that he might be able to see. So he tagged you doing 20 mph over (just like 10 others so far this shift). Routine stop. Probably already knows whether he's going to give you a ticket or warning before he stops the car. But, if his headlights illuminate you leaning over, reaching for stuff, changing positions, moving things around -- basically doing anything at all besides waiting for him to walk up, his warning/curiosity radar is going to go off. I'd say at that point he's got two guesses as to what you're up to: 1) hiding drugs, 2) hiding, or GOING FOR, a gun. Neither of those things do I want on his mind when he's approaching me.
Now we can argue about probable cause and whether he has a right to search your car. Many cops will tell you that, in their opinion, PC can be found pretty much whenever they feel the need. That may not be right or expressly legal, but you'll have to argue the point later. What if he says, "I noticed you locked your glove box. What's in there?" Now we may know that the right answer is, "Officer am I being charged with anything? Am I free to go?" What happens after that would be interesting to see. I'm going to guess the reduced ticket is out of the question at least!
And here's the rub, you've committed no criminal act and have nothing to hide. So what next? Tell him what's in the glove box? Then why lock it up in the first place? Let him find it?...OOOOHHH, bad choice!
I think I have to stick by my first advice: Don't carry it in a glove box -- unless your papers are NOT in there. In fact, don't carry it in the glove box at all! Glove box carry just means you have to fool with your gun every time you get in or out of the car. Leave it in the holster!
If stopped, don't put your hands near it, don't reach for it, don't talk about it -- unless required by your state or if you think he's GOING to find it due to the nature of the stop/interaction.
If the cop has to know about it for whichever reason, be upfront, polite, and professional. Don't argue with him, don't debate the concept. If he does anything unprofessional, aggressive, or illegal, take the best mental notes you can and report it asap. It's your RIGHT, and (as long as you're following the law) you have no reason to act or be afraid.
As the sticky says at the top of the "General" forum says, "You are NOT a guilty criminal -- stop acting like one!"
-Sam