I've updated my main install of the codeblocks to the latest rev and the keybinder seems to be broken for me.
Here is the list of things I've spotted as problems:
1. Memory leak from "m_pAccelEntries = new wxAcceleratorEntry[m_AccelCount];" use unique_ptr?At the point it needs to be deleted, the whole address space is about to be destroyed. But since it seems to offend, I'll add a delete.
2. ctrl-shift-. and ctrl-shift-t doesn't work as acceleratorsI'm using both shortcuts every day. Please describe your environment and how you're setting them. Further data would help me recreate the problem.
3. The new keybinder failed to parse the old config and lost all my bindingsWould you attach your old cbKeybinder.ini file so I can try and duplicate the problem. Windows or Linux? This happens on Linux for the nightly build (June 10 and prior). But I fixed this in head.
4. The old menu name is not visible on windows7 with wx-master + 4k 27inch display in the settings on windows (this is with the latest night build)I'll try this on a VMWare Windows 7, but I don't have access to such a nice monitor. What do you mean by "wx-master" on "lastest night build" I thought the nightly builds were using 3.1 on windows. And I've I made major fixes since the latest nightly build (june 10).
5. I have ctrl-f4 instead of ctrl-w for file->close file?Both probably work. Keybinder now preserves the global accelerators set in main.cpp . Somehow the global shortcut got set as the first accelerator. Please attach your cbKeybinder.ini file so I can try to recreate the problem.
6. The json file is not sorted, so it is hard to compare with another version. It would be really good if this is sortedI agree. I'll put it on the todo list.
7. The json file contains all the keybindings. I think it would be better if it stores only the user specified bindings and leave everything else as default.I'll put this on the todo list to see what happens.
8. Can we really make a introspecting keybinder work reliably? Wouldn't it be better if we specify commands using code? VStudio has such an approach. And this would make it possible to have the sublime/vscode command windows.I don't know yet what any of this means. I'll do some googling.
I'm on gentoo linux, wx3.0.4+patch and wx-master+asan. Both wx versions behave the same sort of.I'll try to create a VMWare gentoo. But it looks really complicated. It will take some time. I can't find an ISO image like Ubuntu or Mint that VMware Player can just load and run without all that configuration voodoo.
rm ~/.config/codeblocks/debug* -v
2. ctrl-shift-. and ctrl-shift-t doesn't work on a fresh config. [snip] ...Accelerators are now fixed. svn rev:11764 .
5. I've found this problem because ctrl-w didn't work.
9. alt-pgup/alt-pgdown doesn't work for me. They should be set to prev/next bookmark, but they don't work. :(
But I see a single cbKeyBinder10.ini. Does this mean that it is common for all personalities?
3. Is still broken.Quote from: oBFusCATed on June 27, 2019, 10:23:34 am3. The new keybinder failed to parse the old config and lost all my bindings
4. The old menu name is not visible on windows7 with wx-master + 4k 27inch display in the settings on windows (this is with the latest night build)
if exist ..\..\lib\gcc_dll\libwxregexu.a del ..\..\lib\gcc_dll\libwxregexu.a
ar rcu ..\..\lib\gcc_dll\libwxregexu.a gcc_mswudll\wxregex_regcomp.o gcc_mswudll\wxregex_regexec.o gcc_mswudll\wxregex_regerror.o gcc_mswudll\wxregex_regfree.o
ranlib ..\..\lib\gcc_dll\libwxregexu.a
mingw32-make: *** No rule to make target '../../src/zlib/adler32.c', needed by 'gcc_mswudll\wxzlib_adler32.o'. Stop.
Did you forget to update the submodules or did you fetch them at all?
4. The old menu name is not visible on windows7 with wx-master + 4k 27inch display in the settings on windows (this is with the latest night build)
Another problem I've discovered is that a v2 file saved with wx28 build doesn't work on wx313 build on linux. I've tried relatively recent build. Please let me know if you need more details.Are there any instructions anywhere to install wx313 on linux. Mint19 only has 3.0
Another problem I've discovered is that a v2 file saved with wx28 build doesn't work on wx313 build on linux. I've tried relatively recent build. Please let me know if you need more details.
Yes, I'm migrating from v2 to v2, but for some reason the file generated by v2.wx28 doesn't work correctly with v2.wx31.
I've custom keybindings - ctrl-shift-f for view -> focus thread search is an example.
I have a centos7 build which is wx28. This is my regular build I use every day. It is not the latest version, but it is pretty new.
I want to migrate to wx3.x and I'm experimenting with a centos7 build which is using wx3.1.3.
This means that I was using wx28 for some time, then I've installed the new build which is now wx3.1.3 and I've discovered this breakage.
Today I've had the ctrl-w stop working and tried to rectify the situation, but then I've got this message "KeyBinding file corrupted. Please delete". What should I delete?
See the attached config file.
Today I've had the ctrl-w stop working and tried to rectify the situation, but then I've got this message "KeyBinding file corrupted. Please delete". What should I delete?
See the attached config file.
You must be using an old version of keybinder. That event was fixed a few revision ago.
That message does not exist anymore.
Today I've had the ctrl-w stop working and tried to rectify the situation, but then I've got this message "KeyBinding file corrupted. Please delete". What should I delete?
See the attached config file.
You must be using an old version of keybinder. That event was fixed a few revision ago.
That message does not exist anymore.
I've been able to re-create this problem. Am now working on it.
It's caused by using a <personality>.cbKeyBinder20.conf file from one build on a different build. The menu id's don't match.
Is there any reason you're storing random numerical ids?
Isn't it possible to use the menu item label (before translation) as an identifier instead?
I've lost all my shortcuts again. I'm on 11979.
See the config file attached.
Does the plugin logs when it fails to set a shortcut? I don't see any error/warning messages.
* Keybinder 2.0.11 2020/03/02 fix missing/conflicting shortcuts when using older .conf on newer build
- Check for mismatched menu id's to global accelerators id's
Cf.,This will allow a global to override an old menu item.This happends when a new build does not match the current .conf file
The non-matching .conf menu item has an incorrect id anyway.
- When a .conf menu id matches a default( current structure) menu id, also make sure the menu path (parentMenu) also matches.
It can mismatch when using a keybinder .conf configured from a previously built version of CodeBlocks on a newer build.
- Set the global accelerators table before calling Initilaize::Update() else globals are missed on the first invocation of KeyBinder/Configure.
git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@11974 2a5c6006-c6dd-42ca-98ab-0921f2732cef
I've lost all my shortcuts again. I'm on 11979.
See the config file attached.
Does the plugin logs when it fails to set a shortcut? I don't see any error/warning messages.
Should I pick this for 20.xx?
What happens if there are duplicate menu items? How does it handle it?
I'll test it myself a day or two and then it will go to 20.xx...
BTW: Is this a regression relative to 17.12. I've never been able to preserve my keybinder settings for years. If this is not a regression, I'd rather prefer not to delay the release even further...
If the problem existed in 17.12 then not fixing it in 20.xx is not a regression. If problem wasn't there and it exists now then it is a regression. The idea of this is if the software got worse and not better.
I don't deny this. I don't know if it is worth it to do rebuilds.
I've lost my local bindings once more. Rev 12012 at the moment.
Would it be possible to implement storing only non-default bindings (the ones I've actually set (only 3 at the moment))?
It will make debugging this a bit easier.
When are keybindings applied? Can the plugin change bindings in the middle of the execution?
Would it be possible to print an error when reading the bindings fails?
My C::B is crashing a lot, so it might be corrupting the files, but I'm finding about this corrupting late.
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/cbkeybinder.o: in function `cbKeyBinder::cbKeyBinder()':
/var/tmp/portage/dev-util/codeblocks-9999-r24/work/codeblocks-9999/src/plugins/contrib/keybinder/cbkeybinder.cpp:75: undefined reference to `vtable for cbKeyBinder'
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/cbkeybinder.o: in function `cbKeyBinder::~cbKeyBinder()':
/var/tmp/portage/dev-util/codeblocks-9999-r24/work/codeblocks-9999/src/plugins/contrib/keybinder/cbkeybinder.cpp:87: undefined reference to `vtable for cbKeyBinder'
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/cbkeybinder.o: in function `cbKeyBinder::CreateKeyBindDefaultFile(bool)':
/var/tmp/portage/dev-util/codeblocks-9999-r24/work/codeblocks-9999/src/plugins/contrib/keybinder/cbkeybinder.cpp:478: undefined reference to `cbKeyBinder::GetTempOldFmtMnuScanFilename()'
My build failed with this.
Code/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/cbkeybinder.o: in function `cbKeyBinder::cbKeyBinder()':
/var/tmp/portage/dev-util/codeblocks-9999-r24/work/codeblocks-9999/src/plugins/contrib/keybinder/cbkeybinder.cpp:75: undefined reference to `vtable for cbKeyBinder'
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/cbkeybinder.o: in function `cbKeyBinder::~cbKeyBinder()':
/var/tmp/portage/dev-util/codeblocks-9999-r24/work/codeblocks-9999/src/plugins/contrib/keybinder/cbkeybinder.cpp:87: undefined reference to `vtable for cbKeyBinder'
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/cbkeybinder.o: in function `cbKeyBinder::CreateKeyBindDefaultFile(bool)':
/var/tmp/portage/dev-util/codeblocks-9999-r24/work/codeblocks-9999/src/plugins/contrib/keybinder/cbkeybinder.cpp:478: undefined reference to `cbKeyBinder::GetTempOldFmtMnuScanFilename()'
My build failed with this. Also the build on travis has failed too https://travis-ci.org/github/obfuscated/codeblocks_sf/builds/671985456
I don't know what you've done, but the last commit broke the eol characters in git. They are now the windows style on linux. This is something which must not happen. Can you try to fix it? I suppose the same problem is happening with svn.
I don't know what you've done, but the last commit broke the eol characters in git. They are now the windows style on linux. This is something which must not happen. Can you try to fix it? I suppose the same problem is happening with svn.
How do I fix it? I commit from windows. Is windows suppose to have only a linefeed?
Now if thats not asking for trouble
pecan@LinuxMint19:~/proj/cbBeta30/trunk/src/plugins/contrib/keybinder$ svn commit -m "- Keybinder - Convert windows CRLF to Linux LF"
svn: E170001: Commit failed (details follow):
svn: E170001: Authorization failed
svn update
cd [to the keybinder plugin dir]
dos2unix *.h
dos2unix *.cpp
svn status -u #Just to see the changed filenames
svn commit -m "- KeyBinder - Convert CRLF to LF"
It says Authorization failed, if you didn't enter any credentials delete your stored authentication data (somewhere in .svn in your home directory, don't know exact location).
But you don't have to run these linux tools, simply set the svn:eol-style property to native on all source files and you get the conversion for free. Unless you have already mixed eol, that you can fix with e.g. Notepad++ easily on the windows side.
{
+ // FIXME (ph#):This call crashes KeyBinder, I'll fix soon.
+ if (lb->GetPageText(selection) == wxT("Keyboard shortcuts")) break;
Code{
+ // FIXME (ph#):This call crashes KeyBinder, I'll fix soon.
+ if (lb->GetPageText(selection) == wxT("Keyboard shortcuts")) break;
What is this? If you don't have this method implemented it should not crash! But you have to rebuild properly!!!
This doesn't probably work on translated C::Bs...
This happens because you have a duplicate configurationpanel.h file which doesn't have this method. I don't know why you do this but I doubt it is a good idea.
Next time when you have a problem with a change I've made, you can tell me. :)
I don't like it because there is not need to put workarounds in the code. It is fine if trunk/master is broken for some time. If someone is affected he/she can revert the commit that is causing the problem.
BTW: Connecting events to the parent is not a good idea in my opinion. It is too fragile if someday we decide to change the UI of the config dialogs.
I'm talking about the page-changed and destroyed events. For the latter - why do you needed? Can't you use the cancel/apply methods implementations?
If there is something missing from the API it is better to add it. Applying workarounds leads to more work in the future.
A new problem, mix of languages :
Usually, I use a translated version of C::B, in french. Sometimes, I need to switch the interface to English, at least to verify the exact word used in the original interface.
After my last switch, I have seen this dialog (see attachment). The sentence, describing the conflict in English and french are the same, as if there where a mix of languages.
(svn 12069, but may be appeared before).
And in Settings/Environmement/Keyboard Shortcuts Ctrl-W and Ctrl-Shift-W appears twice.
I tried to delete one of them in the right part, but it's not sufficient. I have to delete All to avoid this warning.
gd_on
A new problem, mix of languages :
Usually, I use a translated version of C::B, in french. Sometimes, I need to switch the interface to English, at least to verify the exact word used in the original interface.
After my last switch, I have seen this dialog (see attachment). The sentence, describing the conflict in English and french are the same, as if there where a mix of languages.
(svn 12069, but may be appeared before).
And in Settings/Environmement/Keyboard Shortcuts Ctrl-W and Ctrl-Shift-W appears twice.
I tried to delete one of them in the right part, but it's not sufficient. I have to delete All to avoid this warning.
gd_on
A new problem, mix of languages :
Usually, I use a translated version of C::B, in french. Sometimes, I need to switch the interface to English, at least to verify the exact word used in the original interface.
After my last switch, I have seen this dialog (see attachment). The sentence, describing the conflict in English and french are the same, as if there where a mix of languages.
(svn 12069, but may be appeared before).
And in Settings/Environmement/Keyboard Shortcuts Ctrl-W and Ctrl-Shift-W appears twice.
I tried to delete one of them in the right part, but it's not sufficient. I have to delete All to avoid this warning.
gd_on