@@ -53,7 +53,7 @@ endif | |||||
BASE_FLAGS = -Wall -Wextra -pipe -DREAL_BUILD | BASE_FLAGS = -Wall -Wextra -pipe -DREAL_BUILD | ||||
BASE_OPTS = -O2 -ffast-math -mtune=generic -msse -msse2 -mfpmath=sse -fdata-sections -ffunction-sections | BASE_OPTS = -O2 -ffast-math -mtune=generic -msse -msse2 -mfpmath=sse -fdata-sections -ffunction-sections | ||||
LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections | LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections | ||||
# -Wl,--strip-all | |||||
# LINK_OPTS += -Wl,--strip-all | |||||
ifeq ($(MACOS),true) | ifeq ($(MACOS),true) | ||||
# MacOS linker flags | # MacOS linker flags | ||||
@@ -24,14 +24,6 @@ CARLA_BRIDGE_START_NAMESPACE | |||||
// ------------------------------------------------------------------------- | // ------------------------------------------------------------------------- | ||||
#if defined(BRIDGE_GTK2) | |||||
static const char* const appName = "Carla-Gtk2UIs"; | |||||
#elif defined(BRIDGE_GTK3) | |||||
static const char* const appName = "Carla-Gtk3UIs"; | |||||
#else | |||||
static const char* const appName = "Carla-UIs"; | |||||
#endif | |||||
static int gargc = 0; | static int gargc = 0; | ||||
static char** gargv = nullptr; | static char** gargv = nullptr; | ||||
@@ -83,39 +75,6 @@ public: | |||||
gtk_window_set_resizable(GTK_WINDOW(fWindow), kClient->isResizable()); | gtk_window_set_resizable(GTK_WINDOW(fWindow), kClient->isResizable()); | ||||
gtk_window_set_title(GTK_WINDOW(fWindow), kWindowTitle); | gtk_window_set_title(GTK_WINDOW(fWindow), kWindowTitle); | ||||
#if 0 | |||||
{ | |||||
QSettings settings("falkTX", appName); | |||||
if (settings.contains(QString("%1/pos_x").arg(kWindowTitle))) | |||||
{ | |||||
gtk_window_get_position(GTK_WINDOW(fWindow), &fLastX, &fLastY); | |||||
bool hasX, hasY; | |||||
fLastX = settings.value(QString("%1/pos_x").arg(kWindowTitle), fLastX).toInt(&hasX); | |||||
fLastY = settings.value(QString("%1/pos_y").arg(kWindowTitle), fLastY).toInt(&hasY); | |||||
if (hasX && hasY) | |||||
gtk_window_move(GTK_WINDOW(fWindow), fLastX, fLastY); | |||||
if (kClient->isResizable()) | |||||
{ | |||||
gtk_window_get_size(GTK_WINDOW(fWindow), &fLastWidth, &fLastHeight); | |||||
bool hasWidth, hasHeight; | |||||
fLastWidth = settings.value(QString("%1/width").arg(kWindowTitle), fLastWidth).toInt(&hasWidth); | |||||
fLastHeight = settings.value(QString("%1/height").arg(kWindowTitle), fLastHeight).toInt(&hasHeight); | |||||
if (hasWidth && hasHeight) | |||||
gtk_window_resize(GTK_WINDOW(fWindow), fLastWidth, fLastHeight); | |||||
} | |||||
} | |||||
if (settings.value("Engine/UIsAlwaysOnTop", true).toBool()) | |||||
gtk_window_set_keep_above(GTK_WINDOW(fWindow), true); | |||||
} | |||||
#endif | |||||
if (showUI || fNeedsShow) | if (showUI || fNeedsShow) | ||||
{ | { | ||||
show(); | show(); | ||||
@@ -191,14 +150,6 @@ protected: | |||||
carla_debug("CarlaBridgeToolkitGtk::handleDestroy()"); | carla_debug("CarlaBridgeToolkitGtk::handleDestroy()"); | ||||
fWindow = nullptr; | fWindow = nullptr; | ||||
#if 0 | |||||
QSettings settings("falkTX", appName); | |||||
settings.setValue(QString("%1/pos_x").arg(kWindowTitle), fLastX); | |||||
settings.setValue(QString("%1/pos_y").arg(kWindowTitle), fLastY); | |||||
settings.setValue(QString("%1/width").arg(kWindowTitle), fLastWidth); | |||||
settings.setValue(QString("%1/height").arg(kWindowTitle), fLastHeight); | |||||
#endif | |||||
} | } | ||||
gboolean handleTimeout() | gboolean handleTimeout() | ||||
@@ -19,7 +19,6 @@ | |||||
#include "CarlaBridgeToolkit.hpp" | #include "CarlaBridgeToolkit.hpp" | ||||
#include "CarlaStyle.hpp" | #include "CarlaStyle.hpp" | ||||
#include <QtCore/QSettings> // FIXME | |||||
#include <QtCore/QThread> | #include <QtCore/QThread> | ||||
#include <QtCore/QTimerEvent> | #include <QtCore/QTimerEvent> | ||||
@@ -35,14 +34,6 @@ CARLA_BRIDGE_START_NAMESPACE | |||||
// ------------------------------------------------------------------------- | // ------------------------------------------------------------------------- | ||||
#if defined(BRIDGE_QT4) | |||||
static const char* const appName = "Carla-Qt4UIs"; | |||||
#elif defined(BRIDGE_QT5) | |||||
static const char* const appName = "Carla-Qt5UIs"; | |||||
#else | |||||
static const char* const appName = "Carla-UIs"; | |||||
#endif | |||||
static int qargc = 0; | static int qargc = 0; | ||||
static char* qargv[0] = {}; | static char* qargv[0] = {}; | ||||
@@ -84,24 +75,6 @@ public: | |||||
fApp = new QApplication(qargc, qargv); | fApp = new QApplication(qargc, qargv); | ||||
{ | |||||
QSettings settings("falkTX", "Carla"); | |||||
if (settings.value("Main/UseProTheme", true).toBool()) | |||||
{ | |||||
CarlaStyle* const style(new CarlaStyle()); | |||||
fApp->setStyle(style); | |||||
//style->ready(fApp); | |||||
// QString color(settings.value("Main/ProThemeColor", "Black").toString()); | |||||
// | |||||
// if (color == "System") | |||||
// pass(); //style->setColorScheme(CarlaStyle::COLOR_SYSTEM); | |||||
// else | |||||
// style->setColorScheme(CarlaStyle::COLOR_BLACK); | |||||
} | |||||
} | |||||
fWindow = new QMainWindow(nullptr); | fWindow = new QMainWindow(nullptr); | ||||
fWindow->resize(30, 30); | fWindow->resize(30, 30); | ||||
fWindow->hide(); | fWindow->hide(); | ||||
@@ -114,7 +87,6 @@ public: | |||||
CARLA_ASSERT(fWindow != nullptr); | CARLA_ASSERT(fWindow != nullptr); | ||||
carla_debug("CarlaBridgeToolkitQt::exec(%s)", bool2str(showUI)); | carla_debug("CarlaBridgeToolkitQt::exec(%s)", bool2str(showUI)); | ||||
#if defined(BRIDGE_QT4) || defined(BRIDGE_QT5) | |||||
QWidget* const widget((QWidget*)kClient->getWidget()); | QWidget* const widget((QWidget*)kClient->getWidget()); | ||||
fWindow->setCentralWidget(widget); | fWindow->setCentralWidget(widget); | ||||
@@ -122,7 +94,6 @@ public: | |||||
widget->setParent(fWindow); | widget->setParent(fWindow); | ||||
widget->show(); | widget->show(); | ||||
#endif | |||||
if (! kClient->isResizable()) | if (! kClient->isResizable()) | ||||
{ | { | ||||
@@ -133,34 +104,7 @@ public: | |||||
} | } | ||||
fWindow->setWindowIcon(QIcon::fromTheme("carla", QIcon(":/scalable/carla.svg"))); | fWindow->setWindowIcon(QIcon::fromTheme("carla", QIcon(":/scalable/carla.svg"))); | ||||
fWindow->setWindowTitle(kWindowTitle); | |||||
{ | |||||
QSettings settings("falkTX", appName); | |||||
if (settings.contains(QString("%1/pos_x").arg(kWindowTitle))) | |||||
{ | |||||
bool hasX, hasY; | |||||
const int posX(settings.value(QString("%1/pos_x").arg(kWindowTitle), fWindow->x()).toInt(&hasX)); | |||||
const int posY(settings.value(QString("%1/pos_y").arg(kWindowTitle), fWindow->y()).toInt(&hasY)); | |||||
if (hasX && hasY) | |||||
fWindow->move(posX, posY); | |||||
if (kClient->isResizable()) | |||||
{ | |||||
bool hasWidth, hasHeight; | |||||
const int width(settings.value(QString("%1/width").arg(kWindowTitle), fWindow->width()).toInt(&hasWidth)); | |||||
const int height(settings.value(QString("%1/height").arg(kWindowTitle), fWindow->height()).toInt(&hasHeight)); | |||||
if (hasWidth && hasHeight) | |||||
fWindow->resize(width, height); | |||||
} | |||||
} | |||||
if (settings.value("Engine/UIsAlwaysOnTop", true).toBool()) | |||||
fWindow->setWindowFlags(fWindow->windowFlags() | Qt::WindowStaysOnTopHint); | |||||
} | |||||
fWindow->setWindowTitle(kWindowTitle.buffer()); | |||||
if (showUI || fNeedsShow) | if (showUI || fNeedsShow) | ||||
{ | { | ||||
@@ -192,13 +136,6 @@ public: | |||||
if (fWindow != nullptr) | if (fWindow != nullptr) | ||||
{ | { | ||||
QSettings settings("falkTX", appName); | |||||
settings.setValue(QString("%1/pos_x").arg(kWindowTitle), fWindow->x()); | |||||
settings.setValue(QString("%1/pos_y").arg(kWindowTitle), fWindow->y()); | |||||
settings.setValue(QString("%1/width").arg(kWindowTitle), fWindow->width()); | |||||
settings.setValue(QString("%1/height").arg(kWindowTitle), fWindow->height()); | |||||
settings.sync(); | |||||
fWindow->close(); | fWindow->close(); | ||||
delete fWindow; | delete fWindow; | ||||
@@ -51,19 +51,19 @@ LINK_VST_X11_FLAGS = $(LINK_FLAGS) $(X11_LIBS) -ldl | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
ifeq ($(HAVE_GTK2),true) | ifeq ($(HAVE_GTK2),true) | ||||
# TARGETS += ui_lv2-gtk2 | |||||
TARGETS += ui_lv2-gtk2 | |||||
endif | endif | ||||
ifeq ($(HAVE_GTK3),true) | ifeq ($(HAVE_GTK3),true) | ||||
# TARGETS += ui_lv2-gtk3 | |||||
TARGETS += ui_lv2-gtk3 | |||||
endif | endif | ||||
ifeq ($(HAVE_QT4),true) | ifeq ($(HAVE_QT4),true) | ||||
# TARGETS += ui_lv2-qt4 | |||||
TARGETS += ui_lv2-qt4 | |||||
endif | endif | ||||
ifeq ($(HAVE_QT5),true) | ifeq ($(HAVE_QT5),true) | ||||
# TARGETS += ui_lv2-qt5 | |||||
TARGETS += ui_lv2-qt5 | |||||
endif | endif | ||||
ifeq ($(HAVE_X11),true) | ifeq ($(HAVE_X11),true) | ||||