diff --git a/ZRCola/ZRCola.fbp b/ZRCola/ZRCola.fbp index 30a4204..dd01781 100644 --- a/ZRCola/ZRCola.fbp +++ b/ZRCola/ZRCola.fbp @@ -2443,6 +2443,95 @@ + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + -1,59 + + 0 + + 1 + m_categories + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 wxALL|wxEXPAND @@ -2519,8 +2608,8 @@ 0 wxALIGN_CENTRE - 35,35,35,35,35,35,35,35,35,35 - 10 + 35,35,35,35,35,35,35 + 7 1 @@ -2756,111 +2845,6 @@ bSizerRight wxVERTICAL none - - 5 - wxALL|wxEXPAND - 0 - - wxID_ANY - &Unicode - - sbSizerUnicode - wxVERTICAL - none - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 4 - - 0 - - 1 - m_unicode - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_CENTRE - - 0 - - wxString - wxFILTER_INCLUDE_CHAR_LIST - wxTextValidator - m_unicodeValid - - - - - - - - - - - - - - - - - - - - - - - - - - - OnUnicodeText - - - - - - - - 5 wxALL|wxEXPAND @@ -2873,6 +2857,191 @@ wxVERTICAL none + + 5 + wxALIGN_CENTER|wxALL + 0 + + + bSizerUnicode + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + U+ + + 0 + + + 0 + + 1 + m_labelUnicode + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 4 + + 0 + + 1 + m_unicode + 1 + + + protected + 1 + + Resizable + 1 + 50,-1 + + + 0 + + wxString + wxFILTER_INCLUDE_CHAR_LIST + wxTextValidator + m_unicodeValid + + + + + + + + + + + + + + + + + + + + + + + + + + + OnUnicodeText + + + + + + + + 5 wxALIGN_CENTER|wxALL @@ -2904,7 +3073,7 @@ wxALIGN_CENTRE 1 - 250 + 210 1 0 @@ -2921,7 +3090,7 @@ 1 - 0 + 1 0 0 wxID_ANY @@ -2949,7 +3118,7 @@ 0 wxALIGN_CENTRE - 250 + 200 1 1 @@ -3016,6 +3185,97 @@ + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_description + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_CENTRE|wxTE_MULTILINE|wxTE_READONLY + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3060,8 +3320,8 @@ 0 wxALIGN_CENTRE - 7 - 35,35,35,35,35,35,35 + 6 + 35,35,35,35,35,35 1 0 diff --git a/ZRCola/locale/sl_SI.po b/ZRCola/locale/sl_SI.po index a420c8d..e321344 100644 --- a/ZRCola/locale/sl_SI.po +++ b/ZRCola/locale/sl_SI.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: ZRCola\n" -"POT-Creation-Date: 2016-05-11 09:00+0200\n" -"PO-Revision-Date: 2016-05-11 09:00+0200\n" +"POT-Creation-Date: 2016-05-11 14:39+0200\n" +"PO-Revision-Date: 2016-05-11 14:39+0200\n" "Last-Translator: Simon Rozman \n" "Language-Team: Amebis, d. o. o., Kamnik \n" "Language: sl_SI\n" @@ -17,7 +17,7 @@ msgstr "" "X-Poedit-KeywordsList: _\n" "X-Poedit-SearchPath-0: .\n" -#: zrcolafrm.cpp:93 zrcolagui.h:93 MSIBuild/En.Win32.Release.Feature-2.idtx:4 +#: zrcolafrm.cpp:93 zrcolagui.h:95 MSIBuild/En.Win32.Release.Feature-2.idtx:4 #: MSIBuild/En.Win32.Release.Shortcut-2.idtx:4 #: MSIBuild/En.x64.Release.Feature-2.idtx:4 #: MSIBuild/En.x64.Release.Shortcut-2.idtx:4 @@ -242,19 +242,19 @@ msgstr "Unicode sestavljenega" msgid "&Browse" msgstr "Pre&brskaj" -#: zrcolagui.cpp:475 +#: zrcolagui.cpp:478 msgid "Re¢ly Used" msgstr "Nedavno &uporabljeni" -#: zrcolagui.cpp:533 -msgid "&Unicode" -msgstr "&Unicode" - -#: zrcolagui.cpp:545 +#: zrcolagui.cpp:536 msgid "Preview" msgstr "Predogled" -#: zrcolagui.cpp:580 +#: zrcolagui.cpp:541 +msgid "U+" +msgstr "U+" + +#: zrcolagui.cpp:590 msgid "Re&lated" msgstr "&Sorodni" @@ -266,7 +266,7 @@ msgstr "" "Pritisnjena tipka INS. Zdaj vtpikajte kodo Unicode želenega znaka (do štiri " "šestnajstiške števke: 0-9, A-F), nato izpustite INS." -#: zrcolagui.h:200 +#: zrcolagui.h:205 msgid "Character Selector" msgstr "Izbirnik znaka" @@ -285,6 +285,9 @@ msgstr "1250" msgid "Input system for linguistic use" msgstr "Vnašalni sistem za jezikoslovno rabo" +#~ msgid "&Unicode" +#~ msgstr "&Unicode" + #~ msgid "Esc" #~ msgstr "Esc" @@ -399,9 +402,6 @@ msgstr "Vnašalni sistem za jezikoslovno rabo" #~ msgid "-" #~ msgstr "-" -#~ msgid "+" -#~ msgstr "+" - #~ msgid "[" #~ msgstr "[" diff --git a/ZRCola/zrcolaapp.cpp b/ZRCola/zrcolaapp.cpp index 218c573..3fafe1f 100644 --- a/ZRCola/zrcolaapp.cpp +++ b/ZRCola/zrcolaapp.cpp @@ -113,6 +113,21 @@ bool ZRColaApp::OnInit() m_ks_db.idxKey.clear(); m_ks_db.data .clear(); } + } else if (id == ZRCola::character_rec::id) { + dat >> ZRCola::character_rec(m_chr_db); + if (!dat.good()) { + wxFAIL_MSG(wxT("Error reading character data from ZRCola.zrcdb.")); + m_chr_db.idxChr.clear(); + m_chr_db.data .clear(); + } + } else if (id == ZRCola::chrcat_rec::id) { + dat >> ZRCola::chrcat_rec(m_cc_db); + if (!dat.good()) { + wxFAIL_MSG(wxT("Error reading character category data from ZRCola.zrcdb.")); + m_cc_db.idxChrCat.clear(); + m_cc_db.idxRnk .clear(); + m_cc_db.data .clear(); + } } } diff --git a/ZRCola/zrcolaapp.h b/ZRCola/zrcolaapp.h index b460a0f..b7c83b6 100644 --- a/ZRCola/zrcolaapp.h +++ b/ZRCola/zrcolaapp.h @@ -29,6 +29,7 @@ class ZRColaApp; #include #include #include +#include #include #include #include @@ -62,6 +63,8 @@ public: ZRCola::langchar_db m_lc_db; ///< Language character database ZRCola::language_db m_lang_db; ///< Language database ZRCola::keyseq_db m_ks_db; ///< Key sequence database + ZRCola::character_db m_chr_db; ///< Character database + ZRCola::chrcat_db m_cc_db; ///< Characted category database wxZRColaFrame *m_mainWnd; ///< Main window diff --git a/ZRCola/zrcolachrslct.cpp b/ZRCola/zrcolachrslct.cpp index 6593dc5..79a09fd 100644 --- a/ZRCola/zrcolachrslct.cpp +++ b/ZRCola/zrcolachrslct.cpp @@ -29,6 +29,12 @@ wxZRColaCharSelect::wxZRColaCharSelect(wxWindow* parent) : wxZRColaCharSelectBas wxTextValidator *validator = dynamic_cast(m_unicode->GetValidator()); if (validator) validator->SetCharIncludes(wxT("0123456789ABCDEFabcdef")); + + ZRColaApp *app = (ZRColaApp*)wxTheApp; + for (size_t i = 0, n = app->m_cc_db.idxRnk.size(); i < n; i++) { + const ZRCola::chrcat_db::chrcat &cc = app->m_cc_db.idxRnk[i]; + m_categories->Check(m_categories->Insert(wxGetTranslation(wxString(cc.name, cc.name_len), wxT("ZRCola-zrcdb")), i)); + } } diff --git a/ZRCola/zrcolafrm.h b/ZRCola/zrcolafrm.h index deed9d1..423bbec 100644 --- a/ZRCola/zrcolafrm.h +++ b/ZRCola/zrcolafrm.h @@ -122,7 +122,7 @@ protected: protected: bool m_lang_auto; ///< Automatic language selection according to keyboard layout ZRCola::langid_t m_lang; ///< Language for decomposing - WXHWND m_hWndSource; ///< handle of the active window, when the ZRCola hotkey was pressed + WXHWND m_hWndSource; ///< Handle of the active window, when the ZRCola hotkey was pressed wxTaskBarIcon *m_taskBarIcon; ///< Taskbar icon wxZRColaCharSelect *m_chrSelect; ///< Character selection dialog }; diff --git a/ZRCola/zrcolagui.cpp b/ZRCola/zrcolagui.cpp index 7083998..db8f6ad 100644 --- a/ZRCola/zrcolagui.cpp +++ b/ZRCola/zrcolagui.cpp @@ -413,10 +413,16 @@ wxZRColaCharSelectBase::wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id, m_search->ShowCancelButton( true ); sbSizerBrowse->Add( m_search, 0, wxALL|wxEXPAND, 5 ); + wxArrayString m_categoriesChoices; + m_categories = new wxCheckListBox( sbSizerBrowse->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_categoriesChoices, 0 ); + m_categories->SetMaxSize( wxSize( -1,59 ) ); + + sbSizerBrowse->Add( m_categories, 0, wxALL|wxEXPAND, 5 ); + m_gridResults = new wxGrid( sbSizerBrowse->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); // Grid - m_gridResults->CreateGrid( 10, 16 ); + m_gridResults->CreateGrid( 7, 16 ); m_gridResults->EnableEditing( false ); m_gridResults->EnableGridLines( true ); m_gridResults->EnableDragGridSize( false ); @@ -452,9 +458,6 @@ wxZRColaCharSelectBase::wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id, m_gridResults->SetRowSize( 4, 35 ); m_gridResults->SetRowSize( 5, 35 ); m_gridResults->SetRowSize( 6, 35 ); - m_gridResults->SetRowSize( 7, 35 ); - m_gridResults->SetRowSize( 8, 35 ); - m_gridResults->SetRowSize( 9, 35 ); m_gridResults->EnableDragRowSize( false ); m_gridResults->SetRowLabelSize( 0 ); m_gridResults->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); @@ -529,39 +532,43 @@ wxZRColaCharSelectBase::wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id, wxBoxSizer* bSizerRight; bSizerRight = new wxBoxSizer( wxVERTICAL ); - wxStaticBoxSizer* sbSizerUnicode; - sbSizerUnicode = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("&Unicode") ), wxVERTICAL ); + wxStaticBoxSizer* sbSizerPreview; + sbSizerPreview = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Preview") ), wxVERTICAL ); - m_unicode = new wxTextCtrl( sbSizerUnicode->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CENTRE ); + wxBoxSizer* bSizerUnicode; + bSizerUnicode = new wxBoxSizer( wxHORIZONTAL ); + + m_labelUnicode = new wxStaticText( sbSizerPreview->GetStaticBox(), wxID_ANY, _("U+"), wxDefaultPosition, wxDefaultSize, 0 ); + m_labelUnicode->Wrap( -1 ); + bSizerUnicode->Add( m_labelUnicode, 0, wxALIGN_CENTER, 5 ); + + m_unicode = new wxTextCtrl( sbSizerPreview->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 50,-1 ), 0 ); m_unicode->SetMaxLength( 4 ); m_unicode->SetValidator( wxTextValidator( wxFILTER_INCLUDE_CHAR_LIST, &m_unicodeValid ) ); - sbSizerUnicode->Add( m_unicode, 0, wxALL|wxEXPAND, 5 ); + bSizerUnicode->Add( m_unicode, 0, wxALIGN_CENTER, 5 ); - bSizerRight->Add( sbSizerUnicode, 0, wxALL|wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizerPreview; - sbSizerPreview = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Preview") ), wxVERTICAL ); + sbSizerPreview->Add( bSizerUnicode, 0, wxALIGN_CENTER|wxALL, 5 ); m_gridPreview = new wxGrid( sbSizerPreview->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); // Grid m_gridPreview->CreateGrid( 1, 1 ); m_gridPreview->EnableEditing( false ); - m_gridPreview->EnableGridLines( false ); + m_gridPreview->EnableGridLines( true ); m_gridPreview->EnableDragGridSize( false ); m_gridPreview->SetMargins( 0, 0 ); // Columns - m_gridPreview->SetColSize( 0, 250 ); + m_gridPreview->SetColSize( 0, 210 ); m_gridPreview->EnableDragColMove( false ); m_gridPreview->EnableDragColSize( false ); m_gridPreview->SetColLabelSize( 0 ); m_gridPreview->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); // Rows - m_gridPreview->SetRowSize( 0, 250 ); + m_gridPreview->SetRowSize( 0, 200 ); m_gridPreview->EnableDragRowSize( false ); m_gridPreview->SetRowLabelSize( 0 ); m_gridPreview->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); @@ -573,6 +580,9 @@ wxZRColaCharSelectBase::wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id, m_gridPreview->SetDefaultCellAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); sbSizerPreview->Add( m_gridPreview, 0, wxALIGN_CENTER|wxALL, 5 ); + m_description = new wxTextCtrl( sbSizerPreview->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CENTRE|wxTE_MULTILINE|wxTE_READONLY ); + sbSizerPreview->Add( m_description, 1, wxALL|wxEXPAND, 5 ); + bSizerRight->Add( sbSizerPreview, 0, wxALL|wxEXPAND, 5 ); @@ -582,7 +592,7 @@ wxZRColaCharSelectBase::wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id, m_gridRelated = new wxGrid( sbSizerRelated->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); // Grid - m_gridRelated->CreateGrid( 3, 7 ); + m_gridRelated->CreateGrid( 3, 6 ); m_gridRelated->EnableEditing( false ); m_gridRelated->EnableGridLines( true ); m_gridRelated->EnableDragGridSize( false ); @@ -595,7 +605,6 @@ wxZRColaCharSelectBase::wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id, m_gridRelated->SetColSize( 3, 35 ); m_gridRelated->SetColSize( 4, 35 ); m_gridRelated->SetColSize( 5, 35 ); - m_gridRelated->SetColSize( 6, 35 ); m_gridRelated->EnableDragColMove( false ); m_gridRelated->EnableDragColSize( false ); m_gridRelated->SetColLabelSize( 0 ); diff --git a/ZRCola/zrcolagui.h b/ZRCola/zrcolagui.h index 92f3e7c..b594f8d 100644 --- a/ZRCola/zrcolagui.h +++ b/ZRCola/zrcolagui.h @@ -37,6 +37,8 @@ class wxZRColaComposerPanel; #include #include #include +#include +#include #include #include #include @@ -177,10 +179,13 @@ class wxZRColaCharSelectBase : public wxDialog protected: wxSearchCtrl* m_search; + wxCheckListBox* m_categories; wxGrid* m_gridResults; wxGrid* m_gridRecent; + wxStaticText* m_labelUnicode; wxTextCtrl* m_unicode; wxGrid* m_gridPreview; + wxTextCtrl* m_description; wxGrid* m_gridRelated; wxStdDialogButtonSizer* m_sdbSizerButtons; wxButton* m_sdbSizerButtonsOK;