Browse Source

use libpanel

audio_region_bpm_change_fix
Alexandros Theodotou 5 months ago
parent
commit
3e63ebad8c
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 2
      .clang-format
  2. 5
      data/css-themes/zrythm/theme.scss
  3. 23
      inc/gui/widgets/bot_bar.h
  4. 27
      inc/gui/widgets/bot_dock_edge.h
  5. 27
      inc/gui/widgets/center_dock.h
  6. 1
      inc/gui/widgets/header.h
  7. 25
      inc/gui/widgets/left_dock_edge.h
  8. 4
      inc/gui/widgets/main_notebook.h
  9. 27
      inc/gui/widgets/main_window.h
  10. 27
      inc/gui/widgets/right_dock_edge.h
  11. 35
      inc/gui/widgets/view_toolbar.h
  12. 10
      meson.build
  13. 15
      resources/ui/bot_bar.ui
  14. 50
      resources/ui/center_dock.ui
  15. 5
      resources/ui/left_dock_edge.ui
  16. 32
      resources/ui/main_window.ui
  17. 8
      resources/ui/right_dock_edge.ui
  18. 24
      resources/ui/view_toolbar.ui
  19. 32
      src/actions/actions.c
  20. 2
      src/gui/widgets/bot_bar.c
  21. 147
      src/gui/widgets/bot_dock_edge.c
  22. 79
      src/gui/widgets/center_dock.c
  23. 1
      src/gui/widgets/dialogs/bug_report_dialog.c
  24. 17
      src/gui/widgets/header.c
  25. 34
      src/gui/widgets/inspector_plugin.c
  26. 41
      src/gui/widgets/inspector_track.c
  27. 76
      src/gui/widgets/left_dock_edge.c
  28. 69
      src/gui/widgets/main_notebook.c
  29. 21
      src/gui/widgets/main_window.c
  30. 8
      src/gui/widgets/plugin_browser.c
  31. 117
      src/gui/widgets/right_dock_edge.c
  32. 43
      src/gui/widgets/view_toolbar.c
  33. 7
      src/utils/log.c
  34. 3
      subprojects/libpanel.wrap

2
.clang-format

@ -90,7 +90,7 @@ IncludeCategories: @@ -90,7 +90,7 @@ IncludeCategories:
- Regex: '^"((audio|actions|plugins|settings|utils|gui)/.*|zrythm\.h|zrythm_app\.h|project\.h)'
Priority: 3
CaseSensitive: true
- Regex: '^<((glib|gtk)/.*>)|adwaita\.h|glib\.h>'
- Regex: '^<(((glib|gtk)/.*)|adwaita|glib|libpanel)\.h>$'
Priority: 4
- Regex: '^"(tests|helpers)/.*"$'
Priority: 5

5
data/css-themes/zrythm/theme.scss

@ -321,10 +321,11 @@ center-dock > paned > paned > paned > separator { @@ -321,10 +321,11 @@ center-dock > paned > paned > paned > separator {
}
}
/* use .spacer instead in toolbars */
.thick-separator
{
min-height: 2px;
min-width: 2px;
min-height: 6px;
min-width: 6px;
}
track-lane,

23
inc/gui/widgets/bot_bar.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* 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 <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file
@ -27,6 +11,7 @@ @@ -27,6 +11,7 @@
#define __GUI_WIDGETS_BOT_BAR_H__
#include <gtk/gtk.h>
#include <libpanel.h>
typedef struct _DigitalMeterWidget
DigitalMeterWidget;
@ -105,6 +90,8 @@ typedef struct _BotBarWidget @@ -105,6 +90,8 @@ typedef struct _BotBarWidget
TransportControlsWidget * transport_controls;
CpuWidget * cpu_load;
PanelDockSwitcher * bot_dock_switcher;
/** Color in hex to use in pango markups. */
char hex_color[8];
char green_hex[8];

