diff --git a/data/meson.build b/data/meson.build index 08870b259..72b739405 100644 --- a/data/meson.build +++ b/data/meson.build @@ -26,7 +26,7 @@ gschema = configure_file ( install_dir: schemasdir) # install fonts if needed -if get_option('install_dseg_font') +if get_option('with-dseg-font') install_subdir ( join_paths ('fonts', 'DSEG14-Classic-MINI'), install_dir: fontsdir) diff --git a/data/theme.css b/data/theme.css index 5fb87fde5..86da5b6e3 100644 --- a/data/theme.css +++ b/data/theme.css @@ -515,3 +515,8 @@ textview { { padding: 0px; } + +.inspector_label +{ + font-size: small; +} diff --git a/doc/dev/meson.build b/doc/dev/meson.build index 715a2a7c8..9ce4f85ca 100644 --- a/doc/dev/meson.build +++ b/doc/dev/meson.build @@ -49,24 +49,15 @@ if dot_bin.found() doxyfile_mcss, ], install: false, - build_by_default: get_option ('gen_dev_docs'), + build_by_default: false, ) run_target ( - 'gen_dev_docs', + 'gen-dev-docs', command: [ 'echo', 'Developer Docs generated', ], depends: html_dev_target, ) - - run_target ( - 'clean_dev_docs', - command: [ - 'rm', - '-rf', - 'html', - ], - ) endif diff --git a/doc/man/meson.build b/doc/man/meson.build index f68c5fba4..04592f8d1 100644 --- a/doc/man/meson.build +++ b/doc/man/meson.build @@ -35,17 +35,17 @@ manpage = custom_target ( '--version-string=Zrythm ' + meson.project_version (), zrythm_exe, ], - install: get_option ('manpage'), + install: get_option ('with-manpage'), install_dir: mandir, - build_by_default: get_option ('manpage'), + build_by_default: get_option ('with-manpage'), ) run_target ( -'build_manpage', -command: [ - 'echo', - 'Manpage built', - ], -depends: manpage, -) + 'build-manpage', + command: [ + 'echo', + 'Manpage built', + ], + depends: manpage, + ) endif diff --git a/doc/user/meson.build b/doc/user/meson.build index 8ee32ca2c..662f49f60 100644 --- a/doc/user/meson.build +++ b/doc/user/meson.build @@ -37,9 +37,9 @@ foreach lang : locales ], output: lang, command: command, - install: get_option ('user_manual'), + install: get_option ('with-user-manual'), install_dir: docdir, - build_by_default: get_option ('user_manual'), + build_by_default: get_option ('with-user-manual'), ) endif endforeach @@ -47,7 +47,7 @@ endforeach # generate guile docs guile_docs = [] -if guile_dep.found () and get_option ('guile_snarf_docs_path') != '' +if guile_dep.found () and get_option ('guile-snarf-docs-path') != '' foreach snarfable_src : guile_snarfable_srcs split_by_dot = snarfable_src.split('.') without_ext = '' @@ -72,7 +72,7 @@ if guile_dep.found () and get_option ('guile_snarf_docs_path') != '' ], command: [ '@INPUT1@', - get_option ('guile_snarf_docs_path'), + get_option ('guile-snarf-docs-path'), guile_dep.name(), '@INPUT0@', meson.build_root () / '@OUTPUT@', meson.build_root () / '@PRIVATE_DIR@', diff --git a/inc/gui/widgets/inspector_plugin.h b/inc/gui/widgets/inspector_plugin.h index 5c4e38ed3..a28da6e69 100644 --- a/inc/gui/widgets/inspector_plugin.h +++ b/inc/gui/widgets/inspector_plugin.h @@ -47,12 +47,16 @@ G_DECLARE_FINAL_TYPE ( typedef struct _PortsExpanderWidget PortsExpanderWidget; +typedef struct _PluginPropertiesExpanderWidget + PluginPropertiesExpanderWidget; typedef struct _ColorAreaWidget ColorAreaWidget; typedef struct MixerSelections MixerSelections; typedef struct _InspectorPluginWidget { GtkBox parent_instance; + + PluginPropertiesExpanderWidget * properties; PortsExpanderWidget * ctrl_ins; PortsExpanderWidget * ctrl_outs; PortsExpanderWidget * audio_ins; diff --git a/inc/gui/widgets/plugin_properties_expander.h b/inc/gui/widgets/plugin_properties_expander.h new file mode 100644 index 000000000..ea1b3f5e8 --- /dev/null +++ b/inc/gui/widgets/plugin_properties_expander.h @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2020 Alexandros Theodotou + * + * This file is part of Zrythm + * + * Zrythm is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Zrythm is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Zrythm. If not, see . + */ + +/** + * \file + * + * PluginProperties expander widget. + */ + +#ifndef __GUI_WIDGETS_PLUGIN_PROPERTIES_EXPANDER_H__ +#define __GUI_WIDGETS_PLUGIN_PROPERTIES_EXPANDER_H__ + +#include "audio/port.h" +#include "gui/widgets/two_col_expander_box.h" + +#include + +typedef struct _EditableLabelWidget + EditableLabelWidget; +typedef struct _PluginPresetSelectorWidget + PluginPresetSelectorWidget; +typedef struct Track Track; +typedef struct Plugin Plugin; + +#define PLUGIN_PROPERTIES_EXPANDER_WIDGET_TYPE \ + (plugin_properties_expander_widget_get_type ()) +G_DECLARE_FINAL_TYPE ( + PluginPropertiesExpanderWidget, + plugin_properties_expander_widget, + Z, PLUGIN_PROPERTIES_EXPANDER_WIDGET, + TwoColExpanderBoxWidget); + +/** + * @addtogroup widgets + * + * @{ + */ + +/** + * A widget for selecting plugin_properties in the plugin + * inspector. + */ +typedef struct _PluginPropertiesExpanderWidget +{ + TwoColExpanderBoxWidget parent_instance; + + /** Plugin name. */ + GtkLabel * name; + + /** Plugin class. */ + GtkLabel * type; + + PluginPresetSelectorWidget * pset_selector; + + /** Owner plugin. */ + Plugin * plugin; +} PluginPropertiesExpanderWidget; + +/** + * Refreshes each field. + */ +void +plugin_properties_expander_widget_refresh ( + PluginPropertiesExpanderWidget * self, + Plugin * pl); + +/** + * Sets up the PluginPropertiesExpanderWidget for a Plugin. + */ +void +plugin_properties_expander_widget_setup ( + PluginPropertiesExpanderWidget * self, + Plugin * pl); + +/** + * @} + */ + +#endif diff --git a/inc/plugins/plugin.h b/inc/plugins/plugin.h index d29e229cf..bc610d1f2 100644 --- a/inc/plugins/plugin.h +++ b/inc/plugins/plugin.h @@ -86,20 +86,24 @@ typedef struct Plugin Port * enabled; /** Whether plugin UI is opened or not. */ - int visible; + bool visible; + + /** Selected preset. */ + int selected_preset_id; + char * selected_preset; /** The latency in samples. */ nframes_t latency; /** - * UI has been instantiated or not. + * Whether the UI has finished instantiating. * * When instantiating a plugin UI, if it takes * too long there is a UI buffer overflow because * UI updates are sent in lv2_plugin_process. * - * This should be set to 0 until the plugin UI - * has finished instantiating, and if this is 0 + * This should be set to false until the plugin UI + * has finished instantiating, and if this is false * then no UI updates should be sent to the * plugin. */ @@ -109,8 +113,9 @@ typedef struct Plugin * per second). */ float ui_update_hz; - /** Plugin is in deletion. */ - int deleting; + /** Whether the plugin is currently being + * deleted. */ + bool deleting; /** Active preset item, if wrapped or generic * UI. */ @@ -144,20 +149,6 @@ typedef struct Plugin * deactivate before freeing the plugin. */ gulong delete_event_id; -#ifdef _WOE32 - /** A black decoration-less window that follows - * the wrapped plugin's window on Windows. */ - GtkWindow * black_window; - - /** - * Set to 1 to avoid recursive signals - * being fired. - * - * See plugin_gtk.c - */ - int black_window_shown_manually; -#endif - int magic; } Plugin; diff --git a/inc/plugins/plugin_gtk.h b/inc/plugins/plugin_gtk.h index aa80f838c..5fbde77bc 100644 --- a/inc/plugins/plugin_gtk.h +++ b/inc/plugins/plugin_gtk.h @@ -116,6 +116,8 @@ plugin_gtk_rebuild_preset_menu ( /** * Creates a label for a control. * + * TODO move to ui. + * * @param title Whether this is a title text (makes * it bold). * @param preformatted Whether the text is @@ -124,8 +126,8 @@ plugin_gtk_rebuild_preset_menu ( GtkWidget* plugin_gtk_new_label ( const char * text, - int title, - int preformatted, + bool title, + bool preformatted, float xalign, float yalign); diff --git a/meson.build b/meson.build index be0f03e1a..43d1be0eb 100644 --- a/meson.build +++ b/meson.build @@ -19,7 +19,7 @@ project ( 'zrythm', ['c', 'cpp'], version: '0.8.378', license: 'AGPL-3-or-later', - meson_version: '>= 0.50.0', + meson_version: '>= 0.53.0', default_options: [ 'warning_level=2', 'buildtype=debug', @@ -45,7 +45,7 @@ samplesdir = join_paths (zrythmdatadir, 'samples') docdir = join_paths (datadir, 'doc', 'zrythm') sourceviewstylesdir = join_paths (zrythmdatadir, 'sourceview-styles') -# Used for building manpages, manual, etc., using +# Used for building with-manpages, manual, etc., using # foreach locales = [ 'en', 'en_GB', 'gl', 'de', 'fr', 'it', @@ -94,13 +94,13 @@ cdata.set_quoted ('CONFIGURE_LIBDIR', libdir) cdata.set_quoted ('CONFIGURE_BINDIR', bindir) cdata.set_quoted ('LIB_SUFFIX', lib_suffix) cdata.set_quoted ('BIN_SUFFIX', bin_suffix) -if get_option ('trial_ver') +if get_option ('trial-ver') cdata.set('TRIAL_VER', 1) endif -if get_option ('windows_release') +if get_option ('windows-release') cdata.set ('WINDOWS_RELEASE', 1) endif -if get_option ('mac_release') +if get_option ('mac-release') cdata.set ('MAC_RELEASE', 1) endif cdata.set ( @@ -115,7 +115,7 @@ cdata.set_quoted ( cdata.set_quoted ( 'NEW_ISSUE_URL', 'https://redmine.zrythm.org/projects/zrythm/issues/new') -if (get_option ('user_manual')) +if (get_option ('with-user-manual')) cdata.set_quoted ('MANUAL_PATH', docdir) endif @@ -170,10 +170,10 @@ cdata.set_quoted('OPEN_DIR_CMD', open_dir_cmd) sphinx_build = find_program ( ['sphinx-build', 'sphinx-build-3'], - required: get_option ('user_manual')) + required: get_option ('with-user-manual')) help2man = find_program ( ['help2man'], - required: get_option ('manpage')) + required: get_option ('with-manpage')) stoat = find_program ( ['stoat'], required: false) python3 = find_program ( @@ -259,7 +259,7 @@ if (get_option ('buildtype') == 'release') #cdata.set('G_DISABLE_CHECKS', 1) endif -if get_option ('enable_profiling') +if get_option ('enable-profiling') test_cflags += [ '-g', '-pg', 'no-pie' ] endif @@ -347,7 +347,7 @@ if cc.get_id() == 'gcc' endif strict_cflags = [] -if get_option ('strict_flags') +if get_option ('strict-flags') strict_cflags = cc.get_supported_arguments ( test_strict_cflags) endif @@ -361,7 +361,7 @@ endif test_ldflags = [] -if get_option ('enable_profiling') +if get_option ('enable-profiling') test_ldflags += [ '-g', '-pg', 'no-pie' ] endif @@ -450,6 +450,7 @@ libgvc_dep = dependency ( 'libgvc', required: get_option ('graphviz')) if libcgraph_dep.found () and libgvc_dep.found () + have_graphviz = true cdata.set('HAVE_CGRAPH', 1) endif @@ -698,21 +699,19 @@ meson.add_install_script ( meson.add_dist_script ( 'scripts' / 'meson_dist.sh') -if meson.version().version_compare('>=0.53') -summary({ +summary ({ 'Build type': get_option('buildtype'), - 'Profiling': get_option('enable_profiling'), - 'Strict flags': get_option('strict_flags'), - 'Build tests': get_option('enable_tests'), - 'Build GUI tests': get_option('enable_gui_tests'), - 'Generate developer docs': get_option('gen_dev_docs'), - 'Build/install manpage': get_option('manpage'), - 'Build/install user manual': get_option('user_manual'), - 'Install DSEG font': get_option('install_dseg_font'), + 'Profiling': get_option('enable-profiling'), + 'Strict flags': get_option('strict-flags'), + 'Build tests': get_option('enable-tests'), + 'Build GUI tests': get_option('enable-gui-tests'), + 'Build/install manpage': get_option('with-manpage'), + 'Build/install user manual': get_option('with-user-manual'), + 'Install DSEG font': get_option('with-dseg-font'), 'Coverage reports': get_option('b_coverage'), }, section: 'General') -summary({ +summary ({ 'FFmpeg': libavcodec_dep.found () and libavformat_dep.found () and libavutil_dep.found (), 'Jack': have_jack, 'PortAudio': portaudio_dep.found (), @@ -722,13 +721,13 @@ summary({ 'Carla': carla_native_plugin_dep.found () and carla_standalone_dep.found () and carla_utils_dep.found (), 'Gtop': libgtop_dep.found(), 'Guile': have_guile, - }, section: 'Optional libraries') + 'GraphViz': have_graphviz, + }, section: 'Features') -summary({ +summary ({ 'prefix': prefix, 'includedir': includedir, 'libdir': libdir, 'datadir': datadir, 'sysconfdir': sysconfdir, }, section: 'Directories') -endif diff --git a/meson_options.txt b/meson_options.txt index 227d4bebe..abd11825f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -16,19 +16,19 @@ # along with Zrythm. If not, see . option ( - 'enable_profiling', + 'enable-profiling', type: 'boolean', value: false, description: 'Enable profiling with gprof') option ( - 'enable_tests', + 'enable-tests', type: 'boolean', value: false, description: 'Whether to compile unit tests') option ( - 'enable_gui_tests', + 'enable-gui-tests', type: 'boolean', value: false, description: 'Whether to compile GUI unit tests') @@ -88,31 +88,25 @@ option ( description: 'Build with libguile support for scripting') option ( - 'gen_dev_docs', - type: 'boolean', - value: false, - description: 'Generate HTML developer docs') - -option ( - 'manpage', + 'with-manpage', type: 'boolean', value: false, description: 'Build and install manpage') option ( - 'user_manual', + 'with-user-manual', type: 'boolean', value: false, description: 'Build and install user manual') option ( - 'strict_flags', + 'strict-flags', type: 'boolean', value: false, description: 'Compile and link with strict flags (-Werror)') option ( - 'install_dseg_font', + 'with-dseg-font', type: 'boolean', value: true, description: '''Install the DSEG14 font used by the @@ -120,25 +114,25 @@ transport meters. Packagers should turn this off and set the font as a dependency instead''') option ( - 'windows_release', + 'windows-release', type: 'boolean', value: false, - description: 'Turn this on when creating the installer') + description: 'This is only used when making the installers') option ( - 'mac_release', + 'mac-release', type: 'boolean', value: false, - description: 'Turn this on when creating the installer') + description: 'This is only used when making the installers') option ( - 'trial_ver', + 'trial-ver', type: 'boolean', value: false, description: 'Whether this is a trial version with limited functionality') option ( - 'guile_snarf_docs_path', + 'guile-snarf-docs-path', type: 'string', value: '', description: '''Path to guile-snarf-docs (used diff --git a/resources/ui/inspector_plugin.ui b/resources/ui/inspector_plugin.ui index 2650a034f..db85df03c 100644 --- a/resources/ui/inspector_plugin.ui +++ b/resources/ui/inspector_plugin.ui @@ -34,6 +34,13 @@ 1 + + + True + False + + diff --git a/scripts/meson.build b/scripts/meson.build index c5b01b6d9..c27765975 100644 --- a/scripts/meson.build +++ b/scripts/meson.build @@ -36,10 +36,10 @@ if guile_snarf.found() scripts_conf += { 'GUILE_SNARF': guile_snarf.path() } endif -if get_option('guile_snarf_docs_path') != '' +if get_option('guile-snarf-docs-path') != '' scripts_conf += { 'GUILE_SNARF_DOCS_BIN': get_option ( - 'guile_snarf_docs_path'), + 'guile-snarf-docs-path'), 'GUILD_BIN': guild.path() } endif diff --git a/src/gui/widgets/inspector_plugin.c b/src/gui/widgets/inspector_plugin.c index 744d9a5ed..45b11788a 100644 --- a/src/gui/widgets/inspector_plugin.c +++ b/src/gui/widgets/inspector_plugin.c @@ -23,6 +23,7 @@ #include "gui/widgets/inspector_plugin.h" #include "gui/widgets/left_dock_edge.h" #include "gui/widgets/main_window.h" +#include "gui/widgets/plugin_properties_expander.h" #include "gui/widgets/ports_expander.h" #include "plugins/plugin.h" #include "utils/gtk.h" @@ -104,6 +105,9 @@ inspector_plugin_widget_show ( ports_expander_widget_setup_plugin ( self->cv_outs, FLOW_OUTPUT, TYPE_CV, pl); + + plugin_properties_expander_widget_refresh ( + self->properties, pl); } InspectorPluginWidget * @@ -113,6 +117,9 @@ inspector_plugin_widget_new (void) g_object_new ( INSPECTOR_PLUGIN_WIDGET_TYPE, NULL); + plugin_properties_expander_widget_setup ( + self->properties, NULL); + return self; } @@ -131,6 +138,8 @@ inspector_plugin_widget_class_init ( InspectorPluginWidget, \ child); + BIND_CHILD (color); + BIND_CHILD (properties); BIND_CHILD (ctrl_ins); BIND_CHILD (ctrl_outs); BIND_CHILD (audio_ins); @@ -139,7 +148,6 @@ inspector_plugin_widget_class_init ( BIND_CHILD (midi_outs); BIND_CHILD (cv_ins); BIND_CHILD (cv_outs); - BIND_CHILD (color); #undef BIND_CHILD } @@ -148,6 +156,8 @@ static void inspector_plugin_widget_init ( InspectorPluginWidget * self) { + g_type_ensure ( + PLUGIN_PROPERTIES_EXPANDER_WIDGET_TYPE); g_type_ensure (PORTS_EXPANDER_WIDGET_TYPE); gtk_widget_init_template (GTK_WIDGET (self)); diff --git a/src/gui/widgets/meson.build b/src/gui/widgets/meson.build index e05fdcaaf..c95cf3995 100644 --- a/src/gui/widgets/meson.build +++ b/src/gui/widgets/meson.build @@ -101,6 +101,7 @@ widget_srcs = files([ 'panel_file_browser.c', 'piano_roll_keys.c', 'plugin_browser.c', + 'plugin_properties_expander.c', 'plugin_strip_expander.c', 'port_connection_row.c', 'port_connections_popover.c', diff --git a/src/gui/widgets/plugin_properties_expander.c b/src/gui/widgets/plugin_properties_expander.c new file mode 100644 index 000000000..6290c50cb --- /dev/null +++ b/src/gui/widgets/plugin_properties_expander.c @@ -0,0 +1,143 @@ +/* + * Copyright (C) 2020 Alexandros Theodotou + * + * This file is part of Zrythm + * + * Zrythm is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Zrythm is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Zrythm. If not, see . + */ + +#include "audio/engine.h" +#include "audio/mixer.h" +#include "audio/port.h" +#include "audio/track.h" +#include "gui/widgets/editable_label.h" +#include "gui/widgets/inspector_port.h" +#include "gui/widgets/plugin_properties_expander.h" +#include "plugins/plugin.h" +#include "plugins/plugin_gtk.h" +#include "project.h" +#include "utils/gtk.h" + +#include + +G_DEFINE_TYPE ( + PluginPropertiesExpanderWidget, + plugin_properties_expander_widget, + TWO_COL_EXPANDER_BOX_WIDGET_TYPE) + +/** + * Refreshes each field. + */ +void +plugin_properties_expander_widget_refresh ( + PluginPropertiesExpanderWidget * self, + Plugin * pl) +{ + if (pl) + { + gtk_label_set_text ( + self->name, pl->descr->name); + gtk_label_set_text ( + self->type, pl->descr->category_str); + } + else + { + gtk_label_set_text ( + self->name, _("None")); + gtk_label_set_text ( + self->type, _("None")); + } +} + +/** + * Sets up the PluginPropertiesExpanderWidget for a Plugin. + */ +void +plugin_properties_expander_widget_setup ( + PluginPropertiesExpanderWidget * self, + Plugin * pl) +{ + self->plugin = pl; + + /* set name and icon */ + expander_box_widget_set_label ( + Z_EXPANDER_BOX_WIDGET (self), + _("Plugin Properties")); + + GtkWidget * lbl; + +#define CREATE_LABEL(x) \ + lbl = \ + plugin_gtk_new_label ( \ + x, true, false, 0.f, 0.5f); \ + z_gtk_widget_add_style_class ( \ + lbl, "inspector_label"); \ + gtk_widget_set_margin_start (lbl, 2); \ + gtk_widget_set_visible (lbl, 1) + + CREATE_LABEL (_("Name")); + gtk_widget_set_visible (lbl, TRUE); + two_col_expander_box_widget_add_single ( + Z_TWO_COL_EXPANDER_BOX_WIDGET (self), lbl); + self->name = + GTK_LABEL (gtk_label_new ("dist")); + gtk_widget_set_visible ( + GTK_WIDGET (self->name), TRUE); + gtk_label_set_xalign ( + self->name, 0); + gtk_widget_set_margin_start ( + GTK_WIDGET (self->name), 4); + two_col_expander_box_widget_add_single ( + Z_TWO_COL_EXPANDER_BOX_WIDGET (self), + GTK_WIDGET (self->name)); + + CREATE_LABEL (_("Type")); + gtk_widget_set_visible (lbl, TRUE); + two_col_expander_box_widget_add_single ( + Z_TWO_COL_EXPANDER_BOX_WIDGET (self), lbl); + self->type = + GTK_LABEL (gtk_label_new ("Instrument")); + gtk_widget_set_visible ( + GTK_WIDGET (self->type), TRUE); + gtk_label_set_xalign ( + self->type, 0); + gtk_widget_set_margin_start ( + GTK_WIDGET (self->type), 4); + two_col_expander_box_widget_add_single ( + Z_TWO_COL_EXPANDER_BOX_WIDGET (self), + GTK_WIDGET (self->type)); + + CREATE_LABEL (_("Preset")); + gtk_widget_set_visible (lbl, TRUE); + two_col_expander_box_widget_add_single ( + Z_TWO_COL_EXPANDER_BOX_WIDGET (self), lbl); + + plugin_properties_expander_widget_refresh ( + self, pl); +} + +static void +plugin_properties_expander_widget_class_init ( + PluginPropertiesExpanderWidgetClass * klass) +{ +} + +static void +plugin_properties_expander_widget_init ( + PluginPropertiesExpanderWidget * self) +{ + /*two_col_expander_box_widget_add_single (*/ + /*Z_TWO_COL_EXPANDER_BOX_WIDGET (self),*/ + /*GTK_WIDGET (self->name));*/ +} diff --git a/src/gui/widgets/ports_expander.c b/src/gui/widgets/ports_expander.c index 34a2a185e..ace7c8b84 100644 --- a/src/gui/widgets/ports_expander.c +++ b/src/gui/widgets/ports_expander.c @@ -495,4 +495,3 @@ ports_expander_widget_init ( /*Z_TWO_COL_EXPANDER_BOX_WIDGET (self),*/ /*GTK_WIDGET (self->name));*/ } - diff --git a/src/gui/widgets/track_properties_expander.c b/src/gui/widgets/track_properties_expander.c index 6e38f4a04..d968d67e1 100644 --- a/src/gui/widgets/track_properties_expander.c +++ b/src/gui/widgets/track_properties_expander.c @@ -24,7 +24,9 @@ #include "gui/widgets/editable_label.h" #include "gui/widgets/route_target_selector.h" #include "gui/widgets/track_properties_expander.h" +#include "plugins/plugin_gtk.h" #include "project.h" +#include "utils/gtk.h" #include "utils/string.h" #include @@ -87,24 +89,16 @@ track_properties_expander_widget_setup ( g_warn_if_fail (track); self->track = track; - char * str; GtkWidget * lbl; #define CREATE_LABEL(x) \ - lbl = gtk_label_new (NULL); \ - gtk_label_set_xalign ( \ - GTK_LABEL (lbl), 0); \ - gtk_widget_set_margin_start ( \ - lbl, 2); \ - str = \ - g_strdup_printf ( \ - "%s%s%s", \ - "", \ - x, ""); \ - gtk_widget_set_visible (lbl, 1); \ - gtk_label_set_markup ( \ - GTK_LABEL (lbl), str); \ - g_free (str) + lbl = \ + plugin_gtk_new_label ( \ + x, true, false, 0.f, 0.5f); \ + z_gtk_widget_add_style_class ( \ + lbl, "inspector_label"); \ + gtk_widget_set_margin_start (lbl, 2); \ + gtk_widget_set_visible (lbl, 1) /* add track name */ self->name = diff --git a/src/plugins/cached_vst_descriptors.c b/src/plugins/cached_vst_descriptors.c index 850e3d1db..644bc5de7 100644 --- a/src/plugins/cached_vst_descriptors.c +++ b/src/plugins/cached_vst_descriptors.c @@ -27,7 +27,8 @@ static char * get_cached_vst_descriptors_file_path (void) { - char * zrythm_dir = zrythm_get_dir (false); + char * zrythm_dir = + zrythm_get_dir (ZRYTHM_DIR_USER_TOP); g_return_val_if_fail (zrythm_dir, NULL); return diff --git a/src/plugins/plugin_gtk.c b/src/plugins/plugin_gtk.c index 2f2cdbb2d..e17e0b7e7 100644 --- a/src/plugins/plugin_gtk.c +++ b/src/plugins/plugin_gtk.c @@ -354,8 +354,8 @@ on_delete_preset_activate ( GtkWidget* plugin_gtk_new_label ( const char * text, - int title, - int preformatted, + bool title, + bool preformatted, float xalign, float yalign) { diff --git a/tests/meson.build b/tests/meson.build index 2f7affe91..298c19051 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with Zrythm. If not, see . -if get_option ('enable_tests') +if get_option ('enable-tests') subdir('eg-amp.lv2') subdir('eg-fifths.lv2') @@ -71,7 +71,7 @@ if get_option ('enable_tests') ] endif - if get_option ('enable_gui_tests') + if get_option ('enable-gui-tests') tests += [ ['gui/widgets/region', false], ['gui/widgets/track', false],