diff --git a/Updater b/Updater index 54e6451..529bd00 160000 --- a/Updater +++ b/Updater @@ -1 +1 @@ -Subproject commit 54e64515d407f654d05ca79ab911b05f770151c1 +Subproject commit 529bd00da51c3bf820fd237e3695001f9b895c3a diff --git a/ZRCola.sln b/ZRCola.sln index 71562ee..ec365f6 100644 --- a/ZRCola.sln +++ b/ZRCola.sln @@ -18,6 +18,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libZRColaUI", "lib\libZRCol EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stdex", "lib\stdex\build\stdex.vcxproj", "{518777CC-0A59-4415-A12A-82751ED75343}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Updater", "Updater\Updater\build\Updater.vcxproj", "{990D8CF9-4457-4DC0-AA18-4968EF434741}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -66,6 +68,14 @@ Global {518777CC-0A59-4415-A12A-82751ED75343}.Release|Win32.Build.0 = Release|Win32 {518777CC-0A59-4415-A12A-82751ED75343}.Release|x64.ActiveCfg = Release|x64 {518777CC-0A59-4415-A12A-82751ED75343}.Release|x64.Build.0 = Release|x64 + {990D8CF9-4457-4DC0-AA18-4968EF434741}.Debug|Win32.ActiveCfg = Debug|Win32 + {990D8CF9-4457-4DC0-AA18-4968EF434741}.Debug|Win32.Build.0 = Debug|Win32 + {990D8CF9-4457-4DC0-AA18-4968EF434741}.Debug|x64.ActiveCfg = Debug|x64 + {990D8CF9-4457-4DC0-AA18-4968EF434741}.Debug|x64.Build.0 = Debug|x64 + {990D8CF9-4457-4DC0-AA18-4968EF434741}.Release|Win32.ActiveCfg = Release|Win32 + {990D8CF9-4457-4DC0-AA18-4968EF434741}.Release|Win32.Build.0 = Release|Win32 + {990D8CF9-4457-4DC0-AA18-4968EF434741}.Release|x64.ActiveCfg = Release|x64 + {990D8CF9-4457-4DC0-AA18-4968EF434741}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -75,5 +85,6 @@ Global {3C61929E-7289-4101-8D0A-DA22D6E1AEA8} = {6D85AD6A-69D6-40EB-BF0C-7495479DDCE5} {C0A84BD2-3870-4CD6-B281-0AB322E3C579} = {6D85AD6A-69D6-40EB-BF0C-7495479DDCE5} {518777CC-0A59-4415-A12A-82751ED75343} = {6D85AD6A-69D6-40EB-BF0C-7495479DDCE5} + {990D8CF9-4457-4DC0-AA18-4968EF434741} = {6D85AD6A-69D6-40EB-BF0C-7495479DDCE5} EndGlobalSection EndGlobal diff --git a/ZRCola/MSIBuild/Makefile b/ZRCola/MSIBuild/Makefile index d340753..e05ffb7 100644 --- a/ZRCola/MSIBuild/Makefile +++ b/ZRCola/MSIBuild/Makefile @@ -122,6 +122,7 @@ featZRCola compZRCola.exe.$(PLAT) featZRCola complibZRCola.dll.$(PLAT) featZRCola complibZRColaUI.dll.$(PLAT) featZRCola compwxExtend.dll.$(PLAT) +featZRCola compUpdater.dll.$(PLAT) featZRCola compLocalizationRepositoryPath featZRCola compLanguage featZRCola compDatabasePath @@ -132,6 +133,7 @@ featZRCola compZRCola.mo.sl_SI featZRCola compZRCola.zrcdb.mo.sl_SI featZRCola complibZRColaUI.mo.sl_SI featZRCola compwxExtend.mo.sl_SI +featZRCola compUpdater.mo.sl_SI featZRCola compwxstd.mo.sl_SI !ENDIF < + + + 0 + 1 + Check online for product update + wxID_HELP_UPDATE + wxITEM_NORMAL + Check for &Updates... + m_menuHelpUpdate + none + + + + + separator none @@ -5012,5 +5027,376 @@ + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + wxZRColaUpdaterBase + + + wxDEFAULT_DIALOG_STYLE + + Product Update + + + ZRColaUpdater + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizerContent + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 1 + + wxID_ANY + Log + + sbSizerLog + wxVERTICAL + none + + + 5 + wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + 450,150 + 1 + m_log + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_MULTILINE|wxTE_READONLY + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 0 + protected + 0 + + + + 5 + wxALIGN_RIGHT + 0 + + + bSizerButtons + wxHORIZONTAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 0 + + 1 + + 0 + 0 + wxID_ANY + &Update + + 0 + + + 0 + + 1 + m_buttonUpdate + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnUpdate + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_OK + &Close + + 0 + + + 0 + + 1 + m_buttonClose + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ZRCola/ZRCola.props b/ZRCola/ZRCola.props index da12113..efb6302 100644 --- a/ZRCola/ZRCola.props +++ b/ZRCola/ZRCola.props @@ -7,7 +7,7 @@ - ..\lib\wxExtend\include;..\lib\stdex\include;..\lib\libZRCola\include;..\lib\libZRColaUI\include + ..\lib\wxExtend\include;..\Updater\Updater\include;..\lib\stdex\include;..\lib\libZRCola\include;..\lib\libZRColaUI\include diff --git a/ZRCola/ZRCola.vcxproj b/ZRCola/ZRCola.vcxproj index e6e3210..d862bd4 100644 --- a/ZRCola/ZRCola.vcxproj +++ b/ZRCola/ZRCola.vcxproj @@ -90,6 +90,7 @@ + @@ -103,6 +104,7 @@ + @@ -114,6 +116,9 @@ {a3a36689-ac35-4026-93da-a3ba0c0e767c} + + {990d8cf9-4457-4dc0-aa18-4968ef434741} + diff --git a/ZRCola/ZRCola.vcxproj.filters b/ZRCola/ZRCola.vcxproj.filters index d7018e2..9fb694e 100644 --- a/ZRCola/ZRCola.vcxproj.filters +++ b/ZRCola/ZRCola.vcxproj.filters @@ -52,6 +52,9 @@ Source Files + + Source Files + @@ -87,6 +90,9 @@ Header Files + + Header Files + diff --git a/ZRCola/locale/ZRCola.pot b/ZRCola/locale/ZRCola.pot index a9fc1e6..df0bb40 100644 --- a/ZRCola/locale/ZRCola.pot +++ b/ZRCola/locale/ZRCola.pot @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: ZRCola\n" -"POT-Creation-Date: 2016-05-24 08:32+0200\n" +"POT-Creation-Date: 2016-05-24 16:26+0200\n" "PO-Revision-Date: 2016-05-13 15:52+0200\n" "Last-Translator: Simon Rozman \n" "Language-Team: Amebis, d. o. o., Kamnik \n" @@ -23,7 +23,7 @@ msgstr "" msgid "© 2004-%s ZRC SAZU" msgstr "© 2004-%s ZRC SAZU" -#: zrcolaapp.cpp:78 zrcolafrm.cpp:90 zrcolagui.cpp:754 zrcolagui.h:100 +#: zrcolaapp.cpp:78 zrcolafrm.cpp:90 zrcolagui.cpp:758 zrcolagui.h:101 #: MSIBuild/En.Win32.Debug.Feature-2.idtx:4 #: MSIBuild/En.Win32.Debug.Shortcut-2.idtx:4 #: MSIBuild/En.Win32.Release.Feature-2.idtx:4 @@ -94,7 +94,7 @@ msgstr "Izberi celotno besedilo" msgid "C&haracter Selector..." msgstr "Izbirnik &znaka ..." -#: zrcolagui.cpp:78 zrcolagui.cpp:166 +#: zrcolagui.cpp:78 zrcolagui.cpp:170 #, fuzzy msgid "Display character selector to select character to insert into text" msgstr "Prikaži izbirnik znaka za izbor znaka za vstavljanje v besedilo" @@ -104,7 +104,7 @@ msgstr "Prikaži izbirnik znaka za izbor znaka za vstavljanje v besedilo" msgid "&Send Composed" msgstr "Pošlji &sestavljeno" -#: zrcolagui.cpp:89 zrcolagui.cpp:168 +#: zrcolagui.cpp:89 zrcolagui.cpp:172 #, fuzzy msgid "Send composed text to source window" msgstr "Pošlji sestavljeno besedilo izvornemu oknu" @@ -114,7 +114,7 @@ msgstr "Pošlji sestavljeno besedilo izvornemu oknu" msgid "Send &Decomposed" msgstr "Pošlji &razstavljeno" -#: zrcolagui.cpp:98 zrcolagui.cpp:170 +#: zrcolagui.cpp:98 zrcolagui.cpp:174 #, fuzzy msgid "Send decomposed text to source window" msgstr "Pošlji razstavljeno besedilo izvornemu oknu" @@ -189,122 +189,130 @@ msgstr "&Zahtevaj nov znak ..." msgid "Submit a request to ZRC to add a new character" msgstr "Oddaj prošnjo ZRC-u za dodajanje novega znaka" -#: zrcolagui.cpp:151 +#: zrcolagui.cpp:146 +msgid "Check for &Updates..." +msgstr "" + +#: zrcolagui.cpp:146 +msgid "Check online for product update" +msgstr "" + +#: zrcolagui.cpp:155 #, fuzzy msgid "&Help" msgstr "Po&moč" -#: zrcolagui.cpp:156 +#: zrcolagui.cpp:160 #, fuzzy msgid "Cut" msgstr "Izreži" -#: zrcolagui.cpp:156 +#: zrcolagui.cpp:160 #, fuzzy msgid "Cut selection" msgstr "Izreži izbor" -#: zrcolagui.cpp:158 +#: zrcolagui.cpp:162 #, fuzzy msgid "Copy" msgstr "&Kopiraj" -#: zrcolagui.cpp:158 +#: zrcolagui.cpp:162 #, fuzzy msgid "Copy selection" msgstr "Kopiraj izbor" -#: zrcolagui.cpp:160 +#: zrcolagui.cpp:164 #, fuzzy msgid "Paste" msgstr "Prilepi" -#: zrcolagui.cpp:160 +#: zrcolagui.cpp:164 #, fuzzy msgid "Paste selection" msgstr "Prilepi izbor" -#: zrcolagui.cpp:163 +#: zrcolagui.cpp:167 #, fuzzy msgid "Edit" msgstr "Urejanje" -#: zrcolagui.cpp:166 zrcolagui.h:224 +#: zrcolagui.cpp:170 zrcolagui.h:225 #, fuzzy msgid "Character Selector" msgstr "Izbirnik znaka" -#: zrcolagui.cpp:168 +#: zrcolagui.cpp:172 #, fuzzy msgid "Send Composed" msgstr "Pošlji sestavljeno" -#: zrcolagui.cpp:170 +#: zrcolagui.cpp:174 #, fuzzy msgid "Send Decomposed" msgstr "Pošlji razstavljeno" -#: zrcolagui.cpp:173 +#: zrcolagui.cpp:177 #, fuzzy msgid "Compose" msgstr "Sestavljanje" -#: zrcolagui.cpp:177 +#: zrcolagui.cpp:181 #, fuzzy msgid "Character Catalog" msgstr "Katalog znakov" -#: zrcolagui.cpp:181 +#: zrcolagui.cpp:185 #, fuzzy msgid "(De)Composer" msgstr "Raz/Sestavljalnik" -#: zrcolagui.cpp:218 +#: zrcolagui.cpp:222 #, fuzzy msgid "Decomposed Text" msgstr "Razstavljeno besedilo" -#: zrcolagui.cpp:238 +#: zrcolagui.cpp:242 #, fuzzy msgid "Decomposed Unicode Dump" msgstr "Unicode razstavljenega" -#: zrcolagui.cpp:265 +#: zrcolagui.cpp:269 #, fuzzy msgid "Composed Text" msgstr "Sestavljeno besedilo" -#: zrcolagui.cpp:285 +#: zrcolagui.cpp:289 #, fuzzy msgid "Composed Unicode Dump" msgstr "Unicode sestavljenega" -#: zrcolagui.cpp:405 +#: zrcolagui.cpp:409 #, fuzzy msgid "&Browse" msgstr "Pre&brskaj" -#: zrcolagui.cpp:453 +#: zrcolagui.cpp:457 #, fuzzy msgid "Re¢ly Used" msgstr "Nedavno &uporabljeni" -#: zrcolagui.cpp:494 +#: zrcolagui.cpp:498 #, fuzzy msgid "Preview" msgstr "Predogled:" -#: zrcolagui.cpp:499 +#: zrcolagui.cpp:503 #, fuzzy msgid "U+" msgstr "U+" -#: zrcolagui.cpp:550 +#: zrcolagui.cpp:554 #, fuzzy msgid "Re&lated" msgstr "&Sorodni" -#: zrcolagui.cpp:650 +#: zrcolagui.cpp:654 #, fuzzy msgid "" "Some character native to specific language you are working with should not " @@ -315,22 +323,22 @@ msgstr "" "razstaviti v dele.\n" "Za optimalno razstavljanje izberite pravilni jezik." -#: zrcolagui.cpp:654 +#: zrcolagui.cpp:658 #, fuzzy msgid "Select language &automatically according to selected keyboard" msgstr "S&amodejno izberi jezik glede na izbrano tipkovnico" -#: zrcolagui.cpp:657 +#: zrcolagui.cpp:661 #, fuzzy msgid "&Manually select the language from the list below:" msgstr "Ročno izberi jezik na spodnje&m spisku:" -#: zrcolagui.cpp:669 +#: zrcolagui.cpp:673 #, fuzzy msgid "Text Language" msgstr "Jezik besedila" -#: zrcolagui.cpp:674 +#: zrcolagui.cpp:678 #, fuzzy msgid "" "ZRCola can be launched every time you log in to your computer.\n" @@ -341,28 +349,47 @@ msgstr "" "Na voljo bo na vrstici za sistemska obvestila ter preko registriranih " "bližnjic Win+F5 in Win+F6." -#: zrcolagui.cpp:678 +#: zrcolagui.cpp:682 #, fuzzy msgid "Start ZRCola &automatically on logon" msgstr "S&amodejno zaženi ZRColo ob prijavi" -#: zrcolagui.cpp:685 +#: zrcolagui.cpp:689 #, fuzzy msgid "Startup" msgstr "Zagon" -#: zrcolagui.cpp:764 +#: zrcolagui.cpp:768 +#, fuzzy msgid "" "Editor: Janoš Ježovnik\n" "Development: Amebis d. o. o.\n" "Development and maintenance (2004-2015): dr. Peter Weiss" msgstr "" +"Urednik: Janoš Ježovnik\n" +"Razvoj: Amebis d. o. o.\n" +"Razvoj in vzdrževanje (2004-2015): dr. Peter Weiss" -#: zrcolagui.cpp:772 +#: zrcolagui.cpp:776 #, fuzzy msgid "www.zrc-sazu.si" msgstr "www.zrc-sazu.si" +#: zrcolagui.cpp:815 +#, fuzzy +msgid "Log" +msgstr "Prijavi me" + +#: zrcolagui.cpp:831 +#, fuzzy +msgid "&Update" +msgstr "Potrdite osvežitev registra" + +#: zrcolagui.cpp:836 +#, fuzzy +msgid "&Close" +msgstr "&Zapri" + #: zrcolakeyhndlr.cpp:44 #, fuzzy msgid "" @@ -377,16 +404,20 @@ msgstr "" msgid "Start ZRCola automatically on logon" msgstr "Samodejno zaženi ZRColo ob prijavi" -#: zrcolagui.h:261 +#: zrcolagui.h:262 #, fuzzy msgid "Settings" msgstr "Nastavitve" -#: zrcolagui.h:285 +#: zrcolagui.h:286 #, fuzzy msgid "About ZRCola" msgstr "O ZRColi" +#: zrcolagui.h:309 +msgid "Product Update" +msgstr "" + #: MSIBuild/En.Win32.Debug.Feature-2.idtx:3 #: MSIBuild/En.Win32.Debug.Shortcut-2.idtx:3 #: MSIBuild/En.Win32.Release.Feature-2.idtx:3 diff --git a/ZRCola/locale/de_DE.po b/ZRCola/locale/de_DE.po index 590a2ca..8d28e40 100644 --- a/ZRCola/locale/de_DE.po +++ b/ZRCola/locale/de_DE.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: ZRCola\n" -"POT-Creation-Date: 2016-05-24 08:33+0200\n" -"PO-Revision-Date: 2016-05-24 08:33+0200\n" +"POT-Creation-Date: 2016-05-24 16:27+0200\n" +"PO-Revision-Date: 2016-05-24 16:27+0200\n" "Last-Translator: Simon Rozman \n" "Language-Team: Amebis, d. o. o., Kamnik \n" "Language: de_DE\n" @@ -20,7 +20,7 @@ msgstr "" msgid "© 2004-%s ZRC SAZU" msgstr "" -#: zrcolaapp.cpp:78 zrcolafrm.cpp:90 zrcolagui.cpp:754 zrcolagui.h:100 +#: zrcolaapp.cpp:78 zrcolafrm.cpp:90 zrcolagui.cpp:758 zrcolagui.h:101 #: MSIBuild/En.Win32.Debug.Feature-2.idtx:4 #: MSIBuild/En.Win32.Debug.Shortcut-2.idtx:4 #: MSIBuild/En.Win32.Release.Feature-2.idtx:4 @@ -81,7 +81,7 @@ msgstr "" msgid "C&haracter Selector..." msgstr "" -#: zrcolagui.cpp:78 zrcolagui.cpp:166 +#: zrcolagui.cpp:78 zrcolagui.cpp:170 msgid "Display character selector to select character to insert into text" msgstr "" @@ -89,7 +89,7 @@ msgstr "" msgid "&Send Composed" msgstr "" -#: zrcolagui.cpp:89 zrcolagui.cpp:168 +#: zrcolagui.cpp:89 zrcolagui.cpp:172 msgid "Send composed text to source window" msgstr "" @@ -97,7 +97,7 @@ msgstr "" msgid "Send &Decomposed" msgstr "" -#: zrcolagui.cpp:98 zrcolagui.cpp:170 +#: zrcolagui.cpp:98 zrcolagui.cpp:174 msgid "Send decomposed text to source window" msgstr "" @@ -159,154 +159,177 @@ msgstr "" msgid "Submit a request to ZRC to add a new character" msgstr "" -#: zrcolagui.cpp:151 +#: zrcolagui.cpp:146 +msgid "Check for &Updates..." +msgstr "" + +#: zrcolagui.cpp:146 +msgid "Check online for product update" +msgstr "" + +#: zrcolagui.cpp:155 #, fuzzy msgid "&Help" msgstr "&Hilfe" -#: zrcolagui.cpp:156 +#: zrcolagui.cpp:160 #, fuzzy msgid "Cut" msgstr "Ausschneiden" -#: zrcolagui.cpp:156 +#: zrcolagui.cpp:160 #, fuzzy msgid "Cut selection" msgstr "Auswahl ausschneiden" -#: zrcolagui.cpp:158 +#: zrcolagui.cpp:162 #, fuzzy msgid "Copy" msgstr "Kopieren" -#: zrcolagui.cpp:158 +#: zrcolagui.cpp:162 #, fuzzy msgid "Copy selection" msgstr "Auswahl kopieren" -#: zrcolagui.cpp:160 +#: zrcolagui.cpp:164 #, fuzzy msgid "Paste" msgstr "Einfügen" -#: zrcolagui.cpp:160 +#: zrcolagui.cpp:164 #, fuzzy msgid "Paste selection" msgstr "Auswahl einfügen" -#: zrcolagui.cpp:163 +#: zrcolagui.cpp:167 #, fuzzy msgid "Edit" msgstr "Bearbeiten" -#: zrcolagui.cpp:166 zrcolagui.h:224 +#: zrcolagui.cpp:170 zrcolagui.h:225 msgid "Character Selector" msgstr "" -#: zrcolagui.cpp:168 +#: zrcolagui.cpp:172 msgid "Send Composed" msgstr "" -#: zrcolagui.cpp:170 +#: zrcolagui.cpp:174 msgid "Send Decomposed" msgstr "" -#: zrcolagui.cpp:173 +#: zrcolagui.cpp:177 msgid "Compose" msgstr "" -#: zrcolagui.cpp:177 +#: zrcolagui.cpp:181 msgid "Character Catalog" msgstr "" -#: zrcolagui.cpp:181 +#: zrcolagui.cpp:185 msgid "(De)Composer" msgstr "" -#: zrcolagui.cpp:218 +#: zrcolagui.cpp:222 msgid "Decomposed Text" msgstr "" -#: zrcolagui.cpp:238 +#: zrcolagui.cpp:242 msgid "Decomposed Unicode Dump" msgstr "" -#: zrcolagui.cpp:265 +#: zrcolagui.cpp:269 msgid "Composed Text" msgstr "" -#: zrcolagui.cpp:285 +#: zrcolagui.cpp:289 msgid "Composed Unicode Dump" msgstr "" -#: zrcolagui.cpp:405 +#: zrcolagui.cpp:409 #, fuzzy msgid "&Browse" msgstr "Durchsuchen" -#: zrcolagui.cpp:453 +#: zrcolagui.cpp:457 msgid "Re¢ly Used" msgstr "" -#: zrcolagui.cpp:494 +#: zrcolagui.cpp:498 #, fuzzy msgid "Preview" msgstr " Vorschau" -#: zrcolagui.cpp:499 +#: zrcolagui.cpp:503 #, fuzzy msgid "U+" msgstr "Hilfeverzeichnis %u nicht gefunden." -#: zrcolagui.cpp:550 +#: zrcolagui.cpp:554 msgid "Re&lated" msgstr "" -#: zrcolagui.cpp:650 +#: zrcolagui.cpp:654 msgid "" "Some character native to specific language you are working with should not " "decompose to primitives.\n" "For optimal decomposition you should set the language correctly." msgstr "" -#: zrcolagui.cpp:654 +#: zrcolagui.cpp:658 msgid "Select language &automatically according to selected keyboard" msgstr "" -#: zrcolagui.cpp:657 +#: zrcolagui.cpp:661 msgid "&Manually select the language from the list below:" msgstr "" -#: zrcolagui.cpp:669 +#: zrcolagui.cpp:673 msgid "Text Language" msgstr "" -#: zrcolagui.cpp:674 +#: zrcolagui.cpp:678 msgid "" "ZRCola can be launched every time you log in to your computer.\n" "It will be available on the system tray and via registered shortcuts Win+F5 " "and Win+F6." msgstr "" -#: zrcolagui.cpp:678 +#: zrcolagui.cpp:682 msgid "Start ZRCola &automatically on logon" msgstr "" -#: zrcolagui.cpp:685 +#: zrcolagui.cpp:689 msgid "Startup" msgstr "" -#: zrcolagui.cpp:764 +#: zrcolagui.cpp:768 msgid "" "Editor: Janoš Ježovnik\n" "Development: Amebis d. o. o.\n" "Development and maintenance (2004-2015): dr. Peter Weiss" msgstr "" -#: zrcolagui.cpp:772 +#: zrcolagui.cpp:776 msgid "www.zrc-sazu.si" msgstr "" +#: zrcolagui.cpp:815 +#, fuzzy +msgid "Log" +msgstr "&Log" + +#: zrcolagui.cpp:831 +#, fuzzy +msgid "&Update" +msgstr "Kann Benutzer-Konfigurationsdatei nicht aktualisieren." + +#: zrcolagui.cpp:836 +#, fuzzy +msgid "&Close" +msgstr "&Schließen" + #: zrcolakeyhndlr.cpp:44 msgid "" "INS key is pressed. Type the Unicode code of desired character now (up to " @@ -317,14 +340,18 @@ msgstr "" msgid "Start ZRCola automatically on logon" msgstr "" -#: zrcolagui.h:261 +#: zrcolagui.h:262 msgid "Settings" msgstr "" -#: zrcolagui.h:285 +#: zrcolagui.h:286 msgid "About ZRCola" msgstr "" +#: zrcolagui.h:309 +msgid "Product Update" +msgstr "" + # Windows charset for this language (decimal) #: MSIBuild/En.Win32.Debug.Feature-2.idtx:3 #: MSIBuild/En.Win32.Debug.Shortcut-2.idtx:3 diff --git a/ZRCola/locale/ru_RU.po b/ZRCola/locale/ru_RU.po index d6e9e34..eedf17f 100644 --- a/ZRCola/locale/ru_RU.po +++ b/ZRCola/locale/ru_RU.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: ZRCola\n" -"POT-Creation-Date: 2016-05-24 08:33+0200\n" -"PO-Revision-Date: 2016-05-24 08:33+0200\n" +"POT-Creation-Date: 2016-05-24 16:27+0200\n" +"PO-Revision-Date: 2016-05-24 16:27+0200\n" "Last-Translator: Simon Rozman \n" "Language-Team: Amebis, d. o. o., Kamnik \n" "Language: ru_RU\n" @@ -21,7 +21,7 @@ msgstr "" msgid "© 2004-%s ZRC SAZU" msgstr "" -#: zrcolaapp.cpp:78 zrcolafrm.cpp:90 zrcolagui.cpp:754 zrcolagui.h:100 +#: zrcolaapp.cpp:78 zrcolafrm.cpp:90 zrcolagui.cpp:758 zrcolagui.h:101 #: MSIBuild/En.Win32.Debug.Feature-2.idtx:4 #: MSIBuild/En.Win32.Debug.Shortcut-2.idtx:4 #: MSIBuild/En.Win32.Release.Feature-2.idtx:4 @@ -78,7 +78,7 @@ msgstr "" msgid "C&haracter Selector..." msgstr "" -#: zrcolagui.cpp:78 zrcolagui.cpp:166 +#: zrcolagui.cpp:78 zrcolagui.cpp:170 msgid "Display character selector to select character to insert into text" msgstr "" @@ -86,7 +86,7 @@ msgstr "" msgid "&Send Composed" msgstr "" -#: zrcolagui.cpp:89 zrcolagui.cpp:168 +#: zrcolagui.cpp:89 zrcolagui.cpp:172 msgid "Send composed text to source window" msgstr "" @@ -94,7 +94,7 @@ msgstr "" msgid "Send &Decomposed" msgstr "" -#: zrcolagui.cpp:98 zrcolagui.cpp:170 +#: zrcolagui.cpp:98 zrcolagui.cpp:174 msgid "Send decomposed text to source window" msgstr "" @@ -154,143 +154,163 @@ msgstr "" msgid "Submit a request to ZRC to add a new character" msgstr "" -#: zrcolagui.cpp:151 +#: zrcolagui.cpp:146 +msgid "Check for &Updates..." +msgstr "" + +#: zrcolagui.cpp:146 +msgid "Check online for product update" +msgstr "" + +#: zrcolagui.cpp:155 msgid "&Help" msgstr "" -#: zrcolagui.cpp:156 +#: zrcolagui.cpp:160 msgid "Cut" msgstr "" -#: zrcolagui.cpp:156 +#: zrcolagui.cpp:160 msgid "Cut selection" msgstr "" -#: zrcolagui.cpp:158 +#: zrcolagui.cpp:162 msgid "Copy" msgstr "" -#: zrcolagui.cpp:158 +#: zrcolagui.cpp:162 msgid "Copy selection" msgstr "" -#: zrcolagui.cpp:160 +#: zrcolagui.cpp:164 msgid "Paste" msgstr "" -#: zrcolagui.cpp:160 +#: zrcolagui.cpp:164 msgid "Paste selection" msgstr "" -#: zrcolagui.cpp:163 +#: zrcolagui.cpp:167 msgid "Edit" msgstr "" -#: zrcolagui.cpp:166 zrcolagui.h:224 +#: zrcolagui.cpp:170 zrcolagui.h:225 msgid "Character Selector" msgstr "" -#: zrcolagui.cpp:168 +#: zrcolagui.cpp:172 msgid "Send Composed" msgstr "" -#: zrcolagui.cpp:170 +#: zrcolagui.cpp:174 msgid "Send Decomposed" msgstr "" -#: zrcolagui.cpp:173 +#: zrcolagui.cpp:177 msgid "Compose" msgstr "" -#: zrcolagui.cpp:177 +#: zrcolagui.cpp:181 msgid "Character Catalog" msgstr "" -#: zrcolagui.cpp:181 +#: zrcolagui.cpp:185 msgid "(De)Composer" msgstr "" -#: zrcolagui.cpp:218 +#: zrcolagui.cpp:222 msgid "Decomposed Text" msgstr "" -#: zrcolagui.cpp:238 +#: zrcolagui.cpp:242 msgid "Decomposed Unicode Dump" msgstr "" -#: zrcolagui.cpp:265 +#: zrcolagui.cpp:269 msgid "Composed Text" msgstr "" -#: zrcolagui.cpp:285 +#: zrcolagui.cpp:289 msgid "Composed Unicode Dump" msgstr "" -#: zrcolagui.cpp:405 +#: zrcolagui.cpp:409 msgid "&Browse" msgstr "" -#: zrcolagui.cpp:453 +#: zrcolagui.cpp:457 msgid "Re¢ly Used" msgstr "" -#: zrcolagui.cpp:494 +#: zrcolagui.cpp:498 msgid "Preview" msgstr "" -#: zrcolagui.cpp:499 +#: zrcolagui.cpp:503 msgid "U+" msgstr "" -#: zrcolagui.cpp:550 +#: zrcolagui.cpp:554 msgid "Re&lated" msgstr "" -#: zrcolagui.cpp:650 +#: zrcolagui.cpp:654 msgid "" "Some character native to specific language you are working with should not " "decompose to primitives.\n" "For optimal decomposition you should set the language correctly." msgstr "" -#: zrcolagui.cpp:654 +#: zrcolagui.cpp:658 msgid "Select language &automatically according to selected keyboard" msgstr "" -#: zrcolagui.cpp:657 +#: zrcolagui.cpp:661 msgid "&Manually select the language from the list below:" msgstr "" -#: zrcolagui.cpp:669 +#: zrcolagui.cpp:673 msgid "Text Language" msgstr "" -#: zrcolagui.cpp:674 +#: zrcolagui.cpp:678 msgid "" "ZRCola can be launched every time you log in to your computer.\n" "It will be available on the system tray and via registered shortcuts Win+F5 " "and Win+F6." msgstr "" -#: zrcolagui.cpp:678 +#: zrcolagui.cpp:682 msgid "Start ZRCola &automatically on logon" msgstr "" -#: zrcolagui.cpp:685 +#: zrcolagui.cpp:689 msgid "Startup" msgstr "" -#: zrcolagui.cpp:764 +#: zrcolagui.cpp:768 msgid "" "Editor: Janoš Ježovnik\n" "Development: Amebis d. o. o.\n" "Development and maintenance (2004-2015): dr. Peter Weiss" msgstr "" -#: zrcolagui.cpp:772 +#: zrcolagui.cpp:776 msgid "www.zrc-sazu.si" msgstr "" +#: zrcolagui.cpp:815 +msgid "Log" +msgstr "" + +#: zrcolagui.cpp:831 +msgid "&Update" +msgstr "" + +#: zrcolagui.cpp:836 +msgid "&Close" +msgstr "" + #: zrcolakeyhndlr.cpp:44 msgid "" "INS key is pressed. Type the Unicode code of desired character now (up to " @@ -301,14 +321,18 @@ msgstr "" msgid "Start ZRCola automatically on logon" msgstr "" -#: zrcolagui.h:261 +#: zrcolagui.h:262 msgid "Settings" msgstr "" -#: zrcolagui.h:285 +#: zrcolagui.h:286 msgid "About ZRCola" msgstr "" +#: zrcolagui.h:309 +msgid "Product Update" +msgstr "" + # Windows charset for this language (decimal) #: MSIBuild/En.Win32.Debug.Feature-2.idtx:3 #: MSIBuild/En.Win32.Debug.Shortcut-2.idtx:3 diff --git a/ZRCola/locale/sl_SI.po b/ZRCola/locale/sl_SI.po index fa47913..df0a109 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-24 08:32+0200\n" -"PO-Revision-Date: 2016-05-24 08:33+0200\n" +"POT-Creation-Date: 2016-05-24 16:26+0200\n" +"PO-Revision-Date: 2016-05-24 16:27+0200\n" "Last-Translator: Simon Rozman \n" "Language-Team: Amebis, d. o. o., Kamnik \n" "Language: sl_SI\n" @@ -21,7 +21,7 @@ msgstr "" msgid "© 2004-%s ZRC SAZU" msgstr "© 2004-%s ZRC SAZU" -#: zrcolaapp.cpp:78 zrcolafrm.cpp:90 zrcolagui.cpp:754 zrcolagui.h:100 +#: zrcolaapp.cpp:78 zrcolafrm.cpp:90 zrcolagui.cpp:758 zrcolagui.h:101 #: MSIBuild/En.Win32.Debug.Feature-2.idtx:4 #: MSIBuild/En.Win32.Debug.Shortcut-2.idtx:4 #: MSIBuild/En.Win32.Release.Feature-2.idtx:4 @@ -81,7 +81,7 @@ msgstr "Izberi celotno besedilo" msgid "C&haracter Selector..." msgstr "Izbirnik &znaka ..." -#: zrcolagui.cpp:78 zrcolagui.cpp:166 +#: zrcolagui.cpp:78 zrcolagui.cpp:170 msgid "Display character selector to select character to insert into text" msgstr "Prikaži izbirnik znaka za izbor znaka za vstavljanje v besedilo" @@ -89,7 +89,7 @@ msgstr "Prikaži izbirnik znaka za izbor znaka za vstavljanje v besedilo" msgid "&Send Composed" msgstr "Pošlji &sestavljeno" -#: zrcolagui.cpp:89 zrcolagui.cpp:168 +#: zrcolagui.cpp:89 zrcolagui.cpp:172 msgid "Send composed text to source window" msgstr "Pošlji sestavljeno besedilo izvornemu oknu" @@ -97,7 +97,7 @@ msgstr "Pošlji sestavljeno besedilo izvornemu oknu" msgid "Send &Decomposed" msgstr "Pošlji &razstavljeno" -#: zrcolagui.cpp:98 zrcolagui.cpp:170 +#: zrcolagui.cpp:98 zrcolagui.cpp:174 msgid "Send decomposed text to source window" msgstr "Pošlji razstavljeno besedilo izvornemu oknu" @@ -157,99 +157,107 @@ msgstr "&Zahtevaj nov znak ..." msgid "Submit a request to ZRC to add a new character" msgstr "Oddaj prošnjo ZRC-u za dodajanje novega znaka" -#: zrcolagui.cpp:151 +#: zrcolagui.cpp:146 +msgid "Check for &Updates..." +msgstr "Preveri za &posodobitev ..." + +#: zrcolagui.cpp:146 +msgid "Check online for product update" +msgstr "Preveri na spletu za posodobitev izdelka" + +#: zrcolagui.cpp:155 msgid "&Help" msgstr "Po&moč" -#: zrcolagui.cpp:156 +#: zrcolagui.cpp:160 msgid "Cut" msgstr "Izreži" -#: zrcolagui.cpp:156 +#: zrcolagui.cpp:160 msgid "Cut selection" msgstr "Izreži izbor" -#: zrcolagui.cpp:158 +#: zrcolagui.cpp:162 msgid "Copy" msgstr "Kopiraj" -#: zrcolagui.cpp:158 +#: zrcolagui.cpp:162 msgid "Copy selection" msgstr "Kopiraj izbor" -#: zrcolagui.cpp:160 +#: zrcolagui.cpp:164 msgid "Paste" msgstr "Prilepi" -#: zrcolagui.cpp:160 +#: zrcolagui.cpp:164 msgid "Paste selection" msgstr "Prilepi izbor" -#: zrcolagui.cpp:163 +#: zrcolagui.cpp:167 msgid "Edit" msgstr "Urejanje" -#: zrcolagui.cpp:166 zrcolagui.h:224 +#: zrcolagui.cpp:170 zrcolagui.h:225 msgid "Character Selector" msgstr "Izbirnik znaka" -#: zrcolagui.cpp:168 +#: zrcolagui.cpp:172 msgid "Send Composed" msgstr "Pošlji sestavljeno" -#: zrcolagui.cpp:170 +#: zrcolagui.cpp:174 msgid "Send Decomposed" msgstr "Pošlji razstavljeno" -#: zrcolagui.cpp:173 +#: zrcolagui.cpp:177 msgid "Compose" msgstr "Sestavljanje" -#: zrcolagui.cpp:177 +#: zrcolagui.cpp:181 msgid "Character Catalog" msgstr "Katalog znakov" -#: zrcolagui.cpp:181 +#: zrcolagui.cpp:185 msgid "(De)Composer" msgstr "Raz/Sestavljalnik" -#: zrcolagui.cpp:218 +#: zrcolagui.cpp:222 msgid "Decomposed Text" msgstr "Razstavljeno besedilo" -#: zrcolagui.cpp:238 +#: zrcolagui.cpp:242 msgid "Decomposed Unicode Dump" msgstr "Unicode razstavljenega" -#: zrcolagui.cpp:265 +#: zrcolagui.cpp:269 msgid "Composed Text" msgstr "Sestavljeno besedilo" -#: zrcolagui.cpp:285 +#: zrcolagui.cpp:289 msgid "Composed Unicode Dump" msgstr "Unicode sestavljenega" -#: zrcolagui.cpp:405 +#: zrcolagui.cpp:409 msgid "&Browse" msgstr "Pre&brskaj" -#: zrcolagui.cpp:453 +#: zrcolagui.cpp:457 msgid "Re¢ly Used" msgstr "Nedavno &uporabljeni" -#: zrcolagui.cpp:494 +#: zrcolagui.cpp:498 msgid "Preview" msgstr "Predogled" -#: zrcolagui.cpp:499 +#: zrcolagui.cpp:503 msgid "U+" msgstr "U+" -#: zrcolagui.cpp:550 +#: zrcolagui.cpp:554 msgid "Re&lated" msgstr "&Sorodni" -#: zrcolagui.cpp:650 +#: zrcolagui.cpp:654 msgid "" "Some character native to specific language you are working with should not " "decompose to primitives.\n" @@ -259,19 +267,19 @@ msgstr "" "razstaviti v dele.\n" "Za optimalno razstavljanje izberite pravilni jezik." -#: zrcolagui.cpp:654 +#: zrcolagui.cpp:658 msgid "Select language &automatically according to selected keyboard" msgstr "S&amodejno izberi jezik glede na izbrano tipkovnico" -#: zrcolagui.cpp:657 +#: zrcolagui.cpp:661 msgid "&Manually select the language from the list below:" msgstr "Ročno izberi jezik na spodnje&m spisku:" -#: zrcolagui.cpp:669 +#: zrcolagui.cpp:673 msgid "Text Language" msgstr "Jezik besedila" -#: zrcolagui.cpp:674 +#: zrcolagui.cpp:678 msgid "" "ZRCola can be launched every time you log in to your computer.\n" "It will be available on the system tray and via registered shortcuts Win+F5 " @@ -281,15 +289,15 @@ msgstr "" "Na voljo bo na vrstici za sistemska obvestila ter preko registriranih " "bližnjic Win+F5 in Win+F6." -#: zrcolagui.cpp:678 +#: zrcolagui.cpp:682 msgid "Start ZRCola &automatically on logon" msgstr "S&amodejno zaženi ZRColo ob prijavi" -#: zrcolagui.cpp:685 +#: zrcolagui.cpp:689 msgid "Startup" msgstr "Zagon" -#: zrcolagui.cpp:764 +#: zrcolagui.cpp:768 msgid "" "Editor: Janoš Ježovnik\n" "Development: Amebis d. o. o.\n" @@ -299,10 +307,22 @@ msgstr "" "Razvoj: Amebis d. o. o.\n" "Razvoj in vzdrževanje (2004-2015): dr. Peter Weiss" -#: zrcolagui.cpp:772 +#: zrcolagui.cpp:776 msgid "www.zrc-sazu.si" msgstr "www.zrc-sazu.si" +#: zrcolagui.cpp:815 +msgid "Log" +msgstr "Dnevnik" + +#: zrcolagui.cpp:831 +msgid "&Update" +msgstr "&Posodobi" + +#: zrcolagui.cpp:836 +msgid "&Close" +msgstr "&Zapri" + #: zrcolakeyhndlr.cpp:44 msgid "" "INS key is pressed. Type the Unicode code of desired character now (up to " @@ -315,14 +335,18 @@ msgstr "" msgid "Start ZRCola automatically on logon" msgstr "Samodejno zaženi ZRColo ob prijavi" -#: zrcolagui.h:261 +#: zrcolagui.h:262 msgid "Settings" msgstr "Nastavitve" -#: zrcolagui.h:285 +#: zrcolagui.h:286 msgid "About ZRCola" msgstr "O ZRColi" +#: zrcolagui.h:309 +msgid "Product Update" +msgstr "Posodabljanje izdelka" + # Windows charset for this language (decimal) #: MSIBuild/En.Win32.Debug.Feature-2.idtx:3 #: MSIBuild/En.Win32.Debug.Shortcut-2.idtx:3 diff --git a/ZRCola/stdafx.h b/ZRCola/stdafx.h index b4e4e3f..a817c2d 100644 --- a/ZRCola/stdafx.h +++ b/ZRCola/stdafx.h @@ -19,14 +19,29 @@ #pragma once +#include "../include/zrcola.h" +#include "zrcolaabout.h" +#include "zrcolaapp.h" +#include "zrcolachrgrid.h" +#include "zrcolachrcatpnl.h" +#include "zrcolacomppnl.h" +#include "zrcolafrm.h" +#include "zrcolakeyhndlr.h" +#include "zrcolasettings.h" +#include "zrcolaupdater.h" + +#include + +#include +#include + #include #include #include #include #include #include -#include -#include +#include #include #include @@ -40,13 +55,3 @@ #include #include #endif - -#include "../include/zrcola.h" -#include "zrcolaabout.h" -#include "zrcolaapp.h" -#include "zrcolachrgrid.h" -#include "zrcolachrcatpnl.h" -#include "zrcolacomppnl.h" -#include "zrcolafrm.h" -#include "zrcolakeyhndlr.h" -#include "zrcolasettings.h" diff --git a/ZRCola/zrcolaapp.cpp b/ZRCola/zrcolaapp.cpp index 7779c03..4a25739 100644 --- a/ZRCola/zrcolaapp.cpp +++ b/ZRCola/zrcolaapp.cpp @@ -64,6 +64,7 @@ bool ZRColaApp::OnInit() m_locale.AddCatalogLookupPathPrefix(sPath); wxVERIFY(m_locale.Init(language)); wxVERIFY(m_locale.AddCatalog(wxT("wxExtend") wxT(wxExtendVersion))); + wxVERIFY(m_locale.AddCatalog(wxT("Updater") wxT(wxUpdaterVersion))); wxVERIFY(m_locale.AddCatalog(wxT("libZRColaUI"))); wxVERIFY(m_locale.AddCatalog(wxT("ZRCola"))); wxVERIFY(m_locale.AddCatalog(wxT("ZRCola-zrcdb"))); @@ -161,6 +162,9 @@ bool ZRColaApp::OnInit() wxFAIL_MSG(wxT("ZRCola.zrcdb is not a valid ZRCola database.")); } + // Initialize sockets. Otherwise Updater thread will not work. + wxSocketBase::Initialize(); + m_mainWnd = new wxZRColaFrame(); wxPersistentRegisterAndRestore(m_mainWnd); m_mainWnd->Show(); diff --git a/ZRCola/zrcolaapp.h b/ZRCola/zrcolaapp.h index 544e334..32da170 100644 --- a/ZRCola/zrcolaapp.h +++ b/ZRCola/zrcolaapp.h @@ -74,8 +74,9 @@ public: wxZRColaFrame *m_mainWnd; ///< Main window -protected: wxLocale m_locale; ///< Current locale + +protected: #ifdef __WXMSW__ HANDLE m_running; ///< Global Win32 event to determine if another instance of ZRCola is already running #endif diff --git a/ZRCola/zrcolafrm.cpp b/ZRCola/zrcolafrm.cpp index ce6b810..067f274 100644 --- a/ZRCola/zrcolafrm.cpp +++ b/ZRCola/zrcolafrm.cpp @@ -50,8 +50,8 @@ wxBEGIN_EVENT_TABLE(wxZRColaFrame, wxZRColaFrameBase) EVT_MENU (wxID_FOCUS_CHARACTER_CATALOG , wxZRColaFrame::OnPanelCharacterCatalogFocus ) EVT_MENU (wxID_HELP_REQCHAR , wxZRColaFrame::OnHelpReqChar ) - - EVT_MENU (wxID_ABOUT , wxZRColaFrame::OnAbout ) + EVT_MENU (wxID_HELP_UPDATE , wxZRColaFrame::OnHelpUpdate ) + EVT_MENU (wxID_ABOUT , wxZRColaFrame::OnHelpAbout ) wxEND_EVENT_TABLE() @@ -337,7 +337,14 @@ void wxZRColaFrame::OnHelpReqChar(wxCommandEvent& event) } -void wxZRColaFrame::OnAbout(wxCommandEvent& event) +void wxZRColaFrame::OnHelpUpdate(wxCommandEvent& event) +{ + wxZRColaUpdater *dlg = new wxZRColaUpdater(this); + dlg->ShowModal(); +} + + +void wxZRColaFrame::OnHelpAbout(wxCommandEvent& event) { wxZRColaAbout *dlg = new wxZRColaAbout(this); dlg->ShowModal(); diff --git a/ZRCola/zrcolafrm.h b/ZRCola/zrcolafrm.h index 0bd9e02..e82baa4 100644 --- a/ZRCola/zrcolafrm.h +++ b/ZRCola/zrcolafrm.h @@ -85,7 +85,8 @@ protected: void OnPanelCharacterCatalog(wxCommandEvent& event); void OnPanelCharacterCatalogFocus(wxCommandEvent& event); void OnHelpReqChar(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); + void OnHelpUpdate(wxCommandEvent& event); + void OnHelpAbout(wxCommandEvent& event); wxDECLARE_EVENT_TABLE(); protected: diff --git a/ZRCola/zrcolagui.cpp b/ZRCola/zrcolagui.cpp index 819f988..7858992 100644 --- a/ZRCola/zrcolagui.cpp +++ b/ZRCola/zrcolagui.cpp @@ -142,6 +142,10 @@ wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxS m_menuHelpReqChar = new wxMenuItem( m_menuHelp, wxID_HELP_REQCHAR, wxString( _("&Request a new character...") ) , _("Submit a request to ZRC to add a new character"), wxITEM_NORMAL ); m_menuHelp->Append( m_menuHelpReqChar ); + wxMenuItem* m_menuHelpUpdate; + m_menuHelpUpdate = new wxMenuItem( m_menuHelp, wxID_HELP_UPDATE, wxString( _("Check for &Updates...") ) , _("Check online for product update"), wxITEM_NORMAL ); + m_menuHelp->Append( m_menuHelpUpdate ); + m_menuHelp->AppendSeparator(); wxMenuItem* m_menuHelpAbout; @@ -799,3 +803,56 @@ wxZRColaAboutBase::wxZRColaAboutBase( wxWindow* parent, wxWindowID id, const wxS wxZRColaAboutBase::~wxZRColaAboutBase() { } + +wxZRColaUpdaterBase::wxZRColaUpdaterBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxDialog( parent, id, title, pos, size, style, name ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizerContent; + bSizerContent = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizerLog; + sbSizerLog = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Log") ), wxVERTICAL ); + + m_log = new wxTextCtrl( sbSizerLog->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); + m_log->SetMinSize( wxSize( 450,150 ) ); + + sbSizerLog->Add( m_log, 1, wxEXPAND, 5 ); + + + bSizerContent->Add( sbSizerLog, 1, wxALL|wxEXPAND, 5 ); + + + bSizerContent->Add( 0, 0, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizerButtons; + bSizerButtons = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonUpdate = new wxButton( this, wxID_ANY, _("&Update"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonUpdate->Enable( false ); + + bSizerButtons->Add( m_buttonUpdate, 0, wxALL, 5 ); + + m_buttonClose = new wxButton( this, wxID_OK, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerButtons->Add( m_buttonClose, 0, wxALL, 5 ); + + + bSizerContent->Add( bSizerButtons, 0, wxALIGN_RIGHT, 5 ); + + + this->SetSizer( bSizerContent ); + this->Layout(); + bSizerContent->Fit( this ); + + this->Centre( wxBOTH ); + + // Connect Events + m_buttonUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaUpdaterBase::OnUpdate ), NULL, this ); +} + +wxZRColaUpdaterBase::~wxZRColaUpdaterBase() +{ + // Disconnect Events + m_buttonUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaUpdaterBase::OnUpdate ), NULL, this ); + +} diff --git a/ZRCola/zrcolagui.h b/ZRCola/zrcolagui.h index 35de726..0557922 100644 --- a/ZRCola/zrcolagui.h +++ b/ZRCola/zrcolagui.h @@ -70,7 +70,8 @@ class wxZRColaFrameBase : public wxFrame wxID_TOOLBAR_EDIT, wxID_TOOLBAR_COMPOSE, wxID_PANEL_CHRGRPS, - wxID_HELP_REQCHAR + wxID_HELP_REQCHAR, + wxID_HELP_UPDATE }; wxMenuBar* m_menubar; @@ -287,4 +288,27 @@ class wxZRColaAboutBase : public wxDialog }; +/////////////////////////////////////////////////////////////////////////////// +/// Class wxZRColaUpdaterBase +/////////////////////////////////////////////////////////////////////////////// +class wxZRColaUpdaterBase : public wxDialog +{ + private: + + protected: + wxTextCtrl* m_log; + wxButton* m_buttonUpdate; + wxButton* m_buttonClose; + + // Virtual event handlers, overide them in your derived class + virtual void OnUpdate( wxCommandEvent& event ) { event.Skip(); } + + + public: + + wxZRColaUpdaterBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Product Update"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaUpdater") ); + ~wxZRColaUpdaterBase(); + +}; + #endif //__ZRCOLAGUI_H__ diff --git a/ZRCola/zrcolaupdater.cpp b/ZRCola/zrcolaupdater.cpp new file mode 100644 index 0000000..121ed07 --- /dev/null +++ b/ZRCola/zrcolaupdater.cpp @@ -0,0 +1,80 @@ +/* + Copyright 2015-2016 Amebis + + This file is part of ZRCola. + + ZRCola is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ZRCola 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with ZRCola. If not, see . +*/ + +#include "stdafx.h" + + +////////////////////////////////////////////////////////////////////////// +// wxZRColaUpdater +////////////////////////////////////////////////////////////////////////// + +wxZRColaUpdater::wxZRColaUpdater(wxWindow* parent) : + m_logOrig(NULL), + m_updater(NULL), + wxZRColaUpdaterBase(parent) +{ + // Setup logging. + m_logOrig = wxLog::SetActiveTarget(new wxLogTextCtrl(m_log)); + + // Connect events. + Connect(wxID_ANY, wxEVT_UPDATER_CHECK_COMPLETE, wxThreadEventHandler(wxZRColaUpdater::OnCheckComplete), NULL, this); + + // Launch Updater thread. + ZRColaApp *app = (ZRColaApp*)wxTheApp; + m_updater = new wxUpdCheckThread(app->m_locale.GetCanonicalName(), this); + if (m_updater->Run() != wxTHREAD_NO_ERROR) { + wxFAIL_MSG("Can't create the thread!"); + delete m_updater; + m_updater = NULL; + } +} + + +wxZRColaUpdater::~wxZRColaUpdater() +{ + if (m_updater) { + // Terminate the Updater thread. + m_updater->Delete(); + } + + // Disconnect events. + Disconnect(wxID_ANY, wxEVT_UPDATER_CHECK_COMPLETE, wxThreadEventHandler(wxZRColaUpdater::OnCheckComplete), NULL, this); + + if (m_logOrig) { + // Return logging to previous state. + delete wxLog::SetActiveTarget(m_logOrig); + } +} + + +void wxZRColaUpdater::OnCheckComplete(wxThreadEvent& event) +{ + event.Skip(); + + m_buttonUpdate->Enable(event.GetInt() == wxUpdCheckThread::wxUpdUpdateAvailable); +} + + +void wxZRColaUpdater::OnUpdate(wxCommandEvent& event) +{ + event.Skip(); + + if (m_updater) + m_updater->LaunchUpdate(); +} diff --git a/ZRCola/zrcolaupdater.h b/ZRCola/zrcolaupdater.h new file mode 100644 index 0000000..946b165 --- /dev/null +++ b/ZRCola/zrcolaupdater.h @@ -0,0 +1,51 @@ +/* + Copyright 2015-2016 Amebis + + This file is part of ZRCola. + + ZRCola is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ZRCola 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with ZRCola. If not, see . +*/ + +/// +/// Forward declarations +/// +class wxZRColaUpdater; + + +#pragma once + +#include "zrcolagui.h" + +#include + +#include + + +/// +/// ZRCola updater dialog +/// +class wxZRColaUpdater : public wxZRColaUpdaterBase +{ +public: + wxZRColaUpdater(wxWindow* parent); + virtual ~wxZRColaUpdater(); + +protected: + void OnCheckComplete(wxThreadEvent& event); + virtual void OnUpdate(wxCommandEvent& event); + +protected: + wxLog *m_logOrig; ///< Original log + wxUpdCheckThread *m_updater; ///< Updater thread +}; diff --git a/include/MSIBuildCfg.mak b/include/MSIBuildCfg.mak index 4e2fa84..fe653a8 100644 Binary files a/include/MSIBuildCfg.mak and b/include/MSIBuildCfg.mak differ diff --git a/lib/wxExtend b/lib/wxExtend index cdefd74..e25bce4 160000 --- a/lib/wxExtend +++ b/lib/wxExtend @@ -1 +1 @@ -Subproject commit cdefd74f3f960d5fe6858204dd034a0b19ebac84 +Subproject commit e25bce487b192b3c19d08247fbeb0817beb7ccc9 diff --git a/output/locale/.gitignore b/output/locale/.gitignore index 461b755..b63bd1b 100644 --- a/output/locale/.gitignore +++ b/output/locale/.gitignore @@ -1,4 +1,5 @@ */libZRColaUI.mo */wxExtend12.mo +*/Updater10.mo */ZRCola.mo */ZRColaCompile.mo