27
inc/gui/widgets/bot_dock_edge.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* 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 <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file
@ -29,6 +13,7 @@ @@ -29,6 +13,7 @@
#include <stdbool.h>
#include <gtk/gtk.h>
#include <libpanel.h>
#define BOT_DOCK_EDGE_WIDGET_TYPE \
(bot_dock_edge_widget_get_type ())
@ -37,7 +22,7 @@ G_DECLARE_FINAL_TYPE ( @@ -37,7 +22,7 @@ G_DECLARE_FINAL_TYPE (
bot_dock_edge_widget,
Z,
BOT_DOCK_EDGE_WIDGET,
GtkBox)
GtkWidget)
#define MW_BOT_DOCK_EDGE \
MW_CENTER_DOCK->bot_dock_edge
@ -63,8 +48,8 @@ typedef struct _ChordPadPanelWidget @@ -63,8 +48,8 @@ typedef struct _ChordPadPanelWidget
*/
typedef struct _BotDockEdgeWidget
{
GtkBox parent_instance;
FoldableNotebookWidget * bot_notebook;
GtkWidget parent_instance;
PanelFrame * panel_frame;
/** Wrapper. */
GtkBox * modulator_view_box;

27
inc/gui/widgets/center_dock.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* 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 <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file
@ -27,6 +11,7 @@ @@ -27,6 +11,7 @@
#define __GUI_WIDGETS_CENTER_DOCK_H__
#include <gtk/gtk.h>
#include <libpanel.h>
#define CENTER_DOCK_WIDGET_TYPE \
(center_dock_widget_get_type ())
@ -60,15 +45,13 @@ typedef struct _CenterDockWidget @@ -60,15 +45,13 @@ typedef struct _CenterDockWidget
{
GtkWidget parent_instance;
MainNotebookWidget * main_notebook;
PanelDock * dock;
GtkPaned * left_rest_paned;
GtkPaned * center_right_paned;
MainNotebookWidget * main_notebook;
LeftDockEdgeWidget * left_dock_edge;
RightDockEdgeWidget * right_dock_edge;
BotDockEdgeWidget * bot_dock_edge;
GtkPaned * center_paned;
/** Hack to remember paned position. */
bool first_draw;

1
inc/gui/widgets/header.h

@ -51,6 +51,7 @@ typedef struct _HeaderWidget @@ -51,6 +51,7 @@ typedef struct _HeaderWidget
HelpToolbarWidget * help_toolbar;
AdwViewStack * stack;
GtkBox * end_box;
LiveWaveformWidget * live_waveform;
MidiActivityBarWidget * midi_activity;

25
inc/gui/widgets/left_dock_edge.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* 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 <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* @file
@ -27,6 +11,7 @@ @@ -27,6 +11,7 @@
#define __GUI_WIDGETS_LEFT_DOCK_EDGE_H__
#include <gtk/gtk.h>
#include <libpanel.h>
typedef struct _InspectorWidget InspectorWidget;
typedef struct _VisibilityWidget VisibilityWidget;
@ -72,8 +57,8 @@ typedef enum LeftDockEdgeTab @@ -72,8 +57,8 @@ typedef enum LeftDockEdgeTab
*/
typedef struct _LeftDockEdgeWidget
{
GtkWidget parent_instance;
FoldableNotebookWidget * inspector_notebook;
GtkWidget parent_instance;
PanelFrame * panel_frame;
/** Track visibility. */
GtkBox * visibility_box;

4
inc/gui/widgets/main_notebook.h

@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
#include "utils/types.h"
#include <gtk/gtk.h>
#include <libpanel.h>
#define MAIN_NOTEBOOK_WIDGET_TYPE \
(main_notebook_widget_get_type ())
@ -42,13 +43,12 @@ typedef struct _MainNotebookWidget @@ -42,13 +43,12 @@ typedef struct _MainNotebookWidget
{
GtkWidget parent_instance;
FoldableNotebookWidget * foldable_notebook;
PanelFrame * panel_frame;
/** Event viewr + timeline panel. */
GtkPaned * timeline_plus_event_viewer_paned;
TimelinePanelWidget * timeline_panel;
EventViewerWidget * event_viewer;
GtkStack * end_stack;
GtkBox * cc_bindings_box;
CcBindingsWidget * cc_bindings;

27
inc/gui/widgets/main_window.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* 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 <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
#ifndef __GUI_WIDGETS_MAIN_WINDOW_H__
#define __GUI_WIDGETS_MAIN_WINDOW_H__
@ -24,6 +8,7 @@ @@ -24,6 +8,7 @@
#include <adwaita.h>
#include <gtk/gtk.h>
#include <libpanel.h>
#define MAIN_WINDOW_WIDGET_TYPE \
(main_window_widget_get_type ())
@ -61,8 +46,10 @@ typedef struct _MainWindowWidget @@ -61,8 +46,10 @@ typedef struct _MainWindowWidget
{
AdwApplicationWindow parent_instance;
GtkHeaderBar * header_bar;
AdwWindowTitle * window_title;
GtkHeaderBar * header_bar;
PanelDockSwitcher * start_dock_switcher;
AdwWindowTitle * window_title;
PanelDockSwitcher * end_dock_switcher;
AdwViewSwitcher * view_switcher;

27
inc/gui/widgets/right_dock_edge.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* 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 <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file
@ -27,6 +11,7 @@ @@ -27,6 +11,7 @@
#define __GUI_WIDGETS_RIGHT_DOCK_EDGE_H__
#include <gtk/gtk.h>
#include <libpanel.h>
#define RIGHT_DOCK_EDGE_WIDGET_TYPE \
(right_dock_edge_widget_get_type ())
@ -35,7 +20,7 @@ G_DECLARE_FINAL_TYPE ( @@ -35,7 +20,7 @@ G_DECLARE_FINAL_TYPE (
right_dock_edge_widget,
Z,
RIGHT_DOCK_EDGE_WIDGET,
GtkBox)
GtkWidget)
/**
* @addtogroup widgets
@ -60,8 +45,8 @@ typedef struct _ChordPackBrowserWidget @@ -60,8 +45,8 @@ typedef struct _ChordPackBrowserWidget
typedef struct _RightDockEdgeWidget
{
GtkBox parent_instance;
FoldableNotebookWidget * right_notebook;
GtkWidget parent_instance;
PanelFrame * panel_frame;
GtkBox * plugin_browser_box;
PluginBrowserWidget * plugin_browser;

35
inc/gui/widgets/view_toolbar.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019, 2021-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* 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 <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019, 2021-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file
@ -25,6 +9,7 @@ @@ -25,6 +9,7 @@
#define __GUI_WIDGETS_VIEW_TOOLBAR_H__
#include <gtk/gtk.h>
#include <libpanel.h>
#define VIEW_TOOLBAR_WIDGET_TYPE \
(view_toolbar_widget_get_type ())
@ -40,13 +25,13 @@ G_DECLARE_FINAL_TYPE ( @@ -40,13 +25,13 @@ G_DECLARE_FINAL_TYPE (
typedef struct _ViewToolbarWidget
{
GtkBox parent_instance;
GtkButton * status_bar;
GtkButton * fullscreen;
GtkButton * left_panel;
GtkButton * bot_panel;
GtkButton * top_panel;
GtkButton * right_panel;
GtkBox parent_instance;
GtkButton * status_bar;
GtkButton * fullscreen;
PanelDockSwitcher * left_panel;
PanelDockSwitcher * bot_panel;
PanelDockSwitcher * top_panel;
PanelDockSwitcher * right_panel;
} ViewToolbarWidget;
#endif

10
meson.build

@ -954,6 +954,15 @@ libadwaita_dep = dependency ( @@ -954,6 +954,15 @@ libadwaita_dep = dependency (
# resources are not found with static
'default_library=shared'])
libpanel_dep = dependency (
'libpanel-1', version: '>=1.0.0',
fallback: ['libpanel', 'libpanel_static_dep'],
default_options: [
'vapi=false',
'install-examples=false',
'introspection=disabled',
'default_library=static'])
min_version = '>=1.0.25'
if get_option ('opus')
cdata.set('HAVE_OPUS', 1)
@ -1257,6 +1266,7 @@ pcre2_dep = dependency ( @@ -1257,6 +1266,7 @@ pcre2_dep = dependency (
zrythm_deps = [
libadwaita_dep,
libpanel_dep,
fontconfig_dep,
pangoft2_dep,
gtk_dep,

15
resources/ui/bot_bar.ui

@ -48,6 +48,21 @@ @@ -48,6 +48,21 @@
<property name="margin-end">4</property>
</object>
</child>
<child>
<object class="GtkSeparator">
<style>
<class name="spacer"/>
<class name="thick-separator"/>
</style>
<property name="orientation">vertical</property>
</object>
</child>
<child>
<object class="PanelDockSwitcher" id="bot_dock_switcher">
<property name="position">bottom</property>
<property name="tooltip-text" translatable="yes">Toggle Bottom Panel</property>
</object>
</child>
</object>
</child>
</object>

50
resources/ui/center_dock.ui

@ -1,35 +1,43 @@ @@ -1,35 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<requires lib="Panel" version="1.0"/>
<template class="CenterDockWidget" parent="GtkWidget">
<child>
<object class="GtkPaned" id="left_rest_paned">
<property name="name">left-rest-paned</property>
<property name="shrink-start-child">0</property>
<object class="PanelDock" id="dock">
<property name="reveal-start">true</property>
<property name="reveal-bottom">true</property>
<property name="reveal-end">true</property>
<property name="hexpand">true</property>
<property name="vexpand">true</property>
<child>
<object class="LeftDockEdgeWidget" id="left_dock_edge">
<object class="PanelPaned">
<child>
<object class="MainNotebookWidget" id="main_notebook">
<property name="hexpand">true</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkPaned" id="center_right_paned">
<property name="name">center-right-paned</property>
<property name="shrink-end-child">0</property>
<property name="resize-end-child">0</property>
<property name="shrink-start-child">0</property>
<child type="start">
<object class="PanelPaned">
<property name="orientation">vertical</property>
<child>
<object class="GtkPaned" id="center_paned">
<property name="name">center-paned</property>
<property name="orientation">GTK_ORIENTATION_VERTICAL</property>
<child>
<object class="MainNotebookWidget" id="main_notebook">
<property name="hexpand">1</property>
</object>
</child>
<child>
<object class="BotDockEdgeWidget" id="bot_dock_edge"/>
</child>
<object class="LeftDockEdgeWidget" id="left_dock_edge">
</object>
</child>
</object>
</child>
<child type="bottom">
<object class="PanelPaned">
<child>
<object class="BotDockEdgeWidget" id="bot_dock_edge"/>
</child>
</object>
</child>
<child type="end">
<object class="PanelPaned">
<property name="orientation">vertical</property>
<child>
<object class="RightDockEdgeWidget" id="right_dock_edge"/>
</child>

5
resources/ui/left_dock_edge.ui

@ -1,10 +1,11 @@ @@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<requires lib="Panel" version="1.0"/>
<template class="LeftDockEdgeWidget" parent="GtkWidget">
<child>
<object class="FoldableNotebookWidget" id="inspector_notebook">
<property name="vexpand">1</property>
<object class="PanelFrame" id="panel_frame">
<property name="vexpand">true</property>
</object>
</child>
</template>

32
resources/ui/main_window.ui

@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<requires lib="Adw" version="1.0"/>
<requires lib="Panel" version="1.0"/>
<template class="MainWindowWidget" parent="AdwApplicationWindow">
<property name="focusable">1</property>
<property name="icon_name">zrythm</property>
@ -20,6 +22,21 @@ @@ -20,6 +22,21 @@
</style>
</object>
</child>
<child>
<object class="GtkSeparator">
<style>
<class name="spacer"/>
<class name="thick-separator"/>
</style>
<property name="orientation">vertical</property>
</object>
</child>
<child>
<object class="PanelDockSwitcher" id="start_dock_switcher">
<property name="position">start</property>
<property name="tooltip-text" translatable="yes">Toggle Left Panel</property>
</object>
</child>
</object>
</child>
<property name="title-widget">
@ -28,6 +45,21 @@ @@ -28,6 +45,21 @@
</property>
<child type="end">
<object class="GtkBox" id="header_end_box">
<child>
<object class="PanelDockSwitcher" id="end_dock_switcher">
<property name="position">end</property>
<property name="tooltip-text" translatable="yes">Toggle Right Panel</property>
</object>
</child>
<child>
<object class="GtkSeparator">
<style>
<class name="spacer"/>
<class name="thick-separator"/>
</style>
<property name="orientation">vertical</property>
</object>
</child>
<child>
<object class="GtkButton" id="scripting_interface">
<property name="action_name">app.scripting-interface</property>

8
resources/ui/right_dock_edge.ui

@ -1,11 +1,11 @@ @@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<template class="RightDockEdgeWidget" parent="GtkBox">
<property name="orientation">vertical</property>
<requires lib="Panel" version="1.0"/>
<template class="RightDockEdgeWidget" parent="GtkWidget">
<child>
<object class="FoldableNotebookWidget" id="right_notebook">
<property name="vexpand">1</property>
<object class="PanelFrame" id="panel_frame">
<property name="vexpand">true</property>
</object>
</child>
</template>

24
resources/ui/view_toolbar.ui

@ -36,27 +36,27 @@ @@ -36,27 +36,27 @@
<child>
<object class="GtkBox">
<child>
<object class="GtkButton" id="left_panel">
<property name="icon-name">gnome-builder-builder-view-left-pane-symbolic-light</property>
<property name="action_name">app.toggle-left-panel</property>
<object class="PanelDockSwitcher" id="left_panel">
<property name="position">start</property>
<property name="tooltip-text" translatable="yes">Toggle Left Panel</property>
</object>
</child>
<child>
<object class="GtkButton" id="bot_panel">
<property name="icon-name">gnome-builder-builder-view-bottom-pane-symbolic-light</property>
<property name="action_name">app.toggle-bot-panel</property>
<object class="PanelDockSwitcher" id="bot_panel">
<property name="position">bottom</property>
<property name="tooltip-text" translatable="yes">Toggle Bottom Panel</property>
</object>
</child>
<child>
<object class="GtkButton" id="top_panel">
<property name="icon-name">gnome-builder-builder-view-top-pane-symbolic-light</property>
<property name="action_name">app.toggle-top-panel</property>
<object class="PanelDockSwitcher" id="top_panel">
<property name="position">top</property>
<property name="tooltip-text" translatable="yes">Toggle Top Panel</property>
</object>
</child>
<child>
<object class="GtkButton" id="right_panel">
<property name="icon-name">gnome-builder-builder-view-right-pane-symbolic-light</property>
<property name="action_name">app.toggle-right-panel</property>
<object class="PanelDockSwitcher" id="right_panel">
<property name="position">end</property>
<property name="tooltip-text" translatable="yes">Toggle Right Panel</property>
</object>
</child>
</object>

32
src/actions/actions.c

@ -1381,8 +1381,11 @@ activate_toggle_left_panel ( @@ -1381,8 +1381,11 @@ activate_toggle_left_panel (
GVariant * variant,
gpointer user_data)
{
foldable_notebook_widget_toggle_visibility (
MW_LEFT_DOCK_EDGE->inspector_notebook);
g_return_if_fail (MW_CENTER_DOCK);
panel_dock_set_reveal_start (
MW_CENTER_DOCK->dock,
!panel_dock_get_reveal_start (
MW_CENTER_DOCK->dock));
}
void
@ -1391,8 +1394,11 @@ activate_toggle_right_panel ( @@ -1391,8 +1394,11 @@ activate_toggle_right_panel (
GVariant * variant,
gpointer user_data)
{
foldable_notebook_widget_toggle_visibility (
MW_RIGHT_DOCK_EDGE->right_notebook);
g_return_if_fail (MW_CENTER_DOCK);
panel_dock_set_reveal_end (
MW_CENTER_DOCK->dock,
!panel_dock_get_reveal_end (
MW_CENTER_DOCK->dock));
}
void
@ -1401,8 +1407,11 @@ activate_toggle_bot_panel ( @@ -1401,8 +1407,11 @@ activate_toggle_bot_panel (
GVariant * variant,
gpointer user_data)
{
foldable_notebook_widget_toggle_visibility (
MW_BOT_DOCK_EDGE->bot_notebook);
g_return_if_fail (MW_CENTER_DOCK);
panel_dock_set_reveal_bottom (
MW_CENTER_DOCK->dock,
!panel_dock_get_reveal_bottom (
MW_CENTER_DOCK->dock));
}
/**
@ -1414,12 +1423,11 @@ activate_toggle_top_panel ( @@ -1414,12 +1423,11 @@ activate_toggle_top_panel (
GVariant * variant,
gpointer user_data)
{
g_return_if_fail (
MW_CENTER_DOCK && MW_MAIN_NOTEBOOK);
GtkWidget * widget =
(GtkWidget *) MW_MAIN_NOTEBOOK;
gtk_widget_set_visible (
widget, !gtk_widget_get_visible (widget));
g_return_if_fail (MW_CENTER_DOCK);
panel_dock_set_reveal_top (
MW_CENTER_DOCK->dock,
!panel_dock_get_reveal_top (
MW_CENTER_DOCK->dock));
}
void

2
src/gui/widgets/bot_bar.c

@ -612,6 +612,7 @@ bot_bar_widget_init (BotBarWidget * self) @@ -612,6 +612,7 @@ bot_bar_widget_init (BotBarWidget * self)
g_type_ensure (TRANSPORT_CONTROLS_WIDGET_TYPE);
g_type_ensure (CPU_WIDGET_TYPE);
g_type_ensure (BUTTON_WITH_MENU_WIDGET_TYPE);
g_type_ensure (PANEL_TYPE_DOCK_SWITCHER);
gtk_widget_init_template (GTK_WIDGET (self));
@ -682,6 +683,7 @@ bot_bar_widget_class_init ( @@ -682,6 +683,7 @@ bot_bar_widget_class_init (
BIND_CHILD (cpu_load);
BIND_CHILD (status_bar);
BIND_CHILD (playhead_box);
BIND_CHILD (bot_dock_switcher);
#undef BIND_CHILD

147
src/gui/widgets/bot_dock_edge.c

@ -24,8 +24,10 @@ @@ -24,8 +24,10 @@
G_DEFINE_TYPE (
BotDockEdgeWidget,
bot_dock_edge_widget,
GTK_TYPE_BOX)
GTK_TYPE_WIDGET)
/* TODO implement after workspaces */
#if 0
static void
on_notebook_switch_page (
GtkNotebook * notebook,
@ -38,6 +40,7 @@ on_notebook_switch_page ( @@ -38,6 +40,7 @@ on_notebook_switch_page (
g_settings_set_int (
S_UI, "bot-panel-tab", (int) page_num);
}
#endif
/**
* Sets the appropriate stack page.
@ -84,11 +87,6 @@ void @@ -84,11 +87,6 @@ void
bot_dock_edge_widget_setup (
BotDockEdgeWidget * self)
{
foldable_notebook_widget_setup (
self->bot_notebook,
MW_CENTER_DOCK->center_paned, GTK_POS_BOTTOM,
true);
event_viewer_widget_setup (
self->event_viewer_midi,
EVENT_VIEWER_TYPE_MIDI);
@ -122,6 +120,8 @@ bot_dock_edge_widget_setup ( @@ -122,6 +120,8 @@ bot_dock_edge_widget_setup (
GTK_WIDGET (self->event_viewer_stack),
visibility);
/* TODO load from workspaces */
#if 0
GtkNotebook * notebook =
foldable_notebook_widget_get_notebook (
self->bot_notebook);
@ -133,6 +133,7 @@ bot_dock_edge_widget_setup ( @@ -133,6 +133,7 @@ bot_dock_edge_widget_setup (
g_signal_connect (
notebook, "switch-page",
G_CALLBACK (on_notebook_switch_page), self);
#endif
}
/**
@ -146,27 +147,12 @@ bot_dock_edge_widget_show_clip_editor ( @@ -146,27 +147,12 @@ bot_dock_edge_widget_show_clip_editor (
BotDockEdgeWidget * self,
bool navigate_to_region_start)
{
GtkNotebook * notebook =
foldable_notebook_widget_get_notebook (
self->bot_notebook);
int num_pages =
gtk_notebook_get_n_pages (notebook);
for (int i = 0; i < num_pages; i++)
{
GtkWidget * widget =
gtk_notebook_get_nth_page (notebook, i);
if (widget == GTK_WIDGET (self->clip_editor_box))
{
gtk_widget_set_visible (
GTK_WIDGET (self), true);
foldable_notebook_widget_set_visibility (
self->bot_notebook, true);
gtk_notebook_set_current_page (
notebook, i);
break;
}
}
PanelWidget * panel_widget =
PANEL_WIDGET (gtk_widget_get_ancestor (
GTK_WIDGET (self->clip_editor_box),
PANEL_TYPE_WIDGET));
g_return_if_fail (panel_widget);
panel_widget_raise (panel_widget);
bot_dock_edge_widget_update_event_viewer_stack_page (
self);
@ -191,13 +177,33 @@ bot_dock_edge_widget_show_clip_editor ( @@ -191,13 +177,33 @@ bot_dock_edge_widget_show_clip_editor (
}
static void
generate_bot_notebook (BotDockEdgeWidget * self)
dispose (BotDockEdgeWidget * self)
{
self->bot_notebook = foldable_notebook_widget_new (
GTK_POS_BOTTOM, true);
gtk_box_append (
GTK_BOX (self),
GTK_WIDGET (self->bot_notebook));
gtk_widget_unparent (
GTK_WIDGET (self->panel_frame));
G_OBJECT_CLASS (bot_dock_edge_widget_parent_class)
->dispose (G_OBJECT (self));
}
static void
bot_dock_edge_widget_init (BotDockEdgeWidget * self)
{
self->panel_frame =
PANEL_FRAME (panel_frame_new ());
gtk_orientable_set_orientation (
GTK_ORIENTABLE (self->panel_frame),
GTK_ORIENTATION_HORIZONTAL);
gtk_widget_set_parent (
GTK_WIDGET (self->panel_frame),
GTK_WIDGET (self));
PanelFrameHeader * header =
panel_frame_get_header (self->panel_frame);
header = PANEL_FRAME_HEADER (
panel_frame_switcher_new ());
panel_frame_set_header (
self->panel_frame, header);
self->clip_editor_box = GTK_BOX (
gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
@ -271,53 +277,32 @@ generate_bot_notebook (BotDockEdgeWidget * self) @@ -271,53 +277,32 @@ generate_bot_notebook (BotDockEdgeWidget * self)
GTK_WIDGET (self->chord_pad_panel));
/* add tabs */
foldable_notebook_widget_add_page (
self->bot_notebook,
GTK_WIDGET (self->clip_editor_box),
"piano-roll", _ ("Editor"), _ ("Editor view"));
foldable_notebook_widget_add_page (
self->bot_notebook,
GTK_WIDGET (self->mixer_box), "mixer",
_ ("Mixer"), _ ("Mixer view"));
foldable_notebook_widget_add_page (
self->bot_notebook,
GTK_WIDGET (self->modulator_view_box),
"modulator", _ ("Modulators"),
_ ("Modulators"));
foldable_notebook_widget_add_page (
self->bot_notebook,
GTK_WIDGET (self->chord_pad_panel_box),
"chord-pad", _ ("Chord Pad"), _ ("Chord pad"));
GtkNotebook * notebook =
foldable_notebook_widget_get_notebook (
self->bot_notebook);
self->toggle_top_panel =
GTK_BUTTON (gtk_button_new_from_icon_name (
"gnome-builder-builder-"
"view-top-pane-symbolic-light"));
gtk_widget_set_tooltip_text (
GTK_WIDGET (self->toggle_top_panel),
_ ("Show/hide top panel"));
gtk_actionable_set_action_name (
GTK_ACTIONABLE (self->toggle_top_panel),
"app.toggle-top-panel");
gtk_notebook_set_action_widget (
notebook, GTK_WIDGET (self->toggle_top_panel),
GTK_PACK_END);
gtk_notebook_set_tab_pos (
notebook, GTK_POS_BOTTOM);
}
#define ADD_TAB(widget, icon, title) \
{ \
PanelWidget * panel_widget = \
PANEL_WIDGET (panel_widget_new ()); \
panel_widget_set_child ( \
panel_widget, GTK_WIDGET (widget)); \
panel_widget_set_icon_name ( \
panel_widget, icon); \
panel_widget_set_title (panel_widget, title); \
panel_frame_add ( \
self->panel_frame, panel_widget); \
}
static void
bot_dock_edge_widget_init (BotDockEdgeWidget * self)
{
gtk_orientable_set_orientation (
GTK_ORIENTABLE (self),
GTK_ORIENTATION_VERTICAL);
ADD_TAB (
self->clip_editor_box, "piano-roll",
_ ("Editor view"));
ADD_TAB (
self->mixer_box, "mixer", _ ("Mixer view"));
ADD_TAB (
self->modulator_view_box, "modulator",
_ ("Modulators"));
ADD_TAB (
self->chord_pad_panel_box, "chord-pad",
_ ("Chord pad"));
generate_bot_notebook (self);
#undef ADD_TAB
}
static void
@ -328,4 +313,10 @@ bot_dock_edge_widget_class_init ( @@ -328,4 +313,10 @@ bot_dock_edge_widget_class_init (
GTK_WIDGET_CLASS (_klass);
gtk_widget_class_set_css_name (
klass, "bot-dock-edge");
gtk_widget_class_set_layout_manager_type (
klass, GTK_TYPE_BIN_LAYOUT);
GObjectClass * oklass = G_OBJECT_CLASS (_klass);
oklass->dispose = (GObjectFinalizeFunc) dispose;
}

79
src/gui/widgets/center_dock.c

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: © 2018-2021 Alexandros Theodotou <alex@zrythm.org>
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
#include "gui/widgets/bot_dock_edge.h"
@ -14,24 +14,13 @@ @@ -14,24 +14,13 @@
#include "utils/resources.h"
#include "zrythm_app.h"
#include <adwaita.h>
G_DEFINE_TYPE (
CenterDockWidget,
center_dock_widget,
GTK_TYPE_WIDGET)
static void
on_divider_pos_changed (
GObject * gobject,
GParamSpec * pspec,
GtkPaned * paned)
{
int new_pos = gtk_paned_get_position (paned);
g_debug (
"saving bot panel divider pos: %d", new_pos);
g_settings_set_int (
S_UI, "bot-panel-divider-position", new_pos);
}
static bool
on_center_dock_mapped (
GtkWidget * widget,
@ -41,19 +30,7 @@ on_center_dock_mapped ( @@ -41,19 +30,7 @@ on_center_dock_mapped (
{
self->first_draw = false;
/* fetch divider position */
int pos = g_settings_get_int (
S_UI, "bot-panel-divider-position");
g_debug (
"loading bot panel divider pos: %d", pos);
gtk_paned_set_position (
self->center_paned, pos);
g_signal_connect (
G_OBJECT (self->center_paned),
"notify::position",
G_CALLBACK (on_divider_pos_changed),
self->center_paned);
/* TODO set divider positions */
}
return false;
@ -96,8 +73,7 @@ center_dock_widget_tear_down ( @@ -96,8 +73,7 @@ center_dock_widget_tear_down (
static void
dispose (CenterDockWidget * self)
{
gtk_widget_unparent (
GTK_WIDGET (self->left_rest_paned));
gtk_widget_unparent (GTK_WIDGET (self->dock));
G_OBJECT_CLASS (center_dock_widget_parent_class)
->dispose (G_OBJECT (self));
@ -112,43 +88,9 @@ center_dock_widget_init (CenterDockWidget * self) @@ -112,43 +88,9 @@ center_dock_widget_init (CenterDockWidget * self)
g_type_ensure (RIGHT_DOCK_EDGE_WIDGET_TYPE);
g_type_ensure (LEFT_DOCK_EDGE_WIDGET_TYPE);
g_type_ensure (MAIN_NOTEBOOK_WIDGET_TYPE);
g_type_ensure (PANEL_TYPE_PANED);
gtk_widget_init_template (GTK_WIDGET (self));
GValue a = G_VALUE_INIT;
g_value_init (&a, G_TYPE_BOOLEAN);
g_value_set_boolean (&a, 1);
/*g_object_set_property (*/
/*G_OBJECT (self), "left-visible", &a);*/
/*g_object_set_property (*/
/*G_OBJECT (self), "right-visible", &a);*/
/*g_object_set_property (*/
/*G_OBJECT (self), "bottom-visible", &a);*/
/*g_object_set_property (*/
/*G_OBJECT (self), "top-visible", &a);*/
gtk_paned_set_shrink_start_child (
self->left_rest_paned, false);
gtk_paned_set_shrink_end_child (
self->left_rest_paned, false);
gtk_paned_set_shrink_start_child (
self->center_right_paned, false);
gtk_paned_set_shrink_end_child (
self->center_right_paned, false);
gtk_paned_set_resize_start_child (
self->center_right_paned, true);
gtk_paned_set_resize_end_child (
self->center_right_paned, false);
gtk_paned_set_shrink_start_child (
self->center_paned, false);
gtk_paned_set_shrink_end_child (
self->center_paned, false);
gtk_paned_set_resize_start_child (
self->center_paned, true);
gtk_paned_set_resize_end_child (
self->center_paned, true);
}
static void
@ -157,8 +99,6 @@ center_dock_widget_class_init ( @@ -157,8 +99,6 @@ center_dock_widget_class_init (
{
GtkWidgetClass * klass =
GTK_WIDGET_CLASS (_klass);
gtk_widget_class_set_layout_manager_type (
klass, GTK_TYPE_BOX_LAYOUT);
resources_set_class_template (
klass, "center_dock.ui");
@ -169,9 +109,7 @@ center_dock_widget_class_init ( @@ -169,9 +109,7 @@ center_dock_widget_class_init (
gtk_widget_class_bind_template_child ( \
klass, CenterDockWidget, x)
BIND_CHILD (center_paned);
BIND_CHILD (left_rest_paned);
BIND_CHILD (center_right_paned);
BIND_CHILD (dock);
BIND_CHILD (main_notebook);
BIND_CHILD (left_dock_edge);
BIND_CHILD (bot_dock_edge);
@ -179,6 +117,9 @@ center_dock_widget_class_init ( @@ -179,6 +117,9 @@ center_dock_widget_class_init (
#undef BIND_CHILD
gtk_widget_class_set_layout_manager_type (
klass, GTK_TYPE_BIN_LAYOUT);
GObjectClass * oklass = G_OBJECT_CLASS (klass);
oklass->dispose = (GObjectFinalizeFunc) dispose;
}

1
src/gui/widgets/dialogs/bug_report_dialog.c

@ -38,6 +38,7 @@ @@ -38,6 +38,7 @@
#include "zrythm_app.h"
#include <glib/gi18n.h>
#include <json-glib/json-glib.h>
G_DEFINE_TYPE (

17
src/gui/widgets/header.c

@ -50,6 +50,19 @@ header_widget_setup ( @@ -50,6 +50,19 @@ header_widget_setup (
home_toolbar_widget_setup (self->home_toolbar);
}
static void
dispose (HeaderWidget * self)
{
/* unparenting the stack throws a CRITICAL on
* close */
/*gtk_widget_unparent (GTK_WIDGET (self->stack));*/
gtk_widget_unparent (GTK_WIDGET (self->end_box));
G_OBJECT_CLASS (header_widget_parent_class)
->dispose (G_OBJECT (self));
}
static void
header_widget_init (HeaderWidget * self)
{
@ -98,6 +111,7 @@ header_widget_class_init ( @@ -98,6 +111,7 @@ header_widget_class_init (
klass, HeaderWidget, x)
BIND_CHILD (stack);
BIND_CHILD (end_box);
BIND_CHILD (home_toolbar);
BIND_CHILD (project_toolbar);
BIND_CHILD (view_toolbar);
@ -109,4 +123,7 @@ header_widget_class_init ( @@ -109,4 +123,7 @@ header_widget_class_init (
gtk_widget_class_set_layout_manager_type (
klass, GTK_TYPE_BOX_LAYOUT);
GObjectClass * oklass = G_OBJECT_CLASS (_klass);
oklass->dispose = (GObjectFinalizeFunc) dispose;
}

34
src/gui/widgets/inspector_plugin.c

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* 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 <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
#include "gui/backend/mixer_selections.h"
#include "gui/widgets/center_dock.h"
@ -69,14 +53,18 @@ inspector_plugin_widget_show ( @@ -69,14 +53,18 @@ inspector_plugin_widget_show (
MixerSelections * ms,
bool set_notebook_page)
{
g_debug ("showing plugin inspector contents...");
g_debug (
"showing plugin inspector contents (set notebook page: %d)...",
set_notebook_page);
if (set_notebook_page)
{
gtk_notebook_set_current_page (
GTK_NOTEBOOK (
MW_LEFT_DOCK_EDGE->inspector_notebook),
1);
PanelWidget * panel_widget =
PANEL_WIDGET (gtk_widget_get_ancestor (
GTK_WIDGET (self), PANEL_TYPE_WIDGET));
g_return_if_fail (panel_widget);
panel_widget_raise (panel_widget);
g_debug ("raised plugin inspector");
}
/* show info for first plugin */

41
src/gui/widgets/inspector_track.c

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* 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 <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
#include "gui/backend/event_manager.h"
#include "gui/backend/tracklist_selections.h"
@ -107,17 +91,20 @@ inspector_track_widget_show_tracks ( @@ -107,17 +91,20 @@ inspector_track_widget_show_tracks (
TracklistSelections * tls,
bool set_notebook_page)
{
g_debug ("showing %d tracks", tls->num_tracks);
g_debug (
"showing %d tracks (set notebook page: %d)",
tls->num_tracks, set_notebook_page);
if (
set_notebook_page
&& foldable_notebook_widget_get_current_page (
MW_LEFT_DOCK_EDGE->inspector_notebook)
!= 0)
if (set_notebook_page)
{
foldable_notebook_widget_set_current_page (
MW_LEFT_DOCK_EDGE->inspector_notebook, 0,
false);
PanelWidget * panel_widget =
PANEL_WIDGET (gtk_widget_get_ancestor (
GTK_WIDGET (
MW_LEFT_DOCK_EDGE->track_inspector),
PANEL_TYPE_WIDGET));
g_return_if_fail (panel_widget);
panel_widget_raise (panel_widget);
g_debug ("raised track inspector");
}
/* show info for first track */

76
src/gui/widgets/left_dock_edge.c

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* 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 <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
#include "gui/backend/tracklist_selections.h"
#include "gui/widgets/cc_bindings.h"
@ -42,6 +26,8 @@ G_DEFINE_TYPE ( @@ -42,6 +26,8 @@ G_DEFINE_TYPE (
left_dock_edge_widget,
GTK_TYPE_WIDGET)
/* TODO implement after workspaces */
#if 0
static void
on_notebook_switch_page (
GtkNotebook * notebook,
@ -55,6 +41,7 @@ on_notebook_switch_page ( @@ -55,6 +41,7 @@ on_notebook_switch_page (
g_settings_set_int (
S_UI, "left-panel-tab", (int) page_num);
}
#endif
/**
* Refreshes the widget and switches to the given
@ -83,6 +70,8 @@ left_dock_edge_widget_refresh ( @@ -83,6 +70,8 @@ left_dock_edge_widget_refresh (
self->plugin_inspector, MIXER_SELECTIONS,
false);
/* TODO load from workspaces */
#if 0
int page_num =
g_settings_get_int (S_UI, "left-panel-tab");
GtkNotebook * notebook =
@ -90,28 +79,17 @@ left_dock_edge_widget_refresh ( @@ -90,28 +79,17 @@ left_dock_edge_widget_refresh (
self->inspector_notebook);
gtk_notebook_set_current_page (
notebook, page_num);
#endif
}
void
left_dock_edge_widget_setup (
LeftDockEdgeWidget * self)
{
foldable_notebook_widget_setup (
self->inspector_notebook,
MW_CENTER_DOCK->left_rest_paned, GTK_POS_LEFT,
false);
inspector_track_widget_setup (
self->track_inspector, TRACKLIST_SELECTIONS);
visibility_widget_refresh (self->visibility);
GtkNotebook * notebook =
foldable_notebook_widget_get_notebook (
self->inspector_notebook);
g_signal_connect (
G_OBJECT (notebook), "switch-page",
G_CALLBACK (on_notebook_switch_page), self);
}
static GtkScrolledWindow *
@ -160,7 +138,7 @@ static void @@ -160,7 +138,7 @@ static void
dispose (LeftDockEdgeWidget * self)
{
gtk_widget_unparent (
GTK_WIDGET (self->inspector_notebook));
GTK_WIDGET (self->panel_frame));
G_OBJECT_CLASS (
left_dock_edge_widget_parent_class)
@ -186,6 +164,19 @@ left_dock_edge_widget_init ( @@ -186,6 +164,19 @@ left_dock_edge_widget_init (
GtkBox * inspector_wrap;
GtkScrolledWindow * scroll;
#define ADD_TAB(widget, icon, title) \
{ \
PanelWidget * panel_widget = \
PANEL_WIDGET (panel_widget_new ()); \
panel_widget_set_child ( \
panel_widget, GTK_WIDGET (widget)); \
panel_widget_set_icon_name ( \
panel_widget, icon); \
panel_widget_set_title (panel_widget, title); \
panel_frame_add ( \
self->panel_frame, panel_widget); \
}
/* setup track inspector */
self->track_inspector =
inspector_track_widget_new ();
@ -200,10 +191,9 @@ left_dock_edge_widget_init ( @@ -200,10 +191,9 @@ left_dock_edge_widget_init (
scroll = wrap_inspector_in_scrolled_window (
self, GTK_WIDGET (inspector_wrap));
self->track_inspector_scroll = scroll;
foldable_notebook_widget_add_page (
self->inspector_notebook, GTK_WIDGET (scroll),
"track-inspector", _ ("Track"),
_ ("Track inspector"));