[dasher: 159/217] Added parameter for control box id.
- From: Patrick Welche <pwelche src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dasher: 159/217] Added parameter for control box id.
- Date: Sat, 27 Feb 2016 12:13:41 +0000 (UTC)
commit f0c6ea7e17ba4bf37dc061dd5e5987b3e8773703
Author: Ada Majorek <amajorek google com>
Date: Fri Jan 1 02:06:46 2016 -0800
Added parameter for control box id.
No way to select it from properties dialog yet.
Src/DasherCore/ControlManager.cpp | 8 +++++---
Src/DasherCore/Parameters.cpp | 3 ++-
Src/DasherCore/Parameters.h | 2 +-
3 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/Src/DasherCore/ControlManager.cpp b/Src/DasherCore/ControlManager.cpp
index 0bbcf2d..09fae54 100644
--- a/Src/DasherCore/ControlManager.cpp
+++ b/Src/DasherCore/ControlManager.cpp
@@ -380,9 +380,11 @@ CControlManager::CControlManager(CSettingsUser *pCreateFrom, CNodeCreationManage
m_actions["delete dist=paragraph forward=no"] = new Delete(false, EDIT_PARAGRAPH);
m_actions["delete dist=page forward=no"] = new Delete(false, EDIT_PAGE);
m_actions["delete dist=all forward=no"] = new Delete(false, EDIT_FILE);
-
- m_pInterface->ScanFiles(this, "control.xml"); //just look for the one
-
+ auto id = GetStringParameter(SP_CONTROL_BOX_ID);
+ string fileName = "control.xml";
+ if (!id.empty())
+ fileName = "control." + id + ".xml";
+ m_pInterface->ScanFiles(this, fileName);
updateActions();
}
diff --git a/Src/DasherCore/Parameters.cpp b/Src/DasherCore/Parameters.cpp
index 6f2c3a6..33cb989 100644
--- a/Src/DasherCore/Parameters.cpp
+++ b/Src/DasherCore/Parameters.cpp
@@ -132,7 +132,8 @@ const sp_table stringparamtable[] = {
{SP_ALPHABET_2, "Alphabet2", Persistence::PERSISTENT, "", "Alphabet History 2"},
{SP_ALPHABET_3, "Alphabet3", Persistence::PERSISTENT, "", "Alphabet History 3"},
{SP_ALPHABET_4, "Alphabet4", Persistence::PERSISTENT, "", "Alphabet History 4"},
- {SP_COLOUR_ID, "ColourID", Persistence::PERSISTENT, "", "ColourID"},
+ { SP_COLOUR_ID, "ColourID", Persistence::PERSISTENT, "", "ColourID" },
+ { SP_CONTROL_BOX_ID, "ControlBoxID", Persistence::PERSISTENT, "", "ControlBoxID" },
{SP_DASHER_FONT, "DasherFont", Persistence::PERSISTENT, "", "DasherFont"},
{SP_GAME_TEXT_FILE, "GameTextFile", Persistence::PERSISTENT, "", "User-specified file with strings to
practice writing"},
{SP_SOCKET_INPUT_X_LABEL, "SocketInputXLabel", Persistence::PERSISTENT, "x", "Label preceding X values for
network input"},
diff --git a/Src/DasherCore/Parameters.h b/Src/DasherCore/Parameters.h
index 762556f..4fb729e 100644
--- a/Src/DasherCore/Parameters.h
+++ b/Src/DasherCore/Parameters.h
@@ -69,7 +69,7 @@ enum {
enum {
SP_ALPHABET_ID = END_OF_LPS, SP_ALPHABET_1, SP_ALPHABET_2, SP_ALPHABET_3, SP_ALPHABET_4,
- SP_COLOUR_ID, SP_DASHER_FONT, SP_GAME_TEXT_FILE,
+ SP_COLOUR_ID, SP_CONTROL_BOX_ID, SP_DASHER_FONT, SP_GAME_TEXT_FILE,
SP_SOCKET_INPUT_X_LABEL, SP_SOCKET_INPUT_Y_LABEL, SP_INPUT_FILTER, SP_INPUT_DEVICE,
SP_BUTTON_0, SP_BUTTON_1, SP_BUTTON_2, SP_BUTTON_3, SP_BUTTON_4, SP_BUTTON_10, SP_JOYSTICK_DEVICE,
END_OF_SPS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]