diff options
author | David Robillard <d@drobilla.net> | 2017-12-25 15:26:48 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-12-25 16:26:13 -0500 |
commit | 15b3b0e9f8823752f80c7e597a70749813e61c79 (patch) | |
tree | 3f324c6e2a455be8b929456dadbf06520889d435 /src/gui/ConnectWindow.cpp | |
parent | d6a9571641bcb34acb3521feb08eea33195fd9ca (diff) | |
download | ingen-15b3b0e9f8823752f80c7e597a70749813e61c79.tar.gz ingen-15b3b0e9f8823752f80c7e597a70749813e61c79.tar.bz2 ingen-15b3b0e9f8823752f80c7e597a70749813e61c79.zip |
Always use braces
Diffstat (limited to 'src/gui/ConnectWindow.cpp')
-rw-r--r-- | src/gui/ConnectWindow.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp index c4081c97..a2d674b8 100644 --- a/src/gui/ConnectWindow.cpp +++ b/src/gui/ConnectWindow.cpp @@ -133,8 +133,9 @@ ConnectWindow::set_connected_to(SPtr<Ingen::Interface> engine) { _app->world()->set_interface(engine); - if (!_widgets_loaded) + if (!_widgets_loaded) { return; + } if (engine) { _icon->set(Gtk::Stock::CONNECT, Gtk::ICON_SIZE_LARGE_TOOLBAR); @@ -162,10 +163,11 @@ ConnectWindow::set_connected_to(SPtr<Ingen::Interface> engine) _activate_button->set_sensitive(false); _deactivate_button->set_sensitive(false); - if (_mode == Mode::CONNECT_REMOTE) + if (_mode == Mode::CONNECT_REMOTE) { _url_entry->set_sensitive(true); - else if (_mode == Mode::LAUNCH_REMOTE) + } else if (_mode == Mode::LAUNCH_REMOTE) { _port_spinbutton->set_sensitive(true); + } _progress_label->set_text(string("Disconnected")); } @@ -174,8 +176,9 @@ ConnectWindow::set_connected_to(SPtr<Ingen::Interface> engine) void ConnectWindow::set_connecting_widget_states() { - if (!_widgets_loaded) + if (!_widgets_loaded) { return; + } _connect_button->set_sensitive(false); _disconnect_button->set_label("gtk-cancel"); @@ -289,8 +292,9 @@ ConnectWindow::disconnect() _app->detach(); set_connected_to(SPtr<Ingen::Interface>()); - if (!_widgets_loaded) + if (!_widgets_loaded) { return; + } _activate_button->set_sensitive(false); _deactivate_button->set_sensitive(false); @@ -392,15 +396,17 @@ void ConnectWindow::on_hide() { Gtk::Dialog::on_hide(); - if (_app->window_factory()->num_open_graph_windows() == 0) + if (_app->window_factory()->num_open_graph_windows() == 0) { quit(); + } } void ConnectWindow::quit_clicked() { - if (_app->quit(this)) + if (_app->quit(this)) { _quit_flag = true; + } } void @@ -451,8 +457,9 @@ ConnectWindow::gtk_callback() { /* If I call this a "state machine" it's not ugly code any more */ - if (_quit_flag) + if (_quit_flag) { return false; // deregister this callback + } // Timing stuff for repeated attach attempts timeval now; |