gui_window: Use range-based for loops