summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-11 04:19:54 +0000
committerDavid Robillard <d@drobilla.net>2012-05-11 04:19:54 +0000
commitf90d64eb7d90dc03fe4215bef8d77de51ca0ae78 (patch)
treeee973145a55bb352e06d9172d7ebfb2e07d2571e /src/gui
parentf6bddf045a0d94766961b037d9d295eb12ca84f5 (diff)
downloadingen-f90d64eb7d90dc03fe4215bef8d77de51ca0ae78.tar.gz
ingen-f90d64eb7d90dc03fe4215bef8d77de51ca0ae78.tar.bz2
ingen-f90d64eb7d90dc03fe4215bef8d77de51ca0ae78.zip
Lint.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4347 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/ConnectWindow.cpp34
-rw-r--r--src/gui/NodeMenu.cpp2
2 files changed, 18 insertions, 18 deletions
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp
index b27a9f70..2e7cc2e0 100644
--- a/src/gui/ConnectWindow.cpp
+++ b/src/gui/ConnectWindow.cpp
@@ -175,7 +175,7 @@ ConnectWindow::connect(bool existing)
Glib::signal_timeout().connect(
sigc::mem_fun(this, &ConnectWindow::gtk_callback), 40);
-
+ return;
} else if (_mode == LAUNCH_REMOTE) {
int port = _port_spinbutton->get_value_as_int();
char port_str[8];
@@ -193,28 +193,28 @@ ConnectWindow::connect(bool existing)
Glib::signal_timeout().connect(
sigc::mem_fun(this, &ConnectWindow::gtk_callback), 40);
-
} else {
error << "Failed to launch ingen process." << endl;
}
- } else
+ return;
+ }
#endif
- if (_mode == INTERNAL) {
- if (!world->engine()) {
- world->load_module("server");
- world->load_module("jack");
- world->engine()->activate();
- }
+ if (_mode == INTERNAL) {
+ if (!world->engine()) {
+ world->load_module("server");
+ world->load_module("jack");
+ world->engine()->activate();
+ }
- SharedPtr<SigClientInterface> client(new SigClientInterface());
+ SharedPtr<SigClientInterface> client(new SigClientInterface());
- world->interface()->set_respondee(client);
- _app->attach(client);
- _app->register_callbacks();
+ world->interface()->set_respondee(client);
+ _app->attach(client);
+ _app->register_callbacks();
- Glib::signal_timeout().connect(
- sigc::mem_fun(this, &ConnectWindow::gtk_callback), 10);
- }
+ Glib::signal_timeout().connect(
+ sigc::mem_fun(this, &ConnectWindow::gtk_callback), 10);
+ }
}
void
@@ -373,7 +373,7 @@ ConnectWindow::gtk_callback()
_app->client()->signal_response().connect(
sigc::mem_fun(this, &ConnectWindow::ingen_response));
- _ping_id = abs(rand()) / 2 * 2; // avoid -1
+ _ping_id = abs(g_random_int());
_app->interface()->set_response_id(_ping_id);
_app->interface()->get("ingen:engine");
diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp
index c184384e..f6c8a4b1 100644
--- a/src/gui/NodeMenu.cpp
+++ b/src/gui/NodeMenu.cpp
@@ -151,7 +151,7 @@ NodeMenu::on_menu_randomize()
if ((*i)->is_input() && _app->can_control(i->get())) {
float min = 0.0f, max = 1.0f;
nm->port_value_range(*i, min, max, _app->sample_rate());
- const float val = ((rand() / (float)RAND_MAX) * (max - min) + min);
+ const float val = g_random_double_range(0.0, 1.0) * (max - min) + min;
_app->interface()->set_property(
(*i)->path(),
_app->uris().ingen_value,