Fixed many resource file names, removed raw-char matches input-char requirement for Linux operation.

WARNING: This version is unstable. High possibility of encountering a complete processor lockup (likely an infinite loop).

Known bugs on Linux: Some fields are being drawn off-target (such as text) and they need to be fixed in order to allow compatibility. Different style files on different platforms would not be a good idea. The combined-editors are not working. When a text-replacement is made via "~", the cursor is placed before it and attempting to remove or select it causes a lockup. Symbol editor seems to be working fine. The symbol selection dialog causes a crash when used.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@194 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
coppro
2007-02-02 04:23:35 +00:00
parent ed5ac758f9
commit 3c4790cac9
16 changed files with 105 additions and 103 deletions
+8 -8
View File
@@ -67,10 +67,10 @@ void CardsPanel::onChangeSet() {
void CardsPanel::initUI(wxToolBar* tb, wxMenuBar* mb) {
// Toolbar
tb->AddTool(ID_FORMAT_BOLD, _(""), load_resource_tool_image(_("bold")), wxNullBitmap, wxITEM_CHECK, _TOOL_("bold"));
tb->AddTool(ID_FORMAT_ITALIC, _(""), load_resource_tool_image(_("italic")), wxNullBitmap, wxITEM_CHECK, _TOOL_("italic"));
tb->AddTool(ID_FORMAT_SYMBOL, _(""), load_resource_tool_image(_("symbol")), wxNullBitmap, wxITEM_CHECK, _TOOL_("symbols"));
tb->AddTool(ID_FORMAT_REMINDER, _(""), load_resource_tool_image(_("reminder")), wxNullBitmap, wxITEM_CHECK, _TOOL_("reminder text"));
tb->AddTool(ID_FORMAT_BOLD, _(""), load_resource_tool_image(_("format_bold")), wxNullBitmap, wxITEM_CHECK, _TOOL_("bold"));
tb->AddTool(ID_FORMAT_ITALIC, _(""), load_resource_tool_image(_("format_italic")), wxNullBitmap, wxITEM_CHECK, _TOOL_("italic"));
tb->AddTool(ID_FORMAT_SYMBOL, _(""), load_resource_tool_image(_("format_symbol")), wxNullBitmap, wxITEM_CHECK, _TOOL_("symbols"));
tb->AddTool(ID_FORMAT_REMINDER, _(""), load_resource_tool_image(_("format_reminder")), wxNullBitmap, wxITEM_CHECK, _TOOL_("reminder text"));
tb->AddSeparator();
tb->AddTool(ID_CARD_ADD, _(""), load_resource_tool_image(_("card_add")), wxNullBitmap, wxITEM_NORMAL,_TOOL_("add card"));
tb->AddTool(ID_CARD_REMOVE, _(""), load_resource_tool_image(_("card_del")), wxNullBitmap, wxITEM_NORMAL,_TOOL_("remove card"));
@@ -100,10 +100,10 @@ void CardsPanel::initUI(wxToolBar* tb, wxMenuBar* mb) {
mb->Insert(2, menuCard, _("&Cards"));
IconMenu* menuFormat = new IconMenu();
menuFormat->Append(ID_FORMAT_BOLD, _("bold"), _("Bold\tCtrl+B"), _("Makes the selected text bold"), wxITEM_CHECK);
menuFormat->Append(ID_FORMAT_ITALIC, _("italic"), _("Italic\tCtrl+I"), _("Makes the selected text italic"), wxITEM_CHECK);
menuFormat->Append(ID_FORMAT_SYMBOL, _("symbol"), _("Symbols\tCtrl+M"), _("Draws the selected text with symbols"), wxITEM_CHECK);
menuFormat->Append(ID_FORMAT_REMINDER, _("reminder"), _("Reminder Text\tCtrl+R"), _("Show reminder text for the selected keyword"), wxITEM_CHECK);
menuFormat->Append(ID_FORMAT_BOLD, _("format_bold"), _("Bold\tCtrl+B"), _("Makes the selected text bold"), wxITEM_CHECK);
menuFormat->Append(ID_FORMAT_ITALIC, _("format_italic"), _("Italic\tCtrl+I"), _("Makes the selected text italic"), wxITEM_CHECK);
menuFormat->Append(ID_FORMAT_SYMBOL, _("format_symbol"), _("Symbols\tCtrl+M"), _("Draws the selected text with symbols"), wxITEM_CHECK);
menuFormat->Append(ID_FORMAT_REMINDER, _("format_reminder"), _("Reminder Text\tCtrl+R"), _("Show reminder text for the selected keyword"), wxITEM_CHECK);
mb->Insert(3, menuFormat, _("&Format"));
}
+7 -7
View File
@@ -48,19 +48,19 @@ class CardsPanel : public SetWindowPanel {
virtual void doPaste();
// --------------------------------------------------- : Searching (find/replace)
/* virtual bool canFind() const;
#if 0
virtual bool canFind() const;
virtual bool canReplace() const;
virtual bool doFind(wxFindReplaceData& what);
virtual bool doReplace(wxFindReplaceData& what);
private:
// Functions that handle finding
/*
typedef void (CardsPanel::*FindHandler)(const CardP&, const TextValueP&, const size_t, const size_t, wxFindReplaceData&);
/// Execute a find (or replace), and start with the currently selected card and value
/** if findSame==true then find will also find the currently highlighted word
* Returns true if found
* /
*/
bool find(FindReplaceData& what, const FindHandler& handler, bool findSame = false);
/// find handler : select found value
@@ -70,17 +70,17 @@ class CardsPanel : public SetWindowPanel {
void handleReplace(const CardP& card, const TextValueP& value, size_t start, size_t end, FindReplaceData& what);
/// Find in all cards
/** NOTE: this function is essentially the same as findInCard * /
/** NOTE: this function is essentially the same as findInCard */
bool findInCards(const CardP& firstCard, const ValueP& firstValue, int firstChar, FindReplaceData& what, const FindHandler& handler);
/// Find in a card, if firstValue is specified start searching there
/** NOTE: this function is essentially the same as findInCards * /
/** NOTE: this function is essentially the same as findInCards */
bool findInCard(const CardP& card, const ValueP& firstValue, int firstChar, FindReplaceData& what, const FindHandler& handler);
/// Find the current search string in the specified value
/** if searchDir = up searches from the end and only before firstChar, unless firstChar == -1 * /
/** if searchDir = up searches from the end and only before firstChar, unless firstChar == -1 */
bool findInValue(const CardP& crd_, virtual const ValueP& value, int firstChar, FindReplaceData& what, const FindHandler& handler);
*/
#endif
public:
// --------------------------------------------------- : Selection
+7 -7
View File
@@ -34,16 +34,16 @@ void SetInfoPanel::onChangeSet() {
void SetInfoPanel::initUI(wxToolBar* tb, wxMenuBar* mb) {
// Toolbar
tb->AddTool(ID_FORMAT_BOLD, _(""), load_resource_tool_image(_("bold")), wxNullBitmap, wxITEM_CHECK, _("Bold"));
tb->AddTool(ID_FORMAT_ITALIC, _(""), load_resource_tool_image(_("italic")), wxNullBitmap, wxITEM_CHECK, _("Italic"));
tb->AddTool(ID_FORMAT_SYMBOL, _(""), load_resource_tool_image(_("symbol")), wxNullBitmap, wxITEM_CHECK, _("Symbols"));
tb->AddTool(ID_FORMAT_BOLD, _(""), load_resource_tool_image(_("format_bold")), wxNullBitmap, wxITEM_CHECK, _("Bold"));
tb->AddTool(ID_FORMAT_ITALIC, _(""), load_resource_tool_image(_("format_italic")), wxNullBitmap, wxITEM_CHECK, _("Italic"));
tb->AddTool(ID_FORMAT_SYMBOL, _(""), load_resource_tool_image(_("format_symbol")), wxNullBitmap, wxITEM_CHECK, _("Symbols"));
tb->Realize();
// Menus
IconMenu* menuFormat = new IconMenu();
menuFormat->Append(ID_FORMAT_BOLD, _("bold"), _("Bold\tCtrl+B"), _("Makes the selected text bold"), wxITEM_CHECK);
menuFormat->Append(ID_FORMAT_ITALIC, _("italic"), _("Italic\tCtrl+I"), _("Makes the selected text italic"), wxITEM_CHECK);
menuFormat->Append(ID_FORMAT_SYMBOL, _("symbol"), _("Symbols\tCtrl+M"), _("Draws the selected text with symbols"), wxITEM_CHECK);
menuFormat->Append(ID_FORMAT_REMINDER, _("reminder"), _("Reminder Text\tCtrl+R"), _("Show reminder text for the selected keyword"), wxITEM_CHECK);
menuFormat->Append(ID_FORMAT_BOLD, _("format_bold"), _("Bold\tCtrl+B"), _("Makes the selected text bold"), wxITEM_CHECK);
menuFormat->Append(ID_FORMAT_ITALIC, _("format_italic"), _("Italic\tCtrl+I"), _("Makes the selected text italic"), wxITEM_CHECK);
menuFormat->Append(ID_FORMAT_SYMBOL, _("format_symbol"), _("Symbols\tCtrl+M"), _("Draws the selected text with symbols"), wxITEM_CHECK);
menuFormat->Append(ID_FORMAT_REMINDER, _("format_reminder"), _("Reminder Text\tCtrl+R"), _("Show reminder text for the selected keyword"), wxITEM_CHECK);
mb->Insert(2, menuFormat, _("&Format"));
}
+18 -18
View File
@@ -48,9 +48,9 @@ SetWindow::SetWindow(Window* parent, const SetP& set)
// initialize menu bar
wxMenuBar* menuBar = new wxMenuBar();
IconMenu* menuFile = new IconMenu();
menuFile->Append(ID_FILE_NEW, _("new"), _MENU_("new set"), _HELP_("new set"));
menuFile->Append(ID_FILE_OPEN, _("open"), _MENU_("open set"), _HELP_("open set"));
menuFile->Append(ID_FILE_SAVE, _("save"), _MENU_("save set"), _HELP_("save set"));
menuFile->Append(ID_FILE_NEW, _("file_new"), _MENU_("new set"), _HELP_("new set"));
menuFile->Append(ID_FILE_OPEN, _("file_open"), _MENU_("open set"), _HELP_("open set"));
menuFile->Append(ID_FILE_SAVE, _("file_save"), _MENU_("save set"), _HELP_("save set"));
menuFile->Append(ID_FILE_SAVE_AS, _MENU_("save set as"), _HELP_("save set as"));
IconMenu* menuExport = new IconMenu();
menuExport->Append(ID_FILE_EXPORT_HTML, _("&HTML..."), _("Export the set to a HTML file"));
@@ -71,14 +71,14 @@ SetWindow::SetWindow(Window* parent, const SetP& set)
menuBar->Append(menuFile, _MENU_("file"));
IconMenu* menuEdit = new IconMenu();
menuEdit->Append(ID_EDIT_UNDO, _("undo"), _MENU_1_("undo",wxEmptyString), _HELP_("undo"));
menuEdit->Append(ID_EDIT_REDO, _("redo"), _MENU_1_("redo",wxEmptyString), _HELP_("redo"));
menuEdit->Append(ID_EDIT_UNDO, _("edit_undo"), _MENU_1_("undo",wxEmptyString), _HELP_("undo"));
menuEdit->Append(ID_EDIT_REDO, _("edit_redo"), _MENU_1_("redo",wxEmptyString), _HELP_("redo"));
menuEdit->AppendSeparator();
menuEdit->Append(ID_EDIT_CUT, _("cut"), _MENU_("cut"), _HELP_("cut"));
menuEdit->Append(ID_EDIT_COPY, _("copy"), _MENU_("copy"), _HELP_("copy"));
menuEdit->Append(ID_EDIT_PASTE, _("paste"), _MENU_("paste"), _HELP_("paste"));
menuEdit->Append(ID_EDIT_CUT, _("edit_cut"), _MENU_("cut"), _HELP_("cut"));
menuEdit->Append(ID_EDIT_COPY, _("edit_copy"), _MENU_("copy"), _HELP_("copy"));
menuEdit->Append(ID_EDIT_PASTE, _("edit_paste"), _MENU_("paste"), _HELP_("paste"));
menuEdit->AppendSeparator();
menuEdit->Append(ID_EDIT_FIND, _("find"), _MENU_("find"), _(""));
menuEdit->Append(ID_EDIT_FIND, _("edit_find"), _MENU_("find"), _(""));
menuEdit->Append(ID_EDIT_FIND_NEXT, _MENU_("find next"), _(""));
menuEdit->Append(ID_EDIT_REPLACE, _MENU_("replace"), _(""));
menuEdit->AppendSeparator();
@@ -105,16 +105,16 @@ SetWindow::SetWindow(Window* parent, const SetP& set)
// tool bar
wxToolBar* tb = CreateToolBar(wxTB_FLAT | wxNO_BORDER | wxTB_HORIZONTAL);
tb->SetToolBitmapSize(wxSize(18,18));
tb->AddTool(ID_FILE_NEW, _(""), load_resource_tool_image(_("new")), wxNullBitmap, wxITEM_NORMAL, _TOOL_("new set"), _HELP_("new set"));
tb->AddTool(ID_FILE_OPEN, _(""), load_resource_tool_image(_("open")), wxNullBitmap, wxITEM_NORMAL, _TOOL_("open set"), _HELP_("open set"));
tb->AddTool(ID_FILE_SAVE, _(""), load_resource_tool_image(_("save")), wxNullBitmap, wxITEM_NORMAL, _TOOL_("save set"), _HELP_("save set"));
tb->AddTool(ID_FILE_NEW, _(""), load_resource_tool_image(_("file_new")), wxNullBitmap, wxITEM_NORMAL, _TOOL_("new set"), _HELP_("new set"));
tb->AddTool(ID_FILE_OPEN, _(""), load_resource_tool_image(_("file_open")), wxNullBitmap, wxITEM_NORMAL, _TOOL_("open set"), _HELP_("open set"));
tb->AddTool(ID_FILE_SAVE, _(""), load_resource_tool_image(_("file_save")), wxNullBitmap, wxITEM_NORMAL, _TOOL_("save set"), _HELP_("save set"));
tb->AddSeparator();
tb->AddTool(ID_EDIT_CUT, _(""), load_resource_tool_image(_("cut")), wxNullBitmap, wxITEM_NORMAL, _TOOL_("cut"));
tb->AddTool(ID_EDIT_COPY, _(""), load_resource_tool_image(_("copy")), wxNullBitmap, wxITEM_NORMAL, _TOOL_("copy"));
tb->AddTool(ID_EDIT_PASTE, _(""), load_resource_tool_image(_("paste")), wxNullBitmap, wxITEM_NORMAL, _TOOL_("paste"));
tb->AddTool(ID_EDIT_CUT, _(""), load_resource_tool_image(_("edit_cut")), wxNullBitmap, wxITEM_NORMAL, _TOOL_("cut"));
tb->AddTool(ID_EDIT_COPY, _(""), load_resource_tool_image(_("edit_copy")), wxNullBitmap, wxITEM_NORMAL, _TOOL_("copy"));
tb->AddTool(ID_EDIT_PASTE, _(""), load_resource_tool_image(_("edit_paste")), wxNullBitmap, wxITEM_NORMAL, _TOOL_("paste"));
tb->AddSeparator();
tb->AddTool(ID_EDIT_UNDO, _(""), load_resource_tool_image(_("undo")), wxNullBitmap, wxITEM_NORMAL, _TOOL_1_("undo",wxEmptyString));
tb->AddTool(ID_EDIT_REDO, _(""), load_resource_tool_image(_("redo")), wxNullBitmap, wxITEM_NORMAL, _TOOL_1_("redo",wxEmptyString));
tb->AddTool(ID_EDIT_UNDO, _(""), load_resource_tool_image(_("edit_undo")), wxNullBitmap, wxITEM_NORMAL, _TOOL_1_("undo",wxEmptyString));
tb->AddTool(ID_EDIT_REDO, _(""), load_resource_tool_image(_("edit_redo")), wxNullBitmap, wxITEM_NORMAL, _TOOL_1_("redo",wxEmptyString));
tb->AddSeparator();
tb->Realize();
@@ -349,7 +349,7 @@ void SetWindow::onUpdateUI(wxUpdateUIEvent& ev) {
case ID_EDIT_REPLACE : ev.Enable(current_panel->canReplace());break;
default:
// items created by the panel, and cut/copy/paste and find/replace
current_panel->onUpdateUI(ev);
if(current_panel) current_panel->onUpdateUI(ev);
}
}