diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-10-17 22:55:14 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-10-17 22:55:14 -0400 |
commit | ffb8d386216e6fbb58e5a51028da031cf5f44512 (patch) | |
tree | 4e521f77281f0921a08542b8b382a73599ce2046 /src | |
parent | 703995f230cc030e95f5bd023ae3c97d0987741e (diff) | |
download | abaddon-portaudio-ffb8d386216e6fbb58e5a51028da031cf5f44512.tar.gz abaddon-portaudio-ffb8d386216e6fbb58e5a51028da031cf5f44512.zip |
fix gap in connections if image not found
Diffstat (limited to 'src')
-rw-r--r-- | src/windows/profile/userinfopane.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/windows/profile/userinfopane.cpp b/src/windows/profile/userinfopane.cpp index b6f0d59..8c1605a 100644 --- a/src/windows/profile/userinfopane.cpp +++ b/src/windows/profile/userinfopane.cpp @@ -96,12 +96,13 @@ void ConnectionsContainer::SetConnections(const std::vector<ConnectionData> &con "facebook" }; - for (size_t i = 0; i < connections.size(); i++) { - const auto &conn = connections[i]; + int i = 0; + for (const auto &conn : connections) { if (supported_services.find(conn.Type) == supported_services.end()) continue; auto widget = Gtk::manage(new ConnectionItem(conn)); widget->show(); - attach(*widget, static_cast<int>(i % 2), static_cast<int>(i / 2), 1, 1); + attach(*widget, i % 2, i / 2, 1, 1); + i++; } set_halign(Gtk::ALIGN_FILL); |