Browse Source

convert scale and chord selector windows to dialogs

Fixes https://todo.sr.ht/~alextee/zrythm-feature/142.
translate
Alexandros Theodotou 2 months ago
parent
commit
4ed5d4de53
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 24
      inc/gui/widgets/chord_selector_window.h
  2. 20
      inc/gui/widgets/dialogs/bug_report_dialog.h
  3. 24
      inc/gui/widgets/scale_selector_window.h
  4. 2
      resources/ui/chord_selector_window.ui
  5. 13
      resources/ui/scale_selector_window.ui
  6. 2
      src/gui/widgets/chord_selector_window.c
  7. 21
      src/gui/widgets/scale_object.c
  8. 22
      src/gui/widgets/scale_selector_window.c

24
inc/gui/widgets/chord_selector_window.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 this program. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file
@ -35,7 +19,7 @@ G_DECLARE_FINAL_TYPE ( @@ -35,7 +19,7 @@ G_DECLARE_FINAL_TYPE (
chord_selector_window_widget,
Z,
CHORD_SELECTOR_WINDOW_WIDGET,
GtkWindow)
GtkDialog)
/**
* @addtogroup widgets
@ -52,7 +36,7 @@ typedef struct ScaleObject ScaleObject; @@ -52,7 +36,7 @@ typedef struct ScaleObject ScaleObject;
*/
typedef struct _ChordSelectorWindowWidget
{
GtkWindow parent_instance;
GtkDialog parent_instance;
GtkNotebook * notebook;

20
inc/gui/widgets/dialogs/bug_report_dialog.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2020-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: © 2020-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

24
inc/gui/widgets/scale_selector_window.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 this program. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019, 2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file
@ -35,7 +19,7 @@ G_DECLARE_FINAL_TYPE ( @@ -35,7 +19,7 @@ G_DECLARE_FINAL_TYPE (
scale_selector_window_widget,
Z,
SCALE_SELECTOR_WINDOW_WIDGET,
GtkWindow)
GtkDialog)
/**
* @addtogroup widgets
@ -52,7 +36,7 @@ typedef struct MusicalScale MusicalScale; @@ -52,7 +36,7 @@ typedef struct MusicalScale MusicalScale;
*/
typedef struct _ScaleSelectorWindowWidget
{
GtkWindow parent_instance;
GtkDialog parent_instance;
GtkFlowBox * creator_root_note_flowbox;
GtkFlowBoxChild * creator_root_note_c;

2
resources/ui/chord_selector_window.ui

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<template class="ChordSelectorWindowWidget" parent="GtkWindow">
<template class="ChordSelectorWindowWidget" parent="GtkDialog">
<property name="visible">1</property>
<property name="title">Chord Selector</property>
<property name="modal">1</property>

13
resources/ui/scale_selector_window.ui

@ -1,13 +1,10 @@ @@ -1,13 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="Adw" version="1.0"/>
<requires lib="gtk" version="4.0"/>
<template class="ScaleSelectorWindowWidget" parent="GtkWindow">
<property name="visible">1</property>
<template class="ScaleSelectorWindowWidget" parent="GtkDialog">
<property name="title">Scale Selector</property>
<property name="modal">1</property>
<child>
<placeholder/>
</child>
<property name="child">
<object class="GtkNotebook">
<property name="focusable">1</property>
@ -198,9 +195,6 @@ @@ -198,9 +195,6 @@
</property>
</object>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkNotebookPage">
<property name="position">2</property>
@ -216,9 +210,6 @@ @@ -216,9 +210,6 @@
</property>
</object>
</child>
<child>
<placeholder/>
</child>
</object>
</property>
</template>

2
src/gui/widgets/chord_selector_window.c

@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
G_DEFINE_TYPE (
ChordSelectorWindowWidget,
chord_selector_window_widget,
GTK_TYPE_WINDOW)
GTK_TYPE_DIALOG)
static gboolean
on_close_request (

21
src/gui/widgets/scale_object.c

@ -1,28 +1,11 @@ @@ -1,28 +1,11 @@
/*
* 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-2021 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
#include "audio/chord_track.h"
#include "audio/scale_object.h"
#include "gui/widgets/arranger.h"
#include "gui/widgets/bot_bar.h"
#include "gui/widgets/scale_object.h"
#include "gui/widgets/scale_selector_window.h"
#include "project.h"
#include "utils/cairo.h"
#include "utils/ui.h"

22
src/gui/widgets/scale_selector_window.c

@ -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
#include "actions/arranger_selections.h"
#include "audio/scale.h"
@ -35,7 +19,7 @@ @@ -35,7 +19,7 @@
G_DEFINE_TYPE (
ScaleSelectorWindowWidget,
scale_selector_window_widget,
GTK_TYPE_WINDOW)
GTK_TYPE_DIALOG)
static gboolean
on_close_request (

Loading…
Cancel
Save