diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/App.cpp | 1 | ||||
-rw-r--r-- | src/gui/ConnectWindow.cpp | 12 | ||||
-rw-r--r-- | src/gui/GraphBox.cpp | 1 | ||||
-rw-r--r-- | src/gui/GraphCanvas.cpp | 4 | ||||
-rw-r--r-- | src/gui/GraphTreeWindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/GraphView.cpp | 1 | ||||
-rw-r--r-- | src/gui/GraphWindow.hpp | 2 | ||||
-rw-r--r-- | src/gui/LoadPluginWindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/MessagesWindow.hpp | 2 | ||||
-rw-r--r-- | src/gui/NodeMenu.cpp | 2 | ||||
-rw-r--r-- | src/gui/PropertiesWindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/ThreadedLoader.hpp | 2 | ||||
-rw-r--r-- | src/gui/WindowFactory.cpp | 2 | ||||
-rw-r--r-- | src/gui/ingen_gui.cpp | 1 | ||||
-rw-r--r-- | src/gui/meson.build | 2 | ||||
-rw-r--r-- | src/gui/rgba.hpp | 2 |
16 files changed, 20 insertions, 17 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp index 7c1a626c..260afdba 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -72,6 +72,7 @@ #include <algorithm> #include <cassert> +#include <cstdarg> #include <cstdio> #include <exception> #include <iostream> diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp index 7265796a..edafdfa4 100644 --- a/src/gui/ConnectWindow.cpp +++ b/src/gui/ConnectWindow.cpp @@ -476,8 +476,8 @@ ConnectWindow::gtk_callback() // Show if attempted connection goes on for a noticeable amount of time if (!is_visible()) { - const float ms_since_start = (now.tv_sec - start.tv_sec) * 1000.0f + - (now.tv_usec - start.tv_usec) * 0.001f; + const float ms_since_start = ((now.tv_sec - start.tv_sec) * 1000.0f) + + ((now.tv_usec - start.tv_usec) * 0.001f); if (ms_since_start > 500) { present(); set_connecting_widget_states(); @@ -485,8 +485,8 @@ ConnectWindow::gtk_callback() } if (_connect_stage == 0) { - const float ms_since_last = (now.tv_sec - last.tv_sec) * 1000.0f + - (now.tv_usec - last.tv_usec) * 0.001f; + const float ms_since_last = ((now.tv_sec - last.tv_sec) * 1000.0f) + + ((now.tv_usec - last.tv_usec) * 0.001f); if (ms_since_last >= 250) { last = now; if (_mode == Mode::INTERNAL) { @@ -515,8 +515,8 @@ ConnectWindow::gtk_callback() if (_attached) { next_stage(); } else { - const float ms_since_last = (now.tv_sec - last.tv_sec) * 1000.0f + - (now.tv_usec - last.tv_usec) * 0.001f; + const float ms_since_last = ((now.tv_sec - last.tv_sec) * 1000.0f) + + ((now.tv_usec - last.tv_usec) * 0.001f); if (attempts > 10) { error("Failed to ping engine"); _connect_stage = -1; diff --git a/src/gui/GraphBox.cpp b/src/gui/GraphBox.cpp index b47393f3..47c567e3 100644 --- a/src/gui/GraphBox.cpp +++ b/src/gui/GraphBox.cpp @@ -50,6 +50,7 @@ #include <raul/Symbol.hpp> #include <gdk/gdk.h> +#include <glib.h> #include <glib/gstdio.h> #include <glibmm/convert.h> #include <glibmm/fileutils.h> diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp index 22edbf15..3090186a 100644 --- a/src/gui/GraphCanvas.cpp +++ b/src/gui/GraphCanvas.cpp @@ -253,7 +253,7 @@ GraphCanvas::build_menus() _menu->reorder_child(*internal_menu_item, 4); } - // Build skeleton LV2 plugin class heirarchy for 'Plugin' menu + // Build skeleton LV2 plugin class hierarchy for 'Plugin' menu if (_plugin_menu) { _plugin_menu->clear(); } else { @@ -269,7 +269,7 @@ GraphCanvas::build_menus() sigc::mem_fun(this, &GraphCanvas::load_plugin)); } - // Add known plugins to menu heirarchy + // Add known plugins to menu hierarchy auto plugins = _app.store()->plugins(); for (const auto& p : *plugins) { add_plugin(p.second); diff --git a/src/gui/GraphTreeWindow.cpp b/src/gui/GraphTreeWindow.cpp index d32b2a17..1d141271 100644 --- a/src/gui/GraphTreeWindow.cpp +++ b/src/gui/GraphTreeWindow.cpp @@ -47,6 +47,7 @@ #include <cassert> #include <cstdint> #include <memory> +#include <string> namespace ingen { diff --git a/src/gui/GraphView.cpp b/src/gui/GraphView.cpp index 6c46776f..8d1e1777 100644 --- a/src/gui/GraphView.cpp +++ b/src/gui/GraphView.cpp @@ -45,6 +45,7 @@ #include <cstdint> #include <map> #include <memory> +#include <string> #include <utility> namespace ingen { diff --git a/src/gui/GraphWindow.hpp b/src/gui/GraphWindow.hpp index 05c555a5..9936b5df 100644 --- a/src/gui/GraphWindow.hpp +++ b/src/gui/GraphWindow.hpp @@ -44,8 +44,6 @@ class PortModel; namespace gui { -class App; - /** A window for a graph. * * \ingroup GUI diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp index 56551318..3d8b2cd5 100644 --- a/src/gui/LoadPluginWindow.cpp +++ b/src/gui/LoadPluginWindow.cpp @@ -43,6 +43,7 @@ #include <gtkmm/combobox.h> #include <gtkmm/enums.h> #include <gtkmm/messagedialog.h> +#include <gtkmm/object.h> #include <gtkmm/treeiter.h> #include <gtkmm/treepath.h> #include <gtkmm/treeview.h> diff --git a/src/gui/MessagesWindow.hpp b/src/gui/MessagesWindow.hpp index c0de6b61..0a70e76c 100644 --- a/src/gui/MessagesWindow.hpp +++ b/src/gui/MessagesWindow.hpp @@ -38,8 +38,6 @@ class TextView; namespace ingen::gui { -class App; - /** Messages Window. * * Loaded from XML as a derived object. diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp index b18101e3..2815194c 100644 --- a/src/gui/NodeMenu.cpp +++ b/src/gui/NodeMenu.cpp @@ -207,7 +207,7 @@ NodeMenu::on_menu_randomize() bm->port_value_range(p, min, max, _app->sample_rate()); const auto r = static_cast<float>(g_random_double_range(0.0, 1.0)); - const float val = r * (max - min) + min; + const float val = (r * (max - min)) + min; _app->set_property(p->uri(), _app->uris().ingen_value, _app->forge().make(val)); diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp index 770e4a40..0dde0ab2 100644 --- a/src/gui/PropertiesWindow.cpp +++ b/src/gui/PropertiesWindow.cpp @@ -39,6 +39,7 @@ #include <glibmm/containers.h> #include <glibmm/propertyproxy.h> #include <glibmm/ustring.h> +#include <gtk/gtk.h> #include <gtkmm/alignment.h> #include <gtkmm/bin.h> #include <gtkmm/box.h> diff --git a/src/gui/ThreadedLoader.hpp b/src/gui/ThreadedLoader.hpp index 148124fc..27ba7c8c 100644 --- a/src/gui/ThreadedLoader.hpp +++ b/src/gui/ThreadedLoader.hpp @@ -50,7 +50,7 @@ class App; /** Thread for loading graph files. * - * This is a seperate thread so it can send all the loading message without + * This is a separate thread so it can send all the loading message without * blocking everything else, so the app can respond to the incoming events * caused as a result of the graph loading, while the graph loads. * diff --git a/src/gui/WindowFactory.cpp b/src/gui/WindowFactory.cpp index daaadfd3..78acf4fb 100644 --- a/src/gui/WindowFactory.cpp +++ b/src/gui/WindowFactory.cpp @@ -224,7 +224,7 @@ WindowFactory::present_load_plugin( int width = 0; int height = 0; w->second->get_size(width, height); - _load_plugin_win->set_default_size(width - width / 8, height / 2); + _load_plugin_win->set_default_size(width - (width / 8), height / 2); } _load_plugin_win->set_title( std::string("Load Plugin - ") + graph->path() + " - Ingen"); diff --git a/src/gui/ingen_gui.cpp b/src/gui/ingen_gui.cpp index 133286f6..7fba2d50 100644 --- a/src/gui/ingen_gui.cpp +++ b/src/gui/ingen_gui.cpp @@ -28,6 +28,7 @@ #include <glibmm/thread.h> #include <memory> +#include <string> namespace ingen::gui { diff --git a/src/gui/meson.build b/src/gui/meson.build index 3b9a7bb6..810c7829 100644 --- a/src/gui/meson.build +++ b/src/gui/meson.build @@ -30,7 +30,7 @@ gtkmm_dep = dependency( ganv_dep = dependency( 'ganv-1', - fallback: ['ganv', 'ganv_dep'], + include_type: 'system', required: get_option('gui'), version: '>= 1.5.2', ) diff --git a/src/gui/rgba.hpp b/src/gui/rgba.hpp index bb53205e..e01a069d 100644 --- a/src/gui/rgba.hpp +++ b/src/gui/rgba.hpp @@ -34,7 +34,7 @@ rgba_to_uint(uint8_t r, uint8_t g, uint8_t b, uint8_t a) inline uint8_t mono_interpolate(uint8_t v1, uint8_t v2, float f) { - return static_cast<uint8_t>(rintf((v2) * (f) + (v1) * (1 - (f)))); + return static_cast<uint8_t>(rintf((v2 * f) + (v1 * (1.0f - f)))); } #define RGBA_R(x) (static_cast<uint32_t>(x) >> 24) |