Please, move this code (except setting flags) into Timer object. The method then could look like:

```python
try:
    self.timer.set_configuration(
         self.refresh_hour.get_text(),
         self.refresh_mins.get_text())
    color = None
except ValueError:
    color = self.color_invalid

self.refresh_hour.modify_fg(Gtk.StateFlags.NORMAL,
                                             self.color_invalid)
self.refresh_mins.modify_fg(Gtk.StateFlags.NORMAL,
                                             self.color_invalid)
```

All the magic can happen in `set_configuration`:

   - test that the values are appropriate else raise exception
   - save values in configuration
   - change current GObject calls so it matches new configuration