[beast: 17/29] BSE: convert enum type UserMessageType to enum class UserMessageType
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 17/29] BSE: convert enum type UserMessageType to enum class UserMessageType
- Date: Mon, 21 Mar 2016 15:13:32 +0000 (UTC)
commit 3f2759428f7387b884b7d3bddae2930fbee26c4a
Author: Tim Janik <timj gnu org>
Date: Sat Jan 30 02:03:48 2016 +0100
BSE: convert enum type UserMessageType to enum class UserMessageType
Signed-off-by: Tim Janik <timj gnu org>
beast-gtk/bstusermessage.cc | 8 ++++----
beast-gtk/bstusermessage.hh | 8 ++++----
bse/bsejanitor.proc | 8 ++++----
bse/bseserver.cc | 8 ++++----
4 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/beast-gtk/bstusermessage.cc b/beast-gtk/bstusermessage.cc
index 5e97d28..1862362 100644
--- a/beast-gtk/bstusermessage.cc
+++ b/beast-gtk/bstusermessage.cc
@@ -745,11 +745,11 @@ server_user_message (const Bse::UserMessage &umsg)
auto convert_msg_type = [] (Bse::UserMessageType mtype) {
switch (mtype)
{
- case Bse::ERROR: return BST_MSG_ERROR;
- case Bse::WARNING: return BST_MSG_WARNING;
- case Bse::DEBUG: return BST_MSG_DEBUG;
+ case Bse::UserMessageType::ERROR: return BST_MSG_ERROR;
+ case Bse::UserMessageType::WARNING: return BST_MSG_WARNING;
+ case Bse::UserMessageType::DEBUG: return BST_MSG_DEBUG;
default:
- case Bse::INFO: return BST_MSG_INFO;
+ case Bse::UserMessageType::INFO: return BST_MSG_INFO;
}
};
BstMessage msg = { 0, };
diff --git a/beast-gtk/bstusermessage.hh b/beast-gtk/bstusermessage.hh
index 350a350..25681d2 100644
--- a/beast-gtk/bstusermessage.hh
+++ b/beast-gtk/bstusermessage.hh
@@ -6,10 +6,10 @@ G_BEGIN_DECLS
/* --- structures --- */
typedef enum {
- BST_MSG_ERROR = Bse::ERROR,
- BST_MSG_WARNING = Bse::WARNING,
- BST_MSG_INFO = Bse::INFO,
- BST_MSG_DEBUG = Bse::DEBUG,
+ BST_MSG_ERROR = int64 (Bse::UserMessageType::ERROR),
+ BST_MSG_WARNING = int64 (Bse::UserMessageType::WARNING),
+ BST_MSG_INFO = int64 (Bse::UserMessageType::INFO),
+ BST_MSG_DEBUG = int64 (Bse::UserMessageType::DEBUG),
BST_MSG_SCRIPT,
} BstMsgType;
const char* bst_msg_type_ident (BstMsgType);
diff --git a/bse/bsejanitor.proc b/bse/bsejanitor.proc
index 927482f..6bf473e 100644
--- a/bse/bsejanitor.proc
+++ b/bse/bsejanitor.proc
@@ -381,11 +381,11 @@ PROCEDURE (bse-script-send-message, "Script/Message") {
auto stupid_convert = [] (char c) {
switch (c)
{
- case 'E': case 'e': return Bse::ERROR;
- case 'W': case 'w': return Bse::WARNING;
+ case 'E': case 'e': return Bse::UserMessageType::ERROR;
+ case 'W': case 'w': return Bse::UserMessageType::WARNING;
default:
- case 'I': case 'i': return Bse::INFO;
- case 'D': case 'd': return Bse::DEBUG;
+ case 'I': case 'i': return Bse::UserMessageType::INFO;
+ case 'D': case 'd': return Bse::UserMessageType::DEBUG;
}
};
diff --git a/bse/bseserver.cc b/bse/bseserver.cc
index 8164f8e..4e9a333 100644
--- a/bse/bseserver.cc
+++ b/bse/bseserver.cc
@@ -428,7 +428,7 @@ bse_server_require_pcm_input (BseServer *server)
if (!BSE_DEVICE_READABLE (server->pcm_device))
{
UserMessage umsg;
- umsg.utype = Bse::WARNING;
+ umsg.utype = Bse::UserMessageType::WARNING;
umsg.title = _("Audio Recording Failed");
umsg.text1 = _("Failed to start recording from audio device.");
umsg.text2 = _("An audio project is in use which processes an audio input signal, but the audio
device "
@@ -482,7 +482,7 @@ server_open_pcm_device (BseServer *server,
if (!server->pcm_device)
{
UserMessage umsg;
- umsg.utype = Bse::ERROR;
+ umsg.utype = Bse::UserMessageType::ERROR;
umsg.title = _("Audio I/O Failed");
umsg.text1 = _("No available audio device was found.");
umsg.text2 = _("No available audio device could be found and opened successfully. "
@@ -509,7 +509,7 @@ server_open_midi_device (BseServer *server)
if (server->midi_device)
{
UserMessage umsg;
- umsg.utype = Bse::WARNING;
+ umsg.utype = Bse::UserMessageType::WARNING;
umsg.title = _("MIDI I/O Failed");
umsg.text1 = _("MIDI input or output is not available.");
umsg.text2 = _("No available MIDI device could be found and opened successfully. "
@@ -567,7 +567,7 @@ bse_server_open_devices (BseServer *self)
if (error != 0)
{
UserMessage umsg;
- umsg.utype = Bse::ERROR;
+ umsg.utype = Bse::UserMessageType::ERROR;
umsg.title = _("Disk Recording Failed");
umsg.text1 = _("Failed to start PCM recording to disk.");
umsg.text2 = _("An error occoured while opening the recording file, selecting a different "
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]