Using GPIOA_IDR directly looks a bit arcane, and the example can benefit from introducing gpio_get() and how to use it. The stm32f0-discovery example already does it like this.
README
This example blinks the GREEN LED on the ST STM32F4DISCOVERY eval board.
When you press the 'USER' button, the blinking is slower.
Board connections
none required