[beast/wip/timj/soundfont: 3/13] BST: SF2: adapt code to c++ified beast codebase
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast/wip/timj/soundfont: 3/13] BST: SF2: adapt code to c++ified beast codebase
- Date: Mon, 19 Sep 2016 08:17:35 +0000 (UTC)
commit eba9bc80b99b60d847954fc3eaf7cba6d701aade
Author: Stefan Westerfeld <stefan space twc de>
Date: Fri Mar 8 20:10:34 2013 +0100
BST: SF2: adapt code to c++ified beast codebase
beast-gtk/Makefile.am | 4 +-
beast-gtk/bstfiledialog.cc | 2 +-
beast-gtk/bstsoundfontpresetview.c | 47 --------------------
beast-gtk/bstsoundfontpresetview.cc | 31 +++++++++++++
...dfontpresetview.h => bstsoundfontpresetview.hh} | 30 +++----------
.../{bstsoundfontview.c => bstsoundfontview.cc} | 32 +++----------
.../{bstsoundfontview.h => bstsoundfontview.hh} | 33 ++++----------
beast-gtk/bstsupershell.cc | 2 +-
beast-gtk/bsttracksynthdialog.cc | 2 +-
beast-gtk/bsttracksynthdialog.hh | 2 +-
beast-gtk/bstutils.cc | 2 +-
po/POTSCAN | 4 +-
12 files changed, 64 insertions(+), 127 deletions(-)
---
diff --git a/beast-gtk/Makefile.am b/beast-gtk/Makefile.am
index d57072f..c745979 100644
--- a/beast-gtk/Makefile.am
+++ b/beast-gtk/Makefile.am
@@ -36,7 +36,7 @@ beast_headers = $(strip \
bstusermessage.hh bstdial.hh bsttracksynthdialog.hh bstwaveeditor.hh \
bstzoomedwindow.hh bstskinconfig.hh bstmsgabsorb.hh bstsampleeditor.hh \
bstrackview.hh bsttreestores.hh bstbseutils.hh bstutils.hh \
- bstdefs.hh bstsoundfontview.h bstsoundfontpresetview.h \
+ bstdefs.hh bstsoundfontview.hh bstsoundfontpresetview.hh \
)
EXTRA_DIST += $(beast_headers)
# BEAST sources to build the program from
@@ -58,7 +58,7 @@ beast_sources = $(strip \
bstusermessage.cc bstdial.cc bsttracksynthdialog.cc bstwaveeditor.cc \
bstzoomedwindow.cc bstskinconfig.cc bstmsgabsorb.cc bstsampleeditor.cc \
bstrackview.cc bsttreestores.cc bstbseutils.cc bstutils.cc \
- bstsoundfontview.c bstsoundfontpresetview.c $(PROFILE_SOURCE) \
+ bstsoundfontview.cc bstsoundfontpresetview.cc $(PROFILE_SOURCE) \
)
# BEAST sources that get included (don't have own .lo rules)
beast_extra_files = $(strip \
diff --git a/beast-gtk/bstfiledialog.cc b/beast-gtk/bstfiledialog.cc
index 0e0b6ee..05669f1 100644
--- a/beast-gtk/bstfiledialog.cc
+++ b/beast-gtk/bstfiledialog.cc
@@ -232,7 +232,7 @@ bst_file_dialog_global_sound_font (void)
{
static BstFileDialog *singleton = NULL;
if (!singleton)
- singleton = g_object_new (BST_TYPE_FILE_DIALOG, NULL);
+ singleton = (BstFileDialog*) g_object_new (BST_TYPE_FILE_DIALOG, NULL);
return singleton;
}
diff --git a/beast-gtk/bstsoundfontpresetview.cc b/beast-gtk/bstsoundfontpresetview.cc
new file mode 100644
index 0000000..a969796
--- /dev/null
+++ b/beast-gtk/bstsoundfontpresetview.cc
@@ -0,0 +1,31 @@
+// Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
+#include "bstsoundfontpresetview.hh"
+
+/* --- functions --- */
+
+G_DEFINE_TYPE (BstSoundFontPresetView, bst_sound_font_preset_view, BST_TYPE_ITEM_VIEW);
+
+
+static void
+bst_sound_font_preset_view_class_init (BstSoundFontPresetViewClass *klass)
+{
+ BstItemViewClass *item_view_class = BST_ITEM_VIEW_CLASS (klass);
+
+ item_view_class->item_type = "BseSoundFontPreset";
+}
+
+static void
+bst_sound_font_preset_view_init (BstSoundFontPresetView *self)
+{
+ BstItemView *iview = BST_ITEM_VIEW (self);
+}
+
+GtkWidget*
+bst_sound_font_preset_view_new()
+{
+ GtkWidget *sound_font_preset_view;
+
+ sound_font_preset_view = gtk_widget_new (BST_TYPE_SOUND_FONT_PRESET_VIEW, NULL);
+
+ return sound_font_preset_view;
+}
diff --git a/beast-gtk/bstsoundfontpresetview.h b/beast-gtk/bstsoundfontpresetview.hh
similarity index 57%
rename from beast-gtk/bstsoundfontpresetview.h
rename to beast-gtk/bstsoundfontpresetview.hh
index 0afb027..75d00b7 100644
--- a/beast-gtk/bstsoundfontpresetview.h
+++ b/beast-gtk/bstsoundfontpresetview.hh
@@ -1,25 +1,8 @@
-/* BEAST - Bedevilled Audio System
- * Copyright (C) 1998-2003 Tim Janik
- * Copyright (C) 2009 Stefan Westerfeld
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * A copy of the GNU Lesser General Public License should ship along
- * with this library; if not, see http://www.gnu.org/copyleft/.
- */
-
-#ifndef __BST_SOUND_FONT_PRESET_VIEW_H__
-#define __BST_SOUND_FONT_PRESET_VIEW_H__
-
-#include "bstitemview.h"
+// Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
+#ifndef __BST_SOUND_FONT_PRESET_VIEW_HH__
+#define __BST_SOUND_FONT_PRESET_VIEW_HH__
+
+#include "bstitemview.hh"
G_BEGIN_DECLS
@@ -49,4 +32,5 @@ struct _BstSoundFontPresetViewClass
GType bst_sound_font_preset_view_get_type (void);
GtkWidget* bst_sound_font_preset_view_new (void);
-#endif /* __BST_SOUND_FONT_PRESET_VIEW_H__ */
+G_END_DECLS
+#endif /* __BST_SOUND_FONT_PRESET_VIEW_HH__ */
diff --git a/beast-gtk/bstsoundfontview.c b/beast-gtk/bstsoundfontview.cc
similarity index 79%
rename from beast-gtk/bstsoundfontview.c
rename to beast-gtk/bstsoundfontview.cc
index f2929d9..d93de99 100644
--- a/beast-gtk/bstsoundfontview.c
+++ b/beast-gtk/bstsoundfontview.cc
@@ -1,23 +1,7 @@
-/* BEAST - Bedevilled Audio System
- * Copyright (C) 1998-2003 Tim Janik
- * Copyright (C) 2009 Stefan Westerfeld
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * A copy of the GNU Lesser General Public License should ship along
- * with this library; if not, see http://www.gnu.org/copyleft/.
- */
-#include "bstsoundfontview.h"
-#include "bstsoundfontpresetview.h"
-#include "bstfiledialog.h"
+// Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
+#include "bstsoundfontview.hh"
+#include "bstsoundfontpresetview.hh"
+#include "bstfiledialog.hh"
/* --- prototypes --- */
@@ -51,9 +35,9 @@ static const GxkStockAction sound_font_view_actions[] = {
G_DEFINE_TYPE (BstSoundFontView, bst_sound_font_view, BST_TYPE_ITEM_VIEW);
static void
-bst_sound_font_view_class_init (BstSoundFontViewClass *class)
+bst_sound_font_view_class_init (BstSoundFontViewClass *klass)
{
- BstItemViewClass *item_view_class = BST_ITEM_VIEW_CLASS (class);
+ BstItemViewClass *item_view_class = BST_ITEM_VIEW_CLASS (klass);
item_view_class->item_type = "BseSoundFont";
}
@@ -75,7 +59,7 @@ bst_sound_font_view_init (BstSoundFontView *self)
G_N_ELEMENTS (sound_font_view_actions), sound_font_view_actions,
NULL, sound_font_view_action_check, sound_font_view_action_exec);
/* setup tree view */
- GtkTreeView *tview = gxk_radget_find (radget, "tree-view");
+ GtkTreeView *tview = (GtkTreeView *) gxk_radget_find (radget, "tree-view");
bst_item_view_complete_tree (iview, tview);
g_object_connect (gtk_tree_view_get_selection (tview),
@@ -84,7 +68,7 @@ bst_sound_font_view_init (BstSoundFontView *self)
/* setup preset view */
- GtkTreeView *pview = gxk_radget_find (radget, "preset-view");
+ GtkTreeView *pview = (GtkTreeView *) gxk_radget_find (radget, "preset-view");
self->preset_view = BST_SOUND_FONT_PRESET_VIEW (bst_sound_font_preset_view_new());
bst_item_view_complete_tree (BST_ITEM_VIEW (self->preset_view), pview);
}
diff --git a/beast-gtk/bstsoundfontview.h b/beast-gtk/bstsoundfontview.hh
similarity index 56%
rename from beast-gtk/bstsoundfontview.h
rename to beast-gtk/bstsoundfontview.hh
index bf0e27f..f658745 100644
--- a/beast-gtk/bstsoundfontview.h
+++ b/beast-gtk/bstsoundfontview.hh
@@ -1,26 +1,9 @@
-/* BEAST - Bedevilled Audio System
- * Copyright (C) 1998-2003 Tim Janik
- * Copyright (C) 2009 Stefan Westerfeld
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * A copy of the GNU Lesser General Public License should ship along
- * with this library; if not, see http://www.gnu.org/copyleft/.
- */
-
-#ifndef __BST_SOUND_FONT_VIEW_H__
-#define __BST_SOUND_FONT_VIEW_H__
-
-#include "bstitemview.h"
-#include "bstsoundfontpresetview.h"
+// Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
+#ifndef __BST_SOUND_FONT_VIEW_HH__
+#define __BST_SOUND_FONT_VIEW_HH__
+
+#include "bstitemview.hh"
+#include "bstsoundfontpresetview.hh"
G_BEGIN_DECLS
@@ -52,4 +35,6 @@ GType bst_sound_font_view_get_type (void);
GtkWidget* bst_sound_font_view_new (SfiProxy sfont_repo);
SfiProxy bst_sound_font_view_get_preset (BstSoundFontView *self);
-#endif /* __BST_SOUND_FONT_VIEW_H__ */
+G_END_DECLS
+
+#endif /* __BST_SOUND_FONT_VIEW_HH__ */
diff --git a/beast-gtk/bstsupershell.cc b/beast-gtk/bstsupershell.cc
index 224c4df..a0166cb 100644
--- a/beast-gtk/bstsupershell.cc
+++ b/beast-gtk/bstsupershell.cc
@@ -7,7 +7,7 @@
#include "bstbusview.hh"
#include "bstwaveview.hh"
#include "bstrackview.hh"
-#include "bstsoundfontview.h"
+#include "bstsoundfontview.hh"
#include "bstsnetrouter.hh"
#include "bstgconfig.hh"
#include <string.h>
diff --git a/beast-gtk/bsttracksynthdialog.cc b/beast-gtk/bsttracksynthdialog.cc
index 16ec978..f696599 100644
--- a/beast-gtk/bsttracksynthdialog.cc
+++ b/beast-gtk/bsttracksynthdialog.cc
@@ -106,7 +106,7 @@ bst_track_synth_dialog_init (BstTrackSynthDialog *self)
gxk_notebook_append (self->notebook, self->wpage, "wave", TRUE);
bst_wave_view_set_editable (BST_WAVE_VIEW (self->wpage), FALSE);
/* sound font view */
- self->sfont_page = g_object_new (BST_TYPE_SOUND_FONT_VIEW, "visible", TRUE, NULL);
+ self->sfont_page = (GtkWidget *) g_object_new (BST_TYPE_SOUND_FONT_VIEW, "visible", TRUE, NULL);
gxk_notebook_append (self->notebook, self->sfont_page, "sound_font", TRUE);
/* provide buttons */
diff --git a/beast-gtk/bsttracksynthdialog.hh b/beast-gtk/bsttracksynthdialog.hh
index 90cbe68..ca106eb 100644
--- a/beast-gtk/bsttracksynthdialog.hh
+++ b/beast-gtk/bsttracksynthdialog.hh
@@ -4,7 +4,7 @@
#include "bstutils.hh"
#include "bstwaveview.hh"
-#include "bstsoundfontview.h"
+#include "bstsoundfontview.hh"
G_BEGIN_DECLS
diff --git a/beast-gtk/bstutils.cc b/beast-gtk/bstutils.cc
index 90a1afa..9c88573 100644
--- a/beast-gtk/bstutils.cc
+++ b/beast-gtk/bstutils.cc
@@ -5,7 +5,7 @@
#include "bstmenus.hh"
#include "bsttrackview.hh"
#include "bstwaveview.hh"
-#include "bstsoundfontview.h"
+#include "bstsoundfontview.hh"
#include "bstpartview.hh"
#include "bstbusmixer.hh"
#include "bstbuseditor.hh"
diff --git a/po/POTSCAN b/po/POTSCAN
index 8a75ee0..1a91b49 100644
--- a/po/POTSCAN
+++ b/po/POTSCAN
@@ -43,7 +43,7 @@ beast-gtk/bstrecords.idl
beast-gtk/bstsampleeditor.cc
beast-gtk/bstscrollgraph.cc
beast-gtk/bstsnetrouter.cc
-beast-gtk/bstsoundfontview.c
+beast-gtk/bstsoundfontview.cc
beast-gtk/bstsupershell.cc
beast-gtk/bsttrackrollctrl.cc
beast-gtk/bsttracksynthdialog.cc
@@ -92,7 +92,7 @@ bse/bseserver.cc
bse/bsesnooper.cc
bse/bsesong.cc
bse/bsesong.proc
-bse/bsesoundfontosc.c
+bse/bsesoundfontosc.cc
bse/bsesource.proc
bse/bsestandardosc.cc
bse/bsesubiport.cc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]