Compare commits
18 Commits
ver/2.0-al
...
ver/2.0-al
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd2c20fc06 | ||
|
|
ac772671cc | ||
|
|
acfe980705 | ||
|
|
426b7a6227 | ||
|
|
834743c7dd | ||
|
|
c8628ef4eb | ||
|
|
4f52304fe9 | ||
|
|
eef80067bb | ||
|
|
9240288245 | ||
|
|
1b41ff7aab | ||
|
|
61af77e7b6 | ||
|
|
ee7f94d776 | ||
|
|
1cb4f470c6 | ||
|
|
8fd0437502 | ||
|
|
93361f0edb | ||
|
|
2007d04812 | ||
|
|
a4aff5151e | ||
|
|
ce43a99b30 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -53,7 +53,9 @@ All :: "$(LANG).$(PLAT).$(CFG).Component-1.idt"
|
||||
Component ComponentId Directory_ Attributes Condition KeyPath
|
||||
s$(MSIBUILD_LENGTH_ID) S38 s$(MSIBUILD_LENGTH_ID) i2 S255 S$(MSIBUILD_LENGTH_ID)
|
||||
Component Component
|
||||
!IF "$(LANG)" == "Sl"
|
||||
compwxstd.mo.sl_SI {A5FEEA94-08CA-4E12-993F-A115601EF258} ZRCOLALOCSLSIDIR $(MSIBUILD_COMPONENT_ATTRIB_FILE) filewxstd.mo.sl_SI
|
||||
!ENDIF
|
||||
compLocalizationRepositoryPath {0E96110A-C38D-4600-9AE2-B8B59AF53A00} ZRCOLALOCDIR $(MSIBUILD_COMPONENT_ATTRIB_REGISTRY) regLocalizationRepositoryPath
|
||||
compLanguage {B78359AC-9484-402C-8384-3A4595B39389} ZRCOLALOCDIR $(MSIBUILD_COMPONENT_ATTRIB_REGISTRY) regLanguage
|
||||
compDatabasePath {DF3C720D-50BB-4377-9EE0-9AC21C02B9DD} ZRCOLADATADIR $(MSIBUILD_COMPONENT_ATTRIB_REGISTRY) regDatabasePath
|
||||
@@ -226,7 +228,9 @@ All :: "$(LANG).$(PLAT).$(CFG).File-1.idt"
|
||||
File Component_ FileName FileSize Version Language Attributes Sequence
|
||||
s$(MSIBUILD_LENGTH_ID) s$(MSIBUILD_LENGTH_ID) l255 i4 S$(MSIBUILD_LENGTH_ID) S20 I2 i2
|
||||
File File
|
||||
!IF "$(LANG)" == "Sl"
|
||||
filewxstd.mo.sl_SI compwxstd.mo.sl_SI wxstd.mo 0 1060 0 1
|
||||
!ENDIF
|
||||
fileZRCola.zrcdb compZRCola.zrcdb ZRCOLA~1.ZRC|ZRCola.zrcdb 0 0 1
|
||||
file00_ZRCola_Re.ttf comp00_ZRCola_Re.ttf 00_ZRC~1.TTF|00_ZRCola_Re.ttf 0 0 1
|
||||
file00_ZRCola_It.ttf comp00_ZRCola_It.ttf 00_ZRC~2.TTF|00_ZRCola_It.ttf 0 0 1
|
||||
@@ -313,6 +317,7 @@ s$(MSIBUILD_LENGTH_ID) l0
|
||||
Property Property
|
||||
ARPPRODUCTICON iconZRCola.ico
|
||||
ALLUSERS 1
|
||||
DISABLEADVTSHORTCUTS 1
|
||||
INSTALLLEVEL 3
|
||||
InstallMode Typical
|
||||
SecureCustomProperties OLDPRODUCTFOUND;NEWPRODUCTFOUND
|
||||
@@ -342,7 +347,7 @@ regDatabasePath 2 SOFTWARE\Amebis\ZRCola DatabasePath [ZRCOLADATADIR] compDataba
|
||||
Registry Root Key Name Value Component_
|
||||
s$(MSIBUILD_LENGTH_ID) i2 l255 L255 L0 s$(MSIBUILD_LENGTH_ID)
|
||||
1252 Registry Registry
|
||||
regLanguage 1 SOFTWARE\Amebis\ZRCola Language #60 compLanguage
|
||||
regLanguage 2 SOFTWARE\Amebis\ZRCola Language #60 compLanguage
|
||||
<<NOKEEP
|
||||
|
||||
"De.$(PLAT).$(CFG).Registry-2.idt" : "En.$(PLAT).$(CFG).Registry-2.idtx" "..\locale\de_DE.po"
|
||||
|
||||
8
Makefile
8
Makefile
@@ -82,6 +82,7 @@ Setup \
|
||||
SetupDebug \
|
||||
Register \
|
||||
Unregister \
|
||||
PublishPre \
|
||||
Publish :: "MSI\MSIBuild\Version\Version.mak"
|
||||
$(MAKE) /f "Makefile" /$(MAKEFLAGS) HAS_VERSION=1 $@
|
||||
|
||||
@@ -183,12 +184,15 @@ RegisterShortcuts :: \
|
||||
UnregisterShortcuts ::
|
||||
-if exist "$(PROGRAMDATA)\Microsoft\Windows\Start Menu\Programs\ZRCola" rd /s /q "$(PROGRAMDATA)\Microsoft\Windows\Start Menu\Programs\ZRCola"
|
||||
|
||||
Publish :: \
|
||||
PublishPre :: \
|
||||
"$(PUBLISH_PACKAGE_DIR)" \
|
||||
$(REDIST_EN_WIN32) \
|
||||
$(REDIST_EN_X64) \
|
||||
$(REDIST_SL_WIN32) \
|
||||
$(REDIST_SL_X64) \
|
||||
$(REDIST_SL_X64)
|
||||
|
||||
Publish :: \
|
||||
PublishPre \
|
||||
"$(PUBLISH_DIR)\catalog-0000.xml"
|
||||
|
||||
|
||||
|
||||
2
Updater
2
Updater
Submodule Updater updated: e88f1b429f...f1a3ae730a
@@ -74,7 +74,9 @@ compZRCola.exe.Win32 {F30B6545-6203-4B7D-8575-85245A0F90E5} ZRCOLABINDIR 0 file
|
||||
!IF "$(PLAT)" == "x64"
|
||||
compZRCola.exe.x64 {D45B105D-2303-459A-AF4B-52AC3AAD5510} ZRCOLABINDIR 256 fileZRCola.exe.x64
|
||||
!ENDIF
|
||||
!IF "$(LANG)" == "Sl"
|
||||
compZRCola.mo.sl_SI {7FF95C71-D8DE-4D2B-A26D-FEB5A1F54D63} ZRCOLALOCSLSIDIR $(MSIBUILD_COMPONENT_ATTRIB_FILE) fileZRCola.mo.sl_SI
|
||||
!ENDIF
|
||||
<<NOKEEP
|
||||
|
||||
|
||||
@@ -117,17 +119,19 @@ Feature_ Component_
|
||||
s$(MSIBUILD_LENGTH_ID) s$(MSIBUILD_LENGTH_ID)
|
||||
FeatureComponents Feature_ Component_
|
||||
featZRCola compZRCola.exe.$(PLAT)
|
||||
featZRCola compZRCola.mo.sl_SI
|
||||
featZRCola complibZRCola.dll.$(PLAT)
|
||||
featZRCola complibZRColaUI.dll.$(PLAT)
|
||||
featZRCola compwxExtend.dll.$(PLAT)
|
||||
featZRCola compwxExtend.mo.sl_SI
|
||||
featZRCola compwxstd.mo.sl_SI
|
||||
featZRCola compLocalizationRepositoryPath
|
||||
featZRCola compLanguage
|
||||
featZRCola compDatabasePath
|
||||
featZRCola compZRCola.zrcdb
|
||||
featZRCola comp00_ZRCola_Re.ttf
|
||||
!IF "$(LANG)" == "Sl"
|
||||
featZRCola compZRCola.mo.sl_SI
|
||||
featZRCola compwxExtend.mo.sl_SI
|
||||
featZRCola compwxstd.mo.sl_SI
|
||||
!ENDIF
|
||||
<<NOKEEP
|
||||
|
||||
|
||||
@@ -143,7 +147,9 @@ File Component_ FileName FileSize Version Language Attributes Sequence
|
||||
s$(MSIBUILD_LENGTH_ID) s$(MSIBUILD_LENGTH_ID) l255 i4 S$(MSIBUILD_LENGTH_ID) S20 I2 i2
|
||||
File File
|
||||
fileZRCola.exe.$(PLAT) compZRCola.exe.$(PLAT) ZRCola.exe 0 0 1536 1
|
||||
!IF "$(LANG)" == "Sl"
|
||||
fileZRCola.mo.sl_SI compZRCola.mo.sl_SI ZRCola.mo 0 1060 0 1
|
||||
!ENDIF
|
||||
<<NOKEEP
|
||||
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<property name="title">ZRCola</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_name">ZRCola</property>
|
||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||
<property name="xrc_skip_sizer">1</property>
|
||||
<event name="OnActivate"></event>
|
||||
@@ -134,8 +134,8 @@
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="wxMenu" expanded="1">
|
||||
<property name="label">&File</property>
|
||||
<property name="name">m_menuFile</property>
|
||||
<property name="label">&Program</property>
|
||||
<property name="name">m_menuProgram</property>
|
||||
<property name="permission">protected</property>
|
||||
<object class="wxMenuItem" expanded="1">
|
||||
<property name="bitmap"></property>
|
||||
@@ -153,6 +153,105 @@
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="wxMenu" expanded="1">
|
||||
<property name="label">&Edit</property>
|
||||
<property name="name">m_menuEdit</property>
|
||||
<property name="permission">protected</property>
|
||||
<object class="wxMenuItem" expanded="1">
|
||||
<property name="bitmap">Load From Icon Resource; edit_cut.ico; [16; 16]</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="help">Cuts selected text and puts it on the clipboard</property>
|
||||
<property name="id">wxID_CUT</property>
|
||||
<property name="kind">wxITEM_NORMAL</property>
|
||||
<property name="label">Cut</property>
|
||||
<property name="name">m_menuItemEditCut</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="shortcut">Ctrl+X</property>
|
||||
<property name="unchecked_bitmap"></property>
|
||||
<event name="OnMenuSelection"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
<object class="wxMenuItem" expanded="1">
|
||||
<property name="bitmap">Load From Icon Resource; edit_copy.ico; [16; 16]</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="help">Copies selected text to the clipboard</property>
|
||||
<property name="id">wxID_COPY</property>
|
||||
<property name="kind">wxITEM_NORMAL</property>
|
||||
<property name="label">&Copy</property>
|
||||
<property name="name">m_menuItemEditCopy</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="shortcut">Ctrl+C</property>
|
||||
<property name="unchecked_bitmap"></property>
|
||||
<event name="OnMenuSelection"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
<object class="wxMenuItem" expanded="1">
|
||||
<property name="bitmap">Load From Icon Resource; edit_paste.ico; [16; 16]</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="help">Inserts text from the clipboard</property>
|
||||
<property name="id">wxID_PASTE</property>
|
||||
<property name="kind">wxITEM_NORMAL</property>
|
||||
<property name="label">&Paste</property>
|
||||
<property name="name">m_menuItemEditPaste</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="shortcut">Ctrl+V</property>
|
||||
<property name="unchecked_bitmap"></property>
|
||||
<event name="OnMenuSelection"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
<object class="separator" expanded="1">
|
||||
<property name="name">m_separatorEdit1</property>
|
||||
<property name="permission">none</property>
|
||||
</object>
|
||||
<object class="wxMenuItem" expanded="1">
|
||||
<property name="bitmap">Load From Icon Resource; send_composed.ico; [16; 16]</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="help">Sends composed text to source window</property>
|
||||
<property name="id">wxID_SEND_COMPOSED</property>
|
||||
<property name="kind">wxITEM_NORMAL</property>
|
||||
<property name="label">&Send Composed</property>
|
||||
<property name="name">m_menuItemSendComposed</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="shortcut">F5</property>
|
||||
<property name="unchecked_bitmap"></property>
|
||||
<event name="OnMenuSelection"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
<object class="wxMenuItem" expanded="1">
|
||||
<property name="bitmap">Load From Icon Resource; send_decomposed.ico; [16; 16]</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="help">Sends decomposed text to source window</property>
|
||||
<property name="id">wxID_SEND_DECOMPOSED</property>
|
||||
<property name="kind">wxITEM_NORMAL</property>
|
||||
<property name="label">Send &Decomposed</property>
|
||||
<property name="name">m_menuItemSendDecomposed</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="shortcut">F6</property>
|
||||
<property name="unchecked_bitmap"></property>
|
||||
<event name="OnMenuSelection"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
<object class="wxMenuItem" expanded="1">
|
||||
<property name="bitmap">Load From Icon Resource; send_abort.ico; [16; 16]</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="help">Aborts composition and returns focus to source window</property>
|
||||
<property name="id">wxID_SEND_ABORT</property>
|
||||
<property name="kind">wxITEM_NORMAL</property>
|
||||
<property name="label">Abort (De)composition</property>
|
||||
<property name="name">m_menuItemSendAbort</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="shortcut">Esc</property>
|
||||
<property name="unchecked_bitmap"></property>
|
||||
<event name="OnMenuSelection"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="wxMenu" expanded="1">
|
||||
<property name="label">&Help</property>
|
||||
<property name="name">m_menuHelp</property>
|
||||
@@ -174,7 +273,195 @@
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxToolBar" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmapsize"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="margins"></property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_toolbar</property>
|
||||
<property name="packing">1</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="separation">5</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxTB_HORIZONTAL</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="tool" expanded="1">
|
||||
<property name="bitmap">Load From Icon Resource; edit_cut.ico; [24; 24]</property>
|
||||
<property name="context_menu">0</property>
|
||||
<property name="id">wxID_CUT</property>
|
||||
<property name="kind">wxITEM_NORMAL</property>
|
||||
<property name="label">Cut</property>
|
||||
<property name="name">m_toolEditCut</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="statusbar">Cuts selected text and puts it on the clipboard</property>
|
||||
<property name="tooltip">Cut</property>
|
||||
<event name="OnAuiToolBarBeginDrag"></event>
|
||||
<event name="OnAuiToolBarMiddleClick"></event>
|
||||
<event name="OnAuiToolBarOverflowClick"></event>
|
||||
<event name="OnAuiToolBarRightClick"></event>
|
||||
<event name="OnAuiToolBarToolDropDown"></event>
|
||||
<event name="OnMenuSelection"></event>
|
||||
<event name="OnToolClicked"></event>
|
||||
<event name="OnToolEnter"></event>
|
||||
<event name="OnToolRClicked"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
<object class="tool" expanded="1">
|
||||
<property name="bitmap">Load From Icon Resource; edit_copy.ico; [24; 24]</property>
|
||||
<property name="context_menu">0</property>
|
||||
<property name="id">wxID_COPY</property>
|
||||
<property name="kind">wxITEM_NORMAL</property>
|
||||
<property name="label">Copy</property>
|
||||
<property name="name">m_toolEditCopy</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="statusbar">Copies selected text to the clipboard</property>
|
||||
<property name="tooltip">Copy</property>
|
||||
<event name="OnAuiToolBarBeginDrag"></event>
|
||||
<event name="OnAuiToolBarMiddleClick"></event>
|
||||
<event name="OnAuiToolBarOverflowClick"></event>
|
||||
<event name="OnAuiToolBarRightClick"></event>
|
||||
<event name="OnAuiToolBarToolDropDown"></event>
|
||||
<event name="OnMenuSelection"></event>
|
||||
<event name="OnToolClicked"></event>
|
||||
<event name="OnToolEnter"></event>
|
||||
<event name="OnToolRClicked"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
<object class="tool" expanded="1">
|
||||
<property name="bitmap">Load From Icon Resource; edit_paste.ico; [24; 24]</property>
|
||||
<property name="context_menu">0</property>
|
||||
<property name="id">wxID_PASTE</property>
|
||||
<property name="kind">wxITEM_NORMAL</property>
|
||||
<property name="label">Paste</property>
|
||||
<property name="name">m_toolEditPaste</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="statusbar">Inserts text from the clipboard</property>
|
||||
<property name="tooltip">Paste</property>
|
||||
<event name="OnAuiToolBarBeginDrag"></event>
|
||||
<event name="OnAuiToolBarMiddleClick"></event>
|
||||
<event name="OnAuiToolBarOverflowClick"></event>
|
||||
<event name="OnAuiToolBarRightClick"></event>
|
||||
<event name="OnAuiToolBarToolDropDown"></event>
|
||||
<event name="OnMenuSelection"></event>
|
||||
<event name="OnToolClicked"></event>
|
||||
<event name="OnToolEnter"></event>
|
||||
<event name="OnToolRClicked"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
<object class="toolSeparator" expanded="1">
|
||||
<property name="permission">protected</property>
|
||||
</object>
|
||||
<object class="tool" expanded="1">
|
||||
<property name="bitmap">Load From Icon Resource; send_composed.ico; [24; 24]</property>
|
||||
<property name="context_menu">0</property>
|
||||
<property name="id">wxID_SEND_COMPOSED</property>
|
||||
<property name="kind">wxITEM_NORMAL</property>
|
||||
<property name="label">Send Composed</property>
|
||||
<property name="name">m_toolSendComposed</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="statusbar">Sends composed text to source window</property>
|
||||
<property name="tooltip">Send Composed</property>
|
||||
<event name="OnAuiToolBarBeginDrag"></event>
|
||||
<event name="OnAuiToolBarMiddleClick"></event>
|
||||
<event name="OnAuiToolBarOverflowClick"></event>
|
||||
<event name="OnAuiToolBarRightClick"></event>
|
||||
<event name="OnAuiToolBarToolDropDown"></event>
|
||||
<event name="OnMenuSelection"></event>
|
||||
<event name="OnToolClicked"></event>
|
||||
<event name="OnToolEnter"></event>
|
||||
<event name="OnToolRClicked"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
<object class="tool" expanded="1">
|
||||
<property name="bitmap">Load From Icon Resource; send_decomposed.ico; [24; 24]</property>
|
||||
<property name="context_menu">0</property>
|
||||
<property name="id">wxID_SEND_DECOMPOSED</property>
|
||||
<property name="kind">wxITEM_NORMAL</property>
|
||||
<property name="label">Send Decomposed</property>
|
||||
<property name="name">m_toolSendDecomposed</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="statusbar">Sends decomposed text to source window</property>
|
||||
<property name="tooltip">Send Decomposed</property>
|
||||
<event name="OnAuiToolBarBeginDrag"></event>
|
||||
<event name="OnAuiToolBarMiddleClick"></event>
|
||||
<event name="OnAuiToolBarOverflowClick"></event>
|
||||
<event name="OnAuiToolBarRightClick"></event>
|
||||
<event name="OnAuiToolBarToolDropDown"></event>
|
||||
<event name="OnMenuSelection"></event>
|
||||
<event name="OnToolClicked"></event>
|
||||
<event name="OnToolEnter"></event>
|
||||
<event name="OnToolRClicked"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerMain</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
@@ -265,6 +552,52 @@
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="wxStatusBar" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="fields">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_statusBar</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxST_SIZEGRIP</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="Panel" expanded="1">
|
||||
<property name="aui_managed">0</property>
|
||||
@@ -354,7 +687,7 @@
|
||||
<property name="font">00 ZRCola,90,90,20,70,0</property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_DECOMPOSED</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
@@ -445,7 +778,7 @@
|
||||
<property name="font">00 ZRCola,90,90,20,70,0</property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_COMPOSED</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
||||
BIN
ZRCola/ZRCola.rc
BIN
ZRCola/ZRCola.rc
Binary file not shown.
@@ -106,6 +106,12 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="res\edit_copy.ico" />
|
||||
<None Include="res\edit_cut.ico" />
|
||||
<None Include="res\edit_paste.ico" />
|
||||
<None Include="res\send_abort.ico" />
|
||||
<None Include="res\send_composed.ico" />
|
||||
<None Include="res\send_decomposed.ico" />
|
||||
<None Include="res\zrcola.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -62,6 +62,24 @@
|
||||
<None Include="res\zrcola.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="res\send_abort.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="res\send_composed.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="res\send_decomposed.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="res\edit_copy.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="res\edit_cut.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="res\edit_paste.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ZRCola.rc">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: ZRCola\n"
|
||||
"POT-Creation-Date: 2016-03-14 17:18+0100\n"
|
||||
"PO-Revision-Date: 2016-03-14 17:18+0100\n"
|
||||
"POT-Creation-Date: 2016-04-06 12:31+0200\n"
|
||||
"PO-Revision-Date: 2016-04-06 12:31+0200\n"
|
||||
"Last-Translator: Simon Rozman <simon.rozman@amebis.si>\n"
|
||||
"Language-Team: Amebis, d. o. o., Kamnik <info@amebis.si>\n"
|
||||
"Language: sl_SI\n"
|
||||
@@ -17,27 +17,27 @@ msgstr ""
|
||||
"X-Poedit-KeywordsList: _\n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
|
||||
#: zrcolafrm.cpp:58
|
||||
#: zrcolafrm.cpp:56
|
||||
msgid ""
|
||||
"ZRCola keyboard shortcut Win+Z could not be registered. Some functionality "
|
||||
"ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality "
|
||||
"will not be available."
|
||||
msgstr ""
|
||||
"ZRColine bližnjice na tipkovnici Win+Z ni mogoče registrirati. Nekaj "
|
||||
"ZRColine bližnjice na tipkovnici Win+F5 ni mogoče registrirati. Nekaj "
|
||||
"funkcionalnosti ne bo na voljo."
|
||||
|
||||
#: zrcolafrm.cpp:58 zrcolafrm.cpp:60
|
||||
#: zrcolafrm.cpp:56 zrcolafrm.cpp:58
|
||||
msgid "Warning"
|
||||
msgstr "Opozorilo"
|
||||
|
||||
#: zrcolafrm.cpp:60
|
||||
#: zrcolafrm.cpp:58
|
||||
msgid ""
|
||||
"ZRCola keyboard shortcut Win+Shift+Z could not be registered. Some "
|
||||
"functionality will not be available."
|
||||
"ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality "
|
||||
"will not be available."
|
||||
msgstr ""
|
||||
"ZRColine bližnjice na tipkovnici Win+Shift+Z ni mogoče registrirati. Nekaj "
|
||||
"ZRColine bližnjice na tipkovnici Win+F6 ni mogoče registrirati. Nekaj "
|
||||
"funkcionalnosti ne bo na voljo."
|
||||
|
||||
#: zrcolafrm.cpp:140
|
||||
#: zrcolafrm.cpp:119
|
||||
#, c-format
|
||||
msgid ""
|
||||
"ZRCola v%s\n"
|
||||
@@ -46,7 +46,7 @@ msgstr ""
|
||||
"ZRCola v%s\n"
|
||||
"Vse pravice pridržane 2015-%s Amebis"
|
||||
|
||||
#: zrcolafrm.cpp:140
|
||||
#: zrcolafrm.cpp:119
|
||||
msgid "About ZRCola"
|
||||
msgstr "O ZRColi"
|
||||
|
||||
@@ -55,51 +55,123 @@ msgid "E&xit"
|
||||
msgstr "I&zhod"
|
||||
|
||||
#: zrcolagui.cpp:35
|
||||
msgid "&File"
|
||||
msgstr "&Datoteka"
|
||||
msgid "&Program"
|
||||
msgstr "&Program"
|
||||
|
||||
#: zrcolagui.cpp:39
|
||||
#: zrcolagui.cpp:39 zrcolagui.cpp:106
|
||||
msgid "Cut"
|
||||
msgstr "Izreži"
|
||||
|
||||
#: zrcolagui.cpp:39 zrcolagui.cpp:106
|
||||
msgid "Cuts selected text and puts it on the clipboard"
|
||||
msgstr "Izreže izbrano besedilo in ga shrani na odložišče"
|
||||
|
||||
#: zrcolagui.cpp:48
|
||||
msgid "&Copy"
|
||||
msgstr "&Kopiraj"
|
||||
|
||||
#: zrcolagui.cpp:48 zrcolagui.cpp:108
|
||||
msgid "Copies selected text to the clipboard"
|
||||
msgstr "Kopira izbrano besedilo na odložišče"
|
||||
|
||||
#: zrcolagui.cpp:57
|
||||
msgid "&Paste"
|
||||
msgstr "&Prilepi"
|
||||
|
||||
#: zrcolagui.cpp:57 zrcolagui.cpp:110
|
||||
msgid "Inserts text from the clipboard"
|
||||
msgstr "Vstavi besedilo z odložišča"
|
||||
|
||||
#: zrcolagui.cpp:68
|
||||
msgid "&Send Composed"
|
||||
msgstr "Pošlji &sestavljeno"
|
||||
|
||||
#: zrcolagui.cpp:68 zrcolagui.cpp:114
|
||||
msgid "Sends composed text to source window"
|
||||
msgstr "Pošlje sestavljeno besedilo izvornemu oknu"
|
||||
|
||||
#: zrcolagui.cpp:77
|
||||
msgid "Send &Decomposed"
|
||||
msgstr "Pošlji &razstavljeno"
|
||||
|
||||
#: zrcolagui.cpp:77 zrcolagui.cpp:116
|
||||
msgid "Sends decomposed text to source window"
|
||||
msgstr "Pošlje razstavljeno besedilo izvornemu oknu"
|
||||
|
||||
#: zrcolagui.cpp:86
|
||||
msgid "Abort (De)composition"
|
||||
msgstr "Prekini raz/sestavljanje"
|
||||
|
||||
#: zrcolagui.cpp:86
|
||||
msgid "Aborts composition and returns focus to source window"
|
||||
msgstr "Prekine sestavljanje in vrne fokus nazaj izvornemu oknu"
|
||||
|
||||
#: zrcolagui.cpp:94
|
||||
msgid "&Edit"
|
||||
msgstr "Ur&edi"
|
||||
|
||||
#: zrcolagui.cpp:98
|
||||
msgid "&About"
|
||||
msgstr "O progr&amu"
|
||||
|
||||
#: zrcolagui.cpp:42
|
||||
#: zrcolagui.cpp:101
|
||||
msgid "&Help"
|
||||
msgstr "&Pomoč"
|
||||
|
||||
#: zrcolagui.h:47 MSIBuild/En.Win32.Debug.Feature-2.idtx:4
|
||||
#: MSIBuild/En.Win32.Debug.Shortcut-2.idtx:4
|
||||
#: MSIBuild/En.Win32.Release.Feature-2.idtx:4
|
||||
#: zrcolagui.cpp:108
|
||||
msgid "Copy"
|
||||
msgstr "Kopiraj"
|
||||
|
||||
#: zrcolagui.cpp:110
|
||||
msgid "Paste"
|
||||
msgstr "Prilepi"
|
||||
|
||||
#: zrcolagui.cpp:114
|
||||
msgid "Send Composed"
|
||||
msgstr "Pošlji sestavljeno"
|
||||
|
||||
#: zrcolagui.cpp:116
|
||||
msgid "Send Decomposed"
|
||||
msgstr "Pošlji razstavljeno"
|
||||
|
||||
#: zrcolagui.h:64 MSIBuild/En.Win32.Release.Feature-2.idtx:4
|
||||
#: MSIBuild/En.Win32.Release.Shortcut-2.idtx:4
|
||||
#: MSIBuild/En.x64.Debug.Feature-2.idtx:4
|
||||
#: MSIBuild/En.x64.Debug.Shortcut-2.idtx:4
|
||||
#: MSIBuild/En.x64.Release.Feature-2.idtx:4
|
||||
#: MSIBuild/En.x64.Release.Shortcut-2.idtx:4
|
||||
msgid "ZRCola"
|
||||
msgstr "ZRCola"
|
||||
|
||||
# Windows charset for this language (decimal)
|
||||
#: MSIBuild/En.Win32.Debug.Feature-2.idtx:3
|
||||
#: MSIBuild/En.Win32.Debug.Shortcut-2.idtx:3
|
||||
#: MSIBuild/En.Win32.Release.Feature-2.idtx:3
|
||||
#: MSIBuild/En.Win32.Release.Shortcut-2.idtx:3
|
||||
#: MSIBuild/En.x64.Debug.Feature-2.idtx:3
|
||||
#: MSIBuild/En.x64.Debug.Shortcut-2.idtx:3
|
||||
#: MSIBuild/En.x64.Release.Feature-2.idtx:3
|
||||
#: MSIBuild/En.x64.Release.Shortcut-2.idtx:3
|
||||
msgid "1252"
|
||||
msgstr "1250"
|
||||
|
||||
#: MSIBuild/En.Win32.Debug.Feature-2.idtx:4
|
||||
#: MSIBuild/En.Win32.Debug.Shortcut-2.idtx:4
|
||||
#: MSIBuild/En.Win32.Release.Feature-2.idtx:4
|
||||
#: MSIBuild/En.Win32.Release.Shortcut-2.idtx:4
|
||||
#: MSIBuild/En.x64.Debug.Feature-2.idtx:4
|
||||
#: MSIBuild/En.x64.Debug.Shortcut-2.idtx:4
|
||||
#: MSIBuild/En.x64.Release.Feature-2.idtx:4
|
||||
#: MSIBuild/En.x64.Release.Shortcut-2.idtx:4
|
||||
msgid "Input system for linguistic use"
|
||||
msgstr "Vnašalni sistem za jezikoslovno rabo"
|
||||
|
||||
#~ msgid "&File"
|
||||
#~ msgstr "&Datoteka"
|
||||
|
||||
#~ msgid "Send Decomposed (F6)"
|
||||
#~ msgstr "Pošlji razstavljeno (F6)"
|
||||
|
||||
#~ msgid "Send Composed (F5)"
|
||||
#~ msgstr "Pošlji sestavljeno (F5)"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "ZRCola keyboard shortcut Win+Shift+Z could not be registered. Some "
|
||||
#~ "functionality will not be available."
|
||||
#~ msgstr ""
|
||||
#~ "ZRColine bližnjice na tipkovnici Win+Shift+Z ni mogoče registrirati. "
|
||||
#~ "Nekaj funkcionalnosti ne bo na voljo."
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Authentication progress real time monitor"
|
||||
#~ msgstr "Nadzira postopek overovljanja v realnem času"
|
||||
|
||||
BIN
ZRCola/res/edit_copy.ico
Normal file
BIN
ZRCola/res/edit_copy.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
1593
ZRCola/res/edit_copy.pdf
Normal file
1593
ZRCola/res/edit_copy.pdf
Normal file
File diff suppressed because one or more lines are too long
BIN
ZRCola/res/edit_cut.ico
Normal file
BIN
ZRCola/res/edit_cut.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
1707
ZRCola/res/edit_cut.pdf
Normal file
1707
ZRCola/res/edit_cut.pdf
Normal file
File diff suppressed because one or more lines are too long
BIN
ZRCola/res/edit_paste.ico
Normal file
BIN
ZRCola/res/edit_paste.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
1727
ZRCola/res/edit_paste.pdf
Normal file
1727
ZRCola/res/edit_paste.pdf
Normal file
File diff suppressed because one or more lines are too long
BIN
ZRCola/res/send_abort.ico
Normal file
BIN
ZRCola/res/send_abort.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
1603
ZRCola/res/send_abort.pdf
Normal file
1603
ZRCola/res/send_abort.pdf
Normal file
File diff suppressed because one or more lines are too long
BIN
ZRCola/res/send_composed.ico
Normal file
BIN
ZRCola/res/send_composed.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
1688
ZRCola/res/send_composed.pdf
Normal file
1688
ZRCola/res/send_composed.pdf
Normal file
File diff suppressed because one or more lines are too long
BIN
ZRCola/res/send_decomposed.ico
Normal file
BIN
ZRCola/res/send_decomposed.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
1770
ZRCola/res/send_decomposed.pdf
Normal file
1770
ZRCola/res/send_decomposed.pdf
Normal file
File diff suppressed because one or more lines are too long
@@ -26,6 +26,8 @@
|
||||
#include "zrcolakeyhndlr.h"
|
||||
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/persist.h>
|
||||
#include <wx/persist/toplevel.h>
|
||||
#include <wxex/common.h>
|
||||
|
||||
#include <fstream>
|
||||
@@ -33,3 +35,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include <stdex/idrec.h>
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include <Msi.h>
|
||||
#endif
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
*/
|
||||
|
||||
#include "stdafx.h"
|
||||
#if defined(__WXMSW__)
|
||||
#pragma comment(lib, "msi.lib")
|
||||
#endif
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -27,23 +30,32 @@
|
||||
wxIMPLEMENT_APP(ZRColaApp);
|
||||
|
||||
|
||||
ZRColaApp::ZRColaApp() :
|
||||
m_config(wxT(ZRCOLA_CFG_APPLICATION), wxT(ZRCOLA_CFG_VENDOR)),
|
||||
wxApp()
|
||||
ZRColaApp::ZRColaApp() : wxApp()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
bool ZRColaApp::OnInit()
|
||||
{
|
||||
#if defined(__WXMSW__)
|
||||
// To compensate migration to non-advertised shortcut, do the Microsoft Installer's feature completeness check manually.
|
||||
// If execution got this far in the first place (EXE and dependent DLLs are present and loadable).
|
||||
// Furthermore, this increments program usage counter.
|
||||
if (::MsiQueryFeatureState(_T(ZRCOLA_VERSION_GUID), _T("featZRCola")) != INSTALLSTATE_UNKNOWN)
|
||||
::MsiUseFeature(_T(ZRCOLA_VERSION_GUID), _T("featZRCola"));
|
||||
#endif
|
||||
|
||||
wxConfigBase *cfgPrev = wxConfigBase::Set(new wxConfig(wxT(ZRCOLA_CFG_APPLICATION), wxT(ZRCOLA_CFG_VENDOR)));
|
||||
if (cfgPrev) wxDELETE(cfgPrev);
|
||||
|
||||
if (!wxApp::OnInit())
|
||||
return false;
|
||||
|
||||
// Set desired locale.
|
||||
wxLanguage language = (wxLanguage)m_config.Read(wxT("Language"), wxLANGUAGE_DEFAULT);
|
||||
wxLanguage language = (wxLanguage)wxConfigBase::Get()->Read(wxT("Language"), wxLANGUAGE_DEFAULT);
|
||||
if (wxLocale::IsAvailable(language)) {
|
||||
wxString sPath;
|
||||
if (m_config.Read(wxT("LocalizationRepositoryPath"), &sPath))
|
||||
if (wxConfigBase::Get()->Read(wxT("LocalizationRepositoryPath"), &sPath))
|
||||
m_locale.AddCatalogLookupPathPrefix(sPath);
|
||||
wxVERIFY(m_locale.Init(language));
|
||||
wxVERIFY(m_locale.AddCatalog(wxT("wxExtend")));
|
||||
@@ -51,7 +63,7 @@ bool ZRColaApp::OnInit()
|
||||
}
|
||||
|
||||
wxZRColaFrame* mainFrame = new wxZRColaFrame();
|
||||
|
||||
wxPersistentRegisterAndRestore<wxTopLevelWindow>(mainFrame);
|
||||
mainFrame->Show();
|
||||
|
||||
return true;
|
||||
|
||||
@@ -55,7 +55,6 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
wxConfig m_config; ///< Application configuration
|
||||
wxLocale m_locale; ///< Current locale
|
||||
};
|
||||
|
||||
@@ -66,7 +65,7 @@ wxDECLARE_APP(ZRColaApp);
|
||||
inline wxString ZRColaApp::GetDatabasePath() const
|
||||
{
|
||||
wxString sPath;
|
||||
if (m_config.Read(wxT("DatabasePath"), &sPath)) {
|
||||
if (wxConfigBase::Get()->Read(wxT("DatabasePath"), &sPath)) {
|
||||
if (!wxEndsWithPathSeparator(sPath))
|
||||
sPath << wxFILE_SEP_PATH;
|
||||
} else {
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
wxBEGIN_EVENT_TABLE(wxZRColaFrame, wxZRColaFrameBase)
|
||||
EVT_UPDATE_UI_RANGE(wxZRColaFrame::wxID_SEND_COMPOSED, wxZRColaFrame::wxID_SEND_DECOMPOSED, wxZRColaFrame::OnSendUpdate)
|
||||
EVT_UPDATE_UI_RANGE(wxID_SEND_COMPOSED, wxID_SEND_ABORT, wxZRColaFrame::OnSendUpdate)
|
||||
|
||||
EVT_MENU(wxZRColaFrame::wxID_SEND_COMPOSED , wxZRColaFrame::OnSendComposed )
|
||||
EVT_MENU(wxZRColaFrame::wxID_SEND_DECOMPOSED , wxZRColaFrame::OnSendDecomposed )
|
||||
EVT_MENU(wxZRColaFrame::wxID_SEND_ABORT , wxZRColaFrame::OnSendAbort )
|
||||
EVT_MENU( wxID_EXIT , wxZRColaFrame::OnExit )
|
||||
EVT_MENU( wxID_ABOUT , wxZRColaFrame::OnAbout )
|
||||
EVT_MENU(wxID_SEND_COMPOSED , wxZRColaFrame::OnSendComposed )
|
||||
EVT_MENU(wxID_SEND_DECOMPOSED, wxZRColaFrame::OnSendDecomposed )
|
||||
EVT_MENU(wxID_SEND_ABORT , wxZRColaFrame::OnSendAbort )
|
||||
EVT_MENU(wxID_EXIT , wxZRColaFrame::OnExit )
|
||||
EVT_MENU(wxID_ABOUT , wxZRColaFrame::OnAbout )
|
||||
wxEND_EVENT_TABLE()
|
||||
|
||||
|
||||
@@ -56,15 +56,6 @@ wxZRColaFrame::wxZRColaFrame() :
|
||||
wxMessageBox(_("ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality will not be available."), _("Warning"), wxOK | wxICON_WARNING);
|
||||
if (!RegisterHotKey(wxZRColaHKID_INVOKE_DECOMPOSE, wxMOD_WIN, VK_F6))
|
||||
wxMessageBox(_("ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality will not be available."), _("Warning"), wxOK | wxICON_WARNING);
|
||||
|
||||
// Register frame specific hotkey(s).
|
||||
{
|
||||
wxAcceleratorEntry entries[3];
|
||||
entries[0].Set(wxACCEL_NORMAL, WXK_F5 , wxID_SEND_COMPOSED);
|
||||
entries[1].Set(wxACCEL_NORMAL, WXK_F6 , wxID_SEND_DECOMPOSED);
|
||||
entries[2].Set(wxACCEL_NORMAL, WXK_ESCAPE, wxID_SEND_ABORT);
|
||||
SetAcceleratorTable(wxAcceleratorTable(_countof(entries), entries));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -107,12 +98,12 @@ void wxZRColaFrame::OnSendAbort(wxCommandEvent& event)
|
||||
::SetActiveWindow(m_hWndSource);
|
||||
::SetForegroundWindow(m_hWndSource);
|
||||
m_hWndSource = NULL;
|
||||
|
||||
// Select all input in composer to prepare for the overwrite next time.
|
||||
m_panel->m_decomposed->SelectAll();
|
||||
m_panel->m_composed->SelectAll();
|
||||
}
|
||||
|
||||
// Select all input in composer to prepare for the overwrite next time.
|
||||
m_panel->m_decomposed->SelectAll();
|
||||
m_panel->m_composed->SelectAll();
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
@@ -134,22 +125,20 @@ void wxZRColaFrame::DoSend(const wxString& str)
|
||||
// Prepare the INPUT table.
|
||||
wxString::size_type n = str.length();
|
||||
wxString::const_iterator i_str = str.begin();
|
||||
std::vector<INPUT> input(n);
|
||||
std::vector<INPUT> input;
|
||||
input.reserve(n*2);
|
||||
for (std::vector<INPUT>::size_type i = 0; i < n; i++, i_str++) {
|
||||
wxString::char_type c = *i_str;
|
||||
INPUT &inp = input[i];
|
||||
inp.type = INPUT_KEYBOARD;
|
||||
inp.ki.dwFlags = KEYEVENTF_UNICODE;
|
||||
inp.ki.time = 0;
|
||||
inp.ki.dwExtraInfo = 0;
|
||||
if (c == L'\n') {
|
||||
// Enter (Return) key is sent as CR virtual key code.
|
||||
inp.ki.wVk = VK_RETURN;
|
||||
inp.ki.wScan = L'\r';
|
||||
} else {
|
||||
inp.ki.wVk = 0;
|
||||
inp.ki.wScan = c;
|
||||
}
|
||||
|
||||
// Add key down event.
|
||||
INPUT inp = { INPUT_KEYBOARD };
|
||||
inp.ki.dwFlags = KEYEVENTF_UNICODE;
|
||||
inp.ki.wScan = c != L'\n' ? c : L'\r'; // Enter (Return) key is sent as CR.
|
||||
input.push_back(inp);
|
||||
|
||||
// Add key up event.
|
||||
inp.ki.dwFlags |= KEYEVENTF_KEYUP;
|
||||
input.push_back(inp);
|
||||
}
|
||||
|
||||
// Return focus to the source window and send the input.
|
||||
|
||||
@@ -41,13 +41,6 @@ class wxZRColaFrame;
|
||||
///
|
||||
class wxZRColaFrame : public wxZRColaFrameBase
|
||||
{
|
||||
protected:
|
||||
enum {
|
||||
wxID_SEND_COMPOSED = wxID_HIGHEST,
|
||||
wxID_SEND_DECOMPOSED,
|
||||
wxID_SEND_ABORT,
|
||||
};
|
||||
|
||||
public:
|
||||
wxZRColaFrame();
|
||||
virtual ~wxZRColaFrame();
|
||||
|
||||
@@ -22,17 +22,76 @@ wxHelpProvider::Set( new wxHelpControllerHelpProvider );
|
||||
static wxFBContextSensitiveHelpSetter s_wxFBSetTheHelpProvider;
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
|
||||
wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxFrame( parent, id, title, pos, size, style, name )
|
||||
{
|
||||
this->SetSizeHints( wxSize( 150,150 ), wxDefaultSize );
|
||||
|
||||
m_menubar = new wxMenuBar( 0 );
|
||||
m_menuFile = new wxMenu();
|
||||
m_menuProgram = new wxMenu();
|
||||
wxMenuItem* m_menuItemExit;
|
||||
m_menuItemExit = new wxMenuItem( m_menuFile, wxID_EXIT, wxString( _("E&xit") ) + wxT('\t') + wxT("Alt+F4"), wxEmptyString, wxITEM_NORMAL );
|
||||
m_menuFile->Append( m_menuItemExit );
|
||||
m_menuItemExit = new wxMenuItem( m_menuProgram, wxID_EXIT, wxString( _("E&xit") ) + wxT('\t') + wxT("Alt+F4"), wxEmptyString, wxITEM_NORMAL );
|
||||
m_menuProgram->Append( m_menuItemExit );
|
||||
|
||||
m_menubar->Append( m_menuFile, _("&File") );
|
||||
m_menubar->Append( m_menuProgram, _("&Program") );
|
||||
|
||||
m_menuEdit = new wxMenu();
|
||||
wxMenuItem* m_menuItemEditCut;
|
||||
m_menuItemEditCut = new wxMenuItem( m_menuEdit, wxID_CUT, wxString( _("Cut") ) + wxT('\t') + wxT("Ctrl+X"), _("Cuts selected text and puts it on the clipboard"), wxITEM_NORMAL );
|
||||
#ifdef __WXMSW__
|
||||
m_menuItemEditCut->SetBitmaps( wxIcon( wxT("edit_cut.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#elif (defined( __WXGTK__ ) || defined( __WXOSX__ ))
|
||||
m_menuItemEditCut->SetBitmap( wxIcon( wxT("edit_cut.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#endif
|
||||
m_menuEdit->Append( m_menuItemEditCut );
|
||||
|
||||
wxMenuItem* m_menuItemEditCopy;
|
||||
m_menuItemEditCopy = new wxMenuItem( m_menuEdit, wxID_COPY, wxString( _("&Copy") ) + wxT('\t') + wxT("Ctrl+C"), _("Copies selected text to the clipboard"), wxITEM_NORMAL );
|
||||
#ifdef __WXMSW__
|
||||
m_menuItemEditCopy->SetBitmaps( wxIcon( wxT("edit_copy.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#elif (defined( __WXGTK__ ) || defined( __WXOSX__ ))
|
||||
m_menuItemEditCopy->SetBitmap( wxIcon( wxT("edit_copy.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#endif
|
||||
m_menuEdit->Append( m_menuItemEditCopy );
|
||||
|
||||
wxMenuItem* m_menuItemEditPaste;
|
||||
m_menuItemEditPaste = new wxMenuItem( m_menuEdit, wxID_PASTE, wxString( _("&Paste") ) + wxT('\t') + wxT("Ctrl+V"), _("Inserts text from the clipboard"), wxITEM_NORMAL );
|
||||
#ifdef __WXMSW__
|
||||
m_menuItemEditPaste->SetBitmaps( wxIcon( wxT("edit_paste.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#elif (defined( __WXGTK__ ) || defined( __WXOSX__ ))
|
||||
m_menuItemEditPaste->SetBitmap( wxIcon( wxT("edit_paste.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#endif
|
||||
m_menuEdit->Append( m_menuItemEditPaste );
|
||||
|
||||
m_menuEdit->AppendSeparator();
|
||||
|
||||
wxMenuItem* m_menuItemSendComposed;
|
||||
m_menuItemSendComposed = new wxMenuItem( m_menuEdit, wxID_SEND_COMPOSED, wxString( _("&Send Composed") ) + wxT('\t') + wxT("F5"), _("Sends composed text to source window"), wxITEM_NORMAL );
|
||||
#ifdef __WXMSW__
|
||||
m_menuItemSendComposed->SetBitmaps( wxIcon( wxT("send_composed.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#elif (defined( __WXGTK__ ) || defined( __WXOSX__ ))
|
||||
m_menuItemSendComposed->SetBitmap( wxIcon( wxT("send_composed.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#endif
|
||||
m_menuEdit->Append( m_menuItemSendComposed );
|
||||
|
||||
wxMenuItem* m_menuItemSendDecomposed;
|
||||
m_menuItemSendDecomposed = new wxMenuItem( m_menuEdit, wxID_SEND_DECOMPOSED, wxString( _("Send &Decomposed") ) + wxT('\t') + wxT("F6"), _("Sends decomposed text to source window"), wxITEM_NORMAL );
|
||||
#ifdef __WXMSW__
|
||||
m_menuItemSendDecomposed->SetBitmaps( wxIcon( wxT("send_decomposed.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#elif (defined( __WXGTK__ ) || defined( __WXOSX__ ))
|
||||
m_menuItemSendDecomposed->SetBitmap( wxIcon( wxT("send_decomposed.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#endif
|
||||
m_menuEdit->Append( m_menuItemSendDecomposed );
|
||||
|
||||
wxMenuItem* m_menuItemSendAbort;
|
||||
m_menuItemSendAbort = new wxMenuItem( m_menuEdit, wxID_SEND_ABORT, wxString( _("Abort (De)composition") ) + wxT('\t') + wxT("Esc"), _("Aborts composition and returns focus to source window"), wxITEM_NORMAL );
|
||||
#ifdef __WXMSW__
|
||||
m_menuItemSendAbort->SetBitmaps( wxIcon( wxT("send_abort.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#elif (defined( __WXGTK__ ) || defined( __WXOSX__ ))
|
||||
m_menuItemSendAbort->SetBitmap( wxIcon( wxT("send_abort.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#endif
|
||||
m_menuEdit->Append( m_menuItemSendAbort );
|
||||
|
||||
m_menubar->Append( m_menuEdit, _("&Edit") );
|
||||
|
||||
m_menuHelp = new wxMenu();
|
||||
wxMenuItem* m_menuItemAbout;
|
||||
@@ -43,6 +102,21 @@ wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxS
|
||||
|
||||
this->SetMenuBar( m_menubar );
|
||||
|
||||
m_toolbar = this->CreateToolBar( wxTB_HORIZONTAL, wxID_ANY );
|
||||
m_toolEditCut = m_toolbar->AddTool( wxID_CUT, _("Cut"), wxIcon( wxT("edit_cut.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24 ), wxNullBitmap, wxITEM_NORMAL, _("Cut"), _("Cuts selected text and puts it on the clipboard"), NULL );
|
||||
|
||||
m_toolEditCopy = m_toolbar->AddTool( wxID_COPY, _("Copy"), wxIcon( wxT("edit_copy.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24 ), wxNullBitmap, wxITEM_NORMAL, _("Copy"), _("Copies selected text to the clipboard"), NULL );
|
||||
|
||||
m_toolEditPaste = m_toolbar->AddTool( wxID_PASTE, _("Paste"), wxIcon( wxT("edit_paste.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24 ), wxNullBitmap, wxITEM_NORMAL, _("Paste"), _("Inserts text from the clipboard"), NULL );
|
||||
|
||||
m_toolbar->AddSeparator();
|
||||
|
||||
m_toolSendComposed = m_toolbar->AddTool( wxID_SEND_COMPOSED, _("Send Composed"), wxIcon( wxT("send_composed.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24 ), wxNullBitmap, wxITEM_NORMAL, _("Send Composed"), _("Sends composed text to source window"), NULL );
|
||||
|
||||
m_toolSendDecomposed = m_toolbar->AddTool( wxID_SEND_DECOMPOSED, _("Send Decomposed"), wxIcon( wxT("send_decomposed.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24 ), wxNullBitmap, wxITEM_NORMAL, _("Send Decomposed"), _("Sends decomposed text to source window"), NULL );
|
||||
|
||||
m_toolbar->Realize();
|
||||
|
||||
wxBoxSizer* bSizerMain;
|
||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
@@ -53,6 +127,7 @@ wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxS
|
||||
|
||||
this->SetSizer( bSizerMain );
|
||||
this->Layout();
|
||||
m_statusBar = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
}
|
||||
@@ -66,13 +141,13 @@ wxZRColaComposerPanelBase::wxZRColaComposerPanelBase( wxWindow* parent, wxWindow
|
||||
wxBoxSizer* bSizerEditor;
|
||||
bSizerEditor = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_decomposed = new wxTextCtrl( this, wxID_DECOMPOSED, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CENTRE|wxTE_MULTILINE );
|
||||
m_decomposed = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CENTRE|wxTE_MULTILINE );
|
||||
m_decomposed->SetFont( wxFont( 20, 70, 90, 90, false, wxT("00 ZRCola") ) );
|
||||
m_decomposed->SetMinSize( wxSize( 100,25 ) );
|
||||
|
||||
bSizerEditor->Add( m_decomposed, 50, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_composed = new wxTextCtrl( this, wxID_COMPOSED, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CENTRE|wxTE_MULTILINE );
|
||||
m_composed = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CENTRE|wxTE_MULTILINE );
|
||||
m_composed->SetFont( wxFont( 20, 70, 90, 90, false, wxT("00 ZRCola") ) );
|
||||
m_composed->SetMinSize( wxSize( 100,25 ) );
|
||||
|
||||
|
||||
@@ -21,8 +21,10 @@
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/toolbar.h>
|
||||
#include "zrcolacomppnl.h"
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statusbr.h>
|
||||
#include <wx/frame.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/panel.h>
|
||||
@@ -37,14 +39,29 @@ class wxZRColaFrameBase : public wxFrame
|
||||
private:
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
wxID_SEND_COMPOSED = 1000,
|
||||
wxID_SEND_DECOMPOSED,
|
||||
wxID_SEND_ABORT
|
||||
};
|
||||
|
||||
wxMenuBar* m_menubar;
|
||||
wxMenu* m_menuFile;
|
||||
wxMenu* m_menuProgram;
|
||||
wxMenu* m_menuEdit;
|
||||
wxMenu* m_menuHelp;
|
||||
wxToolBar* m_toolbar;
|
||||
wxToolBarToolBase* m_toolEditCut;
|
||||
wxToolBarToolBase* m_toolEditCopy;
|
||||
wxToolBarToolBase* m_toolEditPaste;
|
||||
wxToolBarToolBase* m_toolSendComposed;
|
||||
wxToolBarToolBase* m_toolSendDecomposed;
|
||||
wxZRColaComposerPanel* m_panel;
|
||||
wxStatusBar* m_statusBar;
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaFrameBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 600,400 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
|
||||
wxZRColaFrameBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 600,400 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL, const wxString& name = wxT("ZRCola") );
|
||||
|
||||
~wxZRColaFrameBase();
|
||||
|
||||
@@ -58,12 +75,6 @@ class wxZRColaComposerPanelBase : public wxPanel
|
||||
private:
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
wxID_DECOMPOSED = 1000,
|
||||
wxID_COMPOSED
|
||||
};
|
||||
|
||||
wxTextCtrl* m_decomposed;
|
||||
wxTextCtrl* m_composed;
|
||||
|
||||
|
||||
@@ -54,52 +54,64 @@ bool wxZRColaKeyHandler::ProcessEvent(wxEvent& event)
|
||||
{
|
||||
if (event.GetEventType() == wxEVT_KEY_DOWN) {
|
||||
// The character event occured.
|
||||
ZRCola::keyseq_db::indexKey::size_type start, end;
|
||||
bool found;
|
||||
wxKeyEvent &e = (wxKeyEvent&)event;
|
||||
if (e.GetUnicodeKey() || !e.HasAnyModifiers()) {
|
||||
ZRCola::keyseq_db::indexKey::size_type start, end;
|
||||
bool found;
|
||||
wxFrame *pFrame = wxDynamicCast(wxTheApp->GetTopWindow(), wxFrame);
|
||||
|
||||
{
|
||||
// Parse key event and save it at the end of the key sequence.
|
||||
wxKeyEvent &e = (wxKeyEvent&)event;
|
||||
ZRCola::keyseq_db::keyseq::key_t key;
|
||||
key.key = e.GetKeyCode(); //wxToupper(e.m_uniChar);
|
||||
key.modifiers =
|
||||
(e.ShiftDown() ? ZRCola::keyseq_db::keyseq::SHIFT : 0) |
|
||||
(e.ControlDown() ? ZRCola::keyseq_db::keyseq::CTRL : 0) |
|
||||
(e.AltDown() ? ZRCola::keyseq_db::keyseq::ALT : 0);
|
||||
m_seq.push_back(key);
|
||||
{
|
||||
// Parse key event and save it at the end of the key sequence.
|
||||
ZRCola::keyseq_db::keyseq::key_t key;
|
||||
key.key = e.GetRawKeyCode();
|
||||
key.modifiers =
|
||||
(e.ShiftDown() ? ZRCola::keyseq_db::keyseq::SHIFT : 0) |
|
||||
(e.ControlDown() ? ZRCola::keyseq_db::keyseq::CTRL : 0) |
|
||||
(e.AltDown() ? ZRCola::keyseq_db::keyseq::ALT : 0);
|
||||
m_seq.push_back(key);
|
||||
|
||||
std::vector<ZRCola::keyseq_db::keyseq::key_t>::size_type n = m_seq.size();
|
||||
ZRCola::keyseq_db::keyseq *ks = (ZRCola::keyseq_db::keyseq*)new char[sizeof(ZRCola::keyseq_db::keyseq) + sizeof(ZRCola::keyseq_db::keyseq::key_t)*n];
|
||||
ks->chr = 0;
|
||||
ks->seq_len = n;
|
||||
memcpy(ks->seq, m_seq.data(), sizeof(ZRCola::keyseq_db::keyseq::key_t)*n);
|
||||
found = m_ks_db.idxKey.find(*ks, start, end);
|
||||
delete ks;
|
||||
}
|
||||
std::vector<ZRCola::keyseq_db::keyseq::key_t>::size_type n = m_seq.size();
|
||||
ZRCola::keyseq_db::keyseq *ks = (ZRCola::keyseq_db::keyseq*)new char[sizeof(ZRCola::keyseq_db::keyseq) + sizeof(ZRCola::keyseq_db::keyseq::key_t)*n];
|
||||
ks->chr = 0;
|
||||
ks->seq_len = n;
|
||||
memcpy(ks->seq, m_seq.data(), sizeof(ZRCola::keyseq_db::keyseq::key_t)*n);
|
||||
found = m_ks_db.idxKey.find(*ks, start, end);
|
||||
delete ks;
|
||||
}
|
||||
|
||||
if (found) {
|
||||
// The exact key sequence found.
|
||||
const ZRCola::keyseq_db::keyseq &ks = m_ks_db.idxKey[start];
|
||||
m_seq.clear();
|
||||
if (found) {
|
||||
// The exact key sequence found.
|
||||
const ZRCola::keyseq_db::keyseq &ks = m_ks_db.idxKey[start];
|
||||
m_seq.clear();
|
||||
|
||||
wxObject *obj = event.GetEventObject();
|
||||
if (obj && obj->IsKindOf(wxCLASSINFO(wxTextCtrl))) {
|
||||
// Push text to source control.
|
||||
((wxTextCtrl*)obj)->WriteText(ks.chr);
|
||||
if (pFrame && pFrame->GetStatusBar())
|
||||
pFrame->SetStatusText(wxEmptyString);
|
||||
|
||||
wxObject *obj = event.GetEventObject();
|
||||
if (obj && obj->IsKindOf(wxCLASSINFO(wxTextCtrl))) {
|
||||
// Push text to source control.
|
||||
((wxTextCtrl*)obj)->WriteText(ks.chr);
|
||||
|
||||
// Event is fully processed now.
|
||||
event.StopPropagation();
|
||||
return true;
|
||||
}
|
||||
} else if (start < m_ks_db.idxKey.size() &&
|
||||
ZRCola::keyseq_db::keyseq::CompareSequence(m_seq.data(), m_seq.size(), m_ks_db.idxKey[start].seq, std::min<unsigned __int16>(m_ks_db.idxKey[start].seq_len, m_seq.size())) == 0)
|
||||
{
|
||||
// The sequence is a partial match. Continue watching.
|
||||
if (pFrame && pFrame->GetStatusBar())
|
||||
pFrame->SetStatusText(ZRCola::keyseq_db::GetSequenceAsText(m_seq.data(), m_seq.size()));
|
||||
|
||||
// Event is fully processed now.
|
||||
event.StopPropagation();
|
||||
return true;
|
||||
} else {
|
||||
// The key sequence has no future chance to match. Start all over again.
|
||||
m_seq.clear();
|
||||
|
||||
if (pFrame && pFrame->GetStatusBar())
|
||||
pFrame->SetStatusText(wxEmptyString);
|
||||
}
|
||||
} else if (start < m_ks_db.idxKey.size() &&
|
||||
ZRCola::keyseq_db::keyseq::CompareSequence(m_seq.data(), m_seq.size(), m_ks_db.idxKey[start].seq, std::min<unsigned __int16>(m_ks_db.idxKey[start].seq_len, m_seq.size())) == 0)
|
||||
{
|
||||
// The sequence is a partial match. Continue watching.
|
||||
//event.StopPropagation();
|
||||
//return true;
|
||||
} else {
|
||||
// The key sequence has no future chance to match. Start all over again.
|
||||
m_seq.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -99,15 +99,43 @@ void ZRCola::DBSource::LogErrors() const
|
||||
}
|
||||
|
||||
|
||||
bool ZRCola::DBSource::GetValue(const ATL::CComPtr<ADOField>& f, bool& val) const
|
||||
{
|
||||
wxASSERT_MSG(f, wxT("field is empty"));
|
||||
|
||||
ATL::CComVariant v;
|
||||
wxVERIFY(SUCCEEDED(f->get_Value(&v)));
|
||||
wxCHECK(SUCCEEDED(v.ChangeType(VT_BOOL)), false);
|
||||
|
||||
val = V_BOOL(&v) ? true : false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ZRCola::DBSource::GetValue(const ATL::CComPtr<ADOField>& f, int& val) const
|
||||
{
|
||||
wxASSERT_MSG(f, wxT("field is empty"));
|
||||
|
||||
ATL::CComVariant v;
|
||||
wxVERIFY(SUCCEEDED(f->get_Value(&v)));
|
||||
wxCHECK(SUCCEEDED(v.ChangeType(VT_I4)), false);
|
||||
|
||||
val = V_I4(&v);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ZRCola::DBSource::GetUnicodeCharacter(const ATL::CComPtr<ADOField>& f, wchar_t& chr) const
|
||||
{
|
||||
wxASSERT_MSG(f, wxT("field is empty"));
|
||||
|
||||
ATL::CComVariant v;
|
||||
wxVERIFY(SUCCEEDED(f->get_Value(&v)));
|
||||
wxCHECK(SUCCEEDED(v.ChangeType(VT_BSTR)), false);
|
||||
|
||||
// Parse the field. Must be exactly one Unicode code.
|
||||
wxVERIFY(SUCCEEDED(v.ChangeType(VT_BSTR)));
|
||||
UINT i = 0, n = ::SysStringLen(V_BSTR(&v));
|
||||
chr = 0;
|
||||
for (; i < n && V_BSTR(&v)[i]; i++) {
|
||||
@@ -136,9 +164,9 @@ bool ZRCola::DBSource::GetUnicodeString(const ATL::CComPtr<ADOField>& f, std::ws
|
||||
|
||||
ATL::CComVariant v;
|
||||
wxVERIFY(SUCCEEDED(f->get_Value(&v)));
|
||||
wxCHECK(SUCCEEDED(v.ChangeType(VT_BSTR)), false);
|
||||
|
||||
// Parse the field. Must be "xxxx+xxxx+xxxx..." sequence.
|
||||
wxVERIFY(SUCCEEDED(v.ChangeType(VT_BSTR)));
|
||||
str.clear();
|
||||
for (UINT i = 0, n = ::SysStringLen(V_BSTR(&v)); i < n && V_BSTR(&v)[i];) {
|
||||
// Parse Unicode code.
|
||||
@@ -165,58 +193,48 @@ bool ZRCola::DBSource::GetUnicodeString(const ATL::CComPtr<ADOField>& f, std::ws
|
||||
}
|
||||
|
||||
|
||||
bool ZRCola::DBSource::GetKeySequence(const ATL::CComPtr<ADOField>& f, std::vector<keyseq::keycode>& seq) const
|
||||
bool ZRCola::DBSource::GetKeyCode(const ATL::CComPtr<ADOField>& f, ZRCola::DBSource::keyseq::keycode& kc) const
|
||||
{
|
||||
wxASSERT_MSG(f, wxT("field is empty"));
|
||||
|
||||
ATL::CComVariant v;
|
||||
wxVERIFY(SUCCEEDED(f->get_Value(&v)));
|
||||
wxVERIFY(SUCCEEDED(v.ChangeType(VT_BSTR)));
|
||||
wxCHECK(SUCCEEDED(v.ChangeType(VT_BSTR)), false);
|
||||
|
||||
// Convert to uppercase.
|
||||
_wcsupr_l(V_BSTR(&v), m_locale);
|
||||
|
||||
// Parse the field. Must be comma delimited sequence of key codes.
|
||||
seq.clear();
|
||||
// Parse the field.
|
||||
memset(&kc, 0, sizeof(kc));
|
||||
for (UINT i = 0, n = ::SysStringLen(V_BSTR(&v)); i < n && V_BSTR(&v)[i];) {
|
||||
keyseq::keycode kc = {};
|
||||
|
||||
while (i < n && V_BSTR(&v)[i]) {
|
||||
// Parse key code.
|
||||
static const wchar_t str_shift[] = L"SHIFT+", str_ctrl[] = L"CTRL+", str_alt[] = L"ALT+";
|
||||
if (i + _countof(str_shift) <= n && wmemcmp(V_BSTR(&v) + i, str_shift, _countof(str_shift) - 1) == 0) {
|
||||
kc.shift = true;
|
||||
i += _countof(str_shift) - 1;
|
||||
} else if (i + _countof(str_ctrl) <= n && wmemcmp(V_BSTR(&v) + i, str_ctrl, _countof(str_ctrl) - 1) == 0) {
|
||||
kc.ctrl = true;
|
||||
i += _countof(str_ctrl) - 1;
|
||||
} else if (i + _countof(str_alt) <= n && wmemcmp(V_BSTR(&v) + i, str_alt, _countof(str_alt) - 1) == 0) {
|
||||
kc.alt = true;
|
||||
i += _countof(str_alt) - 1;
|
||||
} else {
|
||||
kc.key = V_BSTR(&v)[i];
|
||||
i++;
|
||||
break;
|
||||
// Parse key code.
|
||||
if (i) {
|
||||
// Check for "+" separator.
|
||||
if (V_BSTR(&v)[i] != L'+') {
|
||||
ATL::CComBSTR fieldname; wxVERIFY(SUCCEEDED(f->get_Name(&fieldname)));
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0070: Syntax error in \"%.*ls\" field (\"%.*ls\"). Key codes must be \"Ctrl+Alt+<key>\" formatted.\n"), m_filename.c_str(), fieldname.Length(), (BSTR)fieldname, n, V_BSTR(&v));
|
||||
}
|
||||
i++;
|
||||
if (i >= n || !V_BSTR(&v)[i]) {
|
||||
ATL::CComBSTR fieldname; wxVERIFY(SUCCEEDED(f->get_Name(&fieldname)));
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0071: Syntax error in \"%.*ls\" field (\"%.*ls\"). Trailing separator \"+\" found.\n"), m_filename.c_str(), fieldname.Length(), (BSTR)fieldname, n, V_BSTR(&v));
|
||||
}
|
||||
}
|
||||
if (i < n && V_BSTR(&v)[i] && V_BSTR(&v)[i] != L',' && !_iswspace_l(V_BSTR(&v)[i], m_locale)) {
|
||||
ATL::CComBSTR fieldname; wxVERIFY(SUCCEEDED(f->get_Name(&fieldname)));
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0060: Syntax error in \"%.*ls\" field (\"%.*ls\"). Key sequences must be \"Ctrl+Alt+<key>\" formatted, delimited by commas and/or space.\n"), m_filename.c_str(), fieldname.Length(), (BSTR)fieldname, n, V_BSTR(&v));
|
||||
return false;
|
||||
}
|
||||
if (seq.size() > 0xffff) {
|
||||
_ftprintf(stderr, wxT("%s: warning ZCC0061: Key sequence \"%.*ls...\" too long. Ignored.\n"), (LPCTSTR)m_filename.c_str(), std::min<UINT>(n, 20), V_BSTR(&v));
|
||||
return false;
|
||||
}
|
||||
seq.push_back(kc);
|
||||
|
||||
// Skip delimiter(s) and whitespace.
|
||||
for (; i < n && V_BSTR(&v)[i] && (V_BSTR(&v)[i] == L',' || _iswspace_l(V_BSTR(&v)[i], m_locale)); i++);
|
||||
}
|
||||
|
||||
if (seq.empty()) {
|
||||
_ftprintf(stderr, wxT("%s: warning ZCC0062: Empty key sequence. Ignored.\n"), (LPCTSTR)m_filename.c_str());
|
||||
return false;
|
||||
static const wchar_t str_shift[] = L"SHIFT", str_ctrl[] = L"CTRL", str_alt[] = L"ALT";
|
||||
if (i + _countof(str_shift) - 1 <= n && wmemcmp(V_BSTR(&v) + i, str_shift, _countof(str_shift) - 1) == 0) {
|
||||
kc.shift = true;
|
||||
i += _countof(str_shift) - 1;
|
||||
} else if (i + _countof(str_ctrl) - 1 <= n && wmemcmp(V_BSTR(&v) + i, str_ctrl, _countof(str_ctrl) - 1) == 0) {
|
||||
kc.ctrl = true;
|
||||
i += _countof(str_ctrl) - 1;
|
||||
} else if (i + _countof(str_alt) - 1 <= n && wmemcmp(V_BSTR(&v) + i, str_alt, _countof(str_alt) - 1) == 0) {
|
||||
kc.alt = true;
|
||||
i += _countof(str_alt) - 1;
|
||||
} else {
|
||||
kc.key = V_BSTR(&v)[i];
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -270,7 +288,7 @@ bool ZRCola::DBSource::SelectKeySequences(ATL::CComPtr<ADORecordset> &rs) const
|
||||
wxCHECK(SUCCEEDED(::CoCreateInstance(CLSID_CADORecordset, NULL, CLSCTX_ALL, IID_IADORecordset, (LPVOID*)&rs)), false);
|
||||
|
||||
// Open it.
|
||||
if (FAILED(rs->Open(ATL::CComVariant(L"SELECT DISTINCT [Znak], [tipka] FROM [wrd_KeyCodes]"), ATL::CComVariant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) {
|
||||
if (FAILED(rs->Open(ATL::CComVariant(L"SELECT DISTINCT [VRS_KeyCodes].[Znak], [VRS_CharGroup].[Name] AS [CharGroup], [VRS_KeyCodes].[KeyCode], [VRS_KeyCodes].[Shift] FROM [VRS_KeyCodes] LEFT JOIN [VRS_CharGroup] ON [VRS_CharGroup].[CharGroup]=[VRS_KeyCodes].[CharGroup]"), ATL::CComVariant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0050: Error loading key sequences from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
|
||||
LogErrors();
|
||||
return false;
|
||||
@@ -293,10 +311,38 @@ bool ZRCola::DBSource::GetKeySequence(const ATL::CComPtr<ADORecordset>& rs, ZRCo
|
||||
wxCHECK(GetUnicodeCharacter(f, ks.chr), false);
|
||||
}
|
||||
|
||||
keyseq::keycode kc1;
|
||||
{
|
||||
ATL::CComPtr<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(ATL::CComVariant(L"tipka"), &f)));
|
||||
wxCHECK(GetKeySequence(f, ks.seq), false);
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(ATL::CComVariant(L"CharGroup"), &f)));
|
||||
wxCHECK(GetKeyCode(f, kc1), false);
|
||||
}
|
||||
|
||||
int keycode;
|
||||
{
|
||||
ATL::CComPtr<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(ATL::CComVariant(L"KeyCode"), &f)));
|
||||
wxCHECK(GetValue(f, keycode), false);
|
||||
}
|
||||
|
||||
bool shift;
|
||||
{
|
||||
ATL::CComPtr<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(ATL::CComVariant(L"Shift"), &f)));
|
||||
wxCHECK(GetValue(f, shift), false);
|
||||
}
|
||||
|
||||
ks.seq.clear();
|
||||
if (kc1.key) {
|
||||
// First key in the sequence is complete.
|
||||
ks.seq.push_back(kc1);
|
||||
keyseq::keycode kc2 = { keycode, shift };
|
||||
ks.seq.push_back(kc2);
|
||||
} else {
|
||||
// First key in the sequence is only modifier(s).
|
||||
kc1.key = keycode;
|
||||
if (shift) kc1.shift = true;
|
||||
ks.seq.push_back(kc1);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -115,6 +115,32 @@ namespace ZRCola {
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Gets boolean from ZRCola.zrc database
|
||||
///
|
||||
/// \param[in] f Data field
|
||||
/// \param[out] val Output boolean value
|
||||
///
|
||||
/// \returns
|
||||
/// - true when successful
|
||||
/// - false otherwise
|
||||
///
|
||||
bool GetValue(const ATL::CComPtr<ADOField>& f, bool& val) const;
|
||||
|
||||
|
||||
///
|
||||
/// Gets integer from ZRCola.zrc database
|
||||
///
|
||||
/// \param[in] f Data field
|
||||
/// \param[out] val Output integer value
|
||||
///
|
||||
/// \returns
|
||||
/// - true when successful
|
||||
/// - false otherwise
|
||||
///
|
||||
bool GetValue(const ATL::CComPtr<ADOField>& f, int& val) const;
|
||||
|
||||
|
||||
///
|
||||
/// Gets encoded Unicode character from ZRCola.zrc database
|
||||
///
|
||||
@@ -142,16 +168,16 @@ namespace ZRCola {
|
||||
|
||||
|
||||
///
|
||||
/// Gets encoded key sequence from ZRCola.zrc database
|
||||
/// Gets encoded key from ZRCola.zrc database
|
||||
///
|
||||
/// \param[in] f Data field
|
||||
/// \param[out] seq Output sequence
|
||||
/// \param[in] f Data field
|
||||
/// \param[out] kc Output key code
|
||||
///
|
||||
/// \returns
|
||||
/// - true when successful
|
||||
/// - false otherwise
|
||||
///
|
||||
bool GetKeySequence(const ATL::CComPtr<ADOField>& f, std::vector<keyseq::keycode>& seq) const;
|
||||
bool GetKeyCode(const ATL::CComPtr<ADOField>& f, keyseq::keycode& kc) const;
|
||||
|
||||
|
||||
///
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// Product version as a single DWORD
|
||||
// Note: Used for version comparison within C/C++ code.
|
||||
//
|
||||
#define ZRCOLA_VERSION 0x01ff0100
|
||||
#define ZRCOLA_VERSION 0x01ff0300
|
||||
|
||||
//
|
||||
// Product version by components
|
||||
@@ -33,26 +33,26 @@
|
||||
//
|
||||
#define ZRCOLA_VERSION_MAJ 1
|
||||
#define ZRCOLA_VERSION_MIN 255
|
||||
#define ZRCOLA_VERSION_REV 1
|
||||
#define ZRCOLA_VERSION_REV 3
|
||||
#define ZRCOLA_VERSION_BUILD 0
|
||||
|
||||
//
|
||||
// Human readable product version and build year for UI
|
||||
//
|
||||
#define ZRCOLA_VERSION_STR "2.0-alpha1"
|
||||
#define ZRCOLA_VERSION_STR "2.0-alpha3"
|
||||
#define ZRCOLA_BUILD_YEAR_STR "2016"
|
||||
|
||||
//
|
||||
// Numerical version presentation for ProductVersion propery in
|
||||
// MSI packages (syntax: N.N[.N[.N]])
|
||||
//
|
||||
#define ZRCOLA_VERSION_INST "1.255.1"
|
||||
#define ZRCOLA_VERSION_INST "1.255.3"
|
||||
|
||||
//
|
||||
// The product code for ProductCode property in MSI packages
|
||||
// Replace with new on every version change, regardless how minor it is.
|
||||
//
|
||||
#define ZRCOLA_VERSION_GUID "{3A1032A5-E9D0-4603-94A7-C7D31AB4CB89}"
|
||||
#define ZRCOLA_VERSION_GUID "{8553943A-9CD0-4639-98CC-0A57A84A7765}"
|
||||
|
||||
//
|
||||
// The product vendor and application name for configuration keeping.
|
||||
|
||||
Submodule lib/wxExtend updated: b004239b29...1ca2510ae1
Binary file not shown.
Reference in New Issue
Block a user